@@ -3693,25 +3693,6 @@ def _get_port_pci_dev(self, context, instance, port):
3693
3693
return None
3694
3694
return device
3695
3695
3696
- def _update_port_pci_binding_profile (self , pci_dev , binding_profile ):
3697
- """Update the binding profile dict with new PCI device data.
3698
-
3699
- :param pci_dev: The PciDevice object to update the profile with.
3700
- :param binding_profile: The dict to update.
3701
- """
3702
- binding_profile .update ({'pci_slot' : pci_dev .address })
3703
- if binding_profile .get ('card_serial_number' ):
3704
- binding_profile .update ({
3705
- 'card_serial_number' : pci_dev .card_serial_number })
3706
- if binding_profile .get ('pf_mac_address' ):
3707
- binding_profile .update ({
3708
- 'pf_mac_address' : pci_utils .get_mac_by_pci_address (
3709
- pci_dev .parent_addr )})
3710
- if binding_profile .get ('vf_num' ):
3711
- binding_profile .update ({
3712
- 'vf_num' : pci_utils .get_vf_num_by_pci_address (
3713
- pci_dev .address )})
3714
-
3715
3696
def _update_port_binding_for_instance (
3716
3697
self , context , instance , host , migration = None ,
3717
3698
provider_mappings = None ):
@@ -3780,8 +3761,9 @@ def _update_port_binding_for_instance(
3780
3761
else :
3781
3762
pci_dev = self ._get_port_pci_dev (context , instance , p )
3782
3763
if pci_dev :
3783
- self ._update_port_pci_binding_profile (pci_dev ,
3784
- binding_profile )
3764
+ binding_profile .update (
3765
+ self ._get_pci_device_profile (pci_dev )
3766
+ )
3785
3767
updates [constants .BINDING_PROFILE ] = binding_profile
3786
3768
3787
3769
# NOTE(gibi): during live migration the conductor already sets the
0 commit comments