diff --git a/README.rst b/README.rst index 805b4735..a551505b 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,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: 0.4.4 +VERSION: 0.4.5 A minimalist Python library to manage VNX/Unity systems. This document lies in the source code and go with the release. diff --git a/requirements.os.txt b/requirements.os.txt new file mode 100644 index 00000000..f0d14836 --- /dev/null +++ b/requirements.os.txt @@ -0,0 +1,8 @@ +## Please download these files with "--no-deps" option, e.g. +## pip download --no-deps -r /requirements.os.txt +python-dateutil>=2.4.2 # BSD +retryz>=0.1.8 # Apache-2.0 +cachez>=0.1.0 # Apache-2.0 +bitmath>=1.3.0 # MIT +queuelib>=1.4.2 # BSD +storops # Apache-2.0 diff --git a/requirements.txt b/requirements.txt index 9b392a47..2872e5cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,11 @@ -future>=0.15.1 -paramiko>=1.13.0 -python-dateutil>=2.4.2 -PyYAML>=3.11 -requests!=2.9.0,>=2.8.1 -retryz>=0.1.8 -cachez>=0.1.0 -six>=1.9.0 -bitmath>=1.3.0 -queuelib>=1.4.2 +paramiko>=1.13.0 # LGPLv2.1+, cinder, manila +requests!=2.9.0,>=2.8.1 # Apache-2.0, cinder, manila +PyYAML>=3.11 # MIT, cinder, manila +six>=1.9.0 # MIT, cinder, manila +enum34>=1.0.4;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD, cinder + +python-dateutil>=2.4.2 # BSD +retryz>=0.1.8 # Apache-2.0 +cachez>=0.1.0 # Apache-2.0 +bitmath>=1.3.0 # MIT +queuelib>=1.4.2 # BSD diff --git a/setup.py b/setup.py index 6227c1d2..909a377c 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,6 @@ import io import os import re -import sys from setuptools import setup, find_packages @@ -54,14 +53,8 @@ def read_requirements(filename): return f.read().splitlines() -def install_requirements(filename): - packages = read_requirements(filename) - if sys.version_info < (3, 4): - packages.append("enum34>=1.0.4") - - def get_description(): - return "Python API for VNX and Unity." + return 'Python API for VNX and Unity.' def get_long_description(): @@ -70,29 +63,30 @@ def get_long_description(): setup( - name="storops", + name='storops', version=version(), - author="Cedric Zhuang", - author_email="cedric.zhuang@gmail.com", + author='Cedric Zhuang', + author_email='cedric.zhuang@gmail.com', + url='https://github.com/emc-openstack/storops', description=get_description(), - license="Apache Software License", - keywords="VNX", + license='Apache Software License', + keywords='VNX Unity EMC Storage', include_package_data=True, packages=find_packages(), platforms=['any'], long_description=get_long_description(), classifiers=[ - "Programming Language :: Python", + 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', - "Natural Language :: English", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Development Status :: 4 - Beta", - "Topic :: Utilities", - "License :: OSI Approved :: Apache Software License", + 'Natural Language :: English', + 'Intended Audience :: Developers', + 'Operating System :: OS Independent', + 'Development Status :: 4 - Beta', + 'Topic :: Utilities', + 'License :: OSI Approved :: Apache Software License', ], install_requires=read_requirements('requirements.txt'), tests_require=read_requirements('test-requirements.txt') diff --git a/storops/lib/converter.py b/storops/lib/converter.py index e8537526..67212553 100644 --- a/storops/lib/converter.py +++ b/storops/lib/converter.py @@ -23,7 +23,6 @@ import bitmath import dateutil.parser -from past.builtins import filter import six from storops.vnx import enums diff --git a/storops/unity/resource/filesystem.py b/storops/unity/resource/filesystem.py index 431a811f..e33fa7aa 100644 --- a/storops/unity/resource/filesystem.py +++ b/storops/unity/resource/filesystem.py @@ -16,7 +16,6 @@ from __future__ import unicode_literals import logging -from past.builtins import filter from storops.exception import UnityResourceNotFoundError, \ UnityCifsServiceNotEnabledError from storops.unity.enums import FSSupportedProtocolEnum, TieringPolicyEnum, \ @@ -135,8 +134,8 @@ def has_snap(self): :return: false if no snaps or all snaps are destroying. """ - return len(filter(lambda s: s.state != SnapStateEnum.DESTROYING, - self.snapshots)) > 0 + return len(list(filter(lambda s: s.state != SnapStateEnum.DESTROYING, + self.snapshots))) > 0 class UnityFileSystemList(UnityResourceList): diff --git a/storops/vnx/resource/vnx_domain.py b/storops/vnx/resource/vnx_domain.py index 1265aef1..49be8c79 100644 --- a/storops/vnx/resource/vnx_domain.py +++ b/storops/vnx/resource/vnx_domain.py @@ -19,8 +19,6 @@ import re from datetime import datetime -from past.builtins import filter - from storops.lib.common import clear_instance_cache from storops.lib.converter import to_datetime from storops.vnx.enums import VNXSPEnum @@ -160,7 +158,7 @@ def filter_by_sp_name(member): sp = VNXSPEnum.parse(member.name) return sp == index - result = filter(filter_by_sp_name, self.list) + result = list(filter(filter_by_sp_name, self.list)) ret = None if len(result) > 0: ret = result[0]