StorOps: The Python Library for VNX & Unity
===========================================
.. image:: https://img.shields.io/travis/emc-openstack/storops/master.svg
:target: https://travis-ci.org/emc-openstack/storops
.. image:: https://img.shields.io/codecov/c/github/emc-openstack/storops/master.svg
:target: https://codecov.io/gh/emc-openstack/storops
.. image:: https://img.shields.io/appveyor/ci/peter-wangxu/storops/master.svg?label=Windows
:target: https://ci.appveyor.com/project/peter-wangxu/storops
.. image:: https://img.shields.io/pypi/v/storops.svg
:target: https://pypi.python.org/pypi/storops
.. image:: https://img.shields.io/pypi/pyversions/storops.svg
:target: https://pypi.org/project/storops/
.. image:: https://landscape.io/github/emc-openstack/storops/master/landscape.svg?style=flat
:target: https://landscape.io/github/emc-openstack/storops/
VERSION: 1.2.12
A minimalist Python library to manage VNX/Unity systems.
This document lies in the source code and go with the release.
Check different release branch/tag for matched documents.
License
-------
`Apache License version 2`_
Install via PIP
---------------
You could use "pip" to install "storops".
.. code-block:: bash
$ pip install storops
Make sure `naviseccli` is installed if you want to manage VNX.
Please contact with Dell/EMC support about installing the `NaviCli-Linux` rpm package.
Optional package requirement
````````````````````````````
#. `paramiko` package
The `paramiko` is required if you need to manage the VNX file related
resources. please follow `install paramiko <http://www.paramiko.org/installing.html>`_ install `paramiko`.
Install via RPM
---------------
There are two RPM packages in each release page.
- `python-storops-<version num>`, install this if you only manage Unity systems.
- `python-storops-vnx-<version num>-x86_64`, a virtual package depends on `python-storops` and `NaviCli-Linux`. Install this if you manage VNX systems or both.
You could download the rpm package from release download page, and install it via:
.. code-block:: bash
$ rpm -i <python-storops_file>
Please contact with Dell/EMC support about installing the `NaviCli-Linux` rpm package.
Feature List
------------
- Manage VNX System
- supported resources
- show system properties
- list installed features
- list/create/delete storage pools
- list/create/delete pool based LUN
- list/create/delete RAID groups
- list/create/delete snapshots
- list/create/delete storage groups
- list/create/delete consistency groups
- list/create/delete users
- list disks
- list ports
- list data mover/virtual data mover
- list NAS storage pool
- list/create/delete CIFS server
- list CIFS share
- list/create/delete file system
- list/create/delete file system snap
- list/create/delete NFS share
- show system domain information
- list hosts
- show system capacity
- supported feature/operations
- list/start/cancel migration sessions
- enable/disable LUN deduplication
- enable/disable LUN compression
- insert/delete disk simulation
- create/attach/detach mount points
- initiator and connection management
- create/delete mirror view
- create/delete DNS
- supported metrics
- VNXStorageProcessor
- `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS
- `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS
- `read_size_kb`/`write_size_kb`: read/write size KB
- VNXLun
- `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS
- `read_iops_sp_a`/`write_iops_sp_b`: read/write IOPS of SPA
- `read_iops_sp_b`/`write_iops_sp_b`: read/write IOPS of SPB
- `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS
- `read_mbps_sp_a`/`write_mbps_sp_a`: read/write MBPS of SPA
- `read_mbps_sp_b`/`write_mbps_sp_b`: read/write MBPS of SPB
- `implicit_trespasses_ps`/`explicit_trespasses_ps`: implicit/explicit trespasses per second
- `implicit_trespasses_ps_sp_a`/`explicit_trespasses_ps_sp_a`: implicit/explicit trespasses per second of SPA
- `implicit_trespasses_ps_sp_b`/`explicit_trespasses_ps_sp_b`: implicit/explicit trespasses per second of SPB
- `utilization`: utilization
- `utilization_sp_a`: utilization of SPA
- `utilization_sp_b`: utilization of SPB
- `read_size_kb`/`write_size_kb`: read/write size KB
- VNXDisk
- `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS
- `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS
- `utilization`: utilization
- `read_size_kb`/`write_size_kb`: read/write size KB
- VNXSPPort
- `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS
- `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS
- `read_size_kb`/`write_size_kb`: read/write size KB
- VNXStorageGroup
- `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS
- `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS
- `read_size_kb`/`write_size_kb`: read/write size KB
- VNXStoragePool
- `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS
- `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS
- `read_size_kb`/`write_size_kb`: read/write size KB
- Manage Unity System
- supported resources
- show system properties
- show system capacity
- list/create/delete storage pools
- list/create/delete remote hosts
- list/create/delete host initiator
- list/create/delete luns
- list/create/delete file systems
- list/create/delete snapshots
- list/create/delete NAS servers
- list/create/delete CIFS servers
- list/create/delete CIFS shares
- list/create/delete NFS servers
- list/create/delete NFS shares
- list/create/delete DNS servers
- list ip ports
- list sas ports
- list/create/delete iSCSI portals
- list/create/delete link aggregations
- list/create/delete Consistency Groups
- list/create/modify/cancel move sessions
- list/create/delete metric real time query
- list metrics query result
- list disks
- list disk groups
- list/create/delete tenants
- list batteries
- list daes
- list fans
- list memory modules
- list management interfaces
- list power supplies
- list ssds
- list remote interfaces
- list/create/modify/verify/delete remote systems
- list/create/modify/delete replication interfaces
- list/create/modify/delete replication sessions
- failover/failback/pause/resume/sync replication sessions
- list/create/modify/delete block import sessions
- pause/resume/cutover/commit/cancel block import sessions
- discover migration objects
- list/create/modify/delete snapshot schedule
- supported feature/operations
- CIFS share access control
- NFS share access control
- Remote hosts access
- Persist historical metric data to csv files
- Upload license
- enable/disable LUN data reduction
- LUN migration
- LUN replication
- CG replication
- supported metrics
- UnitySystem
- read_iops
- write_iops
- total_iops
- read_byte_rate
- write_byte_rate
- total_byte_rate
- UnityDisk
- read_iops
- write_iops
- total_iops
- read_mbps
- write_mbps
- utilization
- response_time
- queue_length
- read_byte_rate
- write_byte_rate
- total_byte_rate
- UnityLun
- read_iops
- write_iops
- total_iops
- read_mbps
- write_mbps
- utilization
- response_time
- queue_length
- read_byte_rate
- write_byte_rate
- total_byte_rate
- UnityFileSystem
- read_iops
- write_iops
- read_mbps
- write_mbps
- UnityStorageProcessor
- net_in_mbps
- net_out_mbps
- block_read_iops
- block_write_iops
- block_total_iops
- block_read_mbps
- block_write_mbps
- cifs_read_iops
- cifs_write_iops
- cifs_read_mbps
- cifs_write_mbps
- nfs_read_iops
- nfs_write_iops
- nfs_read_mbps
- nfs_write_mbps
- utilization
- block_cache_read_hit_ratio
- block_cache_write_hit_ratio
- temperature
- core_count
- block_cache_dirty_size
- read_byte_rate
- write_byte_rate
- total_byte_rate
- fast_cache_read_hits
- fast_cache_write_hits
- fast_cache_read_hit_rate
- fast_cache_write_hit_rate
- UnityFcPort
- read_iops
- write_iops
- total_iops
- read_byte_rate
- write_byte_rate
- total_byte_rate
- UnityIscsiNode
- read_iops
- write_iops
- total_iops
- read_byte_rate
- write_byte_rate
- total_byte_rate
Tutorial
--------
User may reference three kinds of classes directly.
All of them are available under the storops module.
- system classes: like VNXSystem and UnitySystem
- exceptions: like UnityException, VNXException, etc.
- enums: like VNXProvisionEnum, NFSTypeEnum, etc.
We recommend to try the library with IPython notebook or shell.
All operation/resource are accessed from the system instance.
Here are some examples of the typical usage:
Get the VNX System Instance
```````````````````````````
Use the vnx instance to access all sorts of resource and features.
.. code-block:: python
# initialize the VNX system instance
>>> from storops import VNXSystem
>>> vnx = VNXSystem('10.1.1.1', 'sysadmin', 'password')
>>> vnx
{
"VNXSystem": {
"existed": true,
"hash": 5339308,
"name": "K10",
"agent_rev": "7.33.8 (2.97)",
"model_type": "Rackmount",
"model": "VNX5800",
"serial": "APM00123456789",
"revision": "05.33.008.3.297"
}
}
Get the Unity System Instance
`````````````````````````````
.. code-block:: python
from storops import UnitySystem
unity = UnitySystem('<management ip>', '<user>', '<password>')
Get Resources from System or Other Resources
````````````````````````````````````````````
.. code-block:: python
# get all pools
>>> pools = vnx.get_pool()
{
"VNXPoolList": [
{
"VNXPool": {
"luns": [
1,
0
],
"status": "OK(0x0)",
"current_operation_status": "N/A",
...
"disks": {
"VNXDiskList": [
{
"VNXDisk": {
"private": {},
"clariion_tla_part_number": "005050344PWR",
"prct_bound": {},
...
Get a Resource
``````````````
Attention: you could still initialize the python object even
if the resource doesn't exists on array.
You could use the "existed" property to check the existance of the
resource.
.. code-block:: python
# get a existing LUN
>>> lun = vnx.get_lun(lun_id=1)
>>> lun
{
"VNXLun": {
"status": "OK(0x0)",
"existed": true,
...
"default_owner": "VNXSPEnum.SP_B",
"name": "l0"
}
}
# get a non-existing lun
>>> vnx.get_lun(name='hello')
{
"VNXLun": {
"existed": false,
"hash": 5699430
}
}
Access Resource Properties
``````````````````````````
Each properties printed in the json output could be accessed directly.
.. code-block:: python
# access resource properties
>>> lun.status
u'OK(0x0)'
Update the Resource Property
````````````````````````````
All properties of a resource will be updated if any of them is accessed.
For performance concern, the lib won't send query to array once properties
are initialized.
Explicitly call the *"update()"* function if you need a refresh.
.. code-block:: python
>>> vnx = VNXSystem('10.1.1.3') # no query to the system
>>> vnx.model
u'VNX5800' # send query, initialize all properties
>>> vnx.name
u'k10' # no query
>>> vnx.update() # send query, update all properties
Executing Operations
````````````````````
Most of the create/modify operations can be found on the instance.
Call these instance methods to execute the operation.
.. code-block:: python
# create lun
>>> pool = pools[0]
>>> lun1 = pool.create_lun('lun1', size_gb=2)
Remove a Resource
`````````````````
.. code-block:: python
# delete a resource
>>> lun1.delete()
Getting metrics
```````````````
- VNX
.. code-block:: python
>>> from storops import VNXSystem
>>> vnx = VNXSystem('<management ip>', '<user>', '<password>')
# Enable metric query
>>> vnx.enable_perf_stats()
# Get iops for Storage Processor
>>> sp = vnx.get_sp()[0]
>>> sp.read_iops
0.0
>>> sp.write_iops
0.6666666666666666
>>> sp.read_size_kb
0.0
>>> sp.write_size_kb
4.2250000000000005
- Unity
.. code-block:: python
>>> from storops import UnitySystem
>>> unity = UnitySystem('<management ip>', '<user>', '<password>')
# Enable metric query
>>> unity.enable_perf_stats()
# Once metric query enabled, storops will pull the realtime metric info
# from Unity periodically and calculate them, the default interval is
# 60s, so suggest to wait more than 60s for the first time calculation
>>> import time; time.sleep(60)
# Get iops, bandwidth for lun
>>> lun1 = unity.get_lun()[0]
>>> lun1.read_iops
0.05
>>> lun1.total_iops
0.05
>>> lun1.write_iops
0
>>> lun1.read_byte_rate
25.6
>>> lun1.write_byte_rate
0
>>> lun1.total_byte_rate
25.6
Getting Help
````````````
- If you are using IPython, use "?" to check the document and
method signature.
.. code-block::
>>> pool.create_lun?
Signature: pool.create_lun(lun_name=None, size_gb=1, lun_id=None,
provision=None, tier=None, ignore_thresholds=None)
Docstring: Create a pool LUN in the pool.
File: c:\work\python\storops\storops\vnx\resource\block_pool.py
Type: instancemethod
- In IPython, use tab to check all extrinsic methods/properties
of the resource. Print the resource to check all intrinsic properties.
.. code-block::
>>> vnx.
vnx.control_station_ip vnx.get_property_key vnx.parse_all
vnx.create_cg vnx.get_property_label vnx.parsed_resource
vnx.create_pool vnx.get_rg vnx.poll
vnx.create_rg vnx.get_sg vnx.property_names
vnx.create_sg vnx.get_snap vnx.delete_cg
vnx.domain vnx.get_sp_port vnx.delete_disk
vnx.existed vnx.heartbeat vnx.delete_pool
vnx.get_available_disks vnx.install_disk vnx.delete_rg
vnx.get_cg vnx.is_auto_tiering_enabled vnx.delete_sg
vnx.get_connection_port vnx.is_compression_enabled vnx.delete_snap
vnx.get_dict_repr vnx.is_dedup_enabled vnx.set_block_credential
vnx.get_disk vnx.is_fast_cache_enabled vnx.set_cli
vnx.get_fc_port vnx.is_mirror_view_async_enabled vnx.set_naviseccli
vnx.get_fcoe_port vnx.is_mirror_view_enabled vnx.spa_ip
vnx.get_index vnx.is_mirror_view_sync_enabled vnx.spb_ip
vnx.get_iscsi_port vnx.is_sancopy_enabled vnx.stop_heart_beat
vnx.get_lun vnx.is_snap_enabled vnx.update
vnx.get_migration_session vnx.is_thin_enabled vnx.update_nodes_ip
vnx.get_ndu vnx.is_valid vnx.with_no_poll
vnx.get_pool vnx.json vnx.with_poll
vnx.get_pool_feature vnx.parse
How to Run Unittests
--------------------
Unittests are included in the `storops_test` package.
Use following command to install test dependencies.
.. code-block:: bash
$ pip install -r test-requirements.txt
Use `pytest` to run the tests.
.. code-block:: bash
$ pytest storops_test
Or you could use `tox` to run the tests.
.. code-block:: bash
$ tox -e py36
How to Contribute
-----------------
#. Open an issue at the `GitHub storops project`_.
#. Fork the repository on GitHub and make changes on your branch.
#. Add tests to cover your change.
#. Send a pull request.
#. Make sure to add yourself to "Contributors" listed below.
Contributors
------------
Dell EMC Contributors
`````````````````````
- Ryan Liang <ryan.liang@dell.com>
- Yong Huang <yong.huang@dell.com>
- Dong Ding <dong.ding@dell.com>
Community Contributors
``````````````````````
- Cedric Zhuang
- Jay Xu
- Ray Chen
- Tina Tang
- Peter Wang
- Paulo Matias <matias@ufscar.br>
Patches and Suggestions
```````````````````````
.. _GitHub storops project: https://github.com/emc-openstack/storops
.. _Apache License version 2: LICENSE.txt
Raw data
{
"_id": null,
"home_page": "https://github.com/emc-openstack/storops",
"name": "storops",
"maintainer": "Dell EMC Unity OpenStack Team",
"docs_url": null,
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7",
"maintainer_email": "spe.unity.openstack@emc.com",
"keywords": "VNX, Unity, EMC, Storage",
"author": "Cedric Zhuang",
"author_email": "cedric.zhuang@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e1/8c/469012c01ebcab33cb9976f1f2500ddbd1190a139f14300fe398d71cd2b1/storops-1.2.12.tar.gz",
"platform": "any",
"description": "StorOps: The Python Library for VNX & Unity\n===========================================\n\n.. image:: https://img.shields.io/travis/emc-openstack/storops/master.svg\n :target: https://travis-ci.org/emc-openstack/storops\n\n.. image:: https://img.shields.io/codecov/c/github/emc-openstack/storops/master.svg\n :target: https://codecov.io/gh/emc-openstack/storops\n\n.. image:: https://img.shields.io/appveyor/ci/peter-wangxu/storops/master.svg?label=Windows\n :target: https://ci.appveyor.com/project/peter-wangxu/storops\n\n.. image:: https://img.shields.io/pypi/v/storops.svg\n :target: https://pypi.python.org/pypi/storops\n\n.. image:: https://img.shields.io/pypi/pyversions/storops.svg\n :target: https://pypi.org/project/storops/\n\n.. image:: https://landscape.io/github/emc-openstack/storops/master/landscape.svg?style=flat\n :target: https://landscape.io/github/emc-openstack/storops/\n\nVERSION: 1.2.12\n\nA minimalist Python library to manage VNX/Unity systems.\nThis document lies in the source code and go with the release.\nCheck different release branch/tag for matched documents.\n\nLicense\n-------\n\n`Apache License version 2`_\n\nInstall via PIP\n---------------\nYou could use \"pip\" to install \"storops\".\n\n.. code-block:: bash\n\n $ pip install storops\n\nMake sure `naviseccli` is installed if you want to manage VNX.\nPlease contact with Dell/EMC support about installing the `NaviCli-Linux` rpm package.\n\nOptional package requirement\n````````````````````````````\n\n#. `paramiko` package\n\nThe `paramiko` is required if you need to manage the VNX file related\nresources. please follow `install paramiko <http://www.paramiko.org/installing.html>`_ install `paramiko`.\n\nInstall via RPM\n---------------\nThere are two RPM packages in each release page.\n- `python-storops-<version num>`, install this if you only manage Unity systems.\n- `python-storops-vnx-<version num>-x86_64`, a virtual package depends on `python-storops` and `NaviCli-Linux`. Install this if you manage VNX systems or both.\n\nYou could download the rpm package from release download page, and install it via:\n\n.. code-block:: bash\n\n $ rpm -i <python-storops_file>\n\nPlease contact with Dell/EMC support about installing the `NaviCli-Linux` rpm package.\n\n\nFeature List\n------------\n\n- Manage VNX System\n - supported resources\n - show system properties\n - list installed features\n - list/create/delete storage pools\n - list/create/delete pool based LUN\n - list/create/delete RAID groups\n - list/create/delete snapshots\n - list/create/delete storage groups\n - list/create/delete consistency groups\n - list/create/delete users\n - list disks\n - list ports\n - list data mover/virtual data mover\n - list NAS storage pool\n - list/create/delete CIFS server\n - list CIFS share\n - list/create/delete file system\n - list/create/delete file system snap\n - list/create/delete NFS share\n - show system domain information\n - list hosts\n - show system capacity\n - supported feature/operations\n - list/start/cancel migration sessions\n - enable/disable LUN deduplication\n - enable/disable LUN compression\n - insert/delete disk simulation\n - create/attach/detach mount points\n - initiator and connection management\n - create/delete mirror view\n - create/delete DNS\n - supported metrics\n - VNXStorageProcessor\n - `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS\n - `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS\n - `read_size_kb`/`write_size_kb`: read/write size KB\n - VNXLun\n - `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS\n - `read_iops_sp_a`/`write_iops_sp_b`: read/write IOPS of SPA\n - `read_iops_sp_b`/`write_iops_sp_b`: read/write IOPS of SPB\n - `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS\n - `read_mbps_sp_a`/`write_mbps_sp_a`: read/write MBPS of SPA\n - `read_mbps_sp_b`/`write_mbps_sp_b`: read/write MBPS of SPB\n - `implicit_trespasses_ps`/`explicit_trespasses_ps`: implicit/explicit trespasses per second\n - `implicit_trespasses_ps_sp_a`/`explicit_trespasses_ps_sp_a`: implicit/explicit trespasses per second of SPA\n - `implicit_trespasses_ps_sp_b`/`explicit_trespasses_ps_sp_b`: implicit/explicit trespasses per second of SPB\n - `utilization`: utilization\n - `utilization_sp_a`: utilization of SPA\n - `utilization_sp_b`: utilization of SPB\n - `read_size_kb`/`write_size_kb`: read/write size KB\n - VNXDisk\n - `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS\n - `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS\n - `utilization`: utilization\n - `read_size_kb`/`write_size_kb`: read/write size KB\n - VNXSPPort\n - `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS\n - `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS\n - `read_size_kb`/`write_size_kb`: read/write size KB\n - VNXStorageGroup\n - `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS\n - `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS\n - `read_size_kb`/`write_size_kb`: read/write size KB\n - VNXStoragePool\n - `read_iops`/`write_iops`/`total_iops`: read/write/total IOPS\n - `read_mbps`/`write_mbps`/`total_mbps`: read/write/total MBPS\n - `read_size_kb`/`write_size_kb`: read/write size KB\n- Manage Unity System\n - supported resources\n - show system properties\n - show system capacity\n - list/create/delete storage pools\n - list/create/delete remote hosts\n - list/create/delete host initiator\n - list/create/delete luns\n - list/create/delete file systems\n - list/create/delete snapshots\n - list/create/delete NAS servers\n - list/create/delete CIFS servers\n - list/create/delete CIFS shares\n - list/create/delete NFS servers\n - list/create/delete NFS shares\n - list/create/delete DNS servers\n - list ip ports\n - list sas ports\n - list/create/delete iSCSI portals\n - list/create/delete link aggregations\n - list/create/delete Consistency Groups\n - list/create/modify/cancel move sessions\n - list/create/delete metric real time query\n - list metrics query result\n - list disks\n - list disk groups\n - list/create/delete tenants\n - list batteries\n - list daes\n - list fans\n - list memory modules\n - list management interfaces\n - list power supplies\n - list ssds\n - list remote interfaces\n - list/create/modify/verify/delete remote systems\n - list/create/modify/delete replication interfaces\n - list/create/modify/delete replication sessions\n - failover/failback/pause/resume/sync replication sessions\n - list/create/modify/delete block import sessions\n - pause/resume/cutover/commit/cancel block import sessions\n - discover migration objects\n - list/create/modify/delete snapshot schedule\n - supported feature/operations\n - CIFS share access control\n - NFS share access control\n - Remote hosts access\n - Persist historical metric data to csv files\n - Upload license\n - enable/disable LUN data reduction\n - LUN migration\n - LUN replication\n - CG replication\n - supported metrics\n - UnitySystem\n - read_iops\n - write_iops\n - total_iops\n - read_byte_rate\n - write_byte_rate\n - total_byte_rate\n - UnityDisk\n - read_iops\n - write_iops\n - total_iops\n - read_mbps\n - write_mbps\n - utilization\n - response_time\n - queue_length\n - read_byte_rate\n - write_byte_rate\n - total_byte_rate\n - UnityLun\n - read_iops\n - write_iops\n - total_iops\n - read_mbps\n - write_mbps\n - utilization\n - response_time\n - queue_length\n - read_byte_rate\n - write_byte_rate\n - total_byte_rate\n - UnityFileSystem\n - read_iops\n - write_iops\n - read_mbps\n - write_mbps\n - UnityStorageProcessor\n - net_in_mbps\n - net_out_mbps\n - block_read_iops\n - block_write_iops\n - block_total_iops\n - block_read_mbps\n - block_write_mbps\n - cifs_read_iops\n - cifs_write_iops\n - cifs_read_mbps\n - cifs_write_mbps\n - nfs_read_iops\n - nfs_write_iops\n - nfs_read_mbps\n - nfs_write_mbps\n - utilization\n - block_cache_read_hit_ratio\n - block_cache_write_hit_ratio\n - temperature\n - core_count\n - block_cache_dirty_size\n - read_byte_rate\n - write_byte_rate\n - total_byte_rate\n - fast_cache_read_hits\n - fast_cache_write_hits\n - fast_cache_read_hit_rate\n - fast_cache_write_hit_rate\n - UnityFcPort\n - read_iops\n - write_iops\n - total_iops\n - read_byte_rate\n - write_byte_rate\n - total_byte_rate\n - UnityIscsiNode\n - read_iops\n - write_iops\n - total_iops\n - read_byte_rate\n - write_byte_rate\n - total_byte_rate\n\nTutorial\n--------\n\nUser may reference three kinds of classes directly.\nAll of them are available under the storops module.\n\n- system classes: like VNXSystem and UnitySystem\n- exceptions: like UnityException, VNXException, etc.\n- enums: like VNXProvisionEnum, NFSTypeEnum, etc.\n\nWe recommend to try the library with IPython notebook or shell.\n\nAll operation/resource are accessed from the system instance.\n\nHere are some examples of the typical usage:\n\nGet the VNX System Instance\n```````````````````````````\nUse the vnx instance to access all sorts of resource and features.\n\n.. code-block:: python\n\n # initialize the VNX system instance\n >>> from storops import VNXSystem\n >>> vnx = VNXSystem('10.1.1.1', 'sysadmin', 'password')\n >>> vnx\n {\n \"VNXSystem\": {\n \"existed\": true,\n \"hash\": 5339308,\n \"name\": \"K10\",\n \"agent_rev\": \"7.33.8 (2.97)\",\n \"model_type\": \"Rackmount\",\n \"model\": \"VNX5800\",\n \"serial\": \"APM00123456789\",\n \"revision\": \"05.33.008.3.297\"\n }\n }\n\nGet the Unity System Instance\n`````````````````````````````\n\n.. code-block:: python\n\n from storops import UnitySystem\n unity = UnitySystem('<management ip>', '<user>', '<password>')\n\nGet Resources from System or Other Resources\n````````````````````````````````````````````\n\n.. code-block:: python\n\n # get all pools\n >>> pools = vnx.get_pool()\n {\n \"VNXPoolList\": [\n {\n \"VNXPool\": {\n \"luns\": [\n 1,\n 0\n ],\n \"status\": \"OK(0x0)\",\n \"current_operation_status\": \"N/A\",\n ...\n \"disks\": {\n \"VNXDiskList\": [\n {\n \"VNXDisk\": {\n \"private\": {},\n \"clariion_tla_part_number\": \"005050344PWR\",\n \"prct_bound\": {},\n ...\n\nGet a Resource\n``````````````\n\nAttention: you could still initialize the python object even\nif the resource doesn't exists on array.\nYou could use the \"existed\" property to check the existance of the\nresource.\n\n.. code-block:: python\n\n # get a existing LUN\n >>> lun = vnx.get_lun(lun_id=1)\n >>> lun\n {\n \"VNXLun\": {\n \"status\": \"OK(0x0)\",\n \"existed\": true,\n ...\n \"default_owner\": \"VNXSPEnum.SP_B\",\n \"name\": \"l0\"\n }\n }\n\n # get a non-existing lun\n >>> vnx.get_lun(name='hello')\n {\n \"VNXLun\": {\n \"existed\": false,\n \"hash\": 5699430\n }\n }\n\n\nAccess Resource Properties\n``````````````````````````\nEach properties printed in the json output could be accessed directly.\n\n.. code-block:: python\n\n # access resource properties\n >>> lun.status\n u'OK(0x0)'\n\n\nUpdate the Resource Property\n````````````````````````````\n\nAll properties of a resource will be updated if any of them is accessed.\nFor performance concern, the lib won't send query to array once properties\nare initialized.\nExplicitly call the *\"update()\"* function if you need a refresh.\n\n.. code-block:: python\n\n >>> vnx = VNXSystem('10.1.1.3') # no query to the system\n >>> vnx.model\n u'VNX5800' # send query, initialize all properties\n >>> vnx.name\n u'k10' # no query\n >>> vnx.update() # send query, update all properties\n\n\nExecuting Operations\n````````````````````\nMost of the create/modify operations can be found on the instance.\nCall these instance methods to execute the operation.\n\n.. code-block:: python\n\n # create lun\n >>> pool = pools[0]\n >>> lun1 = pool.create_lun('lun1', size_gb=2)\n\nRemove a Resource\n`````````````````\n\n.. code-block:: python\n\n # delete a resource\n >>> lun1.delete()\n\nGetting metrics\n```````````````\n- VNX\n\n.. code-block:: python\n\n >>> from storops import VNXSystem\n >>> vnx = VNXSystem('<management ip>', '<user>', '<password>')\n # Enable metric query\n >>> vnx.enable_perf_stats()\n # Get iops for Storage Processor\n >>> sp = vnx.get_sp()[0] \n >>> sp.read_iops\n 0.0\n >>> sp.write_iops\n 0.6666666666666666\n >>> sp.read_size_kb\n 0.0\n >>> sp.write_size_kb\n 4.2250000000000005\n\n \n- Unity\n\n.. code-block:: python\n\n >>> from storops import UnitySystem\n >>> unity = UnitySystem('<management ip>', '<user>', '<password>')\n # Enable metric query\n >>> unity.enable_perf_stats()\n # Once metric query enabled, storops will pull the realtime metric info\n # from Unity periodically and calculate them, the default interval is\n # 60s, so suggest to wait more than 60s for the first time calculation\n >>> import time; time.sleep(60)\n # Get iops, bandwidth for lun\n >>> lun1 = unity.get_lun()[0]\n >>> lun1.read_iops\n 0.05\n >>> lun1.total_iops\n 0.05\n >>> lun1.write_iops\n 0\n >>> lun1.read_byte_rate\n 25.6\n >>> lun1.write_byte_rate\n 0\n >>> lun1.total_byte_rate\n 25.6\n\nGetting Help\n````````````\n\n- If you are using IPython, use \"?\" to check the document and\n method signature.\n\n.. code-block::\n\n >>> pool.create_lun?\n Signature: pool.create_lun(lun_name=None, size_gb=1, lun_id=None,\n provision=None, tier=None, ignore_thresholds=None)\n Docstring: Create a pool LUN in the pool.\n File: c:\\work\\python\\storops\\storops\\vnx\\resource\\block_pool.py\n Type: instancemethod\n\n- In IPython, use tab to check all extrinsic methods/properties\n of the resource. Print the resource to check all intrinsic properties.\n\n.. code-block::\n\n >>> vnx.\n vnx.control_station_ip vnx.get_property_key vnx.parse_all\n vnx.create_cg vnx.get_property_label vnx.parsed_resource\n vnx.create_pool vnx.get_rg vnx.poll\n vnx.create_rg vnx.get_sg vnx.property_names\n vnx.create_sg vnx.get_snap vnx.delete_cg\n vnx.domain vnx.get_sp_port vnx.delete_disk\n vnx.existed vnx.heartbeat vnx.delete_pool\n vnx.get_available_disks vnx.install_disk vnx.delete_rg\n vnx.get_cg vnx.is_auto_tiering_enabled vnx.delete_sg\n vnx.get_connection_port vnx.is_compression_enabled vnx.delete_snap\n vnx.get_dict_repr vnx.is_dedup_enabled vnx.set_block_credential\n vnx.get_disk vnx.is_fast_cache_enabled vnx.set_cli\n vnx.get_fc_port vnx.is_mirror_view_async_enabled vnx.set_naviseccli\n vnx.get_fcoe_port vnx.is_mirror_view_enabled vnx.spa_ip\n vnx.get_index vnx.is_mirror_view_sync_enabled vnx.spb_ip\n vnx.get_iscsi_port vnx.is_sancopy_enabled vnx.stop_heart_beat\n vnx.get_lun vnx.is_snap_enabled vnx.update\n vnx.get_migration_session vnx.is_thin_enabled vnx.update_nodes_ip\n vnx.get_ndu vnx.is_valid vnx.with_no_poll\n vnx.get_pool vnx.json vnx.with_poll\n vnx.get_pool_feature vnx.parse\n\nHow to Run Unittests\n--------------------\n\nUnittests are included in the `storops_test` package.\n\nUse following command to install test dependencies.\n\n.. code-block:: bash\n\n $ pip install -r test-requirements.txt\n\nUse `pytest` to run the tests.\n\n.. code-block:: bash\n\n $ pytest storops_test\n\nOr you could use `tox` to run the tests.\n\n.. code-block:: bash\n\n $ tox -e py36\n\n\nHow to Contribute\n-----------------\n\n#. Open an issue at the `GitHub storops project`_.\n#. Fork the repository on GitHub and make changes on your branch.\n#. Add tests to cover your change.\n#. Send a pull request.\n#. Make sure to add yourself to \"Contributors\" listed below.\n\nContributors\n------------\n\nDell EMC Contributors\n`````````````````````\n\n- Ryan Liang <ryan.liang@dell.com>\n- Yong Huang <yong.huang@dell.com>\n- Dong Ding <dong.ding@dell.com>\n\nCommunity Contributors\n``````````````````````\n\n- Cedric Zhuang\n- Jay Xu\n- Ray Chen\n- Tina Tang\n- Peter Wang\n- Paulo Matias <matias@ufscar.br>\n\nPatches and Suggestions\n```````````````````````\n\n\n.. _GitHub storops project: https://github.com/emc-openstack/storops\n.. _Apache License version 2: LICENSE.txt\n",
"bugtrack_url": null,
"license": "Apache Software License",
"summary": "Python API for VNX and Unity.",
"version": "1.2.12",
"project_urls": {
"Homepage": "https://github.com/emc-openstack/storops"
},
"split_keywords": [
"vnx",
" unity",
" emc",
" storage"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4561e1d8b7960818c20712659467cc21f4cf681fbac3fc06ce4bb724a973f79a",
"md5": "7073aad605b16baca986b200f470a87f",
"sha256": "6e5f7abd9b18d02c5c9acda7a276720f893bb9082b1c77d428fb24e5d7b2e3f3"
},
"downloads": -1,
"filename": "storops-1.2.12-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "7073aad605b16baca986b200f470a87f",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7",
"size": 1444604,
"upload_time": "2025-07-30T03:17:08",
"upload_time_iso_8601": "2025-07-30T03:17:08.051849Z",
"url": "https://files.pythonhosted.org/packages/45/61/e1d8b7960818c20712659467cc21f4cf681fbac3fc06ce4bb724a973f79a/storops-1.2.12-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e18c469012c01ebcab33cb9976f1f2500ddbd1190a139f14300fe398d71cd2b1",
"md5": "9ac7b8fbc9053372505370e9bcbdd059",
"sha256": "8b9dc5e03dc1daf45b898ca7a0500cf52011709783fa3d159da115bb1e125e83"
},
"downloads": -1,
"filename": "storops-1.2.12.tar.gz",
"has_sig": false,
"md5_digest": "9ac7b8fbc9053372505370e9bcbdd059",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7",
"size": 739742,
"upload_time": "2025-07-30T03:17:09",
"upload_time_iso_8601": "2025-07-30T03:17:09.937059Z",
"url": "https://files.pythonhosted.org/packages/e1/8c/469012c01ebcab33cb9976f1f2500ddbd1190a139f14300fe398d71cd2b1/storops-1.2.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-30 03:17:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "emc-openstack",
"github_project": "storops",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"landscape": true,
"appveyor": true,
"requirements": [
{
"name": "requests",
"specs": [
[
">=",
"2.32.4"
]
]
},
{
"name": "PyYAML",
"specs": [
[
">=",
"6.0.2"
]
]
},
{
"name": "six",
"specs": [
[
">=",
"1.9.0"
]
]
},
{
"name": "enum34",
"specs": []
},
{
"name": "python-dateutil",
"specs": [
[
">=",
"2.4.2"
]
]
},
{
"name": "retryz",
"specs": [
[
">=",
"0.1.8"
]
]
},
{
"name": "cachez",
"specs": [
[
">=",
"0.1.0"
]
]
},
{
"name": "bitmath",
"specs": [
[
">=",
"1.3.0"
]
]
},
{
"name": "urllib3",
"specs": [
[
">=",
"2.5.0"
]
]
}
],
"tox": true,
"lcname": "storops"
}