[openstack-dev] [Quantum] instance_id used as network device_id?

Akihiro MOTOKI amotoki at gmail.com
Tue Aug 7 11:07:18 UTC 2012


Hi Hua,

It is a behavior of nova with quantum-v2 integration.

In nova/network/quantumv2/api.py, instance uuid is passed as device_id for
each VIF as shown below. I think device_id should be assigned to each VIF and
it is a bug that multiple VIFs has the same device_id. How do you think?

Thanks
Akihiro MOTOKI

------------------------------------------------------------
class API(base.Base):
    def allocate_for_instance(self, context, instance, **kwargs):

        [...]

        for network in nets:
            port_req_body = {'port': {'network_id': network['id'],
                                      'admin_state_up': True,
                                      'device_id': instance['uuid'],
                                      'tenant_id': instance['project_id']},
            }
            try:
                created_port_ids.append(
                    quantumv2.get_client(context).create_port(
                        port_req_body)['port']['id'])

         [...]

------------------------------------------------------------

2012/8/7 Hua ZZ Zhang <zhuadl at cn.ibm.com>:
> Akihiro,
>
> From testing your latest patch 11 set of quantum/horizon, I found the the
> instance id was intentionly used as device id of the attached port. Is it
> expected for quantum implementation?  What kind of identification can be
> assigned to this field? thanks.
>
> Best Regards,
>
> -Zhang Hua (Edward)
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

-- 
Akihiro MOTOKI <amotoki at gmail.com>



More information about the OpenStack-dev mailing list