White Papers
Configuration details
36 Dell Storage Manager REST API Cookbook | 3089-WP-SAN
,ensure_ascii=False).encode('utf-8')
,headers=header
,verify=verify_cert)
stdout = json.loads(json_data.text)
print stdout
# capture all storage profile info managed by DSM into spList
payload = {}
REST = '/StorageCenter/ScStorageProfile/GetList'
completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:])
json_data = connection.post(completeURL
,data=json.dumps(payload
,ensure_ascii=False).encode('utf-8')
,headers=header
,verify=verify_cert)
stdout = json.loads(json_data.text)
spList = {}
for i in range(len(stdout)):
spList[stdout[i]['instanceName']] = {}
spList[stdout[i]['instanceName']]['instanceId'] = stdout[i]['instanceId']
spList[stdout[i]['instanceName']]['scName'] = stdout[i]['scName']
STDOUT
{u'instanceName': u'RestTest_sp', u'useTier3Storage': True, u'name':
u'RestTest_sp', u'volumeCount': 0, u'scName': u'SC 9', u'notes': u'Created via
REST API', u'scSerialNumber': 101, u'userCreated': True, u'useTier2Storage':
True, u'instanceId': u'101.14', u'raidTypeUsed': u'Mixed',
u'allowedForNonFlashOptimized': True, u'objectType': u'ScStorageProfile',
u'allowedForFlashOptimized': True, u'tiersUsedDescription': u'Tier 1, Tier 2,
Tier 3', u'useTier1Storage': True, u'raidTypeDescription': u'RAID 10 Active,
RAID 5 Replay'}
RaidTypeUsed Enum Summary
For the latest enumerated field values, refer to the REST API help files located in section 1.1.
3.5.2 Modify a storage profile
The following code can be used to modify either a single attribute or multiple attributes of a storage profile
object concurrently. This code segment cannot be used to change the SC Series attribute.
# modify a storage profile object identified by instanceId
payload = {}
payload['Name'] = 'RestTest_sp_renamed'
payload['RaidTypeUsed'] = 'Mixed'
payload['UseTier1Storage'] = True
payload['UseTier2Storage'] = True