Upgraded to PEP8 1.3.3 to stay aligned with Nova, etc.
Made all the necessary changes to pass new PEP8 standards. Also cleaned up docstrings to conform to the HACKING stanards. Change-Id: Ib8df3030da7a7885655689ab5da0717748c9edbe
This commit is contained in:
parent
ba4be2af5a
commit
cdee965095
@ -13,8 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
"""Manage access to the clients, including authenticating when needed.
|
"""Manage access to the clients, including authenticating when needed."""
|
||||||
"""
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@ -22,13 +21,12 @@ from openstackclient.compute import client as compute_client
|
|||||||
from openstackclient.identity import client as identity_client
|
from openstackclient.identity import client as identity_client
|
||||||
from openstackclient.image import client as image_client
|
from openstackclient.image import client as image_client
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class ClientCache(object):
|
class ClientCache(object):
|
||||||
"""Descriptor class for caching created client handles.
|
"""Descriptor class for caching created client handles."""
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self, factory):
|
def __init__(self, factory):
|
||||||
self.factory = factory
|
self.factory = factory
|
||||||
self._handle = None
|
self._handle = None
|
||||||
@ -41,20 +39,14 @@ class ClientCache(object):
|
|||||||
|
|
||||||
|
|
||||||
class ClientManager(object):
|
class ClientManager(object):
|
||||||
"""Manages access to API clients, including authentication.
|
"""Manages access to API clients, including authentication."""
|
||||||
"""
|
|
||||||
|
|
||||||
compute = ClientCache(compute_client.make_client)
|
compute = ClientCache(compute_client.make_client)
|
||||||
identity = ClientCache(identity_client.make_client)
|
identity = ClientCache(identity_client.make_client)
|
||||||
image = ClientCache(image_client.make_client)
|
image = ClientCache(image_client.make_client)
|
||||||
|
|
||||||
def __init__(self, token=None, url=None,
|
def __init__(self, token=None, url=None, auth_url=None, tenant_name=None,
|
||||||
auth_url=None,
|
tenant_id=None, username=None, password=None,
|
||||||
tenant_name=None, tenant_id=None,
|
region_name=None, api_version=None):
|
||||||
username=None, password=None,
|
|
||||||
region_name=None,
|
|
||||||
api_version=None,
|
|
||||||
):
|
|
||||||
self._token = token
|
self._token = token
|
||||||
self._url = url
|
self._url = url
|
||||||
self._auth_url = auth_url
|
self._auth_url = auth_url
|
||||||
@ -74,8 +66,7 @@ class ClientManager(object):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def get_endpoint_for_service_type(self, service_type):
|
def get_endpoint_for_service_type(self, service_type):
|
||||||
"""Return the endpoint URL for the service type.
|
"""Return the endpoint URL for the service type."""
|
||||||
"""
|
|
||||||
# See if we are using password flow auth, i.e. we have a
|
# See if we are using password flow auth, i.e. we have a
|
||||||
# service catalog to select endpoints from
|
# service catalog to select endpoints from
|
||||||
if self._service_catalog:
|
if self._service_catalog:
|
||||||
|
@ -13,17 +13,13 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
"""
|
"""OpenStack base command"""
|
||||||
OpenStack base command
|
|
||||||
"""
|
|
||||||
|
|
||||||
from cliff.command import Command
|
from cliff.command import Command
|
||||||
|
|
||||||
|
|
||||||
class OpenStackCommand(Command):
|
class OpenStackCommand(Command):
|
||||||
"""Base class for OpenStack commands
|
"""Base class for OpenStack commands."""
|
||||||
"""
|
|
||||||
|
|
||||||
api = None
|
api = None
|
||||||
|
|
||||||
def run(self, parsed_args):
|
def run(self, parsed_args):
|
||||||
|
@ -13,9 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
"""
|
"""Exception definitions."""
|
||||||
Exception definitions.
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
class CommandError(Exception):
|
class CommandError(Exception):
|
||||||
@ -27,8 +25,7 @@ class AuthorizationFailure(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class NoTokenLookupException(Exception):
|
class NoTokenLookupException(Exception):
|
||||||
"""This form of authentication does not support looking up
|
"""This does not support looking up endpoints from an existing token."""
|
||||||
endpoints from an existing token."""
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@ -38,15 +35,12 @@ class EndpointNotFound(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class UnsupportedVersion(Exception):
|
class UnsupportedVersion(Exception):
|
||||||
"""Indicates that the user is trying to use an unsupported
|
"""The user is trying to use an unsupported version of the API"""
|
||||||
version of the API"""
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ClientException(Exception):
|
class ClientException(Exception):
|
||||||
"""
|
"""The base exception class for all exceptions this library raises."""
|
||||||
The base exception class for all exceptions this library raises.
|
|
||||||
"""
|
|
||||||
def __init__(self, code, message=None, details=None):
|
def __init__(self, code, message=None, details=None):
|
||||||
self.code = code
|
self.code = code
|
||||||
self.message = message or self.__class__.message
|
self.message = message or self.__class__.message
|
||||||
@ -57,59 +51,44 @@ class ClientException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class BadRequest(ClientException):
|
class BadRequest(ClientException):
|
||||||
"""
|
"""HTTP 400 - Bad request: you sent some malformed data."""
|
||||||
HTTP 400 - Bad request: you sent some malformed data.
|
|
||||||
"""
|
|
||||||
http_status = 400
|
http_status = 400
|
||||||
message = "Bad request"
|
message = "Bad request"
|
||||||
|
|
||||||
|
|
||||||
class Unauthorized(ClientException):
|
class Unauthorized(ClientException):
|
||||||
"""
|
"""HTTP 401 - Unauthorized: bad credentials."""
|
||||||
HTTP 401 - Unauthorized: bad credentials.
|
|
||||||
"""
|
|
||||||
http_status = 401
|
http_status = 401
|
||||||
message = "Unauthorized"
|
message = "Unauthorized"
|
||||||
|
|
||||||
|
|
||||||
class Forbidden(ClientException):
|
class Forbidden(ClientException):
|
||||||
"""
|
"""HTTP 403 - Forbidden: not authorized to access to this resource."""
|
||||||
HTTP 403 - Forbidden: your credentials don't give you access to this
|
|
||||||
resource.
|
|
||||||
"""
|
|
||||||
http_status = 403
|
http_status = 403
|
||||||
message = "Forbidden"
|
message = "Forbidden"
|
||||||
|
|
||||||
|
|
||||||
class NotFound(ClientException):
|
class NotFound(ClientException):
|
||||||
"""
|
"""HTTP 404 - Not found"""
|
||||||
HTTP 404 - Not found
|
|
||||||
"""
|
|
||||||
http_status = 404
|
http_status = 404
|
||||||
message = "Not found"
|
message = "Not found"
|
||||||
|
|
||||||
|
|
||||||
class Conflict(ClientException):
|
class Conflict(ClientException):
|
||||||
"""
|
"""HTTP 409 - Conflict"""
|
||||||
HTTP 409 - Conflict
|
|
||||||
"""
|
|
||||||
http_status = 409
|
http_status = 409
|
||||||
message = "Conflict"
|
message = "Conflict"
|
||||||
|
|
||||||
|
|
||||||
class OverLimit(ClientException):
|
class OverLimit(ClientException):
|
||||||
"""
|
"""HTTP 413 - Over limit: reached the API limits for this time period."""
|
||||||
HTTP 413 - Over limit: you're over the API limits for this time period.
|
|
||||||
"""
|
|
||||||
http_status = 413
|
http_status = 413
|
||||||
message = "Over limit"
|
message = "Over limit"
|
||||||
|
|
||||||
|
|
||||||
# NotImplemented is a python keyword.
|
# NotImplemented is a python keyword.
|
||||||
class HTTPNotImplemented(ClientException):
|
class HTTPNotImplemented(ClientException):
|
||||||
"""
|
"""HTTP 501 - Not Implemented: server does not support this operation."""
|
||||||
HTTP 501 - Not Implemented: the server does not support this operation.
|
|
||||||
"""
|
|
||||||
http_status = 501
|
http_status = 501
|
||||||
message = "Not Implemented"
|
message = "Not Implemented"
|
||||||
|
|
||||||
@ -120,14 +99,18 @@ class HTTPNotImplemented(ClientException):
|
|||||||
# for c in ClientException.__subclasses__())
|
# for c in ClientException.__subclasses__())
|
||||||
#
|
#
|
||||||
# Instead, we have to hardcode it:
|
# Instead, we have to hardcode it:
|
||||||
_code_map = dict((c.http_status, c) for c in [BadRequest, Unauthorized,
|
_code_map = dict((c.http_status, c) for c in [
|
||||||
Forbidden, NotFound, OverLimit, HTTPNotImplemented])
|
BadRequest,
|
||||||
|
Unauthorized,
|
||||||
|
Forbidden,
|
||||||
|
NotFound,
|
||||||
|
OverLimit,
|
||||||
|
HTTPNotImplemented
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
def from_response(response, body):
|
def from_response(response, body):
|
||||||
"""
|
"""Return an instance of a ClientException based on an httplib2 response.
|
||||||
Return an instance of a ClientException or subclass
|
|
||||||
based on an httplib2 response.
|
|
||||||
|
|
||||||
Usage::
|
Usage::
|
||||||
|
|
||||||
|
@ -13,9 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
"""
|
"""Common client utilities"""
|
||||||
Common client utilities
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
@ -13,9 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
"""
|
"""Command-line interface to the OpenStack APIs"""
|
||||||
Command-line interface to the OpenStack APIs
|
|
||||||
"""
|
|
||||||
|
|
||||||
import getpass
|
import getpass
|
||||||
import logging
|
import logging
|
||||||
@ -59,8 +57,7 @@ class OpenStackShell(App):
|
|||||||
super(OpenStackShell, self).__init__(
|
super(OpenStackShell, self).__init__(
|
||||||
description=__doc__.strip(),
|
description=__doc__.strip(),
|
||||||
version=VERSION,
|
version=VERSION,
|
||||||
command_manager=CommandManager('openstack.cli'),
|
command_manager=CommandManager('openstack.cli'))
|
||||||
)
|
|
||||||
|
|
||||||
# This is instantiated in initialize_app() only when using
|
# This is instantiated in initialize_app() only when using
|
||||||
# password flow auth
|
# password flow auth
|
||||||
@ -69,57 +66,64 @@ class OpenStackShell(App):
|
|||||||
def build_option_parser(self, description, version):
|
def build_option_parser(self, description, version):
|
||||||
parser = super(OpenStackShell, self).build_option_parser(
|
parser = super(OpenStackShell, self).build_option_parser(
|
||||||
description,
|
description,
|
||||||
version,
|
version)
|
||||||
)
|
|
||||||
|
|
||||||
# Global arguments
|
# Global arguments
|
||||||
parser.add_argument('--os-auth-url', metavar='<auth-url>',
|
parser.add_argument(
|
||||||
|
'--os-auth-url',
|
||||||
|
metavar='<auth-url>',
|
||||||
default=env('OS_AUTH_URL'),
|
default=env('OS_AUTH_URL'),
|
||||||
help='Authentication URL (Env: OS_AUTH_URL)')
|
help='Authentication URL (Env: OS_AUTH_URL)')
|
||||||
|
parser.add_argument(
|
||||||
parser.add_argument('--os-tenant-name', metavar='<auth-tenant-name>',
|
'--os-tenant-name',
|
||||||
|
metavar='<auth-tenant-name>',
|
||||||
default=env('OS_TENANT_NAME'),
|
default=env('OS_TENANT_NAME'),
|
||||||
help='Authentication tenant name (Env: OS_TENANT_NAME)')
|
help='Authentication tenant name (Env: OS_TENANT_NAME)')
|
||||||
|
parser.add_argument(
|
||||||
parser.add_argument('--os-tenant-id', metavar='<auth-tenant-id>',
|
'--os-tenant-id',
|
||||||
|
metavar='<auth-tenant-id>',
|
||||||
default=env('OS_TENANT_ID'),
|
default=env('OS_TENANT_ID'),
|
||||||
help='Authentication tenant ID (Env: OS_TENANT_ID)')
|
help='Authentication tenant ID (Env: OS_TENANT_ID)')
|
||||||
|
parser.add_argument(
|
||||||
parser.add_argument('--os-username', metavar='<auth-username>',
|
'--os-username',
|
||||||
|
metavar='<auth-username>',
|
||||||
default=utils.env('OS_USERNAME'),
|
default=utils.env('OS_USERNAME'),
|
||||||
help='Authentication username (Env: OS_USERNAME)')
|
help='Authentication username (Env: OS_USERNAME)')
|
||||||
|
parser.add_argument(
|
||||||
parser.add_argument('--os-password', metavar='<auth-password>',
|
'--os-password',
|
||||||
|
metavar='<auth-password>',
|
||||||
default=utils.env('OS_PASSWORD'),
|
default=utils.env('OS_PASSWORD'),
|
||||||
help='Authentication password (Env: OS_PASSWORD)')
|
help='Authentication password (Env: OS_PASSWORD)')
|
||||||
|
parser.add_argument(
|
||||||
parser.add_argument('--os-region-name', metavar='<auth-region-name>',
|
'--os-region-name',
|
||||||
|
metavar='<auth-region-name>',
|
||||||
default=env('OS_REGION_NAME'),
|
default=env('OS_REGION_NAME'),
|
||||||
help='Authentication region name (Env: OS_REGION_NAME)')
|
help='Authentication region name (Env: OS_REGION_NAME)')
|
||||||
|
parser.add_argument(
|
||||||
parser.add_argument('--os-identity-api-version',
|
'--os-identity-api-version',
|
||||||
metavar='<identity-api-version>',
|
metavar='<identity-api-version>',
|
||||||
default=env('OS_IDENTITY_API_VERSION', default='2.0'),
|
default=env('OS_IDENTITY_API_VERSION', default='2.0'),
|
||||||
help='Identity API version, default=2.0 '
|
help='Identity API version, default=2.0 '
|
||||||
'(Env: OS_IDENTITY_API_VERSION)')
|
'(Env: OS_IDENTITY_API_VERSION)')
|
||||||
|
parser.add_argument(
|
||||||
parser.add_argument('--os-compute-api-version',
|
'--os-compute-api-version',
|
||||||
metavar='<compute-api-version>',
|
metavar='<compute-api-version>',
|
||||||
default=env('OS_COMPUTE_API_VERSION', default='2'),
|
default=env('OS_COMPUTE_API_VERSION', default='2'),
|
||||||
help='Compute API version, default=2 '
|
help='Compute API version, default=2 '
|
||||||
'(Env: OS_COMPUTE_API_VERSION)')
|
'(Env: OS_COMPUTE_API_VERSION)')
|
||||||
|
parser.add_argument(
|
||||||
parser.add_argument('--os-image-api-version',
|
'--os-image-api-version',
|
||||||
metavar='<image-api-version>',
|
metavar='<image-api-version>',
|
||||||
default=env('OS_IMAGE_API_VERSION', default='1.0'),
|
default=env('OS_IMAGE_API_VERSION', default='1.0'),
|
||||||
help='Image API version, default=1.0 '
|
help='Image API version, default=1.0 (Env: OS_IMAGE_API_VERSION)')
|
||||||
'(Env: OS_IMAGE_API_VERSION)')
|
parser.add_argument(
|
||||||
|
'--os-token',
|
||||||
parser.add_argument('--os-token', metavar='<token>',
|
metavar='<token>',
|
||||||
default=env('OS_TOKEN'),
|
default=env('OS_TOKEN'),
|
||||||
help='Defaults to env[OS_TOKEN]')
|
help='Defaults to env[OS_TOKEN]')
|
||||||
|
parser.add_argument(
|
||||||
parser.add_argument('--os-url', metavar='<url>',
|
'--os-url',
|
||||||
|
metavar='<url>',
|
||||||
default=env('OS_URL'),
|
default=env('OS_URL'),
|
||||||
help='Defaults to env[OS_URL]')
|
help='Defaults to env[OS_URL]')
|
||||||
|
|
||||||
@ -198,8 +202,7 @@ class OpenStackShell(App):
|
|||||||
username=self.options.os_username,
|
username=self.options.os_username,
|
||||||
password=self.options.os_password,
|
password=self.options.os_password,
|
||||||
region_name=self.options.os_region_name,
|
region_name=self.options.os_region_name,
|
||||||
api_version=self.api_version,
|
api_version=self.api_version)
|
||||||
)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def init_keyring_backend(self):
|
def init_keyring_backend(self):
|
||||||
@ -260,7 +263,6 @@ class OpenStackShell(App):
|
|||||||
def prepare_to_run_command(self, cmd):
|
def prepare_to_run_command(self, cmd):
|
||||||
"""Set up auth and API versions"""
|
"""Set up auth and API versions"""
|
||||||
self.log.debug('prepare_to_run_command %s', cmd.__class__.__name__)
|
self.log.debug('prepare_to_run_command %s', cmd.__class__.__name__)
|
||||||
|
|
||||||
self.log.debug("api: %s" % cmd.api if hasattr(cmd, 'api') else None)
|
self.log.debug("api: %s" % cmd.api if hasattr(cmd, 'api') else None)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
53
setup.py
53
setup.py
@ -40,14 +40,14 @@ setuptools.setup(
|
|||||||
author_email='openstack@lists.launchpad.net',
|
author_email='openstack@lists.launchpad.net',
|
||||||
packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
|
packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 2 - Pre-Alpha',
|
'Development Status :: 2 - Pre-Alpha',
|
||||||
'Environment :: Console',
|
'Environment :: Console',
|
||||||
'Environment :: OpenStack',
|
'Environment :: OpenStack',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'Intended Audience :: Information Technology',
|
'Intended Audience :: Information Technology',
|
||||||
'License :: OSI Approved :: Apache Software License',
|
'License :: OSI Approved :: Apache Software License',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
],
|
],
|
||||||
install_requires=requires,
|
install_requires=requires,
|
||||||
dependency_links=dependency_links,
|
dependency_links=dependency_links,
|
||||||
@ -56,25 +56,23 @@ setuptools.setup(
|
|||||||
'console_scripts': ['openstack=openstackclient.shell:main'],
|
'console_scripts': ['openstack=openstackclient.shell:main'],
|
||||||
'openstack.cli': [
|
'openstack.cli': [
|
||||||
'create_endpoint=' +
|
'create_endpoint=' +
|
||||||
'openstackclient.identity.v2_0.endpoint:CreateEndpoint',
|
'openstackclient.identity.v2_0.endpoint:CreateEndpoint',
|
||||||
'delete_endpoint=' +
|
'delete_endpoint=' +
|
||||||
'openstackclient.identity.v2_0.endpoint:DeleteEndpoint',
|
'openstackclient.identity.v2_0.endpoint:DeleteEndpoint',
|
||||||
'list_endpoint=' +
|
'list_endpoint=' +
|
||||||
'openstackclient.identity.v2_0.endpoint:ListEndpoint',
|
'openstackclient.identity.v2_0.endpoint:ListEndpoint',
|
||||||
'show_endpoint=' +
|
'show_endpoint=' +
|
||||||
'openstackclient.identity.v2_0.endpoint:ShowEndpoint',
|
'openstackclient.identity.v2_0.endpoint:ShowEndpoint',
|
||||||
|
|
||||||
'add_role=' +
|
'add_role=' +
|
||||||
'openstackclient.identity.v2_0.role:AddRole',
|
'openstackclient.identity.v2_0.role:AddRole',
|
||||||
'create_role=' +
|
'create_role=' +
|
||||||
'openstackclient.identity.v2_0.role:CreateRole',
|
'openstackclient.identity.v2_0.role:CreateRole',
|
||||||
'delete_role=' +
|
'delete_role=' +
|
||||||
'openstackclient.identity.v2_0.role:DeleteRole',
|
'openstackclient.identity.v2_0.role:DeleteRole',
|
||||||
'list_role=openstackclient.identity.v2_0.role:ListRole',
|
'list_role=openstackclient.identity.v2_0.role:ListRole',
|
||||||
'remove_role=' +
|
'remove_role=' +
|
||||||
'openstackclient.identity.v2_0.role:RemoveRole',
|
'openstackclient.identity.v2_0.role:RemoveRole',
|
||||||
'show_role=openstackclient.identity.v2_0.role:ShowRole',
|
'show_role=openstackclient.identity.v2_0.role:ShowRole',
|
||||||
|
|
||||||
'create_server=openstackclient.compute.v2.server:CreateServer',
|
'create_server=openstackclient.compute.v2.server:CreateServer',
|
||||||
'delete_server=openstackclient.compute.v2.server:DeleteServer',
|
'delete_server=openstackclient.compute.v2.server:DeleteServer',
|
||||||
'list_server=openstackclient.compute.v2.server:ListServer',
|
'list_server=openstackclient.compute.v2.server:ListServer',
|
||||||
@ -85,26 +83,23 @@ setuptools.setup(
|
|||||||
'show_server=openstackclient.compute.v2.server:ShowServer',
|
'show_server=openstackclient.compute.v2.server:ShowServer',
|
||||||
'suspend_server=openstackclient.compute.v2.server:SuspendServer',
|
'suspend_server=openstackclient.compute.v2.server:SuspendServer',
|
||||||
'unpause_server=openstackclient.compute.v2.server:UnpauseServer',
|
'unpause_server=openstackclient.compute.v2.server:UnpauseServer',
|
||||||
|
|
||||||
'create_service=' +
|
'create_service=' +
|
||||||
'openstackclient.identity.v2_0.service:CreateService',
|
'openstackclient.identity.v2_0.service:CreateService',
|
||||||
'delete_service=' +
|
'delete_service=' +
|
||||||
'openstackclient.identity.v2_0.service:DeleteService',
|
'openstackclient.identity.v2_0.service:DeleteService',
|
||||||
'list_service=openstackclient.identity.v2_0.service:ListService',
|
'list_service=openstackclient.identity.v2_0.service:ListService',
|
||||||
'show_service=openstackclient.identity.v2_0.service:ShowService',
|
'show_service=openstackclient.identity.v2_0.service:ShowService',
|
||||||
|
|
||||||
'create_tenant=' +
|
'create_tenant=' +
|
||||||
'openstackclient.identity.v2_0.tenant:CreateTenant',
|
'openstackclient.identity.v2_0.tenant:CreateTenant',
|
||||||
'delete_tenant=' +
|
'delete_tenant=' +
|
||||||
'openstackclient.identity.v2_0.tenant:DeleteTenant',
|
'openstackclient.identity.v2_0.tenant:DeleteTenant',
|
||||||
'list_tenant=openstackclient.identity.v2_0.tenant:ListTenant',
|
'list_tenant=openstackclient.identity.v2_0.tenant:ListTenant',
|
||||||
'set_tenant=openstackclient.identity.v2_0.tenant:SetTenant',
|
'set_tenant=openstackclient.identity.v2_0.tenant:SetTenant',
|
||||||
'show_tenant=openstackclient.identity.v2_0.tenant:ShowTenant',
|
'show_tenant=openstackclient.identity.v2_0.tenant:ShowTenant',
|
||||||
|
|
||||||
'create_user=' +
|
'create_user=' +
|
||||||
'openstackclient.identity.v2_0.user:CreateUser',
|
'openstackclient.identity.v2_0.user:CreateUser',
|
||||||
'delete_user=' +
|
'delete_user=' +
|
||||||
'openstackclient.identity.v2_0.user:DeleteUser',
|
'openstackclient.identity.v2_0.user:DeleteUser',
|
||||||
'list_user=openstackclient.identity.v2_0.user:ListUser',
|
'list_user=openstackclient.identity.v2_0.user:ListUser',
|
||||||
'set_user=openstackclient.identity.v2_0.user:SetUser',
|
'set_user=openstackclient.identity.v2_0.user:SetUser',
|
||||||
'show_user=openstackclient.identity.v2_0.user:ShowUser',
|
'show_user=openstackclient.identity.v2_0.user:ShowUser',
|
||||||
@ -118,9 +113,9 @@ setuptools.setup(
|
|||||||
'show_group=openstackclient.identity.v3.group:ShowGroup',
|
'show_group=openstackclient.identity.v3.group:ShowGroup',
|
||||||
'list_group=openstackclient.identity.v3.group:ListGroup',
|
'list_group=openstackclient.identity.v3.group:ListGroup',
|
||||||
'create_project=' +
|
'create_project=' +
|
||||||
'openstackclient.identity.v3.project:CreateProject',
|
'openstackclient.identity.v3.project:CreateProject',
|
||||||
'delete_project=' +
|
'delete_project=' +
|
||||||
'openstackclient.identity.v3.project:DeleteProject',
|
'openstackclient.identity.v3.project:DeleteProject',
|
||||||
'set_project=openstackclient.identity.v3.project:SetProject',
|
'set_project=openstackclient.identity.v3.project:SetProject',
|
||||||
'show_project=openstackclient.identity.v3.project:ShowProject',
|
'show_project=openstackclient.identity.v3.project:ShowProject',
|
||||||
'list_project=openstackclient.identity.v3.project:ListProject',
|
'list_project=openstackclient.identity.v3.project:ListProject',
|
||||||
|
2
tox.ini
2
tox.ini
@ -11,7 +11,7 @@ deps = -r{toxinidir}/tools/pip-requires
|
|||||||
commands = python setup.py testr --testr-args='{posargs}'
|
commands = python setup.py testr --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
deps = pep8==1.1
|
deps = pep8==1.3.3
|
||||||
commands = pep8 --repeat --show-source openstackclient setup.py
|
commands = pep8 --repeat --show-source openstackclient setup.py
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
|
Loading…
Reference in New Issue
Block a user