From fa125b77147f31fafde719075150bc267ce82286 Mon Sep 17 00:00:00 2001 From: Yulia Portnova Date: Tue, 3 Sep 2013 14:37:34 +0300 Subject: [PATCH] setup.py fixed --- LICENSE | 2 +- README.rst | 10 ++++---- doc/Makefile | 4 +-- doc/source/conf.py | 8 +++--- doc/source/index.rst | 30 +++++++++++----------- manilaclient/__init__.py | 4 +-- manilaclient/base.py | 8 +++--- manilaclient/client.py | 12 ++++----- manilaclient/extension.py | 4 +-- manilaclient/openstack/common/version.py | 2 +- manilaclient/service_catalog.py | 8 +++--- manilaclient/shell.py | 30 +++++++++++----------- manilaclient/utils.py | 4 +-- manilaclient/v1/__init__.py | 2 +- manilaclient/v1/client.py | 22 ++++++++-------- manilaclient/v1/contrib/list_extensions.py | 4 +-- manilaclient/v1/limits.py | 2 +- manilaclient/v1/quota_classes.py | 2 +- manilaclient/v1/quotas.py | 2 +- manilaclient/v1/share_snapshots.py | 4 +-- manilaclient/v1/shares.py | 6 ++--- manilaclient/v1/shell.py | 4 +-- manilaclient/v1/volume_backups.py | 2 +- manilaclient/v1/volume_backups_restore.py | 2 +- manilaclient/v1/volume_snapshots.py | 2 +- manilaclient/v1/volume_types.py | 2 +- manilaclient/v1/volumes.py | 2 +- manilaclient/v2/__init__.py | 2 +- manilaclient/v2/client.py | 22 ++++++++-------- manilaclient/v2/contrib/list_extensions.py | 4 +-- manilaclient/v2/limits.py | 2 +- manilaclient/v2/quota_classes.py | 2 +- manilaclient/v2/quotas.py | 2 +- manilaclient/v2/share_snapshots.py | 4 +-- manilaclient/v2/shares.py | 6 ++--- manilaclient/v2/shell.py | 4 +-- manilaclient/v2/volume_backups.py | 2 +- manilaclient/v2/volume_backups_restore.py | 2 +- manilaclient/v2/volume_snapshots.py | 2 +- manilaclient/v2/volume_types.py | 2 +- manilaclient/v2/volumes.py | 2 +- openstack-common.conf | 2 +- run_tests.sh | 8 +++--- setup.py | 2 +- tests/test_base.py | 6 ++--- tests/test_client.py | 18 ++++++------- tests/test_http.py | 4 +-- tests/test_service_catalog.py | 4 +-- tests/test_shell.py | 6 ++--- tests/test_utils.py | 6 ++--- tests/v1/contrib/test_list_extensions.py | 4 +-- tests/v1/fakes.py | 4 +-- tests/v1/shares/fakes.py | 4 +-- tests/v1/shares/test_share_snapshots.py | 4 +-- tests/v1/shares/test_shares.py | 4 +-- tests/v1/test_auth.py | 4 +-- tests/v1/test_shell.py | 6 ++--- tests/v1/test_types.py | 4 +-- tests/v2/contrib/test_list_extensions.py | 4 +-- tests/v2/fakes.py | 4 +-- tests/v2/shares/fakes.py | 4 +-- tests/v2/shares/test_share_snapshots.py | 4 +-- tests/v2/shares/test_shares.py | 4 +-- tests/v2/test_auth.py | 4 +-- tests/v2/test_shell.py | 4 +-- tests/v2/test_types.py | 2 +- tools/cinder.bash_completion | 2 +- tools/install_venv.py | 8 +++--- tox.ini | 2 +- 69 files changed, 187 insertions(+), 187 deletions(-) diff --git a/LICENSE b/LICENSE index 3ecd07361..787acb82f 100644 --- a/LICENSE +++ b/LICENSE @@ -178,7 +178,7 @@ All rights reserved. incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. ---- License for python-cinderclient versions prior to 2.1 --- +--- License for python-manilaclient versions prior to 2.1 --- All rights reserved. diff --git a/README.rst b/README.rst index 86a8669bf..7d034f0d1 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ Python bindings to the OpenStack Cinder API =========================================== This is a client for the OpenStack Cinder API. There's a Python API (the -``cinderclient`` module), and a command-line script (``cinder``). Each +``manilaclient`` module), and a command-line script (``cinder``). Each implements 100% of the OpenStack Cinder API. See the `OpenStack CLI guide`_ for information on how to use the ``cinder`` @@ -16,13 +16,13 @@ The project is hosted on `Launchpad`_, where bugs can be filed. The code is hosted on `Github`_. Patches must be submitted using `Gerrit`_, *not* Github pull requests. -.. _Github: https://github.com/openstack/python-cinderclient -.. _Launchpad: https://launchpad.net/python-cinderclient +.. _Github: https://github.com/openstack/python-manilaclient +.. _Launchpad: https://launchpad.net/python-manilaclient .. _Gerrit: http://wiki.openstack.org/GerritWorkflow This code a fork of `Jacobian's python-cloudservers`__ If you need API support for the Rackspace API solely or the BSD license, you should use that repository. -python-cinderclient is licensed under the Apache License like the rest of OpenStack. +python-manilaclient is licensed under the Apache License like the rest of OpenStack. __ http://github.com/jacobian/python-cloudservers @@ -144,7 +144,7 @@ There's also a complete Python API, but it has not yet been documented. Quick-start using keystone:: # use v2.0 auth with http://example.com:5000/v2.0/") - >>> from cinderclient.v1 import client + >>> from manilaclient.v1 import client >>> nt = client.Client(USER, PASS, TENANT, AUTH_URL, service_type="volume") >>> nt.volumes.list() [...] diff --git a/doc/Makefile b/doc/Makefile index f948ac903..76a657119 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -62,9 +62,9 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/python-cinderclient.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/python-manilaclient.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python-cinderclient.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python-manilaclient.qhc" latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex diff --git a/doc/source/conf.py b/doc/source/conf.py index 7abb3d0ef..ab866ed23 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# python-cinderclient documentation build configuration file, created by +# python-manilaclient documentation build configuration file, created by # sphinx-quickstart on Sun Dec 6 14:19:25 2009. # # This file is execfile()d with current directory set to its containing dir. @@ -42,7 +42,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'python-cinderclient' +project = u'python-manilaclient' copyright = u'Rackspace, based on work by Jacob Kaplan-Moss' # The version info for the project you're documenting, acts as replacement for @@ -164,7 +164,7 @@ html_static_path = ['_static'] #html_file_suffix = '' # Output file base name for HTML help builder. -htmlhelp_basename = 'python-cinderclientdoc' +htmlhelp_basename = 'python-manilaclientdoc' # -- Options for LaTeX output ------------------------------------------------- @@ -179,7 +179,7 @@ htmlhelp_basename = 'python-cinderclientdoc' # (source start file, target name, title, author, documentclass [howto/manual]) # . latex_documents = [ - ('index', 'python-cinderclient.tex', u'python-cinderclient Documentation', + ('index', 'python-manilaclient.tex', u'python-manilaclient Documentation', u'Rackspace - based on work by Jacob Kaplan-Moss', 'manual'), ] diff --git a/doc/source/index.rst b/doc/source/index.rst index e82c824ec..75c03fc8d 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -2,7 +2,7 @@ Python API ========== In order to use the python api directly, you must first obtain an auth token and identify which endpoint you wish to speak to. Once you have done so, you can use the API like so:: - >>> from cinderclient import client + >>> from manilaclient import client >>> cinder = client.Client('1', $OS_USER_NAME, $OS_PASSWORD, $OS_TENANT_NAME, $OS_AUTH_URL) >>> cinder.volumes.list() [] @@ -30,11 +30,11 @@ Release Notes 1.0.4 ----- * Added suport for backup-service commands -.. _1163546: http://bugs.launchpad.net/python-cinderclient/+bug/1163546 -.. _1161857: http://bugs.launchpad.net/python-cinderclient/+bug/1161857 -.. _1160898: http://bugs.launchpad.net/python-cinderclient/+bug/1160898 -.. _1161857: http://bugs.launchpad.net/python-cinderclient/+bug/1161857 -.. _1156994: http://bugs.launchpad.net/python-cinderclient/+bug/1156994 +.. _1163546: http://bugs.launchpad.net/python-manilaclient/+bug/1163546 +.. _1161857: http://bugs.launchpad.net/python-manilaclient/+bug/1161857 +.. _1160898: http://bugs.launchpad.net/python-manilaclient/+bug/1160898 +.. _1161857: http://bugs.launchpad.net/python-manilaclient/+bug/1161857 +.. _1156994: http://bugs.launchpad.net/python-manilaclient/+bug/1156994 1.0.3 ----- @@ -46,15 +46,15 @@ Release Notes * Correct parsing of volume metadata * Enable force delete of volumes and snapshots in error state * Implement clone volume API call -* Add list-extensions call to cinderclient +* Add list-extensions call to manilaclient * Add bootable column to list output -* Add retries to cinderclient operations +* Add retries to manilaclient operations * Add Type/Extra-Specs support * Add volume and snapshot rename commands -.. _1155655: http://bugs.launchpad.net/python-cinderclient/+bug/1155655 -.. _1130730: http://bugs.launchpad.net/python-cinderclient/+bug/1130730 -.. _1068521: http://bugs.launchpad.net/python-cinderclient/+bug/1068521 -.. _1052161: http://bugs.launchpad.net/python-cinderclient/+bug/1052161 -.. _1071003: http://bugs.launchpad.net/python-cinderclient/+bug/1071003 -.. _1065275: http://bugs.launchpad.net/python-cinderclient/+bug/1065275 -.. _1053432: http://bugs.launchpad.net/python-cinderclient/+bug/1053432 +.. _1155655: http://bugs.launchpad.net/python-manilaclient/+bug/1155655 +.. _1130730: http://bugs.launchpad.net/python-manilaclient/+bug/1130730 +.. _1068521: http://bugs.launchpad.net/python-manilaclient/+bug/1068521 +.. _1052161: http://bugs.launchpad.net/python-manilaclient/+bug/1052161 +.. _1071003: http://bugs.launchpad.net/python-manilaclient/+bug/1071003 +.. _1065275: http://bugs.launchpad.net/python-manilaclient/+bug/1065275 +.. _1053432: http://bugs.launchpad.net/python-manilaclient/+bug/1053432 diff --git a/manilaclient/__init__.py b/manilaclient/__init__.py index 6f6043c07..a0f7e7be2 100644 --- a/manilaclient/__init__.py +++ b/manilaclient/__init__.py @@ -14,9 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.openstack.common import version +from manilaclient.openstack.common import version -version_info = version.VersionInfo('python-cinderclient') +version_info = version.VersionInfo('python-manilaclient') # We have a circular import problem when we first run python setup.py sdist # It's harmless, so deflect it. try: diff --git a/manilaclient/base.py b/manilaclient/base.py index 1ee621ae9..ed226e9d0 100644 --- a/manilaclient/base.py +++ b/manilaclient/base.py @@ -22,8 +22,8 @@ Base utilities to build API operation managers and objects on top of. import contextlib import hashlib import os -from cinderclient import exceptions -from cinderclient import utils +from manilaclient import exceptions +from manilaclient import utils # Python 2.4 compat @@ -92,8 +92,8 @@ class Manager(utils.HookableMixin): Delete is not handled because listings are assumed to be performed often enough to keep the cache reasonably up-to-date. """ - base_dir = utils.env('CINDERCLIENT_UUID_CACHE_DIR', - default="~/.cinderclient") + base_dir = utils.env('manilaclient_UUID_CACHE_DIR', + default="~/.manilaclient") # NOTE(sirp): Keep separate UUID caches for each username + endpoint # pair diff --git a/manilaclient/client.py b/manilaclient/client.py index 3a4a29688..1b34ce26e 100644 --- a/manilaclient/client.py +++ b/manilaclient/client.py @@ -27,14 +27,14 @@ if not hasattr(urlparse, 'parse_qsl'): import requests -from cinderclient import exceptions -from cinderclient import service_catalog -from cinderclient import utils +from manilaclient import exceptions +from manilaclient import service_catalog +from manilaclient import utils class HTTPClient(object): - USER_AGENT = 'python-cinderclient' + USER_AGENT = 'python-manilaclient' def __init__(self, user, password, projectid, auth_url, insecure=False, timeout=None, tenant_id=None, proxy_tenant_id=None, @@ -360,8 +360,8 @@ class HTTPClient(object): def get_client_class(version): version_map = { - '1': 'cinderclient.v1.client.Client', - '2': 'cinderclient.v2.client.Client', + '1': 'manilaclient.v1.client.Client', + '2': 'manilaclient.v2.client.Client', } try: client_path = version_map[str(version)] diff --git a/manilaclient/extension.py b/manilaclient/extension.py index ced67f0c7..82fa8f182 100644 --- a/manilaclient/extension.py +++ b/manilaclient/extension.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import base -from cinderclient import utils +from manilaclient import base +from manilaclient import utils class Extension(utils.HookableMixin): diff --git a/manilaclient/openstack/common/version.py b/manilaclient/openstack/common/version.py index c476d19af..56bdb7756 100644 --- a/manilaclient/openstack/common/version.py +++ b/manilaclient/openstack/common/version.py @@ -52,7 +52,7 @@ class VersionInfo(object): # The most likely cause for this is running tests in a tree # produced from a tarball where the package itself has not been # installed into anything. Revert to setup-time logic. - from cinderclient.openstack.common import setup + from manilaclient.openstack.common import setup return setup.get_version(self.package) def release_string(self): diff --git a/manilaclient/service_catalog.py b/manilaclient/service_catalog.py index e1778db8d..5f5919ada 100644 --- a/manilaclient/service_catalog.py +++ b/manilaclient/service_catalog.py @@ -16,7 +16,7 @@ # limitations under the License. -import cinderclient.exceptions +import manilaclient.exceptions class ServiceCatalog(object): @@ -41,7 +41,7 @@ class ServiceCatalog(object): if not filter_value or endpoint[attr] == filter_value: matching_endpoints.append(endpoint) if not matching_endpoints: - raise cinderclient.exceptions.EndpointNotFound() + raise manilaclient.exceptions.EndpointNotFound() # We don't always get a service catalog back ... if not 'serviceCatalog' in self.catalog['access']: @@ -69,9 +69,9 @@ class ServiceCatalog(object): matching_endpoints.append(endpoint) if not matching_endpoints: - raise cinderclient.exceptions.EndpointNotFound() + raise manilaclient.exceptions.EndpointNotFound() elif len(matching_endpoints) > 1: - raise cinderclient.exceptions.AmbiguousEndpoints( + raise manilaclient.exceptions.AmbiguousEndpoints( endpoints=matching_endpoints) else: return matching_endpoints[0][endpoint_type] diff --git a/manilaclient/shell.py b/manilaclient/shell.py index bf952987d..16263326a 100644 --- a/manilaclient/shell.py +++ b/manilaclient/shell.py @@ -27,13 +27,13 @@ import pkgutil import sys import logging -from cinderclient import client -from cinderclient import exceptions as exc -import cinderclient.extension -from cinderclient.openstack.common import strutils -from cinderclient import utils -from cinderclient.v1 import shell as shell_v1 -from cinderclient.v2 import shell as shell_v2 +from manilaclient import client +from manilaclient import exceptions as exc +import manilaclient.extension +from manilaclient.openstack.common import strutils +from manilaclient import utils +from manilaclient.v1 import shell as shell_v1 +from manilaclient.v2 import shell as shell_v2 DEFAULT_OS_VOLUME_API_VERSION = "1" DEFAULT_CINDER_ENDPOINT_TYPE = 'publicURL' @@ -42,10 +42,10 @@ DEFAULT_CINDER_SERVICE_TYPE = 'compute' logger = logging.getLogger(__name__) -class CinderClientArgumentParser(argparse.ArgumentParser): +class manilaclientArgumentParser(argparse.ArgumentParser): def __init__(self, *args, **kwargs): - super(CinderClientArgumentParser, self).__init__(*args, **kwargs) + super(manilaclientArgumentParser, self).__init__(*args, **kwargs) def error(self, message): """error(message: string) @@ -67,7 +67,7 @@ class CinderClientArgumentParser(argparse.ArgumentParser): class OpenStackCinderShell(object): def get_base_parser(self): - parser = CinderClientArgumentParser( + parser = manilaclientArgumentParser( prog='cinder', description=__doc__.strip(), epilog='See "cinder help COMMAND" ' @@ -83,11 +83,11 @@ class OpenStackCinderShell(object): parser.add_argument('--version', action='version', - version=cinderclient.__version__) + version=manilaclient.__version__) parser.add_argument('--debug', action='store_true', - default=utils.env('CINDERCLIENT_DEBUG', + default=utils.env('manilaclient_DEBUG', default=False), help="Print debugging output") @@ -185,7 +185,7 @@ class OpenStackCinderShell(object): 'Defaults to env[OS_CACERT]') parser.add_argument('--insecure', - default=utils.env('CINDERCLIENT_INSECURE', + default=utils.env('manilaclient_INSECURE', default=False), action='store_true', help=argparse.SUPPRESS) @@ -254,14 +254,14 @@ class OpenStackCinderShell(object): self._discover_via_python_path(version), self._discover_via_contrib_path(version)): - extension = cinderclient.extension.Extension(name, module) + extension = manilaclient.extension.Extension(name, module) extensions.append(extension) return extensions def _discover_via_python_path(self, version): for (module_loader, name, ispkg) in pkgutil.iter_modules(): - if name.endswith('python_cinderclient_ext'): + if name.endswith('python_manilaclient_ext'): if not hasattr(module_loader, 'load_module'): # Python 2.6 compat: actually get an ImpImporter obj module_loader = module_loader.find_module(name) diff --git a/manilaclient/utils.py b/manilaclient/utils.py index 558c29221..6f740f544 100644 --- a/manilaclient/utils.py +++ b/manilaclient/utils.py @@ -5,8 +5,8 @@ import uuid import prettytable -from cinderclient import exceptions -from cinderclient.openstack.common import strutils +from manilaclient import exceptions +from manilaclient.openstack.common import strutils def arg(*args, **kwargs): diff --git a/manilaclient/v1/__init__.py b/manilaclient/v1/__init__.py index cecfacd23..1da74fc3b 100644 --- a/manilaclient/v1/__init__.py +++ b/manilaclient/v1/__init__.py @@ -14,4 +14,4 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.v1.client import Client +from manilaclient.v1.client import Client diff --git a/manilaclient/v1/client.py b/manilaclient/v1/client.py index 11f8d8583..a47ef2ad7 100644 --- a/manilaclient/v1/client.py +++ b/manilaclient/v1/client.py @@ -1,14 +1,14 @@ -from cinderclient import client -from cinderclient.v1 import limits -from cinderclient.v1 import quota_classes -from cinderclient.v1 import quotas -from cinderclient.v1 import shares -from cinderclient.v1 import share_snapshots -from cinderclient.v1 import volumes -from cinderclient.v1 import volume_snapshots -from cinderclient.v1 import volume_types -from cinderclient.v1 import volume_backups -from cinderclient.v1 import volume_backups_restore +from manilaclient import client +from manilaclient.v1 import limits +from manilaclient.v1 import quota_classes +from manilaclient.v1 import quotas +from manilaclient.v1 import shares +from manilaclient.v1 import share_snapshots +from manilaclient.v1 import volumes +from manilaclient.v1 import volume_snapshots +from manilaclient.v1 import volume_types +from manilaclient.v1 import volume_backups +from manilaclient.v1 import volume_backups_restore class Client(object): diff --git a/manilaclient/v1/contrib/list_extensions.py b/manilaclient/v1/contrib/list_extensions.py index 91fa0405e..fb9f38053 100644 --- a/manilaclient/v1/contrib/list_extensions.py +++ b/manilaclient/v1/contrib/list_extensions.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import base -from cinderclient import utils +from manilaclient import base +from manilaclient import utils class ListExtResource(base.Resource): diff --git a/manilaclient/v1/limits.py b/manilaclient/v1/limits.py index 2008a6909..f446e1d1e 100644 --- a/manilaclient/v1/limits.py +++ b/manilaclient/v1/limits.py @@ -1,6 +1,6 @@ # Copyright 2011 OpenStack LLC. -from cinderclient import base +from manilaclient import base class Limits(base.Resource): diff --git a/manilaclient/v1/quota_classes.py b/manilaclient/v1/quota_classes.py index 6aa4fdc40..349a19d79 100644 --- a/manilaclient/v1/quota_classes.py +++ b/manilaclient/v1/quota_classes.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import base +from manilaclient import base class QuotaClassSet(base.Resource): diff --git a/manilaclient/v1/quotas.py b/manilaclient/v1/quotas.py index 2ac22dfc3..f12674a1e 100644 --- a/manilaclient/v1/quotas.py +++ b/manilaclient/v1/quotas.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import base +from manilaclient import base class QuotaSet(base.Resource): diff --git a/manilaclient/v1/share_snapshots.py b/manilaclient/v1/share_snapshots.py index dbbb2dc76..563434525 100644 --- a/manilaclient/v1/share_snapshots.py +++ b/manilaclient/v1/share_snapshots.py @@ -17,8 +17,8 @@ import os import urllib -from cinderclient import base -from cinderclient import utils +from manilaclient import base +from manilaclient import utils class ShareSnapshot(base.Resource): diff --git a/manilaclient/v1/shares.py b/manilaclient/v1/shares.py index 1eaeb3fc9..bc5f345d7 100644 --- a/manilaclient/v1/shares.py +++ b/manilaclient/v1/shares.py @@ -19,9 +19,9 @@ import os import re import urllib -from cinderclient import base -from cinderclient import exceptions -from cinderclient import utils +from manilaclient import base +from manilaclient import exceptions +from manilaclient import utils class Share(base.Resource): diff --git a/manilaclient/v1/shell.py b/manilaclient/v1/shell.py index ff212a30f..0b9f9c19e 100644 --- a/manilaclient/v1/shell.py +++ b/manilaclient/v1/shell.py @@ -20,8 +20,8 @@ import os import sys import time -from cinderclient import exceptions -from cinderclient import utils +from manilaclient import exceptions +from manilaclient import utils def _poll_for_status(poll_fn, obj_id, action, final_ok_states, diff --git a/manilaclient/v1/volume_backups.py b/manilaclient/v1/volume_backups.py index 89056af64..7c9a514c8 100644 --- a/manilaclient/v1/volume_backups.py +++ b/manilaclient/v1/volume_backups.py @@ -17,7 +17,7 @@ Volume Backups interface (1.1 extension). """ -from cinderclient import base +from manilaclient import base class VolumeBackup(base.Resource): diff --git a/manilaclient/v1/volume_backups_restore.py b/manilaclient/v1/volume_backups_restore.py index 9405f12ff..deea6df44 100644 --- a/manilaclient/v1/volume_backups_restore.py +++ b/manilaclient/v1/volume_backups_restore.py @@ -18,7 +18,7 @@ This is part of the Volume Backups interface. """ -from cinderclient import base +from manilaclient import base class VolumeBackupsRestore(base.Resource): diff --git a/manilaclient/v1/volume_snapshots.py b/manilaclient/v1/volume_snapshots.py index 50fa56645..1ced95f86 100644 --- a/manilaclient/v1/volume_snapshots.py +++ b/manilaclient/v1/volume_snapshots.py @@ -18,7 +18,7 @@ Volume snapshot interface (1.1 extension). """ import urllib -from cinderclient import base +from manilaclient import base class Snapshot(base.Resource): diff --git a/manilaclient/v1/volume_types.py b/manilaclient/v1/volume_types.py index 93eabd303..3a29b1f5c 100644 --- a/manilaclient/v1/volume_types.py +++ b/manilaclient/v1/volume_types.py @@ -18,7 +18,7 @@ Volume Type interface. """ -from cinderclient import base +from manilaclient import base class VolumeType(base.Resource): diff --git a/manilaclient/v1/volumes.py b/manilaclient/v1/volumes.py index 7ab7e3c22..50a5294d5 100644 --- a/manilaclient/v1/volumes.py +++ b/manilaclient/v1/volumes.py @@ -18,7 +18,7 @@ Volume interface (1.1 extension). """ import urllib -from cinderclient import base +from manilaclient import base class Volume(base.Resource): diff --git a/manilaclient/v2/__init__.py b/manilaclient/v2/__init__.py index 5408cd3bd..de36e98a3 100644 --- a/manilaclient/v2/__init__.py +++ b/manilaclient/v2/__init__.py @@ -14,4 +14,4 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.v2.client import Client +from manilaclient.v2.client import Client diff --git a/manilaclient/v2/client.py b/manilaclient/v2/client.py index 668e8d656..f5b32e479 100644 --- a/manilaclient/v2/client.py +++ b/manilaclient/v2/client.py @@ -1,14 +1,14 @@ -from cinderclient import client -from cinderclient.v2 import limits -from cinderclient.v2 import quota_classes -from cinderclient.v2 import quotas -from cinderclient.v2 import shares -from cinderclient.v2 import share_snapshots -from cinderclient.v2 import volumes -from cinderclient.v2 import volume_snapshots -from cinderclient.v2 import volume_types -from cinderclient.v2 import volume_backups -from cinderclient.v2 import volume_backups_restore +from manilaclient import client +from manilaclient.v2 import limits +from manilaclient.v2 import quota_classes +from manilaclient.v2 import quotas +from manilaclient.v2 import shares +from manilaclient.v2 import share_snapshots +from manilaclient.v2 import volumes +from manilaclient.v2 import volume_snapshots +from manilaclient.v2 import volume_types +from manilaclient.v2 import volume_backups +from manilaclient.v2 import volume_backups_restore class Client(object): diff --git a/manilaclient/v2/contrib/list_extensions.py b/manilaclient/v2/contrib/list_extensions.py index 9031a5123..62ce57b36 100644 --- a/manilaclient/v2/contrib/list_extensions.py +++ b/manilaclient/v2/contrib/list_extensions.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import base -from cinderclient import utils +from manilaclient import base +from manilaclient import utils class ListExtResource(base.Resource): diff --git a/manilaclient/v2/limits.py b/manilaclient/v2/limits.py index d076db8a1..e1ac73e44 100644 --- a/manilaclient/v2/limits.py +++ b/manilaclient/v2/limits.py @@ -1,6 +1,6 @@ # Copyright 2013 OpenStack LLC. -from cinderclient import base +from manilaclient import base class Limits(base.Resource): diff --git a/manilaclient/v2/quota_classes.py b/manilaclient/v2/quota_classes.py index d8b3e2f20..cb5750d08 100644 --- a/manilaclient/v2/quota_classes.py +++ b/manilaclient/v2/quota_classes.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import base +from manilaclient import base class QuotaClassSet(base.Resource): diff --git a/manilaclient/v2/quotas.py b/manilaclient/v2/quotas.py index 803d72cce..89c896feb 100644 --- a/manilaclient/v2/quotas.py +++ b/manilaclient/v2/quotas.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import base +from manilaclient import base class QuotaSet(base.Resource): diff --git a/manilaclient/v2/share_snapshots.py b/manilaclient/v2/share_snapshots.py index dbbb2dc76..563434525 100644 --- a/manilaclient/v2/share_snapshots.py +++ b/manilaclient/v2/share_snapshots.py @@ -17,8 +17,8 @@ import os import urllib -from cinderclient import base -from cinderclient import utils +from manilaclient import base +from manilaclient import utils class ShareSnapshot(base.Resource): diff --git a/manilaclient/v2/shares.py b/manilaclient/v2/shares.py index 1eaeb3fc9..bc5f345d7 100644 --- a/manilaclient/v2/shares.py +++ b/manilaclient/v2/shares.py @@ -19,9 +19,9 @@ import os import re import urllib -from cinderclient import base -from cinderclient import exceptions -from cinderclient import utils +from manilaclient import base +from manilaclient import exceptions +from manilaclient import utils class Share(base.Resource): diff --git a/manilaclient/v2/shell.py b/manilaclient/v2/shell.py index 84a968cdc..2b7707339 100644 --- a/manilaclient/v2/shell.py +++ b/manilaclient/v2/shell.py @@ -18,8 +18,8 @@ import os import sys import time -from cinderclient import exceptions -from cinderclient import utils +from manilaclient import exceptions +from manilaclient import utils def _poll_for_status(poll_fn, obj_id, action, final_ok_states, diff --git a/manilaclient/v2/volume_backups.py b/manilaclient/v2/volume_backups.py index 89056af64..7c9a514c8 100644 --- a/manilaclient/v2/volume_backups.py +++ b/manilaclient/v2/volume_backups.py @@ -17,7 +17,7 @@ Volume Backups interface (1.1 extension). """ -from cinderclient import base +from manilaclient import base class VolumeBackup(base.Resource): diff --git a/manilaclient/v2/volume_backups_restore.py b/manilaclient/v2/volume_backups_restore.py index 9405f12ff..deea6df44 100644 --- a/manilaclient/v2/volume_backups_restore.py +++ b/manilaclient/v2/volume_backups_restore.py @@ -18,7 +18,7 @@ This is part of the Volume Backups interface. """ -from cinderclient import base +from manilaclient import base class VolumeBackupsRestore(base.Resource): diff --git a/manilaclient/v2/volume_snapshots.py b/manilaclient/v2/volume_snapshots.py index d3ae632f9..c7fd874c1 100644 --- a/manilaclient/v2/volume_snapshots.py +++ b/manilaclient/v2/volume_snapshots.py @@ -17,7 +17,7 @@ import urllib -from cinderclient import base +from manilaclient import base class Snapshot(base.Resource): diff --git a/manilaclient/v2/volume_types.py b/manilaclient/v2/volume_types.py index 9d4c2ff33..954da6964 100644 --- a/manilaclient/v2/volume_types.py +++ b/manilaclient/v2/volume_types.py @@ -16,7 +16,7 @@ """Volume Type interface.""" -from cinderclient import base +from manilaclient import base class VolumeType(base.Resource): diff --git a/manilaclient/v2/volumes.py b/manilaclient/v2/volumes.py index cf9f9acf2..e43652195 100644 --- a/manilaclient/v2/volumes.py +++ b/manilaclient/v2/volumes.py @@ -17,7 +17,7 @@ import urllib -from cinderclient import base +from manilaclient import base class Volume(base.Resource): diff --git a/openstack-common.conf b/openstack-common.conf index 39d114c5f..45c9e3ce9 100644 --- a/openstack-common.conf +++ b/openstack-common.conf @@ -4,4 +4,4 @@ modules=setup,version,strutils # The base module to hold the copy of openstack.common -base=cinderclient +base=manilaclient diff --git a/run_tests.sh b/run_tests.sh index 9b3684f3b..833419772 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -4,7 +4,7 @@ set -eu function usage { echo "Usage: $0 [OPTION]..." - echo "Run python-cinderclient test suite" + echo "Run python-manilaclient test suite" echo "" echo " -V, --virtual-env Always use virtualenv. Install automatically if not present" echo " -N, --no-virtual-env Don't use virtualenv. Run tests in local environment" @@ -94,7 +94,7 @@ function run_tests { if [ "x$testrargs" = "x" ]; then testrargs="^(?!.*test_coverage_ext).*$" fi - export PYTHON="${wrapper} coverage run --source cinderclient --parallel-mode" + export PYTHON="${wrapper} coverage run --source manilaclient --parallel-mode" fi # Just run the test suites in current environment set +e @@ -118,7 +118,7 @@ function copy_subunit_log { function run_pep8 { echo "Running pep8 ..." - srcfiles="cinderclient tests" + srcfiles="manilaclient tests" # Just run PEP8 in current environment # # NOTE(sirp): W602 (deprecated 3-arg raise) is being ignored for the @@ -191,5 +191,5 @@ fi if [ $coverage -eq 1 ]; then echo "Generating coverage report in covhtml/" ${wrapper} coverage combine - ${wrapper} coverage html --include='cinderclient/*' --omit='cinderclient/openstack/common/*' -d covhtml -i + ${wrapper} coverage html --include='manilaclient/*' --omit='manilaclient/openstack/common/*' -d covhtml -i fi diff --git a/setup.py b/setup.py index f3a5d13dc..2fc7f1f92 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ setuptools.setup( description="Client library for OpenStack Cinder API.", long_description=read_file("README.rst"), license="Apache License, Version 2.0", - url="https://github.com/openstack/python-cinderclient", + url="https://github.com/openstack/python-manilaclient", packages=setuptools.find_packages(exclude=['tests', 'tests.*']), cmdclass=setup.get_cmdclass(), install_requires=requires, diff --git a/tests/test_base.py b/tests/test_base.py index 7eba9864a..dbe03b286 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -1,6 +1,6 @@ -from cinderclient import base -from cinderclient import exceptions -from cinderclient.v1 import volumes +from manilaclient import base +from manilaclient import exceptions +from manilaclient.v1 import volumes from tests import utils from tests.v1 import fakes diff --git a/tests/test_client.py b/tests/test_client.py index 1b7297184..eb8e0ff41 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,20 +1,20 @@ -import cinderclient.client -import cinderclient.v1.client -import cinderclient.v2.client +import manilaclient.client +import manilaclient.v1.client +import manilaclient.v2.client from tests import utils class ClientTest(utils.TestCase): def test_get_client_class_v1(self): - output = cinderclient.client.get_client_class('1') - self.assertEqual(output, cinderclient.v1.client.Client) + output = manilaclient.client.get_client_class('1') + self.assertEqual(output, manilaclient.v1.client.Client) def test_get_client_class_v2(self): - output = cinderclient.client.get_client_class('2') - self.assertEqual(output, cinderclient.v2.client.Client) + output = manilaclient.client.get_client_class('2') + self.assertEqual(output, manilaclient.v2.client.Client) def test_get_client_class_unknown(self): - self.assertRaises(cinderclient.exceptions.UnsupportedVersion, - cinderclient.client.get_client_class, '0') + self.assertRaises(manilaclient.exceptions.UnsupportedVersion, + manilaclient.client.get_client_class, '0') diff --git a/tests/test_http.py b/tests/test_http.py index cfc188570..722de5f09 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -2,8 +2,8 @@ import mock import requests -from cinderclient import client -from cinderclient import exceptions +from manilaclient import client +from manilaclient import exceptions from tests import utils diff --git a/tests/test_service_catalog.py b/tests/test_service_catalog.py index 8dabd99a6..fb95caae5 100644 --- a/tests/test_service_catalog.py +++ b/tests/test_service_catalog.py @@ -1,5 +1,5 @@ -from cinderclient import exceptions -from cinderclient import service_catalog +from manilaclient import exceptions +from manilaclient import service_catalog from tests import utils diff --git a/tests/test_shell.py b/tests/test_shell.py index 580dd25f7..7c39b30f5 100644 --- a/tests/test_shell.py +++ b/tests/test_shell.py @@ -6,8 +6,8 @@ import sys import fixtures from testtools import matchers -from cinderclient import exceptions -import cinderclient.shell +from manilaclient import exceptions +import manilaclient.shell from tests import utils @@ -31,7 +31,7 @@ class ShellTest(utils.TestCase): orig = sys.stdout try: sys.stdout = cStringIO.StringIO() - _shell = cinderclient.shell.OpenStackCinderShell() + _shell = manilaclient.shell.OpenStackCinderShell() _shell.main(argstr.split()) except SystemExit: exc_type, exc_value, exc_traceback = sys.exc_info() diff --git a/tests/test_utils.py b/tests/test_utils.py index 22a167afa..2decd5013 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,7 +1,7 @@ -from cinderclient import exceptions -from cinderclient import utils -from cinderclient import base +from manilaclient import exceptions +from manilaclient import utils +from manilaclient import base from tests import utils as test_utils UUID = '8e8ec658-c7b0-4243-bdf8-6f7f2952c0d0' diff --git a/tests/v1/contrib/test_list_extensions.py b/tests/v1/contrib/test_list_extensions.py index faf10bb83..a668ae2d6 100644 --- a/tests/v1/contrib/test_list_extensions.py +++ b/tests/v1/contrib/test_list_extensions.py @@ -1,5 +1,5 @@ -from cinderclient import extension -from cinderclient.v1.contrib import list_extensions +from manilaclient import extension +from manilaclient.v1.contrib import list_extensions from tests import utils from tests.v1 import fakes diff --git a/tests/v1/fakes.py b/tests/v1/fakes.py index ee4a58dc3..7dfd27764 100644 --- a/tests/v1/fakes.py +++ b/tests/v1/fakes.py @@ -15,8 +15,8 @@ import urlparse -from cinderclient import client as base_client -from cinderclient.v1 import client +from manilaclient import client as base_client +from manilaclient.v1 import client from tests import fakes import tests.utils as utils diff --git a/tests/v1/shares/fakes.py b/tests/v1/shares/fakes.py index 26e785562..ed493f972 100644 --- a/tests/v1/shares/fakes.py +++ b/tests/v1/shares/fakes.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from cinderclient.v1 import shares as shares_ext_module -from cinderclient.v1 import client +from manilaclient.v1 import shares as shares_ext_module +from manilaclient.v1 import client from tests.v1 import fakes diff --git a/tests/v1/shares/test_share_snapshots.py b/tests/v1/shares/test_share_snapshots.py index a6c4400e0..dc4037305 100644 --- a/tests/v1/shares/test_share_snapshots.py +++ b/tests/v1/shares/test_share_snapshots.py @@ -15,8 +15,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import extension -from cinderclient.v1 import share_snapshots +from manilaclient import extension +from manilaclient.v1 import share_snapshots from tests import utils from tests.v1.shares import fakes diff --git a/tests/v1/shares/test_shares.py b/tests/v1/shares/test_shares.py index 7dee763f9..cfec94749 100644 --- a/tests/v1/shares/test_shares.py +++ b/tests/v1/shares/test_shares.py @@ -15,8 +15,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import extension -from cinderclient.v1 import shares +from manilaclient import extension +from manilaclient.v1 import shares from tests import utils from tests.v1.shares import fakes diff --git a/tests/v1/test_auth.py b/tests/v1/test_auth.py index 4ad12310f..b64546009 100644 --- a/tests/v1/test_auth.py +++ b/tests/v1/test_auth.py @@ -3,8 +3,8 @@ import mock import requests -from cinderclient.v1 import client -from cinderclient import exceptions +from manilaclient.v1 import client +from manilaclient import exceptions from tests import utils diff --git a/tests/v1/test_shell.py b/tests/v1/test_shell.py index 8d283098e..aa1241a3c 100644 --- a/tests/v1/test_shell.py +++ b/tests/v1/test_shell.py @@ -19,9 +19,9 @@ import os import fixtures -from cinderclient import client -from cinderclient import shell -from cinderclient.v1 import shell as shell_v1 +from manilaclient import client +from manilaclient import shell +from manilaclient.v1 import shell as shell_v1 from tests.v1 import fakes from tests import utils diff --git a/tests/v1/test_types.py b/tests/v1/test_types.py index 92aa2c090..2564110d4 100644 --- a/tests/v1/test_types.py +++ b/tests/v1/test_types.py @@ -1,5 +1,5 @@ -from cinderclient import exceptions -from cinderclient.v1 import volume_types +from manilaclient import exceptions +from manilaclient.v1 import volume_types from tests import utils from tests.v1 import fakes diff --git a/tests/v2/contrib/test_list_extensions.py b/tests/v2/contrib/test_list_extensions.py index 49b0e572e..5f5e461a3 100644 --- a/tests/v2/contrib/test_list_extensions.py +++ b/tests/v2/contrib/test_list_extensions.py @@ -14,8 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import extension -from cinderclient.v2.contrib import list_extensions +from manilaclient import extension +from manilaclient.v2.contrib import list_extensions from tests import utils from tests.v1 import fakes diff --git a/tests/v2/fakes.py b/tests/v2/fakes.py index 038a434e1..692b25a5d 100644 --- a/tests/v2/fakes.py +++ b/tests/v2/fakes.py @@ -14,8 +14,8 @@ import urlparse -from cinderclient import client as base_client -from cinderclient.v2 import client +from manilaclient import client as base_client +from manilaclient.v2 import client from tests import fakes import tests.utils as utils diff --git a/tests/v2/shares/fakes.py b/tests/v2/shares/fakes.py index a4f1ad803..4f0dc5790 100644 --- a/tests/v2/shares/fakes.py +++ b/tests/v2/shares/fakes.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from cinderclient.v2 import shares as shares_ext_module -from cinderclient.v2 import client +from manilaclient.v2 import shares as shares_ext_module +from manilaclient.v2 import client from tests.v2 import fakes diff --git a/tests/v2/shares/test_share_snapshots.py b/tests/v2/shares/test_share_snapshots.py index 0893beb2b..914c79939 100644 --- a/tests/v2/shares/test_share_snapshots.py +++ b/tests/v2/shares/test_share_snapshots.py @@ -15,8 +15,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import extension -from cinderclient.v2 import share_snapshots +from manilaclient import extension +from manilaclient.v2 import share_snapshots from tests import utils from tests.v2.shares import fakes diff --git a/tests/v2/shares/test_shares.py b/tests/v2/shares/test_shares.py index e21dddf80..6a8ae7f7f 100644 --- a/tests/v2/shares/test_shares.py +++ b/tests/v2/shares/test_shares.py @@ -15,8 +15,8 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient import extension -from cinderclient.v2 import shares +from manilaclient import extension +from manilaclient.v2 import shares from tests import utils from tests.v2.shares import fakes diff --git a/tests/v2/test_auth.py b/tests/v2/test_auth.py index b18a7a327..4920fa991 100644 --- a/tests/v2/test_auth.py +++ b/tests/v2/test_auth.py @@ -19,8 +19,8 @@ import json import mock import requests -from cinderclient import exceptions -from cinderclient.v2 import client +from manilaclient import exceptions +from manilaclient.v2 import client from tests import utils diff --git a/tests/v2/test_shell.py b/tests/v2/test_shell.py index ce6646f83..b5e435d2a 100644 --- a/tests/v2/test_shell.py +++ b/tests/v2/test_shell.py @@ -15,8 +15,8 @@ import fixtures -from cinderclient import client -from cinderclient import shell +from manilaclient import client +from manilaclient import shell from tests import utils from tests.v2 import fakes diff --git a/tests/v2/test_types.py b/tests/v2/test_types.py index f36b768b6..8af16454b 100644 --- a/tests/v2/test_types.py +++ b/tests/v2/test_types.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from cinderclient.v2 import volume_types +from manilaclient.v2 import volume_types from tests import utils from tests.v2 import fakes diff --git a/tools/cinder.bash_completion b/tools/cinder.bash_completion index 060bf1f7d..1726a234c 100644 --- a/tools/cinder.bash_completion +++ b/tools/cinder.bash_completion @@ -7,7 +7,7 @@ _cinder() opts="$(cinder bash_completion)" - COMPLETION_CACHE=~/.cinderclient/*/*-cache + COMPLETION_CACHE=~/.manilaclient/*/*-cache opts+=" "$(cat $COMPLETION_CACHE 2> /dev/null | tr '\n' ' ') COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) diff --git a/tools/install_venv.py b/tools/install_venv.py index db0e32bce..62ff2a21e 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -192,7 +192,7 @@ def install_dependencies(venv=VENV): pip_install('-r', TEST_REQUIRES) # Tell the virtual env how to "import cinder" pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages", - "cinderclient.pth") + "manilaclient.pth") f = open(pthfile, 'w') f.write("%s\n" % ROOT) @@ -203,12 +203,12 @@ def post_process(): def print_help(): help = """ - python-cinderclient development environment setup is complete. + python-manilaclient development environment setup is complete. - python-cinderclient development uses virtualenv to track and manage Python + python-manilaclient development uses virtualenv to track and manage Python dependencies while in development and testing. - To activate the python-cinderclient virtualenv for the extent of your + To activate the python-manilaclient virtualenv for the extent of your current shell session you can run: $ source .venv/bin/activate diff --git a/tox.ini b/tox.ini index 34ca825c1..635608627 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ commands = python setup.py testr --testr-args='{posargs}' [testenv:pep8] deps = pep8 -commands = pep8 --repeat --show-source cinderclient setup.py +commands = pep8 --repeat --show-source manilaclient setup.py [testenv:venv] commands = {posargs}