Wrong network address

asked 2017-04-05 23:26:48 -0500

Weiming gravatar image

updated 2017-04-06 02:22:38 -0500

I configured an interface with a network address 192.168.0.130, but the following code gives the address as 192.168.0.153, and every time I ran the following code, the address increased incrementally, i.e., 154, 155, 156, ...

from novaclient import client

nova = client.Client(VERSION, USERNAME, PASSWORD, PROJECT_ID, AUTH_URL)
router = self.nova.servers.get(router_id)
address_map = router.addresses[network['name']]
address = address_map[0]['addr']

Is the above code correct in Mitaka release? Does it fit Mitaka or older release such as Liberty?

edit retag flag offensive close merge delete