Browse Source

setup.py fixed

changes/19/47819/1
Yulia Portnova 8 years ago
parent
commit
fa125b7714
  1. 2
      LICENSE
  2. 10
      README.rst
  3. 4
      doc/Makefile
  4. 8
      doc/source/conf.py
  5. 30
      doc/source/index.rst
  6. 4
      manilaclient/__init__.py
  7. 8
      manilaclient/base.py
  8. 12
      manilaclient/client.py
  9. 4
      manilaclient/extension.py
  10. 2
      manilaclient/openstack/common/version.py
  11. 8
      manilaclient/service_catalog.py
  12. 30
      manilaclient/shell.py
  13. 4
      manilaclient/utils.py
  14. 2
      manilaclient/v1/__init__.py
  15. 22
      manilaclient/v1/client.py
  16. 4
      manilaclient/v1/contrib/list_extensions.py
  17. 2
      manilaclient/v1/limits.py
  18. 2
      manilaclient/v1/quota_classes.py
  19. 2
      manilaclient/v1/quotas.py
  20. 4
      manilaclient/v1/share_snapshots.py
  21. 6
      manilaclient/v1/shares.py
  22. 4
      manilaclient/v1/shell.py
  23. 2
      manilaclient/v1/volume_backups.py
  24. 2
      manilaclient/v1/volume_backups_restore.py
  25. 2
      manilaclient/v1/volume_snapshots.py
  26. 2
      manilaclient/v1/volume_types.py
  27. 2
      manilaclient/v1/volumes.py
  28. 2
      manilaclient/v2/__init__.py
  29. 22
      manilaclient/v2/client.py
  30. 4
      manilaclient/v2/contrib/list_extensions.py
  31. 2
      manilaclient/v2/limits.py
  32. 2
      manilaclient/v2/quota_classes.py
  33. 2
      manilaclient/v2/quotas.py
  34. 4
      manilaclient/v2/share_snapshots.py
  35. 6
      manilaclient/v2/shares.py
  36. 4
      manilaclient/v2/shell.py
  37. 2
      manilaclient/v2/volume_backups.py
  38. 2
      manilaclient/v2/volume_backups_restore.py
  39. 2
      manilaclient/v2/volume_snapshots.py
  40. 2
      manilaclient/v2/volume_types.py
  41. 2
      manilaclient/v2/volumes.py
  42. 2
      openstack-common.conf
  43. 8
      run_tests.sh
  44. 2
      setup.py
  45. 6
      tests/test_base.py
  46. 18
      tests/test_client.py
  47. 4
      tests/test_http.py
  48. 4
      tests/test_service_catalog.py
  49. 6
      tests/test_shell.py
  50. 6
      tests/test_utils.py
  51. 4
      tests/v1/contrib/test_list_extensions.py
  52. 4
      tests/v1/fakes.py
  53. 4
      tests/v1/shares/fakes.py
  54. 4
      tests/v1/shares/test_share_snapshots.py
  55. 4
      tests/v1/shares/test_shares.py
  56. 4
      tests/v1/test_auth.py
  57. 6
      tests/v1/test_shell.py
  58. 4
      tests/v1/test_types.py
  59. 4
      tests/v2/contrib/test_list_extensions.py
  60. 4
      tests/v2/fakes.py
  61. 4
      tests/v2/shares/fakes.py
  62. 4
      tests/v2/shares/test_share_snapshots.py
  63. 4
      tests/v2/shares/test_shares.py
  64. 4
      tests/v2/test_auth.py
  65. 4
      tests/v2/test_shell.py
  66. 2
      tests/v2/test_types.py
  67. 2
      tools/cinder.bash_completion
  68. 8
      tools/install_venv.py
  69. 2
      tox.ini

2
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.

10
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()
[...]

4
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

8
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'),
]

30
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

4
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:

8
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

12
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)]

4
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):

2
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):

8
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]

30
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)

4
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):

2
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

22
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):

4
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):

2
manilaclient/v1/limits.py

@ -1,6 +1,6 @@
# Copyright 2011 OpenStack LLC.
from cinderclient import base
from manilaclient import base
class Limits(base.Resource):

2
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):

2
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):

4
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):

6
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):

4
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,

2
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):

2
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):

2
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):

2
manilaclient/v1/volume_types.py

@ -18,7 +18,7 @@
Volume Type interface.
"""
from cinderclient import base
from manilaclient import base
class VolumeType(base.Resource):

2
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):

2
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

22
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):

4
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):

2
manilaclient/v2/limits.py

@ -1,6 +1,6 @@
# Copyright 2013 OpenStack LLC.
from cinderclient import base
from manilaclient import base
class Limits(base.Resource):

2
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):

2
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):

4
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):

6
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):

4
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,

2
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):

2
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):

2
manilaclient/v2/volume_snapshots.py

@ -17,7 +17,7 @@
import urllib
from cinderclient import base
from manilaclient import base
class Snapshot(base.Resource):

2
manilaclient/v2/volume_types.py

@ -16,7 +16,7 @@
"""Volume Type interface."""
from cinderclient import base
from manilaclient import base
class VolumeType(base.Resource):

2
manilaclient/v2/volumes.py

@ -17,7 +17,7 @@
import urllib
from cinderclient import base
from manilaclient import base
class Volume(base.Resource):

2
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

8
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

2
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,

6
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

18
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')

4
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

4
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

6
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()

6
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'

4
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

4
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

4
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

4
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

4
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

4
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

6
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

4
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

4
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

4
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

4
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

4
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

4
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

4
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

4
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

2
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

2
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}) )

8
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

2
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}

Loading…
Cancel
Save