RETIRED, further work has moved to Debian project infrastructure
Go to file
Stack 64cb39b9da Add unit tests for Left Hand client
This commit has unit test cases for Left hand client
to increase code coverage of client.

Change-Id: Ia8576ce971d9ef7554446d0fa028954565f1bff0
2016-09-28 23:44:44 -07:00
docs Updates client version to 2.1.0 2016-01-12 16:31:44 -08:00
hpelefthandclient Updates client version to 2.1.0 2016-01-12 16:31:44 -08:00
samples Rebranding the hplefthandclient 2015-11-13 15:47:35 -08:00
test Add unit tests for Left Hand client 2016-09-28 23:44:44 -07:00
.gitignore Normalize unit tests 2015-02-24 11:42:38 -08:00
LICENSE.txt Initial commit of the hplefthand client 2013-12-12 16:25:45 -08:00
README.rst Fixes the README underline formatting 2016-01-12 16:17:48 -08:00
config.ini Add remote copy support 2015-12-21 14:46:52 -08:00
requirements-py3.txt Add SSH support to LeftHand Client 2015-12-15 16:55:06 -08:00
requirements.txt Add SSH support to LeftHand Client 2015-12-15 16:55:06 -08:00
setup.py Add SSH support to LeftHand Client 2015-12-15 16:55:06 -08:00
test-requirements-py3.txt Add unit tests for Left Hand client 2016-09-28 23:44:44 -07:00
test-requirements.txt Add unit tests for Left Hand client 2016-09-28 23:44:44 -07:00
tox.ini Rebranding the hplefthandclient 2015-11-13 15:47:35 -08:00

README.rst

Latest Version

Downloads

HPE LeftHand/StoreVirtual REST Client

This is a Client library that can talk to the HPE LeftHand/StoreVirtual Storage array. The HPE LeftHand storage array has a REST web service interface as well as runs SSH. This client library implements a simple interface to talk with that REST interface using the python Requests http library and communicates via SSH using Pytohn's paramiko library.

This is the new location for the rebranded HP LeftHand/StoreVirtual REST Client and will be where all future releases are made. It was previously located on PyPi at: https://pypi.python.org/pypi/hplefthandclient

The GitHub repository for the old HP LeftHand/StoreVirtual REST Client is located at: https://github.com/hpe-storage/python-lefthandclient/tree/1.x

The HP LeftHand/StoreVirtual REST Client (hplefthandclient) is now considered deprecated.

Requirements

This branch requires 11.5 version or later of the LeftHand OS firmware.

Capabilities

  • Get Volume(s)
  • Get Volume by Name
  • Create Volume
  • Delete Volume
  • Modify Volume
  • Clone Volume
  • Get Snapshot(s)
  • Delete Shapshot
  • Get Shapshot by Name
  • Create Snapshot
  • Delete Snapshot
  • Clone Snapshot
  • Modify Snapshot
  • Get Cluster(s)
  • Get Cluster by Name
  • Get Server(s)
  • Get Server by Name
  • Create Server
  • Delete Server
  • Add Server Access
  • Remove Server Access
  • Make Volume Remote
  • Make Volume Primary
  • Create Remote Snapshot Schedule
  • Delete Remote Snapshot Schedule
  • Query Remote Snapshot Schedule
  • Stop Remote Snapshot Schedule
  • Start Remote Snapshot Schedule

Installation

To install:

$ sudo pip install .

Unit Tests

To run all unit tests:

$ tox -e py27

To run a specific test:

$ tox -e py27 -- test/file.py:class_name.test_method_name

To run all unit tests with Python 3.4:

$ tox -e py34

To run a specific test with Python 3.4:

$ tox -e py34 -- test/file.py:class_name.test_method_name

To run all unit tests with code coverage:

$ tox -e cover

The output of the coverage tests will be placed into the coverage dir.

Folders

  • docs -- contains the documentation.
  • hpelefthandlient -- the actual client.py library
  • test -- unit tests
  • samples -- some sample uses

Documentation

To build the documentation:

$ tox -e docs

To view the built documentation point your browser to:

docs/html/index.html

Running Simulators

Manually run flask server (when config.ini unit=true):

* WSAPI::

$ python test/HPELeftHandMockServer_flask.py -port 5001 -user <USERNAME> -password <PASSWORD> -debug

  • SSH:

    $ python test/HPELeftHandMockServer_ssh.py [port]