Change how we retrieve host wwpns from block_device_mapping
Nova commit [1] has changed the format of the block_device_mapping.
We need to adapt our way how we get the list of host wwpns.
[1] 0258cecaca
Change-Id: I852aeeb57c891c8bd1458c83feae05f58046eb8a
This commit is contained in:
parent
07055fe19e
commit
45b9e903ac
|
@ -22,9 +22,6 @@ LUN = 0
|
|||
BLOCK_DEVICE = {
|
||||
'connection_info': {
|
||||
'driver_volume_type': 'fibre_channel',
|
||||
'connector': {
|
||||
'wwpns': [PARTITION_WWPN],
|
||||
'host': '3cfb165c-0df3-4d80-87b2-4c353e61318f'},
|
||||
'data': {
|
||||
'initiator_target_map': {
|
||||
PARTITION_WWPN: [
|
||||
|
|
|
@ -31,7 +31,9 @@ class BlockDevice(object):
|
|||
|
||||
@property
|
||||
def host_wwpns(self):
|
||||
return self.bd['connection_info']['connector']['wwpns']
|
||||
return (
|
||||
self.bd['connection_info']['data']['initiator_target_map'].keys()
|
||||
)
|
||||
|
||||
def get_target_wwpn(self, partition_wwpn):
|
||||
if partition_wwpn not in self.host_wwpns:
|
||||
|
|
Loading…
Reference in New Issue