def bind_port(self, context)
2020-06-08 19:24:05.615 54668 DEBUG neutron.plugins.ml2.managers [req-737d8789-ad68-42d8-adab-0334f94509e6 fde919fba81146bfa6a74a5a8e483f45 42272601916748e2ba64d8a1c5413ba4 - default default] Attempting to bind port fe63f730-8d74-4936-aa4c-5b4112d11640 on host c2b298f4-3fdf-44fb-b67d-efefca11dbf9 for vnic_type baremetal with profile {"local_link_information": [{"switch_info": "JG05-SA-01-CE8850", "port_id": "100GE1/0/12", "switch_id": "30:e9:8e:e0:0e:21"}]} bind_port /usr/lib/python2.7/site-packages/neutron/plugins/ml2/managers.py:745 [root@bogon neutron]# neutron port-show fe63f730-8d74-4936-aa4c-5b4112d11640 neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. +-----------------------+--------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +-----------------------+--------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | True | | allowed_address_pairs | | | binding:host_id | c2b298f4-3fdf-44fb-b67d-efefca11dbf9 | | binding:profile | {"local_link_information": [{"switch_info": "JG05-SA-01-CE8850", "port_id": "100GE1/0/12", "switch_id": "30:e9:8e:e0:0e:21"}]} | | binding:vif_details | {} | | binding:vif_type | other | | binding:vnic_type | baremetal | | created_at | 2020-06-08T11:15:04Z | | description | | | device_id | e621ae44-34fd-40cb-8562-870caf408131 | | device_owner | compute:nova | | extra_dhcp_opts | | | fixed_ips | {"subnet_id": "479cefc6-9df2-4f0a-ab1d-6c0248816d22", "ip_address": "172.16.101.29"} | | id | fe63f730-8d74-4936-aa4c-5b4112d11640 | | mac_address | ac:8d:34:89:ae:ec | | name | | | network_id | d25bad06-1316-4321-837e-9dde06147c05 | | port_security_enabled | True | | project_id | 46cc02c6fab04f7095c4bc687d397610 | | revision_number | 17 | | security_groups | e70c2156-a68d-4343-a167-4caffee8c643 | | status | ACTIVE | | tags | | | tenant_id | 46cc02c6fab04f7095c4bc687d397610 | | updated_at | 2020-06-08T11:24:06Z | +-----------------------+--------------------------------------------------------------------------------------------------------------------------------+ [root@bogon neutron]#
def _bind_port_level(self, context, level, segments_to_bind):
2020-06-08 19:24:05.616 54668 DEBUG neutron.plugins.ml2.managers [req-737d8789-ad68-42d8-adab-0334f94509e6 fde919fba81146bfa6a74a5a8e483f45 42272601916748e2ba64d8a1c5413ba4 - default default] Attempting to bind port fe63f730-8d74-4936-aa4c-5b4112d11640 on host c2b298f4-3fdf-44fb-b67d-efefca11dbf9 at level 0 using segments [{‘network_id‘: ‘d25bad06-1316-4321-837e-9dde06147c05‘, ‘segmentation_id‘: 101, ‘physical_network‘: u‘physnet_vlan‘, ‘id‘: ‘4b55b5de-7fc5-4da5-b422-2ebbed7a7fce‘, ‘network_type‘: u‘vlan‘}] _bind_port_level /usr/lib/python2.7/site-packages/neutron/plugins/ml2/managers.py:766
原文:https://www.cnblogs.com/dream397/p/13070603.html