← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1598219] [NEW] Networking API v2.0 (CURRENT): Create subnet Request parameters missing the 'no-gateway' option.

 

You have been subscribed to a public bug:

http://developer.openstack.org/api-ref-networking-v2.html

Create subnet Request parameters missing the 'no-gateway' option.

localadmin@qa4:~/devstack$ neutron subnet-create --help
usage: neutron subnet-create [-h] [-f {html,json,shell,table,value,yaml}]
                             [-c COLUMN] [--max-width <integer>] [--noindent]
                             [--prefix PREFIX] [--request-format {json,xml}]
                             [--tenant-id TENANT_ID] [--name NAME]
                             [--gateway GATEWAY_IP | --no-gateway]     <<<<<<<<<
                             [--allocation-pool start=IP_ADDR,end=IP_ADDR]
                             [--host-route destination=CIDR,nexthop=IP_ADDR]
                             [--dns-nameserver DNS_NAMESERVER]
                             [--disable-dhcp] [--enable-dhcp]
                             [--ip-version {4,6}]
                             [--ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]
                             [--ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]
                             [--subnetpool SUBNETPOOL]
                             [--prefixlen PREFIX_LENGTH]
                             NETWORK [CIDR]

Create a subnet for a given tenant.

positional arguments:
  NETWORK               Network ID or name this subnet belongs to.
  CIDR                  CIDR of subnet to create.

optional arguments:
  -h, --help            show this help message and exit
  --request-format {json,xml}
                        The XML or JSON request format.
  --tenant-id TENANT_ID
                        The owner tenant ID.
  --name NAME           Name of this subnet.
  --gateway GATEWAY_IP  Gateway IP of this subnet.
  --no-gateway          No distribution of gateway.     <<<<<<<<


localadmin@qa4:~/devstack$ neutron --debug subnet-create --name my-subnet --no-gateway <<<<<<< my-net 1.1.1.0/24
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://172.29.85.228:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG: keystoneclient.session RESP: [200] Content-Length: 339 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.7 (Ubuntu) Connection: Keep-Alive Date: Fri, 01 Jul 2016 14:57:31 GMT Content-Type: application/json x-openstack-request-id: req-47f66134-62d8-4cf8-a979-99eacbdb1069 
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://172.29.85.228:5000/v2.0/";, "rel": "self"}, {"href": "http://docs.openstack.org/";, "type": "text/html", "rel": "describedby"}]}}

DEBUG: stevedore.extension found extension EntryPoint.parse('table = cliff.formatters.table:TableFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('json = cliff.formatters.json_format:JSONFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('shell = cliff.formatters.shell:ShellFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('value = cliff.formatters.value:ValueFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('yaml = cliff.formatters.yaml_format:YAMLFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('html = clifftablib.formatters:HtmlFormatter')
DEBUG: neutronclient.neutron.v2_0.subnet.CreateSubnet get_data(Namespace(allocation_pools=None, cidr=u'1.1.1.0/24', columns=[], disable_dhcp=False, dns_nameservers=None, enable_dhcp=False, formatter='table', gateway=None, host_routes=None, ip_version=4, ipv6_address_mode=None, ipv6_ra_mode=None, max_width=0, name=u'my-subnet', network_id=u'my-net', no_gateway=True, noindent=False, prefix='', prefixlen=None, request_format='json', subnetpool=None, tenant_id=None, variables=[]))
DEBUG: keystoneclient.auth.identity.v2 Making authentication request to http://172.29.85.228:5000/v2.0/tokens
DEBUG: stevedore.extension found extension EntryPoint.parse('router_scheduler = neutronclient.neutron.v2_0.cisco.routerscheduler')
DEBUG: stevedore.extension found extension EntryPoint.parse('hosting_devices = neutronclient.neutron.v2_0.cisco.hostingdevice')
DEBUG: stevedore.extension found extension EntryPoint.parse('router_types = neutronclient.neutron.v2_0.cisco.routertype')
DEBUG: stevedore.extension found extension EntryPoint.parse('hosting_device_scheduler = neutronclient.neutron.v2_0.cisco.hostingdevicescheduler')
DEBUG: stevedore.extension found extension EntryPoint.parse('hosting_device_templates = neutronclient.neutron.v2_0.cisco.hostingdevicetemplate')
DEBUG: stevedore.extension found extension EntryPoint.parse('hosting_devices = networking_cisco.neutronclient.hostingdevice')
DEBUG: stevedore.extension found extension EntryPoint.parse('router_types = networking_cisco.neutronclient.routertype')
DEBUG: stevedore.extension found extension EntryPoint.parse('policy_profile = networking_cisco.neutronclient.policyprofile')
DEBUG: stevedore.extension found extension EntryPoint.parse('hosting_device_templates = networking_cisco.neutronclient.hostingdevicetemplate')
DEBUG: stevedore.extension found extension EntryPoint.parse('router_scheduler = networking_cisco.neutronclient.routerscheduler')
DEBUG: stevedore.extension found extension EntryPoint.parse('network_profile = networking_cisco.neutronclient.networkprofile')
DEBUG: stevedore.extension found extension EntryPoint.parse('hosting_device_scheduler = networking_cisco.neutronclient.hostingdevicescheduler')
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://172.29.85.228:9696/v2.0/networks.json?fields=id&name=my-net -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}ba0eb119408665ed65e1b6f2bce556a019dd03f6"
DEBUG: keystoneclient.session RESP: [200] Date: Fri, 01 Jul 2016 14:57:32 GMT Connection: keep-alive Content-Type: application/json; charset=UTF-8 Content-Length: 62 X-Openstack-Request-Id: req-c713240f-db4a-41c6-9266-a2b71846ea2f 
RESP BODY: {"networks": [{"id": "3cb83644-568c-4227-b3ae-f7c02066a021"}]}

DEBUG: keystoneclient.session REQ: curl -g -i -X POST http://172.29.85.228:9696/v2.0/subnets.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}ba0eb119408665ed65e1b6f2bce556a019dd03f6" -d '{"subnet": {"network_id": "3cb83644-568c-4227-b3ae-f7c02066a021", "ip_version": 4, "cidr": "1.1.1.0/24", "gateway_ip": null, "name": "my-subnet"}}'
DEBUG: keystoneclient.session RESP: [201] Date: Fri, 01 Jul 2016 14:57:32 GMT Connection: keep-alive Content-Type: application/json; charset=UTF-8 Content-Length: 533 X-Openstack-Request-Id: req-ed6db0ed-b6ed-424c-8711-12ce87ae7d08 
RESP BODY: {"subnet": {"description": "", "enable_dhcp": true, "network_id": "3cb83644-568c-4227-b3ae-f7c02066a021", "tenant_id": "11490fe658324835893b1ba1852d6313", "created_at": "2016-07-01T14:57:32", "dns_nameservers": [], "updated_at": "2016-07-01T14:57:32", "gateway_ip": null, "ipv6_ra_mode": null, "allocation_pools": [{"start": "1.1.1.1", "end": "1.1.1.254"}], "host_routes": [], "ip_version": 4, "ipv6_address_mode": null, "cidr": "1.1.1.0/24", "id": "251065a1-c168-4956-8a21-806e7de67970", "subnetpool_id": null, "name": "my-subnet"}}

Created a new subnet:
+-------------------+------------------------------------------+
| Field             | Value                                    |
+-------------------+------------------------------------------+
| allocation_pools  | {"start": "1.1.1.1", "end": "1.1.1.254"} |
| cidr              | 1.1.1.0/24                               |
| created_at        | 2016-07-01T14:57:32                      |
| description       |                                          |
| dns_nameservers   |                                          |
| enable_dhcp       | True                                     |
| gateway_ip        |                                          |
| host_routes       |                                          |
| id                | 251065a1-c168-4956-8a21-806e7de67970     |
| ip_version        | 4                                        |
| ipv6_address_mode |                                          |
| ipv6_ra_mode      |                                          |
| name              | my-subnet                                |
| network_id        | 3cb83644-568c-4227-b3ae-f7c02066a021     |
| subnetpool_id     |                                          |
| tenant_id         | 11490fe658324835893b1ba1852d6313         |
| updated_at        | 2016-07-01T14:57:32                      |
+-------------------+------------------------------------------+

** Affects: neutron
     Importance: Undecided
     Assignee: Danny Choi (dannchoi)
         Status: In Progress

-- 
Networking API v2.0 (CURRENT): Create subnet Request parameters missing the 'no-gateway' option.
https://bugs.launchpad.net/bugs/1598219
You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron.