virtual_network_update fails after del_network_ipam
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenContrail |
Triaged
|
Undecided
|
Hampapur Ajay |
Bug Description
If you try to update virtual network with information that network_ipam was deleted it will fail.
Reproduction :
vnc_lib - VncApi object
>>> vn_blue_obj = VirtualNetwork(
>>> _vnc_lib.
u'97233eaf-
>>> vn_obj = _vnc_lib.
>>> vn_obj.
>>> _vnc_lib.
u'{"virtual-
>>> vn_obj_upd = _vnc_lib.
>>> vn_obj_
>>> _vnc_lib.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
self.
File "/usr/lib/
raise he
cfgm_common.
full stacktrace from screen-apiSrv.log http://
tags: | added: api config |
AFAIK,
The problem here comes from the fact that the example in the docs is incorrect.
To create a subnet, we need to provide a specific IPAM. add_network_ ipam(NetworkIpa m(),VnSubnetsTy pe([IpamSubnetT ype(subnet = SubnetType( '10.1.1. 0', 24))]))
Thie example:
vn_obj.
is using a NetworkIpam() object that is transient. The code will work if the client looks for an existing Ipam object (such as the default-ipam). It is unclear to me whether this results in a transient Ipam() actually being created by the API server.
The delete with another transient object will fail.
This should be a documentation bug, AFAIK. Ajay, please confirm.