Method | URI | Description |
---|---|---|
GET | /v2.0/subnets/{subnet_id} | Shows information for a specified subnet. |
You can control which attributes are returned by using the fields query parameter. For information, see Filtering and Column Selection in the OpenStack Networking API v2.0 Reference.
Normal response codes: 201
Error response codes: unauthorized (401), itemNotFound (404)
This table shows the URI parameters for the show subnet request:
Name | Type | Description |
---|---|---|
| UUID | The UUID for the subnet of interest to you. |
This operation does not require a request body.
Example 3.27. Show subnet: JSON response
{ "subnet":{ "name":"my_subnet", "enable_dhcp":true, "network_id":"d32019d3-bc6e-4319-9c1d-6722fc136a22", "tenant_id":"4fd44f30292945e481c7b8a0c8908869", "dns_nameservers":[ ], "allocation_pools":[ { "start":"192.0.0.2", "end":"192.255.255.254" } ], "host_routes":[ ], "ip_version":4, "gateway_ip":"192.0.0.1", "cidr":"192.0.0.0/8", "id":"54d6f61d-db07-451c-9ab3-b9609b6b6f0b" } }
Example 3.28. Show subnet: XML response
<?xml version='1.0' encoding='UTF-8'?> <subnet xmlns="http://openstack.org/quantum/api/v2.0" xmlns:quantum="http://openstack.org/quantum/api/v2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <name>test_subnet_1</name> <enable_dhcp quantum:type="bool">True</enable_dhcp> <network_id>d32019d3-bc6e-4319-9c1d-6722fc136a22</network_id> <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id> <dns_nameservers quantum:type="list"/> <allocation_pools> <allocation_pool> <start>192.0.0.2</start> <end>192.255.255.254</end> </allocation_pool> </allocation_pools> <host_routes quantum:type="list"/> <ip_version quantum:type="long">4</ip_version> <gateway_ip>192.0.0.1</gateway_ip> <cidr>192.0.0.0/8</cidr> <id>54d6f61d-db07-451c-9ab3-b9609b6b6f0b</id> </subnet>
This operation does not return a response body.