device_owner in openstack.network.v2.port.Port incorrect after creating instance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack SDK |
New
|
Undecided
|
Unassigned |
Bug Description
After wasting about 1h on chasing a problem, I noticed the cause was the openstack.
Here is a minimal example that demonstrates the issue:
----------
from openstack import connection
import json
import os
def get_connection_
conn = connection.
return conn
inputfile = my_credentials_file
with open(inputfile) as json_file:
json_string = json_file.read()
json_obj = json.loads(
username = json_obj[
password = json_obj[
auth_url_sdk = json_obj[
user_domain_name = json_obj[
project_domain_name = json_obj[
project_name = json_obj[
conn = get_connection_
compute_service = conn.compute
network_service = conn.network
image_service = conn.image
block_service = conn.block_store
# Network is using the id for 'private' and imageRef the id for 'Cirros'
compute_
name="Teste",
flavor_id=1,
networks=[{'uuid': '9ffae962-
security_
imageRef=
)
for i in network_
if i['device_owner'] == 'compute:None':
print i
tags: | added: network |
We just take the JSON that comes back in the device_owner field, so that's what the server is giving us.