Comment 1 for bug 1381074

Revision history for this message
Pedro Marques (5-roque) wrote :

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.
Thie example:
   vn_obj.add_network_ipam(NetworkIpam(),VnSubnetsType([IpamSubnetType(subnet = SubnetType('10.1.1.0', 24))]))

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.