Fix Datera driver export call
A previous commit 3fabed9d64 broke the
export call for the Datera driver. This allows the information to
correctly be accessed again.
Change-Id: I4775700e7a416bf5ebcb5e39f604b270e27f284d
Closes-Bug: #1466967
This commit is contained in:
@@ -328,35 +328,18 @@ class DateraVolumeTestCase(test.TestCase):
|
||||
|
||||
stub_create_export = {
|
||||
u'_ipColl': [u'172.28.121.10', u'172.28.120.10'],
|
||||
u'acls': {},
|
||||
u'activeServers': {u'4594953e-f97f-e111-ad85-001e6738c0f0': u'1'},
|
||||
u'ctype': u'TC_BLOCK_ISCSI',
|
||||
u'endpointsExt1': {
|
||||
u'4594953e-f97f-e111-ad85-001e6738c0f0': {
|
||||
u'ipHigh': 0,
|
||||
u'ipLow': u'192421036',
|
||||
u'ipStr': u'172.28.120.11',
|
||||
u'ipV': 4,
|
||||
u'name': u'',
|
||||
u'network': 24
|
||||
}
|
||||
},
|
||||
u'endpointsExt2': {
|
||||
u'4594953e-f97f-e111-ad85-001e6738c0f0': {
|
||||
u'ipHigh': 0,
|
||||
u'ipLow': u'192486572',
|
||||
u'ipStr': u'172.28.121.11',
|
||||
u'ipV': 4,
|
||||
u'name': u'',
|
||||
u'network': 24
|
||||
}
|
||||
},
|
||||
u'inodes': {u'c20aba21-6ef6-446b-b374-45733b4883ba': u'1'},
|
||||
u'name': u'',
|
||||
u'networkPort': 0,
|
||||
u'serverAllocation': u'TS_ALLOC_COMPLETED',
|
||||
u'servers': {u'4594953e-f97f-e111-ad85-001e6738c0f0': u'1'},
|
||||
u'targetAllocation': u'TS_ALLOC_COMPLETED',
|
||||
u'active_initiators': [],
|
||||
u'activeServers': [u'4594953e-f97f-e111-ad85-001e6738c0f0'],
|
||||
u'admin_state': u'online',
|
||||
u'atype': u'none',
|
||||
u'creation_type': u'system_explicit',
|
||||
u'endpoint_addrs': [u'172.30.128.2'],
|
||||
u'endpoint_idents': [u'iqn.2013-05.com.daterainc::01:sn:fc372bc0490b2dbe'],
|
||||
u'initiators': [],
|
||||
u'name': u'OS-a8b4d666',
|
||||
u'server_allocation': u'TS_ALLOC_COMPLETED',
|
||||
|
||||
u'servers': [u'4594953e-f97f-e111-ad85-001e6738c0f0'],
|
||||
u'targetIds': {
|
||||
u'4594953e-f97f-e111-ad85-001e6738c0f0': {
|
||||
u'ids': [{
|
||||
@@ -365,8 +348,11 @@ stub_create_export = {
|
||||
}]
|
||||
}
|
||||
},
|
||||
u'typeName': u'TargetIscsiConfig',
|
||||
u'uuid': u'7071efd7-9f22-4996-8f68-47e9ab19d0fd'
|
||||
|
||||
u'target_allocation': u'TS_ALLOC_COMPLETED',
|
||||
u'type': u'iscsi',
|
||||
u'uuid': u'7071efd7-9f22-4996-8f68-47e9ab19d0fd',
|
||||
u'volumes': []
|
||||
}
|
||||
|
||||
stub_get_export = {
|
||||
|
||||
@@ -177,12 +177,9 @@ class DateraDriver(san.SanISCSIDriver):
|
||||
'volumes', action='export', method='post',
|
||||
body={'ctype': 'TC_BLOCK_ISCSI'}, resource=volume['id'])
|
||||
|
||||
portal = "%s:3260" % export['_ipColl'][0]
|
||||
portal = "%s:3260" % export['endpoint_addrs'][0]
|
||||
|
||||
# NOTE(thingee): Refer to the Datera test for a stub of what this
|
||||
# looks like. We're just going to pull the first IP that the Datera
|
||||
# cluster makes available for the portal.
|
||||
iqn = next(export['targetIds'].values())['ids'][0]['id']
|
||||
iqn = export['endpoint_idents'][0]
|
||||
else:
|
||||
export = self._issue_api_request(
|
||||
'export_configs',
|
||||
|
||||
Reference in New Issue
Block a user