Dell Storage Manager REST API Cookbook Abstract This paper discusses code samples with the Dell™ Storage Manager (DSM) REST API which can provide and improve on orchestration and delivery of repetitive tasks while minimizing the potential for error.
Revisions Revisions Date Description May 2016 Initial release October 2016 New code samples January 2019 Multiple edits and update to new format. Acknowledgements This paper was produced by the following members of the Dell EMC storage engineering team: Authors: Daniel Tan, Linux/UNIX Product Specialist Mark Tomczik, Oracle Product Specialist The information in this publication is provided “as is.” Dell Inc.
Table of contents Table of contents Revisions.............................................................................................................................................................................2 Acknowledgements .............................................................................................................................................................2 Table of contents .................................................................................................
Table of contents 3.2.2 Add an HBA port to a server.............................................................................................................................23 3.2.3 Create a server cluster .....................................................................................................................................24 3.2.4 Add a server to a server cluster........................................................................................................................25 3.2.
Table of contents 3.9.4 Unlock an SC Series user account ...................................................................................................................48 3.9.5 Delete or restore an SC Series user account ...................................................................................................48 3.10 Disks .................................................................................................................................................................49 3.10.
Executive summary Executive summary Dell™ Storage Manager (DSM), formerly known as Enterprise Manager, is a comprehensive, user-friendly, single-pane-of-glass framework for management and administration of various Dell EMC™ storage platforms in a unified environment. There are circumstances within business environments in which tasks may be repetitive, tedious, and errorprone when attempted with a GUI-based framework.
Configuration details 1 Getting started The Python interpreter is used in this paper to interface with the DSM RESTful API to deliver commands and retrieve data proxied through DSM to a Dell EMC SC Series array. This section outlines installing and configuring Python as well as the required configuration for the DSM RESTful API interface.
Configuration details # yum –y update # yum –y install python # yum –y install python-pip # pip --install upgrade pip # pip install requests http simplejson httplib urllib urllib2 # python --version Python 2.7.10 1.3 Deploy modules and logging Python is an extensible scripting platform that allows additional features and functions to be added by using importable modules. Some examples of available modules are referenced by the following import statements in python script main.py. # head -10 ./main.
Configuration details 1.5 Establish the DSM parameters The main.py used for this paper contains the following initialization attributes to establish the connection to the DSM Data Collector. # define env incl. DSM IP addr, port & login credentials DSM_ip = '' DSM_port = '3033' DSM_id = '' DSM_pass = '' verify_cert = False apiversion = '2.0' 1.
Configuration details 2 Connecting to a DSM Data Collector This section discusses using the configured Python environment to interact with the DSM Data Collector. Python is a natively object-oriented language; methods such as opening a connection to the DSM Data Collector involve using and interacting with the connection object previously created. All subsequent REST API calls are defined between the open and close connection code segments shown in the following subsections. 2.
Configuration details # define the REST API call REST = '/ApiConnection/Logout' # build the complete REST API URL completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) # execute REST API call via the HTTP POST method print connection.post(completeURL ,data=json.dumps(payload ,ensure_ascii=False).encode('utf-8') ,headers=header ,verify=verify_cert) STDOUT 2.
Configuration details # 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) conn_instanceId = stdout['instanceId'] print conn_instanceId STDOUT 0 2.3.
Configuration details STDOUT Name SC 4 SC 18 SC 9 2.3.3 scSerialNumber 862 716 101 instanceId 862 716 101 IP 172.16.2.104 172.16.2.118 172.16.2.
Configuration details 2.3.4 All volume objects # declare and define the payload variable payload = {} # define the REST API call REST = '/StorageCenter/StorageCenter/%s/VolumeList' % (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.
Configuration details # 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]['na
Configuration details # 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) srvList = {} print "Name\t\t\t\t\tinstanceId\t\tPath" for i in range(len(stdout)): print "%s\t\t\t\t%s\t\t%s" % (stdout[i]['name'] ,stdout[i]['instanceId'] ,stdout[i]['serverFolderPath']) srvList[stdout[i]['instanceName']] =
Configuration details # 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) osList = {} print "Name\t\t\t\t\tinstanceId\t\tscName" for i in range(len(stdout)): print "%s\t\t\t\t%s\t\t%s" % (stdout[i]['instanceName'] ,stdout[i]['instanceId'] ,stdout[i]['scName']) osList[stdout[i]['instanceName']] = {} osList[stdout[i]['instanceName']]['instanceId'] = stdout[i]['instanceId'] osList[stdout[i]['instanceName
Configuration details To execute the command and print return codes or data to STDOUT, run the following: print connection.post (completeURL ,data=json.dumps(payload ,ensure_ascii=False).encode('utf-8') ,headers=header ,verify=verify_cert) To execute the command and capture any return codes or data in the variable json_data for further parsing and analysis, run the following: json_data = connection.post (completeURL ,data=json.dumps(payload ,ensure_ascii=False).
Configuration details 3 Working with the SC Series array The primary functions and syntax of script is contained between the open and close code segments discussed in sections 2.1 and 2.2. This paper provides simple guidance for the Python syntax to promote readability and understanding of the use of REST API calls with the DSM Data Collector. The following code assumptions are made: • • • 3.
Configuration details stdout = json.loads(json_data.text) print stdout #srvFolderList = {} created earlier in Section 2.3.4 srvFolderList[stdout['name']] = {} srvFolderList[stdout['name']]['instanceId'] = stdout['instanceId'] srvFolderList[stdout['name']]['parent'] = 'Servers' STDOUT {u'status': u'Up', u'deleteAllowed': True, u'name': u'RestTest', u'parent': {u'instanceId': u'101.0', u'instanceName': u'Servers', u'objectType': u'ScServerFolder'}, u'instanceId': u'101.
Configuration details # renamed folder retains the same instanceID value as the original folder srvFolderList[payload['Name']]['instanceId'] = stdout['instanceId'] # remove duplicate list entry del srvFolderList['RestTest'] STDOUT {u'status': u'Up', u'deleteAllowed': True, u'name': u'RestTest_001', u'parent': {u'instanceId': u'101.0', u'instanceName': u'Servers', u'objectType': u'ScServerFolder'}, u'instanceId': u'101.
Configuration details 3.2 Servers This section presents the REST API calls used to create, manage, and remove SC Series server objects. Server REST API calls used in this section 3.2.
Configuration details u'connectivity': u'Down', u'alertOnPartialConnectivity': True, u'deleteAllowed': True, u'pathCount': 0, u'name': u'theodore', u'hbaPresent': False, u'connectedToAllControllers': True, u'scName': u'SC 9', u'notes': u'Created via REST API', u'mapped': False, u'operatingSystem': {u'instanceId': u'101.30', u'instanceName': u'Red Hat Linux 6.x', u'objectType': u'ScServerOperatingSystem'}} 3.2.
Configuration details PortType Enum Summary For the latest enumerated field values, refer to the REST API help files located in section 1.1. 3.2.3 Create a server cluster # create a server cluster which contains server objects payload = {} payload['Name'] = 'RestTest_SrvCluster' payload['OperatingSystem'] = osList['Red Hat Linux 6.
Configuration details 3.2.4 Add a server to a server cluster # add new server object to a server cluster folder payload = {} REST = '/StorageCenter/ScPhysicalServer/%s/AddToCluster' % srvClusterList['RestTest_SrvCluster']['instanceId'] completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) print connection.post(completeURL ,data=json.dumps(payload ,ensure_ascii=False).encode('utf-8') ,headers=header ,verify=verify_cert) STDOUT 3.2.
Configuration details 3.3 Volume folders Volume folders enable the ability to logically group volume objects by name, purpose, size, or other defined criteria. Volumes folder REST API calls used in this section 3.3.
Configuration details STDOUT {u'status': u'Up', u'deleteAllowed': True, u'instanceName': u'RestTest', u'name': u'RestTest', u'parent': {u'instanceId': u'101.0', u'instanceName': u'Volumes', u'objectType': u'ScVolumeFolder'}, u'instanceId': u'101.101', u'scName': u'SC 9', u'notes': u'Created via REST API', u'scSerialNumber': 101, u'parentIndex': 0, u'okToDelete': True, u'folderPath': u'', u'root': False, u'statusMessage': u'', u'objectType': u'ScVolumeFolder'} 3.3.
Configuration details STDOUT {u'status': u'Up', u'deleteAllowed': True, u'instanceName': u'RestTest_001', u'name': u'RestTest_001', u'parent': {u'instanceId': u'101.0', u'instanceName': u'Volumes', u'objectType': u'ScVolumeFolder'}, u'instanceId': u'101.101', u'scName': u'SC 9', u'notes': u'Created via REST API', u'scSerialNumber': 101, u'parentIndex': 0, u'okToDelete': True, u'folderPath': u'', u'root': False, u'statusMessage': u'', u'objectType': u'ScVolumeFolder'} 3.3.
Configuration details 3.4.1 Create a volume # create Storage Center volume object managed by DSM / SC 9 payload = {} payload['Name'] = 'RestTest_Vol' payload['Size'] = '10GB' payload['StorageCenter'] = scList['SC 9']['instanceId'] payload['VolumeFolder'] = volFolderList['RestTest']['instanceId'] payload['Notes'] = 'Created via REST API' REST = '/StorageCenter/ScVolume' completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.post(completeURL ,data=json.
Configuration details 3.4.2 Map a volume to a server # map a volume object to a server payload = {} payload['Server'] = srvList['clapton']['instanceId'] REST = '/StorageCenter/ScVolume/%s/MapToServer' % volList['RestTest_Vol']['instanceId'] 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.
Configuration details STDOUT {u'instanceId': u'101.8704', u'scSerialNumber': 101, u'replicationSource': False, u'liveVolume': False, u'vpdId': 8264, u'objectType': u'ScVolume', u'volumeFolderPath': u'RestTest/', u'hostCacheEnabled': False, u'inRecycleBin': False, u'instanceName': u'RestTest_Vol', u'statusMessage': u'', u'status': u'Down', u'storageType': {u'instanceId': u'101.
Configuration details 3.4.4 Pre-allocate a volume The volume pre-allocation is successful only if the volume has been and is currently mapped to a server object within the same SC Series array. # preallocate a volume object payload = {} REST = '/StorageCenter/ScVolume/%s/PreallocateStorage' % volList['RestTest_Vol']['instanceId'] completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.post(completeURL ,data=json.dumps(payload ,ensure_ascii=False).
Configuration details # modify a volume object payload = {} payload['Name'] = 'RestTest_Vol_renamed' payload['VolumeFolder'] = volFolderList['RestTest']['instanceId'] REST = '/StorageCenter/ScVolume/%s' % volList['RestTest_Vol']['instanceId'] completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.put(completeURL ,data=json.dumps(payload ,ensure_ascii=False).encode('utf-8') ,headers=header ,verify=verify_cert) stdout = json.loads(json_data.
Configuration details STDOUT 3.4.7 Delete a volume A volume object can either be placed in the recycle bin (it can be restored at a later time) or the volume object can be permanently deleted using the following details. 3.4.7.1 Move to recycle bin # recycle a volume object payload = {} REST = '/StorageCenter/ScVolume/%s/Recycle' % volList['RestTest_Vol_renamed']['instanceId'] completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.
Configuration details 3.5 Storage profiles This section discusses the use of REST API calls to create, manage, and remove storage profile objects on an SC Series array. Security profile REST API calls used in this section 3.5.1 REST API Method /StorageCenter/ScStorageProfile POST /StorageCenter/ScStorageProfile/ PUT DELETE /StorageCenter/ScStorageProfile/GetList POST Create a storage profile The payload['RaidTypeUsed'] attribute contains the EnumValueName values in Figure 2.
Configuration details ,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.
Configuration details payload['UseTier3Storage'] = True REST = '/StorageCenter/ScStorageProfile/%s' % spList['RestTest_sp']['instanceId'] completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.put(completeURL ,data=json.dumps(payload ,ensure_ascii=False).encode('utf-8') ,headers=header ,verify=verify_cert) stdout = json.loads(json_data.
Configuration details 3.6 Replays This section provides the REST API calls used to create, manage, and remove Replays (also known as snapshots) and view volume objects on an SC Series array. Replay REST API calls used in this section 3.6.
Configuration details rplyList[stdout['createVolume']['instanceName']]['description'] = payload['Description'] rplyList[stdout['createVolume']['instanceName']]['scName'] = stdout['scName'] # capture all storage profile info managed by DSM into rplyList payload = {} REST = '/StorageCenter/ScReplay/GetList' completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.post(completeURL ,data=json.dumps(payload ,ensure_ascii=False).
Configuration details 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) print stdout STDOUT {u'instanceId': u'101.
Configuration details STDOUT {u'scSerialNumber': 101, u'globalIndex': u'101-8739-1', u'description': u'RestTest_Vol_replay', u'spaceRecovery': False, u'instanceId': u'101.8739.1', u'scName': u'SC 9', u'consistent': False, u'expires': False, u'freezeTime': u'2016-05-06T12:52:59-05:00', u'createVolume': {u'instanceId': u'101.
Configuration details # create a new named replay profile object payload = {} payload['Name'] = 'RestTest_rp' payload['StorageCenter'] = scList['SC 9']['instanceId'] payload['Notes'] = 'Created via REST API' REST = '/StorageCenter/ScReplayProfile' 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.
Configuration details 3.7.2 Modify a Replay profile # modify a replay profile object identified by instanceId payload = {} payload['Name'] = 'RestTest_rp_renamed' payload['Notes'] = 'Created via REST API' REST = '/StorageCenter/ScReplayProfile/%s' % rpList['RestTest_rp']['instanceId'] completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.put(completeURL ,data=json.dumps(payload ,ensure_ascii=False).encode('utf-8') ,headers=header ,verify=verify_cert) stdout = json.
Configuration details 3.8 Recycle bin This section discusses restoring a volume object from the recycle bin to its original parent folder in the Volumes tree. Recycle bin REST API calls used in this section 3.8.
Configuration details 3.9.1 Create an SC Series user account The payload['Privilege'] and payload['SessionTimeout'] attributes contain the EnumValueName values detailed in the corresponding tables below. An additional code segment is included here to capture all user account information from all DSM-managed SC Series arrays and populate the Python dictionary usrList.
Configuration details usrList[stdout[i]['instanceName']]['scName'] = stdout[i]['scName'] usrList[stdout[i]['instanceName']]['locked'] = stdout[i]['locked'] STDOUT 3.9.1.1 Privilege Enum Summary For the latest enumerated field values, refer to the REST API help files located in section 1.1. Payload[Privilege] EnumValueName values 3.9.1.2 SessionTimeout Enum Summary For the latest enumerated field values, refer to the REST API help files located in section 1.1.
Configuration details 3.9.2 Modify an SC Series user account The following code can be used exclusively to modify a single attribute or multiple attributes of a user account object concurrently. This code segment cannot be used to change or reset a user account name, password, or account status (locked or unlocked) attribute. # modify a user account payload = {} payload['RealName'] = 'REST User Renamed' payload['EmailAddress'] = 'restusr@mycompany.
Configuration details print connection.post(completeURL ,data=json.dumps(payload ,ensure_ascii=False).encode('utf-8') ,headers=header ,verify=verify_cert) STDOUT 3.9.4 Unlock an SC Series user account # unlock a user account payload = {} REST = '/StorageCenter/ScUser/%s/Unlock' % usrList['restusr']['instanceId'] completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) print connection.post(completeURL , data=json.dumps(payload ,ensure_ascii=False).
Configuration details ,ensure_ascii=False).encode('utf-8') ,headers=header ,verify=verify_cert) stdout = json.loads(json_data.text) print stdout STDOUT {u'result': True} {u'createdByGroupLogIn': False, u'modifiedOn': u'2016-04-25T14:33:02-05:00', u'passwordDaysUntilExpiration': 0, u'instanceId': u'101.
Configuration details 3.10.1 All disks by disk folder # list all disks by Disk Folder category payload = {} REST = '/StorageCenter/ScDiskFolder/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.
Configuration details u'ScDiskClass'}, u'endurance': 0, u'reportsWear': False}, {u'managed': True, u'userConsumableSize': u'600127266816 Bytes', u'healthMask': [], u'scSerialNumber': 101, u'diskClassIndex': 2, u'unassignedReason': u'AlreadyAssigned', u'estimatedWearWarningEndurance': 0, u'size': u'600127266816 Bytes', u'secured': False, u'instanceId': u'101.128', u'enclosureIndex': 5, u'controlType': u'Managed', u'objectType': u'ScDisk', u'instanceName': u'05-10', u'diskFolder': {u'instanceId': u'101.
Configuration details STDOUT [{u'managed': True, u'userConsumableSize': u'2000398934016 Bytes', u'healthMask': [], u'scSerialNumber': 716, u'diskClassIndex': 4, u'unassignedReason': u'AlreadyAssigned', u'estimatedWearWarningEndurance': 0, u'size': u'2000398934016 Bytes', u'secured': False, u'instanceId': u'716.55', u'enclosureIndex': 3, u'controlType': u'Managed', u'objectType': u'ScDisk', u'instanceName': u'03-03', u'diskFolder': {u'instanceId': u'716.
Configuration details STDOUT [{u'managed': False, u'userConsumableSize': u'600127266816 Bytes', u'healthMask': [], u'scSerialNumber': 101, u'diskClassIndex': 2, u'unassignedReason': u'AlreadyAssigned', u'estimatedWearWarningEndurance': 0, u'size': u'600127266816 Bytes', u'secured': False, u'instanceId': u'101.129', u'enclosureIndex': 5, u'controlType': u'Managed', u'objectType': u'ScDisk', u'instanceName': u'05-15', u'diskFolder': {u'instanceId': u'101.
Configuration details 3.10.5 Execute a RAID rebalance # initiate a SC RAID rebalance payload = {} payload['StorageCenter'] = scList['SC 9']['instanceId'] REST = '/StorageCenter/ScDiskFolder/RaidRebalance' completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) print connection.post(completeURL ,data=json.dumps(payload ,ensure_ascii=False).encode('utf-8') ,headers=header ,verify=verify_cert) STDOUT {u'result': True} 3.
Configuration details activeAlert[stdout[i]['instanceName']]['alertStatus'] = stdout[i]['alertStatus'] activeAlert[stdout[i]['instanceName']]['message'] = stdout[i]['message'] activeAlert[stdout[i]['instanceName']]['createTime'] = stdout[i]['createTime'] STDOUT 3.11.
Configuration details 4 Working with Linux/UNIX This section covers tools discussed in this paper that can facilitate the installation and use of Python on Linux/UNIX platforms. 4.1 wget The wget command is a UNIX-based utility that enables the retrieval of content from a web URL address. An example of this command is: # wget --no-check-certificate \ > https://www.python.org/ftp/python/2.7.11/Python-2.7.10.tgz 4.
Configuration details 5 Sample script This section presents the various components of the Storage Center REST API discussed in previous sections and assembles it into a cohesive, functional, and complete sample script. This sample script is annotated to explain statements or sections as needed. Additional code can be injected into this complete sample script where denoted by the placeholder: "===== YOUR CODE GOES HERE =====".
Configuration details apiversion = '2.0' # Default = 2.0 # disable warnings from requests module if not verify_cert: requests.packages.urllib3.disable_warnings() # define base URL for DSM REST API interface baseURL = 'https://%s:%s/api/rest/' % (DSM_ip, DSM_port) # define HTTP content headers header = {} header['Content-Type'] = 'application/json; charset=utf-8' header['Accept'] = 'application/json' header['x-dell-api-version'] = apiversion # define the connection session connection = requests.
Configuration details REST = '/ApiConnection/ApiConnection/%s/StorageCenterList' % conn_instanceId completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.get(completeURL ,headers=header ,verify=verify_cert) stdout = json.loads(json_data.
Configuration details if volFolderList.
Configuration details srvFolderList[stdout[i]['name']][key] = {} srvFolderList[stdout[i]['name']][key]['instanceId'] = stdout[i]['instanceId'] srvFolderList[stdout[i]['name']][key]['parent'] = stdout[i]['parent']['instanceName'] # objects Servers payload = {} REST = '/StorageCenter/StorageCenter/%s/ServerList' % (scList[key]['instanceId']) completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.get(completeURL ,headers=header ,verify=verify_cert) stdout = json.
Configuration details # get disks info by both diskFolder and diskTier sorting payload = {} REST = '/StorageCenter/ScDiskFolder/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.
Configuration details # print capacities and usage across all SC managed by DSM for key in scList: print("=== %s" % key) for keyTier in dskTier[key].keys(): print("Disks in %s : %s" % (keyTier, dskTier[key][keyTier]['diskCount'])) payload = {} REST = '/StorageCenter/ScDiskFolderTier/%s/StorageUsage' % dskTier[key][keyTier]['instanceId'] completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.get(completeURL ,headers=header ,verify=verify_cert) stdout = json.
Configuration details 5.1 Console output Name SC 25 SC 18 SC 9 - 101 SC 10 SC 4 Serial Number 60707 716 101 103 862 DSM Instance Total Volume Folders Managed Total Volumes Managed Total Server Folders Managed Total Servers Managed : : : : : instanceId 60707 716 101 103 862 172.16.21.
Configuration details 5.2 _FolderDestroy This code can be injected into the working code sample shown in section 5 replacing the placeholder, "===== YOUR CODE GOES HERE =====". This code recursively parses the specified folder path and permanently destroys all subfolders and volumes within this folder path.
Configuration details completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.delete(completeURL ,headers=header ,verify=verify_cert) """ Call the _FolderDestroy function and instructing it to destroy all subfolders and volumes contained within the /Unix/Linux/RestTest path on SC 9 """ _FolderDestroy("SC 9 - 101" ,volFolderList[os.path.basename("/Unix/Linux/RestTest")] ["SC 9 - 101"] ['instanceId'] ) print("") 5.
Configuration details for item in range(len(qos_out)): if qos_out[item]['scName'] == scName: print(qos_out[item]['name']) qos_list.append(qos_out[item]['instanceId']) print("") print(qos_list) # parse volume folder and replicate volumes in for loop payload = {} REST = '/StorageCenter/ScVolumeFolder/%s/VolumeList' % (instanceId) completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:]) json_data = connection.get(completeURL ,headers=header ,verify=verify_cert) stdout = json.loads(json_data.
Configuration details volFolderList[os.path.basename("/Unix/Solaris")]["SC 4"]['instanceId'], "SC 9 - 101") print("") 5.4 _DispAllVolsMapped This code can be injected into the working code sample shown in section 5 replacing the placeholder, "===== YOUR CODE GOES HERE =====".
Configuration details print("%-30s %-15s %s") % (volsMapped[vol_key]['instanceName'], vol_key, volList[volsMapped[vol_key]['instanceName']][key]['path']) else: print("WARN: Srv obj %s does not exist on %s") % (srvName, key) print("") """ Initiate the function to query the DSM installation for all instances of the server object named rhevm across all SC arrays """ _DispAllVolsMapped("rhevm") print("") 69 Dell Storage Manager REST API Cookbook | 3089-WP-SAN
Configuration details A Configuration details Component table Component Description OS Fedora 23 Server and Python 2.7.10 Cabling Fibre Channel Server Dell PowerEdge™ R620 Storage Dell Storage Center OS (SCOS) 6.5.
Additional resources B Additional resources B.1 Technical support and resources Dell.com/support is focused on meeting your needs with proven services and support. Storage technical documents and videos provide expertise that helps to ensure customer success on Dell EMC storage platforms. B.2 Related documentation Table 13 lists the referenced or recommended resources related to this document.