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.
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.