diff --git a/README.rst b/README.rst index 73773533..d3969dc8 100755 --- a/README.rst +++ b/README.rst @@ -19,7 +19,7 @@ StorOps: The Python Library for VNX & Unity .. image:: https://landscape.io/github/emc-openstack/storops/master/landscape.svg?style=flat :target: https://landscape.io/github/emc-openstack/storops/ -VERSION: 1.2.1 +VERSION: 1.2.2 A minimalist Python library to manage VNX/Unity systems. This document lies in the source code and go with the release. @@ -187,43 +187,85 @@ Feature List - LUN migration - LUN replication - supported metrics - - system - - read/write/total IOPS - - read/write/total bandwidth - - disk - - read/write/total IOPS - - read/write/total bandwidth + - 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 - - lun - - read/write/total IOPS - - read/write/total bandwidth + - 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 - - filesystem - - read/write IOPS - - read/write bandwidth - - storage processor - - net in/out bandwidth - - block read/write/total IOPS - - block read/write/total bandwidth - - CIFS read/write IOPS - - CIFS read/write bandwidth - - NFS read/write IOPS - - NFS read/write bandwidth + - 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/write hit ratio - - block cache dirty size - - fast cache read/write hits - - fast cache read/write hit rate - - fc port - - read/write/total IOPS - - read/write/total bandwidth - - iscsi node - - read/write/total IOPS - - read/write/total bandwidth + - 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 -------- @@ -380,6 +422,34 @@ Remove a Resource # delete a resource >>> lun1.delete() +Getting metrics +``````````````` + +.. code-block:: python + + >>> from storops import UnitySystem + >>> unity = UnitySystem('', '', '') + # 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 ```````````` diff --git a/storops/unity/enums.py b/storops/unity/enums.py index 68e16500..182e2642 100644 --- a/storops/unity/enums.py +++ b/storops/unity/enums.py @@ -322,6 +322,7 @@ class EnclosureTypeEnum(UnityEnum): NAGA_12G_SAS_DAE = (32, '80 Drive 12G DAE') MIRANDA_12G_SAS_DPE = (36, '25 Drive 12G DPE') RHEA_12G_SAS_DPE = (37, '12 Drive 12G DPE') + SCORP_12G_SAS_DPE = (38, '25 Drive 12G DPE') VIRTUAL_DPE = (100, 'Virtual DPE') UNSUPPORTED = (999, 'Unsupported Enclosure') @@ -737,6 +738,7 @@ class MetricTypeEnum(UnityEnum): class DiskTechnologyEnum(UnityEnum): SAS = (1, 'SAS') NL_SAS = (2, 'NL_SAS') + EFD = (5, 'EFD') SAS_FLASH_2 = (6, 'SAS_FLASH_2') SAS_FLASH_3 = (7, 'SAS_FLASH_3') SAS_FLASH_4 = (8, 'SAS_FLASH_4') diff --git a/storops/unity/resource/nfs_share.py b/storops/unity/resource/nfs_share.py index 07bcadad..5577576c 100644 --- a/storops/unity/resource/nfs_share.py +++ b/storops/unity/resource/nfs_share.py @@ -81,7 +81,6 @@ def allow_root(self, *hosts): def allow_ro(self, *hosts): self.delete_access(*hosts) self.ro = self._add(self.ro, hosts) - self.root = self._add(self.root, hosts) return self def allow_rw(self, *hosts): diff --git a/storops_test/unity/rest_data/nfsShare/index.json b/storops_test/unity/rest_data/nfsShare/index.json index c169d63c..a237032f 100644 --- a/storops_test/unity/rest_data/nfsShare/index.json +++ b/storops_test/unity/rest_data/nfsShare/index.json @@ -81,11 +81,6 @@ { "url": "/api/instances/nfsShare/NFSShare_30/action/modify?compact=True", "body": { - "rootAccessHosts": [ - { - "id": "Host_11" - } - ], "readOnlyHosts": [ { "id": "Host_11" diff --git a/storops_test/unity/rest_data/storageResource/index.json b/storops_test/unity/rest_data/storageResource/index.json index e1465843..c44105a1 100644 --- a/storops_test/unity/rest_data/storageResource/index.json +++ b/storops_test/unity/rest_data/storageResource/index.json @@ -407,14 +407,6 @@ "id": "Host_7" } ], - "rootAccessHosts": [ - { - "id": "Host_1" - }, - { - "id": "Host_11" - } - ], "readOnlyHosts": [ { "id": "Host_1" @@ -970,11 +962,6 @@ "id": "NFSShare_32" }, "nfsShareParameters": { - "rootAccessHosts": [ - { - "id": "Host_16" - } - ], "readOnlyHosts": [ { "id": "Host_16" diff --git a/utility/rpm_publish/python-storops-vnx.spec b/utility/rpm_publish/python-storops-vnx.spec index 58982d5d..ea6c093d 100644 --- a/utility/rpm_publish/python-storops-vnx.spec +++ b/utility/rpm_publish/python-storops-vnx.spec @@ -7,7 +7,7 @@ %global pypi_name storops Name: python-%{pypi_name}-vnx -Version: 1.2.1 +Version: 1.2.2 Release: 1%{?dist} Summary: Library for managing Unity/VNX systems. @@ -70,6 +70,9 @@ Library for managing Unity/VNX systems. Please refer to https://github.com/emc-o %changelog +* Thu Nov 7 2019 Ryan Liang - 1.2.2-1 +- Release v1.2.2: https://github.com/emc-openstack/storops/releases/tag/r1.2.2 + * Mon Aug 12 2019 Ryan Liang - 1.2.1-1 - Release v1.2.1: https://github.com/emc-openstack/storops/releases/tag/r1.2.1 diff --git a/utility/rpm_publish/python-storops.spec b/utility/rpm_publish/python-storops.spec index 45fe8b71..4b939e77 100644 --- a/utility/rpm_publish/python-storops.spec +++ b/utility/rpm_publish/python-storops.spec @@ -8,7 +8,7 @@ # %%global pre_release dev.1 Name: python-%{pypi_name} -Version: 1.2.1 +Version: 1.2.2 Release: %{?pre_release:0.%{pre_release}}%{!?pre_release:1}%{?dist} Summary: Library for managing Unity/VNX systems. @@ -134,6 +134,9 @@ Library for managing Unity/VNX systems. Please refer to https://github.com/emc-o %changelog +* Thu Nov 7 2019 Ryan Liang - 1.2.2-1 +- Release v1.2.2: https://github.com/emc-openstack/storops/releases/tag/r1.2.2 + * Mon Aug 12 2019 Ryan Liang - 1.2.1-1 - Release v1.2.1: https://github.com/emc-openstack/storops/releases/tag/r1.2.1