Remove all the openstack dir

Remove all the openstack dir

Change-Id: I7214c3835686c4a2fa2ed237667e717de5af96a7
This commit is contained in:
zhurong 2016-10-19 20:40:29 +08:00
parent 526947d6ed
commit b951bd5ea0
38 changed files with 67 additions and 95 deletions

View File

@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.common.apiclient import client as api_client
from solumclient.common import auth
from solumclient.common import client
from solumclient.openstack.common.apiclient import client as api_client
API_NAME = 'builder'
VERSION_MAP = {

View File

@ -13,7 +13,7 @@
# under the License.
from solumclient.builder.v1 import image
from solumclient.openstack.common.apiclient import client
from solumclient.common.apiclient import client
class Client(client.BaseClient):

View File

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.common.apiclient import base as apiclient_base
from solumclient.common import base as solum_base
from solumclient.openstack.common.apiclient import base as apiclient_base
class Image(apiclient_base.Resource):

View File

@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.common.apiclient import client as api_client
from solumclient.common import auth
from solumclient.common import client
from solumclient.openstack.common.apiclient import client as api_client
API_NAME = 'solum'
VERSION_MAP = {

View File

@ -24,7 +24,7 @@ import os
import six
from stevedore import extension
from solumclient.openstack.common.apiclient import exceptions
from solumclient.common.apiclient import exceptions
_discovered_plugins = {}
@ -41,7 +41,7 @@ def discover_auth_systems():
def add_plugin(ext):
_discovered_plugins[ext.name] = ext.plugin
ep_namespace = "solumclient.openstack.common.apiclient.auth"
ep_namespace = "solumclient.common.apiclient.auth"
mgr = extension.ExtensionManager(ep_namespace)
mgr.map(add_plugin)
@ -143,8 +143,7 @@ class BaseAuthPlugin(object):
@classmethod
def add_opts(cls, parser):
"""Populate the parser with the options for this plugin.
"""
"""Populate the parser with the options for this plugin."""
for opt in cls.opt_names:
# use `BaseAuthPlugin.common_opt_names` since it is never
# changed in child classes
@ -153,8 +152,7 @@ class BaseAuthPlugin(object):
@classmethod
def add_common_opts(cls, parser):
"""Add options that are common for several plugins.
"""
"""Add options that are common for several plugins."""
for opt in cls.common_opt_names:
cls._parser_add_opt(parser, opt)
@ -191,8 +189,7 @@ class BaseAuthPlugin(object):
@abc.abstractmethod
def _do_authenticate(self, http_client):
"""Protected method for authentication.
"""
"""Protected method for authentication."""
def sufficient_options(self):
"""Check if all required options are present.

View File

@ -29,8 +29,8 @@ import copy
import six
from six.moves.urllib import parse
from solumclient.common.apiclient import exceptions
from solumclient.i18n import _
from solumclient.openstack.common.apiclient import exceptions
from oslo_utils import strutils
@ -454,8 +454,7 @@ class Resource(object):
@property
def human_id(self):
"""Human-readable ID which can be used for bash completion.
"""
"""Human-readable ID which can be used for bash completion."""
if self.HUMAN_ID:
name = getattr(self, self.NAME_ATTR, None)
if name is not None:

View File

@ -32,13 +32,12 @@ try:
except ImportError:
import json
import requests
from oslo_log import log as logging
from oslo_utils import importutils
import requests
from solumclient.common.apiclient import exceptions
from solumclient.i18n import _
from solumclient.openstack.common.apiclient import exceptions
_logger = logging.getLogger(__name__)
@ -63,7 +62,7 @@ class HTTPClient(object):
into terminal and send the same request with curl.
"""
user_agent = "solumclient.openstack.common.apiclient"
user_agent = "solumclient.common.apiclient"
def __init__(self,
auth_plugin,
@ -286,7 +285,7 @@ class HTTPClient(object):
>>> def test_clients():
... from keystoneclient.auth import keystone
... from openstack.common.apiclient import client
... from openstack.apiclient import client
... auth = keystone.KeystoneAuthPlugin(
... username="user", password="pass", tenant_name="tenant",
... auth_url="http://auth:5000/v2.0")

View File

@ -29,8 +29,7 @@ from solumclient.i18n import _
class ClientException(Exception):
"""The base exception class for all exceptions this library raises.
"""
"""The base exception class for all exceptions this library raises."""
pass
@ -108,8 +107,7 @@ class AmbiguousEndpoints(EndpointException):
class HttpError(ClientException):
"""The base exception class for all HTTP exceptions.
"""
"""The base exception class for all HTTP exceptions."""
http_status = 0
message = _("HTTP Error")

View File

@ -30,7 +30,7 @@ import requests
import six
from six.moves.urllib import parse
from solumclient.openstack.common.apiclient import client
from solumclient.common.apiclient import client
def assert_has_keys(dct, required=None, optional=None):
@ -46,8 +46,7 @@ def assert_has_keys(dct, required=None, optional=None):
class TestResponse(requests.Response):
"""Wrap requests.Response and provide a convenient initialization.
"""
"""Wrap requests.Response and provide a convenient initialization."""
def __init__(self, data):
super(TestResponse, self).__init__()
@ -86,15 +85,14 @@ class FakeHTTPClient(client.HTTPClient):
super(FakeHTTPClient, self).__init__(*args, **kwargs)
def assert_called(self, method, url, body=None, pos=-1):
"""Assert than an API method was just called.
"""
"""Assert than an API method was just called."""
expected = (method, url)
called = self.callstack[pos][0:2]
assert self.callstack, \
"Expected %s %s but no calls were made." % expected
assert (self.callstack,
"Expected %s %s but no calls were made." % expected)
assert expected == called, 'Expected %s %s; got %s %s' % \
(expected + called)
assert expected == called, 'Expected %s %s; got %s %s' % (
expected + called)
if body is not None:
if self.callstack[pos][3] != body:
@ -102,12 +100,11 @@ class FakeHTTPClient(client.HTTPClient):
(self.callstack[pos][3], body))
def assert_called_anytime(self, method, url, body=None):
"""Assert than an API method was called anytime in the test.
"""
"""Assert than an API method was called anytime in the test."""
expected = (method, url)
assert self.callstack, \
"Expected %s %s but no calls were made." % expected
assert (self.callstack,
"Expected %s %s but no calls were made." % expected)
found = False
entry = None
@ -116,8 +113,7 @@ class FakeHTTPClient(client.HTTPClient):
found = True
break
assert found, 'Expected %s %s; got %s' % \
(method, url, self.callstack)
assert found, 'Expected %s %s; got %s' % (method, url, self.callstack)
if body is not None:
assert entry[3] == body, "%s != %s" % (entry[3], body)

View File

@ -14,8 +14,8 @@
from keystoneclient.v2_0 import client as ksclient
from solumclient.openstack.common.apiclient import auth
from solumclient.openstack.common.apiclient import exceptions
from solumclient.common.apiclient import auth
from solumclient.common.apiclient import exceptions
class KeystoneAuthPlugin(auth.BaseAuthPlugin):

View File

@ -14,8 +14,8 @@
from six.moves.urllib import parse as urlparse
from solumclient.openstack.common.apiclient import base
from solumclient.openstack.common.apiclient import exceptions
from solumclient.common.apiclient import base
from solumclient.common.apiclient import exceptions
class FindMixin(object):

View File

@ -16,9 +16,9 @@ import time
from oslo_log import log as logging
from solumclient.common.apiclient import client as api_client
from solumclient.common import exc
from solumclient import config
from solumclient.openstack.common.apiclient import client as api_client
_logger = logging.getLogger(__name__)

View File

@ -28,8 +28,8 @@ import prettytable
import six
from six import moves
from solumclient.common.apiclient import exceptions
from solumclient.i18n import _
from solumclient.openstack.common.apiclient import exceptions
from oslo_utils import encodeutils
from oslo_utils import strutils

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.openstack.common.apiclient import exceptions
from solumclient.common.apiclient import exceptions
class CommandException(Exception):

View File

@ -1,17 +0,0 @@
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import six
six.add_move(six.MovedModule('mox', 'mox', 'mox3.mox'))

View File

@ -48,12 +48,12 @@ from keystoneclient.v2_0 import client as keystoneclient
import six
import solumclient
from solumclient.common.apiclient import exceptions
from solumclient.common import cli_utils
from solumclient.common import exc
from solumclient.common import github
from solumclient.common import yamlutils
from solumclient import config
from solumclient.openstack.common.apiclient import exceptions
from solumclient.v1 import app as cli_app
from solumclient.v1 import languagepack as cli_lp
from solumclient.v1 import pipeline as cli_pipe

View File

@ -15,8 +15,8 @@
import mock
from solumclient.builder import client
from solumclient.common.apiclient import exceptions
from solumclient.common import auth
from solumclient.openstack.common.apiclient import exceptions
from solumclient.tests import base

View File

@ -14,7 +14,7 @@
from solumclient.builder.v1 import client as builder_client
from solumclient.builder.v1 import image
from solumclient.openstack.common.apiclient import fake_client
from solumclient.common.apiclient import fake_client
from solumclient.tests import base
image_fixture = {

View File

@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.openstack.common.apiclient import base
from solumclient.openstack.common.apiclient import client
from solumclient.openstack.common.apiclient import fake_client
from solumclient.common.apiclient import base
from solumclient.common.apiclient import client
from solumclient.common.apiclient import fake_client
from solumclient.tests import base as test_base

View File

@ -15,10 +15,10 @@
import mock
import requests
from solumclient.common.apiclient import auth
from solumclient.common.apiclient import client as api_client
from solumclient.common.apiclient import exceptions
from solumclient.common import client
from solumclient.openstack.common.apiclient import auth
from solumclient.openstack.common.apiclient import client as api_client
from solumclient.openstack.common.apiclient import exceptions
from solumclient.tests import base

View File

@ -14,8 +14,8 @@
import six
from solumclient.common.apiclient import exceptions
from solumclient.common import exc
from solumclient.openstack.common.apiclient import exceptions
from solumclient.tests import base

View File

@ -15,8 +15,8 @@
import mock
from solumclient import client
from solumclient.common.apiclient import exceptions
from solumclient.common import auth
from solumclient.openstack.common.apiclient import exceptions
from solumclient.tests import base

View File

@ -24,8 +24,8 @@ from stevedore import extension
from testtools import matchers
from solumclient import client
from solumclient.common.apiclient import auth
from solumclient.common import yamlutils
from solumclient.openstack.common.apiclient import auth
from solumclient import solum
from solumclient.tests import base
from solumclient.v1 import component

View File

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.openstack.common.apiclient import exceptions
from solumclient.openstack.common.apiclient import fake_client
from solumclient.common.apiclient import exceptions
from solumclient.common.apiclient import fake_client
from solumclient.tests import base
from solumclient.v1 import client as sclient
from solumclient.v1 import component

View File

@ -13,7 +13,7 @@
# under the License.
from solumclient.builder.v1 import image
from solumclient.openstack.common.apiclient import fake_client
from solumclient.common.apiclient import fake_client
from solumclient.tests import base
from solumclient.v1 import client as sclient
from solumclient.v1 import languagepack

View File

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.openstack.common.apiclient import exceptions
from solumclient.openstack.common.apiclient import fake_client
from solumclient.common.apiclient import exceptions
from solumclient.common.apiclient import fake_client
from solumclient.tests import base
from solumclient.v1 import client as sclient
from solumclient.v1 import pipeline

View File

@ -14,7 +14,7 @@
import mock
from solumclient.openstack.common.apiclient import fake_client
from solumclient.common.apiclient import fake_client
from solumclient.tests import base
from solumclient.v1 import client as sclient
from solumclient.v1 import plan

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.openstack.common.apiclient import fake_client
from solumclient.common.apiclient import fake_client
from solumclient.tests import base
from solumclient.v1 import client as sclient
from solumclient.v1 import platform

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.common.apiclient import base as apiclient_base
from solumclient.common.apiclient import exceptions
from solumclient.common import base as solum_base
from solumclient.common import exc
from solumclient.openstack.common.apiclient import base as apiclient_base
from solumclient.openstack.common.apiclient import exceptions
from oslo_utils import uuidutils

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.openstack.common.apiclient import client
from solumclient.common.apiclient import client
from solumclient.v1 import app
from solumclient.v1 import component
from solumclient.v1 import languagepack

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.common.apiclient import base as apiclient_base
from solumclient.common.apiclient import exceptions
from solumclient.common import base as solum_base
from solumclient.common import exc
from solumclient.openstack.common.apiclient import base as apiclient_base
from solumclient.openstack.common.apiclient import exceptions
from oslo_utils import uuidutils

View File

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.common.apiclient import base as apiclient_base
from solumclient.common import base as solum_base
from solumclient.openstack.common.apiclient import base as apiclient_base
class LanguagePack(apiclient_base.Resource):

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.common.apiclient import base as apiclient_base
from solumclient.common.apiclient import exceptions
from solumclient.common import base as solum_base
from solumclient.common import exc
from solumclient.openstack.common.apiclient import base as apiclient_base
from solumclient.openstack.common.apiclient import exceptions
from oslo_utils import uuidutils

View File

@ -14,11 +14,11 @@
import six
from solumclient.common.apiclient import base as apiclient_base
from solumclient.common.apiclient import exceptions
from solumclient.common import base as solum_base
from solumclient.common import exc
from solumclient.common import yamlutils
from solumclient.openstack.common.apiclient import base as apiclient_base
from solumclient.openstack.common.apiclient import exceptions
from oslo_utils import uuidutils

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.openstack.common.apiclient import base
from solumclient.common.apiclient import base
class Platform(base.Resource):

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from solumclient.common.apiclient import base as apiclient_base
from solumclient.common.apiclient import exceptions
from solumclient.common import base as solum_base
from solumclient.common import exc
from solumclient.openstack.common.apiclient import base as apiclient_base
from solumclient.openstack.common.apiclient import exceptions
from oslo_utils import uuidutils