Consume VF capacity from the right place
networking-powervm change set I91dc7cf5820bbdd66af80e8f492a80d03c21c02e ensures that the VF capacity comes through in vif['details']['capacity'] regardless of whether it was configured in the ml2 config or the binding:profile. This change set accomodates by always grabbing the value from that location. Change-Id: I086220bf879028df5946b02e756b803aefb0d17e
This commit is contained in:
@@ -230,12 +230,11 @@ class FakeDirectVif(dict):
|
||||
details={
|
||||
'vlan': '79',
|
||||
'physical_ports': [],
|
||||
'redundancy': 3},
|
||||
'redundancy': 3,
|
||||
'capacity': cap},
|
||||
profile={})
|
||||
if pports is not None:
|
||||
self['details']['physical_ports'] = pports
|
||||
if cap is not None:
|
||||
self['profile']['capacity'] = cap
|
||||
|
||||
def get_physical_network(self):
|
||||
return self._physnet
|
||||
|
||||
@@ -508,8 +508,8 @@ class PvmVnicSriovVifDriver(PvmVifDriver):
|
||||
# Redundancy: plugin sets from binding:profile, then conf, then default
|
||||
redundancy = int(vif['details']['redundancy'])
|
||||
|
||||
# Capacity: from binding:profile or pport default
|
||||
capacity = vif['profile'].get('capacity')
|
||||
# Capacity: plugin sets from binding:profile, then conf, then default
|
||||
capacity = vif['details']['capacity']
|
||||
|
||||
vnic = pvm_card.VNIC.bld(
|
||||
self.adapter, vlan_id, slot_num=slot_num, mac_addr=mac_address,
|
||||
|
||||
Reference in New Issue
Block a user