ScaleIO-py is a Python module that allow easy interaction with the EMC ScaleIO 1.3+ REST API. The goal is to resemble the ScaleIO API (not in detail) in a Pythonic way (learning as we go). Atm ScaleIO-py is in late Alpha stage and focus will be on getting basic features become stable (especially the to/from API object mapping) before adding fancy functionality.
All development of this module have been done in my own lab so I have likely missed important logic for the module to work generally. That will be the goal for upcoming betas to make sure it’ll work in any ScaleIO 1.3+ environment.
This article serve as a very short introduction to what the module is. I plan to add a set of posts that go through the basics of how to use the module as well as more advanced topics, like how to install, manage and upgrade a cluster using nothing more than Python. First post should already be out (Programmable Storage - Part 1) even though it’s work in progress. All code is located at scaleio-py together with example code in /examples directory.
want to test ScaleIO-py?
To install do the following:
* git clone https://github.com/swevm/scaleio-py.git
* cd scaleio-py
* python setup.py install
Supported CRUD functionality
Retrieve methods
- Get list of SDS objects
- Get list of SDC objects
- Get list of Protection Domain objects
- Get list of Volume Objects
- Get list of Storage Pool objects
- Get list of System objects
- Get volume by id or name
- Get SDC by id, name or ip
- Get SDS by id, name or ip
- Get Storage Pool by id or name
- Get Protection Domain by id or name
- Get Volume by id or name
- Get list of SDC(s) mapped to Volume by volumeObject
Create
- Create Volume by Protection Domain name [rename??] (Take PD object not PD name as argument)
- Map Volume to SDC
- Map Volume to all SDCs
- Unmap Volume from SDC
- Install new ScaleIO cluster (binaries and basic configuration using IM API)
Delete
- Delete Volume
- Delete Volume snapshot (by Volume Object) [Need testing]
- Delete SDC from cluster (same as unregister SDC from cluster) [remove one of them]
- Create Volume snapshot byt System id [Need testing]
Update
- Set SDC name
- Upload binaries to be installed by IM