RETIRED, further work has moved to Debian project infrastructure
Go to file
Anthony Lee f920a8302f Adds unit tests for the LeftHand Exception class
The Exception class for the LeftHand client did not have any
unit tests.

This patch adds unit tests that check the output from the
from_response function and the ClientException class when an
error is passed in.

This patch also removed the use of 'ref' from the
ClientException class. It was added in fa50dedd but was
never officially released so it will not be deprecated.

Change-Id: Ifeb0687e00808155fda116ac97abcf6afaedbff5
2015-08-26 10:49:24 -07:00
docs Adds unit tests for the LeftHand Exception class 2015-08-26 10:49:24 -07:00
hplefthandclient Adds unit tests for the LeftHand Exception class 2015-08-26 10:49:24 -07:00
samples Making the client Python3.4+ Compliant 2015-07-17 10:42:41 -07:00
test Adds unit tests for the LeftHand Exception class 2015-08-26 10:49:24 -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 Revert "Replaces httplib2 with Python Requests support" 2015-08-14 09:25:37 -07:00
config.ini Normalize unit tests 2015-02-24 11:42:38 -08:00
requirements-py3.txt Making the client Python3.4+ Compliant 2015-07-17 10:42:41 -07:00
requirements.txt Revert "Replaces httplib2 with Python Requests support" 2015-08-14 09:25:37 -07:00
setup.py Revert "Replaces httplib2 with Python Requests support" 2015-08-14 09:25:37 -07:00
test-requirements-py3.txt Making the client Python3.4+ Compliant 2015-07-17 10:42:41 -07:00
test-requirements.txt Update tox to generate docs & code coverage output 2015-02-23 05:24:04 -08:00
tox.ini Making the client Python3.4+ Compliant 2015-07-17 10:42:41 -07:00

README.rst

HP LeftHand/StoreVirtual REST Client =================== This is a Client library that can talk to the HP LeftHand/StoreVirtual Storage array. The HP LeftHand storage array has a REST web service interface. This client library implements a simple interface to talk with that REST interface using the python httplib2 http library.

Requirements

This branch requires 11.5 version 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
  • Get Cluster(s)
  • Get Cluster by Name
  • Get Server(s)
  • Get Server by Name
  • Create Server
  • Delete Server
  • Add Server Access
  • Remove Server Access

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 code coverage:

$ tox -e cover

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

Folders

  • docs -- contains the documentation.
  • hplefthandlient -- 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):

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