KEERO-320 - Fix all occurrences of old names (keero, glazier) in python client

This commit is contained in:
Stan Lagun 2013-04-26 02:00:15 +04:00
parent da48d1474f
commit b66194bacf
31 changed files with 71 additions and 71 deletions

View File

@ -1,9 +1,9 @@
Python bindings to the Glazier API Python bindings to the Murano API
===================== =====================
This is a client library for Glazier built on the Glazier API. It This is a client library for Murano built on the Murano API. It
provides a Python API (the ``glazierclient`` module) and a command-line tool provides a Python API (the ``muranoclient`` module) and a command-line tool
(``glazier``). (``murano``).
SEE ALSO SEE ALSO
-------- --------
* `Glazier <http://glazier.mirantis.com>`__ * `Murano <http://murano.mirantis.com>`__

View File

@ -2,7 +2,7 @@
# #
import os import os
project = 'python-glazierclient' project = 'python-muranoclient'
# -- General configuration ---------------------------------------------------- # -- General configuration ----------------------------------------------------

View File

@ -14,12 +14,12 @@
under the License. under the License.
================== ==================
Glazier API Client Murano API Client
================== ==================
In order to use the python api directly, you must first obtain an auth token and identify which endpoint you wish to speak to. Once you have done so, you can use the API like so:: In order to use the python api directly, you must first obtain an auth token and identify which endpoint you wish to speak to. Once you have done so, you can use the API like so::
>>> from glazierclient import Client >>> from muranoclient import Client
>>> glazier = Client('1', endpoint=GLAZIER_URL, token=OS_AUTH_TOKEN) >>> murano = Client('1', endpoint=MURANO_URL, token=OS_AUTH_TOKEN)
... ...
@ -34,10 +34,10 @@ In order to use the CLI, you must provide your OpenStack username, password, ten
The command line tool will attempt to reauthenticate using your provided credentials for every request. You can override this behavior by manually supplying an auth token using ``--os-image-url`` and ``--os-auth-token``. You can alternatively set these environment variables:: The command line tool will attempt to reauthenticate using your provided credentials for every request. You can override this behavior by manually supplying an auth token using ``--os-image-url`` and ``--os-auth-token``. You can alternatively set these environment variables::
export GLAZIER_URL=http://glazier.example.org:8082/ export MURANO_URL=http://murano.example.org:8082/
export OS_AUTH_TOKEN=3bcc3d3a03f44e3d8377f9247b0ad155 export OS_AUTH_TOKEN=3bcc3d3a03f44e3d8377f9247b0ad155
Once you've configured your authentication parameters, you can run ``glazier help`` to see a complete listing of available commands. Once you've configured your authentication parameters, you can run ``murano help`` to see a complete listing of available commands.
Release Notes Release Notes

View File

@ -11,7 +11,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# 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 glazierclient.common import utils from muranoclient.common import utils
def Client(version, *args, **kwargs): def Client(version, *args, **kwargs):

View File

@ -21,7 +21,7 @@ import StringIO
import urlparse import urlparse
import os import os
from glazierclient.common import exceptions from muranoclient.common import exceptions
try: try:
@ -41,7 +41,7 @@ if not hasattr(urlparse, 'parse_qsl'):
urlparse.parse_qsl = cgi.parse_qsl urlparse.parse_qsl = cgi.parse_qsl
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
USER_AGENT = 'python-glazierclient' USER_AGENT = 'python-muranoclient'
CHUNKSIZE = 1024 * 64 # 64kB CHUNKSIZE = 1024 * 64 # 64kB

View File

@ -17,9 +17,9 @@ import sys
import uuid import uuid
import os import os
from glazierclient.common import exceptions from muranoclient.common import exceptions
import prettytable import prettytable
from glazierclient.openstack.common import importutils from muranoclient.openstack.common import importutils
# Decorator for cli-args # Decorator for cli-args
@ -107,7 +107,7 @@ def env(*vars, **kwargs):
def import_versioned_module(version, submodule=None): def import_versioned_module(version, submodule=None):
module = 'glazierclient.v%s' % version module = 'muranoclient.v%s' % version
if submodule: if submodule:
module = '.'.join((module, submodule)) module = '.'.join((module, submodule))
return importutils.import_module(module) return importutils.import_module(module)

View File

