Python library that provides very simple way to use Rest API services for HPE storage and disk backup devices
Project description
Package description
hpestorapi - python library that provides very simple way to use Rest API services for HPE storage and disk backup devices. Current version supports:
HPE 3PAR StoreServ disk arrays
HPE Primera disk arrays
HPE XP7 and P9500 (Command View AE Configuration manager is required)
HPE StoreOnce G3 disk backup device
HPE StoreOnce G4 disk backup device
Installation
Requirements
hpestorapi library depends on:
Python 3.6 or newer
Python requests library
Install from PyPI
To download and install hpestorapi you can use pip:
# pip install hpestorapi
Install from GitHub
Get a copy of source code
# git clone https://github.com/HewlettPackard/python-storage-clients.git # cd python-storage-clients
Install package with dependencies:
# python setup.py install
Import hpestorapi library in your python script:
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import hpestorapi
Usage example
from hpestorapi import StoreServ with StoreServ('10.0.0.1', '3paruser', '3parpass') as array: array.open() status, data = array.get('system') if status == 200: print(f'Name={data["name"]},' f'SerialNumber={data["serialNumber"]},' f'Address={data["IPv4Addr"]}' )
Documentation
The latest version of the documentation can be found here: pdf
Unit Tests
You should install docker prior to running tests. To run all unit tests:
# pip install -r requirements/development.txt # docker build -t storeserv test/storeserv # docker build -t storeonce3 test/storeonce3 # tox
How to contribute
Fork the repository on Github
Create a named feature branch
Write your change
Write tests for your change (if applicable)
Run the tests, ensuring they all pass
Submit a Pull Request using Github
License
This project is licensed under the Apache 2.0 license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file hpestorapi-0.9.6-py3-none-any.whl
.
File metadata
- Download URL: hpestorapi-0.9.6-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f734c9455b4de12909699de6f4c64d58ebbb0824fc212bd675820b219df29b2e |
|
MD5 | 7d599b3fb7431d0508f10edac4b570f9 |
|
BLAKE2b-256 | 58941575c21f644eb569b097fee5e596b038e254d9cca6b4cd3a9d5d448fa599 |