Commit 875d06d0 authored by David Johnson's avatar David Johnson

Extend the Nova VM name hack in 9ef9388c.

For whatever reason, when you create VMs from the command line Nova
client, the Neutron port "device_owner" field is "compute:None",
instead of "compute:nova" when you create from the Dashboard.

Sigh... why does stuff like this happen?
parent 7830bee8
Pipeline #1245 skipped
......@@ -2072,7 +2072,8 @@ class CapnetNeutronAgent(service.Service):
cn_binding['host'] =
# XXX: if Nova VM, figure out the name -- ugh.
if device_details['device_owner'] == 'compute:nova':
if device_details['device_owner'] == 'compute:nova' \
or device_details['device_owner'].startswith('compute:'):
vm_name = self.__find_vm_name(port.port_name)
if vm_name:
cn_binding['dns_name'] = vm_name
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment