Giter VIP home page Giter VIP logo

pyxtrem's Introduction

PyXtrem

PyXtrem is a library comprising of python modules that simplifies the consumption of XtremIO REST API.

Description

PyXtrem is a library comprising of python modules that simplifies the consumption of XtremIO REST API. The library comprises of

  • xtremHardwareLib.py – Functions wrapping REST queries to XtremIO that get details of hardware aspects of XtremIO cluster
  • xtremOperationsLib.py – Functions wrapping REST queries to XtremIO that can create, delete and get details of XtremIO objects objects like volumes, snapshot, initiators and initiator groups
  • xtremXenvLib.py – Functions wrapping REST query to get details of X environment. There are utility functions that leverage REST query in getting performance stats on single volume
  • xtremXmsLib.py – Functions wrapping REST query that get details of XMS. It also has utility functions that leverage REST query in performance stats at the scope of entire XtremIO cluster

Users can automate workflows related to XtremIO management functions such as adding/deleting an XtremIO volume, initiator or initiator group, consistency groups, creating snapshots on volumes or consistency groups, refreshing a snapshot and many more.

Installation

Download the python files and copy in the them in your working directory.

Usage Instructions

In your python program that is meant to automate certain set of tasks for XtremiO, just import the necessary or all the python modules and start invoking functions defined in these. Typically, you would need to pass XtremIO IP address, username and password and other parameters

import xtremXenvLib
import xtremXmsLib
import xtremOperationsLib
import xtremHardwareLib

xtremOperationsLib.createVolume(""1.1.1.1","username","password","TEST-Volume","500g")
xtremOperationsLib.getVolumeDetails("1.1.1.1","username","password","TEST-Volume")
xtremOperationsLib.createSnapshot("1.1.1.1","username","password",["Test-Volume"])

xtremXmsLib.getXms("1.1.1.1","username","password")

xtremXenvLib.getXenvs("1.1.1.1","username","password")

xtremHardwareLib.getXbricks("1.1.1.1","username","password")

There is an object based API wrapper also included, currently supporting the gathering of array information at this time. Physical and logical devices are represented as XtremObjects. The details() function returns a dict containing all of the detailed information returned from the array for that particular object.

array = XtremIO("1.1.1.1","username","password")

# Get a list of clusters in the XMS, and set the active one to the first one
clusters = array.get_clusters()
array.set_cluster(clusters[0])

# Get a list of the bricks in the active cluster
bricks = array.get_xbricks()
for brick in bricks:
    print brick.details()

Future

Currently, wrapper functions for critical activities related to volumes, consistency groups, snapshots, are added. In future, wrapper functions will be added for

  • ISCSI initiators
  • DPG
  • Schedulers
  • Notifiers (SYR, SNMP, SYSLOG))

Contribution

Create a fork of the project into your own reposity. Make all your necessary changes and create a pull request with a description on what was added or removed and details explaining the changes in lines of code. If approved, project owners will merge it.

Licensing

PyXtrem is freely distributed under the MIT License. See LICENSE for details.

Support

Please file bugs and issues on the Github issues page for this project. This is to help keep track and document everything related to this repo. For general discussions and further support you can join the EMC {code} Community slack channel. Lastly, for questions asked on Stackoverflow.com please tag them with EMC. The code and documentation are released with no warranties or SLAs and are intended to be supported through a community driven process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.