@ -52,7 +52,7 @@ class VersionInfo(object):
# The most likely cause for this is running tests in a tree # The most likely cause for this is running tests in a tree
# produced from a tarball where the package itself has not been # produced from a tarball where the package itself has not been
# installed into anything. Revert to setup-time logic. # installed into anything. Revert to setup-time logic.
from glazierclient.openstack.common import setup from muranoclient.openstack.common import setup
return setup.get_version(self.package) return setup.get_version(self.package)
def release_string(self): def release_string(self):

View File

@ -13,7 +13,7 @@
# under the License. # under the License.
""" """
Command-line interface to the Glazier Project. Command-line interface to the Murano Project.
""" """
import argparse import argparse
@ -22,19 +22,19 @@ import sys
import httplib2 import httplib2
from keystoneclient.v2_0 import client as ksclient from keystoneclient.v2_0 import client as ksclient
from glazierclient import client as glazierclient from muranoclient import client as apiclient
from glazierclient.common import utils, exceptions from muranoclient.common import utils, exceptions
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class GlazierShell(object): class MuranoShell(object):
def get_base_parser(self): def get_base_parser(self):
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
prog='glazier', prog='murano',
description=__doc__.strip(), description=__doc__.strip(),
epilog='See glazier help COMMAND" ' epilog='See murano help COMMAND" '
'for help on a specific command.', 'for help on a specific command.',
add_help=False, add_help=False,
formatter_class=HelpFormatter, formatter_class=HelpFormatter,
@ -46,9 +46,9 @@ class GlazierShell(object):
help=argparse.SUPPRESS,) help=argparse.SUPPRESS,)
parser.add_argument('-d', '--debug', parser.add_argument('-d', '--debug',
default=bool(utils.env('GLAZIERCLIENT_DEBUG')), default=bool(utils.env('MURANOCLIENT_DEBUG')),
action='store_true', action='store_true',
help='Defaults to env[GLAZIERCLIENT_DEBUG]') help='Defaults to env[MURANOCLIENT_DEBUG]')
parser.add_argument('-v', '--verbose', parser.add_argument('-v', '--verbose',
default=False, action="store_true", default=False, action="store_true",
@ -57,7 +57,7 @@ class GlazierShell(object):
parser.add_argument('-k', '--insecure', parser.add_argument('-k', '--insecure',
default=False, default=False,
action='store_true', action='store_true',
help="Explicitly allow glazierclient to perform " help="Explicitly allow muranoclient to perform "
"\"insecure\" SSL (https) requests. " "\"insecure\" SSL (https) requests. "
"The server's certificate will " "The server's certificate will "
"not be verified against any certificate " "not be verified against any certificate "
@ -112,14 +112,14 @@ class GlazierShell(object):
default=utils.env('OS_AUTH_TOKEN'), default=utils.env('OS_AUTH_TOKEN'),
help='Defaults to env[OS_AUTH_TOKEN]') help='Defaults to env[OS_AUTH_TOKEN]')
parser.add_argument('--glazier-url', parser.add_argument('--murano-url',
default=utils.env('GLAZIER_URL'), default=utils.env('MURANO_URL'),
help='Defaults to env[GLAZIER_URL]') help='Defaults to env[MURANO_URL]')
parser.add_argument('--glazier-api-version', parser.add_argument('--murano-api-version',
default=utils.env( default=utils.env(
'GLAZIER_API_VERSION', default='1'), 'MURANO_API_VERSION', default='1'),
help='Defaults to env[GLAZIER_API_VERSION] ' help='Defaults to env[MURANO_API_VERSION] '
'or 1') 'or 1')
parser.add_argument('--os-service-type', parser.add_argument('--os-service-type',
@ -204,7 +204,7 @@ class GlazierShell(object):
self._setup_debugging(options.debug) self._setup_debugging(options.debug)
# build available subcommands based on version # build available subcommands based on version
api_version = options.glazier_api_version api_version = options.murano_api_version
subcommand_parser = self.get_subcommand_parser(api_version) subcommand_parser = self.get_subcommand_parser(api_version)
self.parser = subcommand_parser self.parser = subcommand_parser
@ -222,9 +222,9 @@ class GlazierShell(object):
self.do_help(args) self.do_help(args)
return 0 return 0
if args.os_auth_token and args.glazier_url: if args.os_auth_token and args.murano_url:
token = args.os_auth_token token = args.os_auth_token
endpoint = args.glazier_url endpoint = args.murano_url
else: else:
if not args.os_username: if not args.os_username:
raise exceptions.CommandError("You must provide a username " raise exceptions.CommandError("You must provide a username "
@ -258,7 +258,7 @@ class GlazierShell(object):
_ksclient = self._get_ksclient(**kwargs) _ksclient = self._get_ksclient(**kwargs)
token = args.os_auth_token or _ksclient.auth_token token = args.os_auth_token or _ksclient.auth_token
url = args.glazier_url url = args.murano_url
endpoint = url or self._get_endpoint(_ksclient, **kwargs) endpoint = url or self._get_endpoint(_ksclient, **kwargs)
kwargs = { kwargs = {
@ -270,7 +270,7 @@ class GlazierShell(object):
'key_file': args.key_file, 'key_file': args.key_file,
} }
client = glazierclient.Client(api_version, endpoint, **kwargs) client = apiclient.Client(api_version, endpoint, **kwargs)
try: try:
args.func(client, args) args.func(client, args)
@ -303,7 +303,7 @@ class HelpFormatter(argparse.HelpFormatter):
def main(): def main():
try: try:
GlazierShell().main(sys.argv[1:]) MuranoShell().main(sys.argv[1:])
except Exception, e: except Exception, e:
print >> sys.stderr, e print >> sys.stderr, e

View File

@ -12,4 +12,4 @@
# 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 glazierclient.v1.client import Client from muranoclient.v1.client import Client

View File

@ -12,12 +12,12 @@
# 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 glazierclient.common import http from muranoclient.common import http
from glazierclient.v1 import environments, sessions, services from muranoclient.v1 import environments, sessions, services
class Client(http.HTTPClient): class Client(http.HTTPClient):
"""Client for the Glazier v1 API. """Client for the Murano v1 API.
:param string endpoint: A user-supplied endpoint URL for the service. :param string endpoint: A user-supplied endpoint URL for the service.
:param string token: Token for authentication. :param string token: Token for authentication.
@ -26,7 +26,7 @@ class Client(http.HTTPClient):
""" """
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
""" Initialize a new client for the Glazier v1 API. """ """ Initialize a new client for the Murano v1 API. """
super(Client, self).__init__(*args, **kwargs) super(Client, self).__init__(*args, **kwargs)
self.environments = environments.EnvironmentManager(self) self.environments = environments.EnvironmentManager(self)
self.sessions = sessions.SessionManager(self) self.sessions = sessions.SessionManager(self)

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 glazierclient.common import base from muranoclient.common import base
class Environment(base.Resource): class Environment(base.Resource):

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 glazierclient.common import base from muranoclient.common import base
class ActiveDirectory(base.Resource): class ActiveDirectory(base.Resource):

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 glazierclient.common import base from muranoclient.common import base
class Session(base.Resource): class Session(base.Resource):

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 glazierclient.common import utils from muranoclient.common import utils
def do_environment_list(cc, args={}): def do_environment_list(cc, args={}):

View File

@ -13,6 +13,6 @@
# under the License. # under the License.
from glazierclient.openstack.common import version as common_version from muranoclient.openstack.common import version as common_version
version_info = common_version.VersionInfo('python-glazierclient') version_info = common_version.VersionInfo('python-muranoclient')

View File

@ -4,4 +4,4 @@
modules=setup,importutils,version modules=setup,importutils,version
# The base module to hold the copy of openstack.common # The base module to hold the copy of openstack.common
base=glazierclient base=muranoclient

View File

@ -2,7 +2,7 @@
function usage { function usage {
echo "Usage: $0 [OPTION]..." echo "Usage: $0 [OPTION]..."
echo "Run python-glazierclient's test suite(s)" echo "Run python-muranoclient's test suite(s)"
echo "" echo ""
echo " -p, --pep8 Just run pep8" echo " -p, --pep8 Just run pep8"
echo " -h, --help Print this usage message" echo " -h, --help Print this usage message"

View File

@ -1,5 +1,5 @@
[nosetests] [nosetests]
cover-package = glazierclient cover-package = muranoclient
cover-html = true cover-html = true
cover-erase = true cover-erase = true
cover-inclusive = true cover-inclusive = true

View File

@ -14,9 +14,9 @@
import setuptools import setuptools
from glazierclient.openstack.common import setup from muranoclient.openstack.common import setup
project = 'python-glazierclient' project = 'python-muranoclient'
setuptools.setup( setuptools.setup(
@ -24,9 +24,9 @@ setuptools.setup(
version=setup.get_version(project, '2013.1'), version=setup.get_version(project, '2013.1'),
author='Mirantis, Inc.', author='Mirantis, Inc.',
author_email='smelikyan@mirantis.com', author_email='smelikyan@mirantis.com',
description="Client library for Glazier Project", description="Client library for Murano Project",
license='Apache', license='Apache',
url='http://glazier.mirantis.com/', url='http://murano.mirantis.com/',
packages=setuptools.find_packages(exclude=['tests', 'tests.*']), packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
include_package_data=True, include_package_data=True,
install_requires=setup.parse_requirements(), install_requires=setup.parse_requirements(),
@ -42,7 +42,7 @@ setuptools.setup(
'Programming Language :: Python', 'Programming Language :: Python',
], ],
entry_points={ entry_points={
'console_scripts': ['glazier = glazierclient.shell:main'] 'console_scripts': ['murano = muranoclient.shell:main']
}, },
dependency_links=setup.parse_dependency_links(), dependency_links=setup.parse_dependency_links(),
tests_require=setup.parse_requirements(['tools/test-requires']), tests_require=setup.parse_requirements(['tools/test-requires']),

View File

@ -15,7 +15,7 @@
import unittest import unittest
import logging import logging
from httpretty import HTTPretty, httprettified from httpretty import HTTPretty, httprettified
from glazierclient.client import Client from muranoclient.client import Client
LOG = logging.getLogger('Unit tests') LOG = logging.getLogger('Unit tests')

View File

@ -16,10 +16,10 @@ import unittest
import logging import logging
from mock import MagicMock from mock import MagicMock
from glazierclient.client import Client from muranoclient.client import Client
import glazierclient.v1.environments as environments import muranoclient.v1.environments as environments
import glazierclient.v1.services as services import muranoclient.v1.services as services
import glazierclient.v1.sessions as sessions import muranoclient.v1.sessions as sessions
def my_mock(*a, **b): def my_mock(*a, **b):
return [a, b] return [a, b]

View File

@ -20,7 +20,7 @@
# under the License. # under the License.
""" """
Installation script for python-glazierclient's development virtualenv Installation script for python-muranoclient's development virtualenv
""" """
import os import os
@ -32,12 +32,12 @@ import install_venv_common as install_venv
def print_help(): def print_help():
help = """ help = """
Glazier development environment setup is complete. Murano development environment setup is complete.
Glazier development uses virtualenv to track and manage Python dependencies Murano development uses virtualenv to track and manage Python dependencies
while in development and testing. while in development and testing.
To activate the Glazier virtualenv for the extent of your current shell session To activate the Murano virtualenv for the extent of your current shell session
you can run: you can run:
$ source .venv/bin/activate $ source .venv/bin/activate
@ -58,7 +58,7 @@ def main(argv):
pip_requires = os.path.join(root, 'tools', 'pip-requires') pip_requires = os.path.join(root, 'tools', 'pip-requires')
test_requires = os.path.join(root, 'tools', 'test-requires') test_requires = os.path.join(root, 'tools', 'test-requires')
py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1]) py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
project = 'python-glazierclient' project = 'python-muranoclient'
install = install_venv.InstallVenv(root, venv, pip_requires, test_requires, install = install_venv.InstallVenv(root, venv, pip_requires, test_requires,
py_version, project) py_version, project)
options = install.parse_args(argv) options = install.parse_args(argv)

View File

@ -14,13 +14,13 @@ commands = nosetests
[testenv:pep8] [testenv:pep8]
deps = pep8==1.3.3 deps = pep8==1.3.3
commands = pep8 --repeat --show-source glazierclient setup.py commands = pep8 --repeat --show-source muranoclient setup.py
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
commands = nosetests --cover-erase --cover-package=glazierclient --with-xcoverage commands = nosetests --cover-erase --cover-package=muranoclient --with-xcoverage
[tox:jenkins] [tox:jenkins]
downloadcache = ~/cache/pip downloadcache = ~/cache/pip
@ -38,7 +38,7 @@ deps = file://{toxinidir}/.cache.bundle
[testenv:jenkinscover] [testenv:jenkinscover]
deps = file://{toxinidir}/.cache.bundle deps = file://{toxinidir}/.cache.bundle
setenv = NOSE_WITH_XUNIT=1 setenv = NOSE_WITH_XUNIT=1
commands = nosetests --cover-erase --cover-package=glazierclient --with-xcoverage commands = nosetests --cover-erase --cover-package=muranoclient --with-xcoverage
[testenv:jenkinsvenv] [testenv:jenkinsvenv]
deps = file://{toxinidir}/.cache.bundle deps = file://{toxinidir}/.cache.bundle