White Papers

Configuration details
8 Dell Storage Manager REST API Cookbook | 3089-WP-SAN
# 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.py
# import modules into Python script
import requests, json, http, httplib, urllib, urllib2
import os, sys, subprocess, math
import math, time
import logging
from simplejson import scanner
# setup logging to scapi.log
logging.basicConfig(level=logging.DEBUG
,filename='scapi.log'
,format='[%(asctime)s] %(levelname)s %(message)s')
Note: Logging defaults to capturing all information, warnings, and errors to the scapi.log file within the
current working directory.
1.4 DSM REST API installation and help
The DSM REST API is supported with DSM 2015 R3, build 15.3.1.300 or newer.
The REST API is automatically installed with the default installation of the DSM Data Collector on the
specified Microsoft
®
Windows
®
host.
The latest DSM Data Collector is available on Dell.com/support.
The information in this paper has been tested and validated with a modified version of the Python-based
HttpClient class and methods created and developed to support Cinder and SC Series arrays with
OpenStack. The non-modified HttpClient class code is open source and available through GitHub project
openstack/cinder in master branch cinder/volume/drivers/dell_emc/sc and is located in file
storagecenter_api.py.