Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

[nova-quantum] how to verify device_owner of port is nova(compute)

While asking quantum to create port when its creating instance, nova feels in following: zone = 'compute:%s' % instance['availability_zone'] port_req_body = {'port': {'device_id': instance['uuid'], 'device_owner': zone}}

So in quantum, if I want to know whether nova is the device_owner or not should I be checking something like following: if 'compute:' in port['device_owner']: ??

Or is there another cleaner way. context object passed as create_port's argument does not hold any information either.

Thanks Ronak

click to hide/show revision 2
readability, tags

[nova-quantum] how How to verify device_owner of port is nova(compute)nova(compute)?

While asking quantum to create port when its creating instance, nova feels in following: following:

zone = 'compute:%s' % instance['availability_zone']
             port_req_body = {'port': {'device_id': instance['uuid'],
                                       'device_owner': zone}}

zone}}

So in quantum, if I want to know whether nova is the device_owner or not should I be checking something like following: following:

if 'compute:' in port['device_owner']: ??

??

Or is there another cleaner way. context object passed as create_port's argument does not hold any information either.

Thanks Ronak