Bug 1258400

Summary: Inconsistent between subnet-create & subnet-update command
Product: Red Hat OpenStack Reporter: Eran Kuris <ekuris>
Component: python-neutronclientAssignee: Nir Magnezi <nmagnezi>
Status: CLOSED WONTFIX QA Contact: Ofer Blaut <oblaut>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.0 (RHEL 7)CC: amuller, chrisw, ekuris, jruzicka, nyechiel, yeylon
Target Milestone: ---   
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-01 14:43:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eran Kuris 2015-08-31 09:48:09 UTC
Description of problem:
When creating subnet with allocation pool we using flag that calls :  " --allocation-pool"

the full command : 
$ neutron subnet-create external_network 10.35.166.0/24 --disable-dhcp --gateway 10.35.166.254  --allocation-pool start=10.35.166.1,end=10.35.166.100

When we want to update the subnet we need to use this flags : 
--allocation-pools type=dict list=true start=10.35.166.1,end=10.35.166.55

the full command is : 
[root@cougar16 ~(keystone_admin)]# neutron  subnet-update c609b9ce-18d7-4b44-b8e0-5354a7b92caa --allocation-pools type=dict list=true start=10.35.166.1,end=10.35.166.55
Updated subnet: c609b9ce-18d7-4b44-b8e0-5354a7b92caa



Version-Release number of selected component (if applicable):

[root@cougar16 ~(keystone_admin)]# rpm -qa |grep neutron 
openstack-neutron-2014.1.5-2.el7ost.noarch
python-neutronclient-2.3.4-3.el7ost.noarch
python-neutron-2014.1.5-2.el7ost.noarch
openstack-neutron-ml2-2014.1.5-2.el7ost.noarch
openstack-neutron-openvswitch-2014.1.5-2.el7ost.noarch
How reproducible:


Steps to Reproduce:
1.Install OSP 5 on  RHEL 7.1 
2.run the command : neutron net-create external_network --provider:network_type=vlan  --provider:segmentation_id=181 --provider:physical_network physnet --router:external

3.run the command : neutron subnet-create external_network 10.35.166.0/24 --disable-dhcp --gateway 10.35.166.254  --allocation-pool start=10.35.166.1,end=10.35.166.100

4. neutron subnet-update c609b9ce-18d7-4b44-b8e0-5354a7b92caa --allocation-pool start=10.35.166.1,end=10.35.166.90
Unrecognized attribute(s) 'allocation_pool'
Actual results:

5.neutron subnet-update c609b9ce-18d7-4b44-b8e0-5354a7b92caa --allocation-pools start=10.35.166.1,end=10.35.166.90
Invalid input for allocation_pools. Reason: Invalid data format for IP pool: 'start=10.35.166.1,end=10.35.166.90'.


Expected results:
the command in step 4 should work.

Additional info:
the command that work is : 
neutron  subnet-update c609b9ce-18d7-4b44-b8e0-5354a7b92caa --allocation-pools type=dict list=true start=10.35.166.1,end=10.35.166.55
Updated subnet: c609b9ce-18d7-4b44-b8e0-5354a7b92caa


Probably it reproduce in OSP 7

Comment 4 Assaf Muller 2015-09-01 14:43:44 UTC
Once again there's nothing downstream specific about this bug, there's no need to continue tracking it in RHBZ.

Comment 5 Eran Kuris 2015-10-06 05:39:57 UTC
Opened upstream bug  about this issue : 
https://bugs.launchpad.net/python-neutronclient/+bug/1490985