White Papers

Configuration details
15 Dell Storage Manager REST API Cookbook | 3089-WP-SAN
# define the REST API call
REST = '/StorageCenter/StorageCenter/%s/ServerFolderList' %
(scList['SC 9']['instanceId'])
# build the complete REST API URL
completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:])
# execute REST API call via the HTTP GET method
json_data = connection.get(completeURL
,headers=header
,verify=verify_cert)
stdout = json.loads(json_data.text)
srvFolderList = {}
print "Name\t\t\t\t\tinstanceId\t\tParent"
for i in range(len(stdout)):
if stdout[i]['name'] == "Servers":
continue
print "%s\t\t\t\t%s\t\t%s" % (stdout[i]['name']
,stdout[i]['instanceId']
,stdout[i]['parent']['instanceName']
)
srvFolderList[stdout[i]['name']] = {}
srvFolderList[stdout[i]['name']]['instanceId'] = stdout[i]['instanceId']
srvFolderList[stdout[i]['name']]['parent'] =
stdout[i]['parent']['instanceName']
STDOUT
Name instanceId Parent
Oracle 101.5 Servers
HP-UX 101.6 Unix
AIX 101.11 Unix
Solaris 101.12 Unix
OVM 101.16 Oracle
[snip]
2.3.6 <instanceId> All server objects
# declare and define the payload variable
payload = {}
# define the REST API call
REST = '/StorageCenter/StorageCenter/%s/ServerList' %
(scList['SC 9']['instanceId'])