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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from solumclient.common.apiclient import client as api_client
from solumclient.common import auth from solumclient.common import auth
from solumclient.common import client from solumclient.common import client
from solumclient.openstack.common.apiclient import client as api_client
API_NAME = 'builder' API_NAME = 'builder'
VERSION_MAP = { VERSION_MAP = {

View File

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

View File

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

View File

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

View File

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

View File

@ -29,8 +29,8 @@ import copy
import six import six
from six.moves.urllib import parse from six.moves.urllib import parse
from solumclient.common.apiclient import exceptions
from solumclient.i18n import _ from solumclient.i18n import _
from solumclient.openstack.common.apiclient import exceptions
from oslo_utils import strutils from oslo_utils import strutils
@ -454,8 +454,7 @@ class Resource(object):
@property @property
def human_id(self): 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: if self.HUMAN_ID:
name = getattr(self, self.NAME_ATTR, None) name = getattr(self, self.NAME_ATTR, None)
if name is not None: if name is not None:

View File

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

View File

@ -29,8 +29,7 @@ from solumclient.i18n import _
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."""
"""
pass pass
@ -108,8 +107,7 @@ class AmbiguousEndpoints(EndpointException):
class HttpError(ClientException): class HttpError(ClientException):
"""The base exception class for all HTTP exceptions. """The base exception class for all HTTP exceptions."""
"""
http_status = 0 http_status = 0
message = _("HTTP Error") message = _("HTTP Error")

View File

@ -30,7 +30,7 @@ import requests
import six import six
from six.moves.urllib import parse 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): 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): class TestResponse(requests.Response):
"""Wrap requests.Response and provide a convenient initialization. """Wrap requests.Response and provide a convenient initialization."""
"""
def __init__(self, data): def __init__(self, data):
super(TestResponse, self).__init__() super(TestResponse, self).__init__()
@ -86,15 +85,14 @@ class FakeHTTPClient(client.HTTPClient):
super(FakeHTTPClient, self).__init__(*args, **kwargs) super(FakeHTTPClient, self).__init__(*args, **kwargs)
def assert_called(self, method, url, body=None, pos=-1): 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) expected = (method, url)
called = self.callstack[pos][0:2] called = self.callstack[pos][0:2]
assert self.callstack, \ assert (self.callstack,
"Expected %s %s but no calls were made." % expected "Expected %s %s but no calls were made." % expected)
assert expected == called, 'Expected %s %s; got %s %s' % \ assert expected == called, 'Expected %s %s; got %s %s' % (
(expected + called) expected + called)
if body is not None: if body is not None:
if self.callstack[pos][3] != body: if self.callstack[pos][3] != body:
@ -102,12 +100,11 @@ class FakeHTTPClient(client.HTTPClient):
(self.callstack[pos][3], body)) (self.callstack[pos][3], body))
def assert_called_anytime(self, method, url, body=None): 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) expected = (method, url)
assert self.callstack, \ assert (self.callstack,
"Expected %s %s but no calls were made." % expected "Expected %s %s but no calls were made." % expected)
found = False found = False
entry = None entry = None
@ -116,8 +113,7 @@ class FakeHTTPClient(client.HTTPClient):
found = True found = True
break break
assert found, 'Expected %s %s; got %s' % \ assert found, 'Expected %s %s; got %s' % (method, url, self.callstack)
(method, url, self.callstack)
if body is not None: if body is not None:
assert entry[3] == body, "%s != %s" % (entry[3], body) assert entry[3] == body, "%s != %s" % (entry[3], body)

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from solumclient.openstack.common.apiclient import exceptions from solumclient.common.apiclient import exceptions
class CommandException(Exception): 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 six
import solumclient import solumclient
from solumclient.common.apiclient import exceptions
from solumclient.common import cli_utils from solumclient.common import cli_utils
from solumclient.common import exc from solumclient.common import exc
from solumclient.common import github from solumclient.common import github
from solumclient.common import yamlutils from solumclient.common import yamlutils
from solumclient import config from solumclient import config
from solumclient.openstack.common.apiclient import exceptions
from solumclient.v1 import app as cli_app from solumclient.v1 import app as cli_app
from solumclient.v1 import languagepack as cli_lp from solumclient.v1 import languagepack as cli_lp
from solumclient.v1 import pipeline as cli_pipe from solumclient.v1 import pipeline as cli_pipe

View File

@ -15,8 +15,8 @@
import mock import mock
from solumclient.builder import client from solumclient.builder import client
from solumclient.common.apiclient import exceptions
from solumclient.common import auth from solumclient.common import auth
from solumclient.openstack.common.apiclient import exceptions
from solumclient.tests import base 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 client as builder_client
from solumclient.builder.v1 import image 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.tests import base
image_fixture = { image_fixture = {

View File

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

View File

@ -15,10 +15,10 @@
import mock import mock
import requests 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.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 from solumclient.tests import base

View File

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

View File

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

View File

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

View File

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

View File

@ -13,7 +13,7 @@
# under the License. # under the License.
from solumclient.builder.v1 import image 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.tests import base
from solumclient.v1 import client as sclient from solumclient.v1 import client as sclient
from solumclient.v1 import languagepack from solumclient.v1 import languagepack

View File

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

View File

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

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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.tests import base
from solumclient.v1 import client as sclient from solumclient.v1 import client as sclient
from solumclient.v1 import platform from solumclient.v1 import platform

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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 base as solum_base
from solumclient.common import exc 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 from oslo_utils import uuidutils

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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 app
from solumclient.v1 import component from solumclient.v1 import component
from solumclient.v1 import languagepack from solumclient.v1 import languagepack

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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 base as solum_base
from solumclient.common import exc 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 from oslo_utils import uuidutils

View File

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

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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 base as solum_base
from solumclient.common import exc 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 from oslo_utils import uuidutils

View File

@ -14,11 +14,11 @@
import six 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 base as solum_base
from solumclient.common import exc from solumclient.common import exc
from solumclient.common import yamlutils 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 from oslo_utils import uuidutils

View File

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

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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 base as solum_base
from solumclient.common import exc 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 from oslo_utils import uuidutils