Use openstacksdk for update_port_pci_info function.
Implements: blueprint switch-to-openstacksdk
@@ -525,16 +525,10 @@ def get_namespace(namespace_name):
def update_port_pci_info(pod, vif):
node = get_host_id(pod)
annot_port_pci_info = get_port_annot_pci_info(node, vif.id)
- neutron = clients.get_neutron_client()
+ os_net = clients.get_network_client()
LOG.debug("Neutron port %s is updated with binding:profile info %s",
vif.id, annot_port_pci_info)
- neutron.update_port(
- vif.id,
- {
- "port": {
- 'binding:profile': annot_port_pci_info
- }
- })
+ os_net.update_port(vif.id, binding_profile=annot_port_pci_info)
def get_port_annot_pci_info(nodename, neutron_port):
