]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
NetApp FC drivers should not set 'rw' access mode
authorClinton Knight <cknight@netapp.com>
Mon, 4 Jan 2016 19:05:40 +0000 (14:05 -0500)
committerClinton Knight <cknight@netapp.com>
Tue, 5 Jan 2016 20:36:00 +0000 (20:36 +0000)
The volume manager is responsible for setting the initiator access
mode in initialize_connection based on volume metadata.  The NetApp
FC drivers currently hardcode the access mode to 'rw'.  So the fix
is to stop setting the access_mode value in the connection info that
is returned from the NetApp drivers.

Partial-Bug: 1526152
Change-Id: I587bba62ebfc067bb362ce95b324b4a74c0e02d0

cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py
cinder/tests/unit/volume/drivers/netapp/eseries/test_library.py
cinder/volume/drivers/netapp/dataontap/block_base.py
cinder/volume/drivers/netapp/eseries/library.py

index b110038d305541acf5d1e2487389209f4042d239..981f71c450fd2ce4bf404e1756a1face865986e4 100644 (file)
@@ -101,7 +101,6 @@ FC_FABRIC_MAP = {'fabricB':
 FC_TARGET_INFO = {'driver_volume_type': 'fibre_channel',
                   'data': {'target_lun': 1,
                            'initiator_target_map': FC_I_T_MAP,
-                           'access_mode': 'rw',
                            'target_wwn': FC_TARGET_WWPNS,
                            'target_discovered': True}}
 
index 66d6663d8a75067ede9fb5d59d7b71f7b9e85c57..b8bb6abce4f57aef77e40a6c378c648526b52671 100644 (file)
@@ -828,7 +828,6 @@ class NetAppEseriesLibraryTestCase(test.TestCase):
                 'target_discovered': True,
                 'target_lun': 0,
                 'target_wwn': [eseries_fake.WWPN_2],
-                'access_mode': 'rw',
                 'initiator_target_map': {
                     eseries_fake.WWPN: [eseries_fake.WWPN_2]
                 },
index 8db15678dca846a040ae433ac981497610bda19a..8532a4571009427e16b2ade9091b7bbd3c5d8433 100644 (file)
@@ -786,7 +786,6 @@ class NetAppBlockStorageLibrary(object):
                     'target_discovered': True,
                     'target_lun': 1,
                     'target_wwn': '500a098280feeba5',
-                    'access_mode': 'rw',
                     'initiator_target_map': {
                         '21000024ff406cc3': ['500a098280feeba5'],
                         '21000024ff406cc2': ['500a098280feeba5']
@@ -803,7 +802,6 @@ class NetAppBlockStorageLibrary(object):
                     'target_lun': 1,
                     'target_wwn': ['500a098280feeba5', '500a098290feeba5',
                                    '500a098190feeba5', '500a098180feeba5'],
-                    'access_mode': 'rw',
                     'initiator_target_map': {
                         '21000024ff406cc3': ['500a098280feeba5',
                                              '500a098290feeba5'],
@@ -839,7 +837,6 @@ class NetAppBlockStorageLibrary(object):
                        'data': {'target_discovered': True,
                                 'target_lun': int(lun_id),
                                 'target_wwn': target_wwpns,
-                                'access_mode': 'rw',
                                 'initiator_target_map': initiator_target_map}}
 
         return target_info
index d4d15e0ef37670b5126cb6ca9290d1a93c843d37..c087abcad1043d3a0990720f9917dcff463c3ca6 100644 (file)
@@ -692,7 +692,6 @@ class NetAppESeriesLibrary(object):
                     'target_discovered': True,
                     'target_lun': 1,
                     'target_wwn': '500a098280feeba5',
-                    'access_mode': 'rw',
                     'initiator_target_map': {
                         '21000024ff406cc3': ['500a098280feeba5'],
                         '21000024ff406cc2': ['500a098280feeba5']
@@ -709,7 +708,6 @@ class NetAppESeriesLibrary(object):
                     'target_lun': 1,
                     'target_wwn': ['500a098280feeba5', '500a098290feeba5',
                                    '500a098190feeba5', '500a098180feeba5'],
-                    'access_mode': 'rw',
                     'initiator_target_map': {
                         '21000024ff406cc3': ['500a098280feeba5',
                                              '500a098290feeba5'],
@@ -744,7 +742,6 @@ class NetAppESeriesLibrary(object):
                        'data': {'target_discovered': True,
                                 'target_lun': int(lun_id),
                                 'target_wwn': target_wwpns,
-                                'access_mode': 'rw',
                                 'initiator_target_map': initiator_target_map}}
 
         return target_info