Change Smaug to Karbor

There was a decision in the community to change the project name.

Change-Id: I552759662151f424d752ced8f1df2e6664f434e4
This commit is contained in:
chenying
2016-08-15 11:14:57 +08:00
parent 321b6f640a
commit 44f20e3019
54 changed files with 213 additions and 213 deletions

View File

@@ -1,7 +1,7 @@
[run]
branch = True
source = smaugclient
omit = smaugclient/tests/*,smaug/openstack/*
source = karborclient
omit = karborclient/tests/*,karbor/openstack/*
[report]
ignore_errors = True

View File

@@ -1,4 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/python-smaugclient.git
project=openstack/python-karborclient.git

View File

@@ -14,4 +14,4 @@ Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub:
https://launchpad.net/python-smaugclient
https://launchpad.net/python-karborclient

View File

@@ -1,16 +1,16 @@
Smaug
Karbor
======
.. image:: https://img.shields.io/pypi/v/python-smaugclient.svg
:target: https://pypi.python.org/pypi/python-smaugclient/
.. image:: https://img.shields.io/pypi/v/python-karborclient.svg
:target: https://pypi.python.org/pypi/python-karborclient/
:alt: Latest Version
.. image:: https://img.shields.io/pypi/dm/python-smaugclient.svg
:target: https://pypi.python.org/pypi/python-smaugclient/
.. image:: https://img.shields.io/pypi/dm/python-karborclient.svg
:target: https://pypi.python.org/pypi/python-karborclient/
:alt: Downloads
Smaug Mission Statement
Karbor Mission Statement
* Formalize Application Data Protection in OpenStack (APIs, Services, Plugins, …)
* Be able to protect Any Resource in OpenStack(as well as their dependencies)
@@ -25,37 +25,37 @@ Smaug Mission Statement
* `Specs`_
* `How to Contribute`_
.. _PyPi: https://pypi.python.org/pypi/python-smaugclient
.. _Launchpad project: https://launchpad.net/python-smaugclient
.. _Blueprints: https://blueprints.launchpad.net/python-smaugclient
.. _Bugs: https://bugs.launchpad.net/python-smaugclient
.. _Source: https://git.openstack.org/cgit/openstack/python-smaugclient
.. _PyPi: https://pypi.python.org/pypi/python-karborclient
.. _Launchpad project: https://launchpad.net/python-karborclient
.. _Blueprints: https://blueprints.launchpad.net/python-karborclient
.. _Bugs: https://bugs.launchpad.net/python-karborclient
.. _Source: https://git.openstack.org/cgit/openstack/python-karborclient
.. _How to Contribute: http://docs.openstack.org/infra/manual/developers.html
Python Smaugclient
Python Karborclient
-------------------
python-smaugclient is a client library for Smaug built on the Smaug API.
It provides a Python API (the ``smaugclient`` module) and a command-line tool
(``smaug``).
python-karborclient is a client library for karbor built on the karbor API.
It provides a Python API (the ``karborclient`` module) and a command-line tool
(``karbor``).
Project Resources
-----------------
Project status, bugs, and blueprints are tracked on Launchpad:
* Client bug tracker
* https://launchpad.net/python-smaugclient
* https://launchpad.net/python-karborclient
* Smaug bug tracker
* https://launchpad.net/smaug
* Karbor bug tracker
* https://launchpad.net/karbor
Developer documentation can be found here:
http://docs.openstack.org/developer/smaug
http://docs.openstack.org/developer/karbor
Additional resources are linked from the project wiki page:
https://wiki.openstack.org/wiki/Smaug
https://wiki.openstack.org/wiki/karbor
License
-------

View File

@@ -37,7 +37,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'python-smaugclient'
project = u'python-karborclient'
copyright = u'2013, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.

View File

@@ -1,4 +1,4 @@
Welcome to smaugclient's documentation!
Welcome to karborclient's documentation!
========================================================
Contents:

View File

@@ -4,9 +4,9 @@ Installation
At the command line::
$ pip install python-smaugclient
$ pip install python-karborclient
Or, if you have virtualenvwrapper installed::
$ mkvirtualenv python-smaugclient
$ pip install python-smaugclient
$ mkvirtualenv python-karborclient
$ pip install python-karborclient

View File

@@ -2,6 +2,6 @@
Usage
========
To use smaugclient in a project::
To use karborclient in a project::
import smaugclient
import karborclient

View File

@@ -16,4 +16,4 @@ import pbr.version
__version__ = pbr.version.VersionInfo(
'python-smaugclient').version_string()
'python-karborclient').version_string()

View File

@@ -9,7 +9,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from smaugclient.common import utils
from karborclient.common import utils
def Client(version, *args, **kwargs):

View File

@@ -20,8 +20,8 @@ import copy
import six
from six.moves.urllib import parse
from smaugclient.common import http
from smaugclient.openstack.common.apiclient import exceptions
from karborclient.common import http
from karborclient.openstack.common.apiclient import exceptions
SORT_DIR_VALUES = ('asc', 'desc')
SORT_KEY_VALUES = ('id', 'status', 'name', 'created_at')

View File

@@ -26,10 +26,10 @@ import requests
import six
from six.moves import urllib
from smaugclient.openstack.common.apiclient import exceptions as exc
from karborclient.openstack.common.apiclient import exceptions as exc
LOG = logging.getLogger(__name__)
USER_AGENT = 'python-smaugclient'
USER_AGENT = 'python-karborclient'
CHUNKSIZE = 1024 * 64 # 64kB
@@ -299,7 +299,7 @@ class HTTPClient(object):
class SessionClient(keystone_adapter.Adapter):
"""Smaug specific keystoneclient Adapter.
"""karbor specific keystoneclient Adapter.
"""
@@ -386,7 +386,7 @@ def _construct_http_client(*args, **kwargs):
'service_type': service_type,
'region_name': region_name,
'service_name': service_name,
'user_agent': 'python-smaugclient',
'user_agent': 'python-karborclient',
}
parameters.update(kwargs)
return SessionClient(**parameters)

View File

@@ -23,7 +23,7 @@ from oslo_utils import importutils
import prettytable
from smaugclient.openstack.common.apiclient import exceptions
from karborclient.openstack.common.apiclient import exceptions
# Decorator for cli-args
@@ -50,7 +50,7 @@ def env(*vars, **kwargs):
def import_versioned_module(version, submodule=None):
module = 'smaugclient.v%s' % version
module = 'karborclient.v%s' % version
if submodule:
module = '.'.join((module, submodule))
return importutils.import_module(module)

View File

@@ -18,7 +18,7 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html
import oslo_i18n
_translators = oslo_i18n.TranslatorFactory(domain='smaugclient')
_translators = oslo_i18n.TranslatorFactory(domain='karborclient')
# The primary translation function using the well-known name "_"
_ = _translators.primary

View File

@@ -24,7 +24,7 @@ import os
import six
from stevedore import extension
from smaugclient.openstack.common.apiclient import exceptions
from karborclient.openstack.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 = "smaugclient.openstack.common.apiclient.auth"
ep_namespace = "karborclient.openstack.common.apiclient.auth"
mgr = extension.ExtensionManager(ep_namespace)
mgr.map(add_plugin)

View File

@@ -31,8 +31,8 @@ from oslo_utils import uuidutils
import six
from six.moves.urllib import parse
from smaugclient.i18n import _
from smaugclient.openstack.common.apiclient import exceptions
from karborclient.i18n import _
from karborclient.openstack.common.apiclient import exceptions
def getid(obj):

View File

@@ -36,8 +36,8 @@ from oslo_log import log as logging
from oslo_utils import importutils
import requests
from smaugclient.i18n import _
from smaugclient.openstack.common.apiclient import exceptions
from karborclient.i18n import _
from karborclient.openstack.common.apiclient import exceptions
@@ -63,7 +63,7 @@ class HTTPClient(object):
into terminal and send the same request with curl.
"""
user_agent = "smaugclient.openstack.common.apiclient"
user_agent = "karborclient.openstack.common.apiclient"
def __init__(self,
auth_plugin,

View File

@@ -24,7 +24,7 @@ import sys
import six
from smaugclient.i18n import _
from karborclient.i18n import _
class ClientException(Exception):

View File

@@ -30,7 +30,7 @@ import requests
import six
from six.moves.urllib import parse
from smaugclient.openstack.common.apiclient import client
from karborclient.openstack.common.apiclient import client
def assert_has_keys(dct, required=None, optional=None):

View File

@@ -11,7 +11,7 @@
# under the License.
"""
Command-line interface to the Smaug Project.
Command-line interface to the karbor Project.
"""
from __future__ import print_function
@@ -31,15 +31,15 @@ from oslo_utils import encodeutils
import six
import six.moves.urllib.parse as urlparse
import smaugclient
from smaugclient import client as smaug_client
from smaugclient.common import utils
from smaugclient.openstack.common.apiclient import exceptions as exc
import karborclient
from karborclient import client as karbor_client
from karborclient.common import utils
from karborclient.openstack.common.apiclient import exceptions as exc
logger = logging.getLogger(__name__)
class SmaugShell(object):
class KarborShell(object):
def _append_global_identity_args(self, parser):
# Register the CLI arguments that have moved to the session object.
@@ -50,9 +50,9 @@ class SmaugShell(object):
def get_base_parser(self):
parser = argparse.ArgumentParser(
prog='smaug',
prog='karbor',
description=__doc__.strip(),
epilog='See "smaug help COMMAND" '
epilog='See "karbor help COMMAND" '
'for help on a specific command.',
add_help=False,
formatter_class=HelpFormatter,
@@ -65,13 +65,13 @@ class SmaugShell(object):
parser.add_argument('--version',
action='version',
version=smaugclient.__version__,
version=karborclient.__version__,
help="Show program's version number and exit.")
parser.add_argument('-d', '--debug',
default=bool(utils.env('SMAUGCLIENT_DEBUG')),
default=bool(utils.env('KARBORCLIENT_DEBUG')),
action='store_true',
help='Defaults to env[SMAUGCLIENT_DEBUG].')
help='Defaults to env[KARBORCLIENT_DEBUG].')
parser.add_argument('-v', '--verbose',
default=False, action="store_true",
@@ -117,14 +117,14 @@ class SmaugShell(object):
action='store_true',
help="Do not contact keystone for a token. "
"Defaults to env[OS_NO_CLIENT_AUTH].")
parser.add_argument('--smaug-url',
default=utils.env('SMAUG_URL'),
help='Defaults to env[SMAUG_URL].')
parser.add_argument('--karbor-url',
default=utils.env('KARBOR_URL'),
help='Defaults to env[KARBOR_URL].')
parser.add_argument('--smaug-api-version',
parser.add_argument('--karbor-api-version',
default=utils.env(
'SMAUG_API_VERSION', default='1'),
help='Defaults to env[SMAUG_API_VERSION] '
'KARBOR_API_VERSION', default='1'),
help='Defaults to env[KARBOR_API_VERSION] '
'or 1.')
parser.add_argument('--os-service-type',
@@ -136,9 +136,9 @@ class SmaugShell(object):
help='Defaults to env[OS_ENDPOINT_TYPE].')
parser.add_argument('--include-password',
default=bool(utils.env('SMAUG_INCLUDE_PASSWORD')),
default=bool(utils.env('KARBOR_INCLUDE_PASSWORD')),
action='store_true',
help='Send os-username and os-password to smaug.')
help='Send os-username and os-password to karbor.')
self._append_global_identity_args(parser)
@@ -289,7 +289,7 @@ class SmaugShell(object):
self._setup_logging(options.debug)
# build available subcommands based on version
api_version = options.smaug_api_version
api_version = options.karbor_api_version
subcommand_parser = self.get_subcommand_parser(api_version)
self.parser = subcommand_parser
@@ -320,11 +320,11 @@ class SmaugShell(object):
" env[OS_AUTH_TOKEN]")
if args.os_no_client_auth:
if not args.smaug_url:
if not args.karbor_url:
raise exc.CommandError(
"If you specify --os-no-client-auth"
" you must also specify a Smaug API URL"
" via either --smaug-url or env[SMAUG_URL]")
" you must also specify a Karbor API URL"
" via either --karbor-url or env[KARBOR_URL]")
else:
# Tenant name or ID is needed to make keystoneclient retrieve a
@@ -343,10 +343,10 @@ class SmaugShell(object):
" either --os-auth-url or via"
" env[OS_AUTH_URL]")
endpoint = args.smaug_url
endpoint = args.karbor_url
if args.os_no_client_auth:
# Authenticate through smaug, don't use session
# Authenticate through karbor, don't use session
kwargs = {
'username': args.os_username,
'password': args.os_password,
@@ -398,7 +398,7 @@ class SmaugShell(object):
if args.api_timeout:
kwargs['timeout'] = args.api_timeout
client = smaug_client.Client(api_version, endpoint, **kwargs)
client = karbor_client.Client(api_version, endpoint, **kwargs)
args.func(client, args)
@@ -440,10 +440,10 @@ class HelpFormatter(argparse.HelpFormatter):
def main(args=sys.argv[1:]):
try:
SmaugShell().main(args)
KarborShell().main(args)
except KeyboardInterrupt:
print('... terminating smaug client', file=sys.stderr)
print('... terminating karbor client', file=sys.stderr)
sys.exit(1)
except Exception as e:
if '--debug' in args or '-d' in args:

View File

@@ -16,12 +16,12 @@ import socket
import mock
import testtools
from smaugclient.common import http
from smaugclient.openstack.common.apiclient import exceptions as exc
from smaugclient.tests.unit import fakes
from karborclient.common import http
from karborclient.openstack.common.apiclient import exceptions as exc
from karborclient.tests.unit import fakes
@mock.patch('smaugclient.common.http.requests.request')
@mock.patch('karborclient.common.http.requests.request')
class HttpClientTest(testtools.TestCase):
# Patch os.environ to avoid required auth info.
@@ -29,7 +29,7 @@ class HttpClientTest(testtools.TestCase):
super(HttpClientTest, self).setUp()
def test_http_raw_request(self, mock_request):
headers = {'User-Agent': 'python-smaugclient'}
headers = {'User-Agent': 'python-karborclient'}
mock_request.return_value = \
fakes.FakeHTTPResponse(
200, 'OK',
@@ -71,15 +71,15 @@ class HttpClientTest(testtools.TestCase):
mock_request.assert_has_calls([
mock.call('GET', 'http://example.com:8082',
allow_redirects=False,
headers={'User-Agent': 'python-smaugclient'}),
headers={'User-Agent': 'python-karborclient'}),
mock.call('GET', 'http://example.com:8082',
allow_redirects=False,
headers={'User-Agent': 'python-smaugclient',
headers={'User-Agent': 'python-karborclient',
'X-Auth-Key': 'pass',
'X-Auth-User': 'user'}),
mock.call('GET', 'http://example.com:8082',
allow_redirects=False,
headers={'User-Agent': 'python-smaugclient',
headers={'User-Agent': 'python-karborclient',
'X-Auth-Token': 'abcd1234'})
])
@@ -101,7 +101,7 @@ class HttpClientTest(testtools.TestCase):
'GET', 'http://example.com:8082',
allow_redirects=False,
headers={'X-Region-Name': 'RegionOne',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
def test_http_json_request(self, mock_request):
# Record a 200
@@ -119,7 +119,7 @@ class HttpClientTest(testtools.TestCase):
'GET', 'http://example.com:8082',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
def test_http_json_request_argument_passed_to_requests(self, mock_request):
"""Check that we have sent the proper arguments to requests."""
@@ -147,7 +147,7 @@ class HttpClientTest(testtools.TestCase):
data='"text"',
headers={'Content-Type': 'application/json',
'X-Auth-Url': 'http://AUTH_URL',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
def test_http_json_request_w_req_body(self, mock_request):
# Record a 200
@@ -166,7 +166,7 @@ class HttpClientTest(testtools.TestCase):
data='"test-body"',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
def test_http_json_request_non_json_resp_cont_type(self, mock_request):
# Record a 200
@@ -184,7 +184,7 @@ class HttpClientTest(testtools.TestCase):
'GET', 'http://example.com:8082', data='"test-data"',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
def test_http_json_request_invalid_json(self, mock_request):
# Record a 200
@@ -202,7 +202,7 @@ class HttpClientTest(testtools.TestCase):
'GET', 'http://example.com:8082',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
def test_http_manual_redirect_delete(self, mock_request):
mock_request.side_effect = [
@@ -223,11 +223,11 @@ class HttpClientTest(testtools.TestCase):
mock.call('DELETE', 'http://example.com:8082/foo',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'}),
'User-Agent': 'python-karborclient'}),
mock.call('DELETE', 'http://example.com:8082/foo/bar',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
])
def test_http_manual_redirect_post(self, mock_request):
@@ -249,11 +249,11 @@ class HttpClientTest(testtools.TestCase):
mock.call('POST', 'http://example.com:8082/foo',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'}),
'User-Agent': 'python-karborclient'}),
mock.call('POST', 'http://example.com:8082/foo/bar',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
])
def test_http_manual_redirect_put(self, mock_request):
@@ -275,11 +275,11 @@ class HttpClientTest(testtools.TestCase):
mock.call('PUT', 'http://example.com:8082/foo',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'}),
'User-Agent': 'python-karborclient'}),
mock.call('PUT', 'http://example.com:8082/foo/bar',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
])
def test_http_manual_redirect_prohibited(self, mock_request):
@@ -295,7 +295,7 @@ class HttpClientTest(testtools.TestCase):
'DELETE', 'http://example.com:8082/foo',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
def test_http_manual_redirect_error_without_location(self, mock_request):
mock_request.return_value = \
@@ -310,7 +310,7 @@ class HttpClientTest(testtools.TestCase):
'DELETE', 'http://example.com:8082/foo',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
def test_http_json_request_redirect(self, mock_request):
# Record the 302
@@ -333,11 +333,11 @@ class HttpClientTest(testtools.TestCase):
mock.call('GET', 'http://example.com:8082',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'}),
'User-Agent': 'python-karborclient'}),
mock.call('GET', 'http://example.com:8082',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
])
def test_http_404_json_request(self, mock_request):
@@ -356,7 +356,7 @@ class HttpClientTest(testtools.TestCase):
'GET', 'http://example.com:8082',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
def test_http_300_json_request(self, mock_request):
mock_request.return_value = \
@@ -374,10 +374,10 @@ class HttpClientTest(testtools.TestCase):
'GET', 'http://example.com:8082',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'})
'User-Agent': 'python-karborclient'})
def test_fake_json_request(self, mock_request):
headers = {'User-Agent': 'python-smaugclient'}
headers = {'User-Agent': 'python-karborclient'}
mock_request.side_effect = [socket.gaierror]
client = http.HTTPClient('fake://example.com:8082')
@@ -388,7 +388,7 @@ class HttpClientTest(testtools.TestCase):
headers=headers)
def test_http_request_socket_error(self, mock_request):
headers = {'User-Agent': 'python-smaugclient'}
headers = {'User-Agent': 'python-karborclient'}
mock_request.side_effect = [socket.gaierror]
client = http.HTTPClient('http://example.com:8082')
@@ -399,7 +399,7 @@ class HttpClientTest(testtools.TestCase):
headers=headers)
def test_http_request_socket_timeout(self, mock_request):
headers = {'User-Agent': 'python-smaugclient'}
headers = {'User-Agent': 'python-karborclient'}
mock_request.side_effect = [socket.timeout]
client = http.HTTPClient('http://example.com:8082')
@@ -424,7 +424,7 @@ class HttpClientTest(testtools.TestCase):
'GET', 'http://example.com:8082',
allow_redirects=False,
headers={'Content-Type': 'application/json',
'User-Agent': 'python-smaugclient'},
'User-Agent': 'python-karborclient'},
timeout=float(123))
def test_get_system_ca_file(self, mock_request):
@@ -445,7 +445,7 @@ class HttpClientTest(testtools.TestCase):
client = http.HTTPClient('https://foo', cacert="NOWHERE")
self.assertEqual("NOWHERE", client.verify_cert)
with mock.patch('smaugclient.common.http.get_system_ca_file') as gsf:
with mock.patch('karborclient.common.http.get_system_ca_file') as gsf:
gsf.return_value = "SOMEWHERE"
client = http.HTTPClient('https://foo')
self.assertEqual("SOMEWHERE", client.verify_cert)

View File

@@ -11,13 +11,13 @@
# under the License.
"""
Tests for `smaugclient` module.
Tests for `karborclient` module.
"""
from smaugclient.tests.unit import base
from karborclient.tests.unit import base
class TestSmaugclient(base.TestCaseShell):
class TestKarborclient(base.TestCaseShell):
def test_something(self):
pass

View File

@@ -23,9 +23,9 @@ from oslo_log import log
import six
from testtools import matchers
from smaugclient.openstack.common.apiclient import exceptions
import smaugclient.shell
from smaugclient.tests.unit import base
from karborclient.openstack.common.apiclient import exceptions
import karborclient.shell
from karborclient.tests.unit import base
FAKE_ENV = {'OS_USERNAME': 'username',
@@ -51,7 +51,7 @@ def _create_ver_list(versions):
class TestArgs(object):
package_version = ''
smaug_repo_url = 'http://127.0.0.1'
karbor_repo_url = 'http://127.0.0.1'
exists_action = ''
is_public = False
categories = []
@@ -78,7 +78,7 @@ class ShellCommandTest(ShellTest):
def get_auth_endpoint(bound_self, args):
return ('test', {})
self.useFixture(fixtures.MonkeyPatch(
'smaugclient.shell.SmaugShell._get_endpoint_and_kwargs',
'karborclient.shell.KarborShell._get_endpoint_and_kwargs',
get_auth_endpoint))
self.client = mock.MagicMock()
@@ -99,7 +99,7 @@ class ShellCommandTest(ShellTest):
try:
sys.stdout = six.StringIO()
sys.stderr = six.StringIO()
_shell = smaugclient.shell.SmaugShell()
_shell = karborclient.shell.KarborShell()
_shell.main(argstr.split())
except SystemExit:
exc_type, exc_value, exc_traceback = sys.exc_info()
@@ -133,9 +133,9 @@ class ShellCommandTest(ShellTest):
def test_help(self):
required = [
'.*?^usage: smaug',
'.*?^usage: karbor',
'.*?^\s+plan-create\s+Create a plan.',
'.*?^See "smaug help COMMAND" for help on a specific command',
'.*?^See "karbor help COMMAND" for help on a specific command',
]
stdout, stderr = self.shell('help')
for r in required:
@@ -144,7 +144,7 @@ class ShellCommandTest(ShellTest):
def test_help_on_subcommand(self):
required = [
'.*?^usage: smaug plan-create',
'.*?^usage: karbor plan-create',
'.*?^Create a plan.',
]
stdout, stderr = self.shell('help plan-create')
@@ -154,9 +154,9 @@ class ShellCommandTest(ShellTest):
def test_help_no_options(self):
required = [
'.*?^usage: smaug',
'.*?^usage: karbor',
'.*?^\s+plan-create\s+Create a plan',
'.*?^See "smaug help COMMAND" for help on a specific command',
'.*?^See "karbor help COMMAND" for help on a specific command',
]
stdout, stderr = self.shell('')
for r in required:

View File

@@ -15,10 +15,10 @@ try:
except ImportError:
import urllib.parse as urlparse
from smaugclient.common import http as base_client
from smaugclient.tests.unit import base
from smaugclient.tests.unit import fakes
from smaugclient.v1 import client
from karborclient.common import http as base_client
from karborclient.tests.unit import base
from karborclient.tests.unit import fakes
from karborclient.v1 import client
REQUEST_ID = 'req-test-request-id'

View File

@@ -12,8 +12,8 @@
import mock
from smaugclient.tests.unit import base
from smaugclient.tests.unit.v1 import fakes
from karborclient.tests.unit import base
from karborclient.tests.unit.v1 import fakes
cs = fakes.FakeClient()
mock_request_return = ({}, {'checkpoint': {}})
@@ -24,7 +24,7 @@ FAKE_PLAN_ID = "3330f8b1-975d-4621-a872-fa9afb43cb6c"
class CheckpointsTest(base.TestCaseShell):
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_checkpoints(self, mock_request):
mock_request.return_value = mock_request_return
cs.checkpoints.list(provider_id=FAKE_PROVIDER_ID)
@@ -33,7 +33,7 @@ class CheckpointsTest(base.TestCaseShell):
'/providers/{provider_id}/checkpoints'.format(
provider_id=FAKE_PROVIDER_ID), headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_get_checkpoint(self, mock_request):
mock_request.return_value = mock_request_return
cs.checkpoints.get(FAKE_PROVIDER_ID, '1')
@@ -42,7 +42,7 @@ class CheckpointsTest(base.TestCaseShell):
'/providers/{provider_id}/checkpoints/1'.format(
provider_id=FAKE_PROVIDER_ID), headers={})
@mock.patch('smaugclient.common.http.HTTPClient.raw_request')
@mock.patch('karborclient.common.http.HTTPClient.raw_request')
def test_delete_checkpoint(self, mock_request):
mock_request.return_value = mock_request_return
cs.checkpoints.delete(FAKE_PROVIDER_ID, '1')
@@ -51,7 +51,7 @@ class CheckpointsTest(base.TestCaseShell):
'/providers/{provider_id}/checkpoints/1'.format(
provider_id=FAKE_PROVIDER_ID), headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_checkpoints_with_marker_limit(self, mock_request):
mock_request.return_value = mock_request_return
cs.checkpoints.list(provider_id=FAKE_PROVIDER_ID,
@@ -62,7 +62,7 @@ class CheckpointsTest(base.TestCaseShell):
'checkpoints?limit=2&marker=1234'.format(
provider_id=FAKE_PROVIDER_ID), headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_checkpoints_with_sort_key_dir(self, mock_request):
mock_request.return_value = mock_request_return
cs.checkpoints.list(provider_id=FAKE_PROVIDER_ID,
@@ -78,7 +78,7 @@ class CheckpointsTest(base.TestCaseShell):
cs.checkpoints.list, FAKE_PROVIDER_ID,
sort_key='invalid', sort_dir='asc')
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_create_checkpoint(self, mock_request):
mock_request.return_value = mock_request_return
cs.checkpoints.create(FAKE_PROVIDER_ID, FAKE_PLAN_ID)

View File

@@ -12,8 +12,8 @@
import mock
from smaugclient.tests.unit import base
from smaugclient.tests.unit.v1 import fakes
from karborclient.tests.unit import base
from karborclient.tests.unit.v1 import fakes
cs = fakes.FakeClient()
mock_request_return = ({}, {'plan': {'name': 'fake_name'}})
@@ -21,7 +21,7 @@ mock_request_return = ({}, {'plan': {'name': 'fake_name'}})
class PlansTest(base.TestCaseShell):
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_plans_with_marker_limit(self, mock_request):
mock_request.return_value = mock_request_return
cs.plans.list(marker=1234, limit=2)
@@ -30,7 +30,7 @@ class PlansTest(base.TestCaseShell):
'/plans?limit=2&marker=1234'.format(
project_id=fakes.PROJECT_ID), headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_plans_with_sort_key_dir(self, mock_request):
mock_request.return_value = mock_request_return
cs.plans.list(sort_key='id', sort_dir='asc')
@@ -40,12 +40,12 @@ class PlansTest(base.TestCaseShell):
'sort_dir=asc&sort_key=id'.format(
project_id=fakes.PROJECT_ID), headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_plans_with_invalid_sort_key(self, mock_request):
self.assertRaises(ValueError,
cs.plans.list, sort_key='invalid', sort_dir='asc')
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_create_plan(self, mock_request):
mock_request.return_value = mock_request_return
cs.plans.create('Plan name', 'provider_id', '', "")
@@ -59,7 +59,7 @@ class PlansTest(base.TestCaseShell):
'parameters': ''}},
headers={})
@mock.patch('smaugclient.common.http.HTTPClient.raw_request')
@mock.patch('karborclient.common.http.HTTPClient.raw_request')
def test_delete_plan(self, mock_request):
mock_request.return_value = mock_request_return
cs.plans.delete('1')
@@ -68,7 +68,7 @@ class PlansTest(base.TestCaseShell):
'/plans/1',
headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_create_update(self, mock_request):
mock_request.return_value = mock_request_return
cs.plans.update('1', {'name': 'Test name.'})
@@ -77,7 +77,7 @@ class PlansTest(base.TestCaseShell):
'/plans/1',
data={'plan': {'name': 'Test name.'}}, headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_show_plan(self, mock_request):
mock_request.return_value = mock_request_return
cs.plans.get('1')
@@ -86,7 +86,7 @@ class PlansTest(base.TestCaseShell):
'/plans/1',
headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_show_plan_with_headers(self, mock_request):
mock_request.return_value = mock_request_return
cs.plans.get('1', session_id='fake_session_id')

View File

@@ -12,8 +12,8 @@
import mock
from smaugclient.tests.unit import base
from smaugclient.tests.unit.v1 import fakes
from karborclient.tests.unit import base
from karborclient.tests.unit.v1 import fakes
cs = fakes.FakeClient()
mock_request_return = ({}, {'protectable_type': {}})
@@ -23,7 +23,7 @@ mock_instance_request_return = ({}, {'instance': {}})
class ProtectablesTest(base.TestCaseShell):
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_protectables(self, mock_request):
mock_request.return_value = mock_request_return
cs.protectables.list()
@@ -31,7 +31,7 @@ class ProtectablesTest(base.TestCaseShell):
'GET',
'/protectables', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_get_protectables(self, mock_request):
mock_request.return_value = mock_request_return
cs.protectables.get('OS::Cinder::Volume')
@@ -39,7 +39,7 @@ class ProtectablesTest(base.TestCaseShell):
'GET',
'/protectables/OS::Cinder::Volume', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_get_protectables_instance(self, mock_request):
mock_request.return_value = mock_instance_request_return
cs.protectables.get_instance('OS::Cinder::Volume', '1')
@@ -48,7 +48,7 @@ class ProtectablesTest(base.TestCaseShell):
'/protectables/OS::Cinder::Volume/'
'instances/1', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_protectables_instances(self, mock_request):
mock_request.return_value = mock_instances_request_return
cs.protectables.list_instances('OS::Cinder::Volume')
@@ -57,7 +57,7 @@ class ProtectablesTest(base.TestCaseShell):
'/protectables/OS::Cinder::Volume/'
'instances', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_protectables_instances_with_marker_limit(self, mock_request):
mock_request.return_value = mock_instances_request_return
cs.protectables.list_instances('OS::Cinder::Volume',
@@ -67,7 +67,7 @@ class ProtectablesTest(base.TestCaseShell):
'/protectables/OS::Cinder::Volume/'
'instances?limit=2&marker=1234', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_protectables_instances_with_sort_key_dir(self, mock_request):
mock_request.return_value = mock_instances_request_return
cs.protectables.list_instances('OS::Cinder::Volume',

View File

@@ -12,8 +12,8 @@
import mock
from smaugclient.tests.unit import base
from smaugclient.tests.unit.v1 import fakes
from karborclient.tests.unit import base
from karborclient.tests.unit.v1 import fakes
cs = fakes.FakeClient()
mock_request_return = ({}, {'provider': {}})
@@ -21,7 +21,7 @@ mock_request_return = ({}, {'provider': {}})
class ProvidersTest(base.TestCaseShell):
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_get_providers(self, mock_request):
mock_request.return_value = mock_request_return
cs.providers.get('2220f8b1-975d-4621-a872-fa9afb43cb6c')
@@ -30,7 +30,7 @@ class ProvidersTest(base.TestCaseShell):
'/providers/'
'2220f8b1-975d-4621-a872-fa9afb43cb6c', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_providers(self, mock_request):
mock_request.return_value = mock_request_return
cs.providers.list()
@@ -38,7 +38,7 @@ class ProvidersTest(base.TestCaseShell):
'GET',
'/providers', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_providers_with_marker_limit(self, mock_request):
mock_request.return_value = mock_request_return
cs.providers.list(marker=1234, limit=2)
@@ -46,7 +46,7 @@ class ProvidersTest(base.TestCaseShell):
'GET',
'/providers?limit=2&marker=1234', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_providers_with_sort_key_dir(self, mock_request):
mock_request.return_value = mock_request_return
cs.providers.list(sort_key='id', sort_dir='asc')

View File

@@ -12,8 +12,8 @@
import mock
from smaugclient.tests.unit import base
from smaugclient.tests.unit.v1 import fakes
from karborclient.tests.unit import base
from karborclient.tests.unit.v1 import fakes
cs = fakes.FakeClient()
mock_request_return = ({}, {'restore': {}})
@@ -21,7 +21,7 @@ mock_request_return = ({}, {'restore': {}})
class RestoresTest(base.TestCaseShell):
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_restores_with_marker_limit(self, mock_request):
mock_request.return_value = mock_request_return
cs.restores.list(marker=1234, limit=2)
@@ -29,7 +29,7 @@ class RestoresTest(base.TestCaseShell):
'GET',
'/restores?limit=2&marker=1234', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_restores_with_sort_key_dir(self, mock_request):
mock_request.return_value = mock_request_return
cs.restores.list(sort_key='id', sort_dir='asc')
@@ -38,12 +38,12 @@ class RestoresTest(base.TestCaseShell):
'/restores?'
'sort_dir=asc&sort_key=id', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_plans_with_invalid_sort_key(self, mock_request):
self.assertRaises(ValueError,
cs.restores.list, sort_key='invalid', sort_dir='asc')
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_create_restore(self, mock_request):
mock_request.return_value = mock_request_return
cs.restores.create('586cc6ce-e286-40bd-b2b5-dd32694d9944',
@@ -62,7 +62,7 @@ class RestoresTest(base.TestCaseShell):
'restore_target': '192.168.1.2:35357/v2.0'
}}, headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_show_restore(self, mock_request):
mock_request.return_value = mock_request_return
cs.restores.get('1')
@@ -71,7 +71,7 @@ class RestoresTest(base.TestCaseShell):
'/restores/1',
headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_show_restore_with_headers(self, mock_request):
mock_request.return_value = mock_request_return
cs.restores.get('1', session_id='fake_session_id')

View File

@@ -12,8 +12,8 @@
import mock
from smaugclient.tests.unit import base
from smaugclient.tests.unit.v1 import fakes
from karborclient.tests.unit import base
from karborclient.tests.unit.v1 import fakes
cs = fakes.FakeClient()
mock_request_return = ({}, {'scheduled_operation': {'name': 'fake_name'}})
@@ -21,7 +21,7 @@ mock_request_return = ({}, {'scheduled_operation': {'name': 'fake_name'}})
class ScheduledOperationsTest(base.TestCaseShell):
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_scheduled_operations_with_marker_limit(self, mock_request):
mock_request.return_value = mock_request_return
cs.scheduled_operations.list(marker=1234, limit=2)
@@ -29,7 +29,7 @@ class ScheduledOperationsTest(base.TestCaseShell):
'GET',
'/scheduled_operations?limit=2&marker=1234', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list__scheduled_operations_with_sort_key_dir(self, mock_request):
mock_request.return_value = mock_request_return
cs.scheduled_operations.list(sort_key='id', sort_dir='asc')
@@ -38,14 +38,14 @@ class ScheduledOperationsTest(base.TestCaseShell):
'/scheduled_operations?'
'sort_dir=asc&sort_key=id', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_scheduled_operations_with_invalid_sort_key(self,
mock_request):
self.assertRaises(ValueError,
cs.scheduled_operations.list, sort_key='invalid',
sort_dir='asc')
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_create_scheduled_operation(self, mock_request):
mock_request.return_value = mock_request_return
cs.scheduled_operations.create(
@@ -63,7 +63,7 @@ class ScheduledOperationsTest(base.TestCaseShell):
'operation_definition': 'operation_definition'}},
headers={})
@mock.patch('smaugclient.common.http.HTTPClient.raw_request')
@mock.patch('karborclient.common.http.HTTPClient.raw_request')
def test_delete_scheduled_operation(self, mock_request):
mock_request.return_value = mock_request_return
cs.scheduled_operations.delete('1')
@@ -72,7 +72,7 @@ class ScheduledOperationsTest(base.TestCaseShell):
'/scheduled_operations/1',
headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_show_scheduled_operation(self, mock_request):
mock_request.return_value = mock_request_return
cs.scheduled_operations.get('1')
@@ -81,7 +81,7 @@ class ScheduledOperationsTest(base.TestCaseShell):
'/scheduled_operations/1',
headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_show_scheduled_operation_with_headers(self, mock_request):
mock_request.return_value = mock_request_return
cs.scheduled_operations.get('1', session_id='fake_session_id')

View File

@@ -12,8 +12,8 @@
import mock
from smaugclient.tests.unit import base
from smaugclient.tests.unit.v1 import fakes
from karborclient.tests.unit import base
from karborclient.tests.unit.v1 import fakes
cs = fakes.FakeClient()
mock_request_return = ({}, {'trigger_info': {'name': 'fake_name'}})
@@ -21,7 +21,7 @@ mock_request_return = ({}, {'trigger_info': {'name': 'fake_name'}})
class TriggersTest(base.TestCaseShell):
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_triggers_with_marker_limit(self, mock_request):
mock_request.return_value = mock_request_return
cs.triggers.list(marker=1234, limit=2)
@@ -29,7 +29,7 @@ class TriggersTest(base.TestCaseShell):
'GET',
'/triggers?limit=2&marker=1234', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_triggers_with_sort_key_dir(self, mock_request):
mock_request.return_value = mock_request_return
cs.triggers.list(sort_key='id', sort_dir='asc')
@@ -38,12 +38,12 @@ class TriggersTest(base.TestCaseShell):
'/triggers?'
'sort_dir=asc&sort_key=id', headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_list_triggers_with_invalid_sort_key(self, mock_request):
self.assertRaises(ValueError,
cs.triggers.list, sort_key='invalid', sort_dir='asc')
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_create_trigger(self, mock_request):
mock_request.return_value = mock_request_return
cs.triggers.create('name', 'time', 'properties')
@@ -56,7 +56,7 @@ class TriggersTest(base.TestCaseShell):
'properties': 'properties'}},
headers={})
@mock.patch('smaugclient.common.http.HTTPClient.raw_request')
@mock.patch('karborclient.common.http.HTTPClient.raw_request')
def test_delete_trigger(self, mock_request):
mock_request.return_value = mock_request_return
cs.triggers.delete('1')
@@ -65,7 +65,7 @@ class TriggersTest(base.TestCaseShell):
'/triggers/1',
headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_show_plan(self, mock_request):
mock_request.return_value = mock_request_return
cs.triggers.get('1')
@@ -74,7 +74,7 @@ class TriggersTest(base.TestCaseShell):
'/triggers/1',
headers={})
@mock.patch('smaugclient.common.http.HTTPClient.json_request')
@mock.patch('karborclient.common.http.HTTPClient.json_request')
def test_show_trigger_with_headers(self, mock_request):
mock_request.return_value = mock_request_return
cs.triggers.get('1', session_id='fake_session_id')

View File

@@ -12,7 +12,7 @@
from six.moves.urllib import parse
from smaugclient.common import base
from karborclient.common import base
class Checkpoint(base.Resource):

View File

@@ -12,18 +12,18 @@
# License for the specific language governing permissions and limitations
# under the License.
from smaugclient.common import http
from smaugclient.v1 import checkpoints
from smaugclient.v1 import plans
from smaugclient.v1 import protectables
from smaugclient.v1 import providers
from smaugclient.v1 import restores
from smaugclient.v1 import scheduled_operations
from smaugclient.v1 import triggers
from karborclient.common import http
from karborclient.v1 import checkpoints
from karborclient.v1 import plans
from karborclient.v1 import protectables
from karborclient.v1 import providers
from karborclient.v1 import restores
from karborclient.v1 import scheduled_operations
from karborclient.v1 import triggers
class Client(object):
"""Client for the Smaug v1 API.
"""Client for the karbor v1 API.
:param string endpoint: A user-supplied endpoint URL for the service.
:param string token: Token for authentication.
@@ -32,7 +32,7 @@ class Client(object):
"""
def __init__(self, *args, **kwargs):
"""Initialize a new client for the Smaug v1 API."""
"""Initialize a new client for the karbor v1 API."""
self.http_client = http._construct_http_client(*args, **kwargs)
self.plans = plans.PlanManager(self.http_client)
self.restores = restores.RestoreManager(self.http_client)

View File

@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from smaugclient.common import base
from karborclient.common import base
class Plan(base.Resource):

View File

@@ -12,7 +12,7 @@
from six.moves.urllib import parse
from smaugclient.common import base
from karborclient.common import base
class Protectable(base.Resource):

View File

@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from smaugclient.common import base
from karborclient.common import base
class Provider(base.Resource):

View File

@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from smaugclient.common import base
from karborclient.common import base
class Restore(base.Resource):

View File

@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from smaugclient.common import base
from karborclient.common import base
class ScheduledOperation(base.Resource):

View File

@@ -14,11 +14,11 @@ import argparse
import os
from karborclient.common import base
from karborclient.common import utils
from karborclient.openstack.common.apiclient import exceptions
from oslo_serialization import jsonutils
from oslo_utils import uuidutils
from smaugclient.common import base
from smaugclient.common import utils
from smaugclient.openstack.common.apiclient import exceptions
@utils.arg('--all-tenants',

View File

@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from smaugclient.common import base
from karborclient.common import base
class Trigger(base.Resource):

View File

@@ -13,4 +13,4 @@
from pbr import version
version_info = version.VersionInfo('python-smaugclient')
version_info = version.VersionInfo('python-karborclient')

View File

@@ -5,4 +5,4 @@ module=apiclient.exceptions
module=apiclient
# The base module to hold the copy of openstack.common
base=smaugclient
base=karborclient

View File

@@ -1,6 +1,6 @@
[metadata]
name = python-smaugclient
summary = Python client library for Smaug API
name = python-karborclient
summary = Python client library for Karbor API
description-file =
README.rst
author = OpenStack
@@ -25,11 +25,11 @@ setup-hooks =
[files]
packages =
smaugclient
karborclient
[entry_points]
console_scripts =
smaug = smaugclient.shell:main
karbor = karborclient.shell:main
[build_sphinx]
source-dir = doc/source

View File

@@ -20,7 +20,7 @@ commands = {posargs}
[testenv:functional]
setenv =
OS_TEST_PATH = ./smaugclient/tests/functional
OS_TEST_PATH = ./karborclient/tests/functional
passenv = OS_*
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'