add_network_ipam doesn't work correctly for update
Bug #1381082 reported by
Jacek Świderski
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenContrail |
New
|
Undecided
|
Hampapur Ajay |
Bug Description
Part of generated method add_network_ipam responsible for updating attr (and since its generated there might be more problems like this) doesn't work :
(...)
# if ref already exists, update any attr with it
for ref in refs:
if ref['to'] == ref_obj.
ref = {'to':ref_
if ref_obj.uuid:
return
(...)
this code doesn't modify refs list in any way - it remains the same because it only changes what ref "points to" and not refs content - like this :
>>> a = ["aaa","bbb"]
>>> a
['aaa', 'bbb']
>>> for item in a:
... item = "ccc"
...
>>> a
['aaa', 'bbb']
Changed in opencontrail: | |
status: | Incomplete → New |
tags: | added: api config |
To post a comment you must log in.
Jacek,
Can you please provide a working example of this problem ?
i.e. from the API client generate a subnet as an attribute to a specific IPAM; then generate a modification.
My understanding is that modifying the subnet prefix is possible today and that we do have tests for that.