diff --git a/python-portasclient/.gitignore b/python-glazierclient/.gitignore similarity index 100% rename from python-portasclient/.gitignore rename to python-glazierclient/.gitignore diff --git a/python-glazierclient/README.rst b/python-glazierclient/README.rst new file mode 100644 index 0000000..b7a3f78 --- /dev/null +++ b/python-glazierclient/README.rst @@ -0,0 +1,9 @@ +Python bindings to the Glazier API +===================== +This is a client library for Glazier built on the Glazier API. It +provides a Python API (the ``glazierclient`` module) and a command-line tool +(``glazier``). + +SEE ALSO +-------- +* `Glazier `__ diff --git a/python-portasclient/doc/source/_static/.placeholder b/python-glazierclient/doc/source/_static/.placeholder similarity index 100% rename from python-portasclient/doc/source/_static/.placeholder rename to python-glazierclient/doc/source/_static/.placeholder diff --git a/python-portasclient/doc/source/_templates/.placeholder b/python-glazierclient/doc/source/_templates/.placeholder similarity index 100% rename from python-portasclient/doc/source/_templates/.placeholder rename to python-glazierclient/doc/source/_templates/.placeholder diff --git a/python-portasclient/doc/source/_theme/theme.conf b/python-glazierclient/doc/source/_theme/theme.conf similarity index 100% rename from python-portasclient/doc/source/_theme/theme.conf rename to python-glazierclient/doc/source/_theme/theme.conf diff --git a/python-portasclient/doc/source/conf.py b/python-glazierclient/doc/source/conf.py similarity index 98% rename from python-portasclient/doc/source/conf.py rename to python-glazierclient/doc/source/conf.py index 7d653c8..38d8e65 100644 --- a/python-portasclient/doc/source/conf.py +++ b/python-glazierclient/doc/source/conf.py @@ -2,7 +2,7 @@ # import os -project = 'python-portasclient' +project = 'python-glazierclient' # -- General configuration ---------------------------------------------------- diff --git a/python-portasclient/doc/source/index.rst b/python-glazierclient/doc/source/index.rst similarity index 80% rename from python-portasclient/doc/source/index.rst rename to python-glazierclient/doc/source/index.rst index 91280a9..ff5f6c7 100644 --- a/python-portasclient/doc/source/index.rst +++ b/python-glazierclient/doc/source/index.rst @@ -1,9 +1,9 @@ -Python API -========== +Glazier 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:: - >>> from portasclient import Client - >>> portas = Client('1', endpoint=PORTAS_URL, token=OS_AUTH_TOKEN) + >>> from glazierclient import Client + >>> glazier = Client('1', endpoint=GLAZIER_URL, token=OS_AUTH_TOKEN) ... @@ -18,10 +18,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:: - export PORTAS_URL=http://portas.example.org:8082/ + export GLAZIER_URL=http://glazier.example.org:8082/ export OS_AUTH_TOKEN=3bcc3d3a03f44e3d8377f9247b0ad155 -Once you've configured your authentication parameters, you can run ``portas help`` to see a complete listing of available commands. +Once you've configured your authentication parameters, you can run ``glazier help`` to see a complete listing of available commands. Release Notes diff --git a/python-glazierclient/glazierclient/__init__.py b/python-glazierclient/glazierclient/__init__.py new file mode 100644 index 0000000..207fa15 --- /dev/null +++ b/python-glazierclient/glazierclient/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2013 Mirantis, Inc. +# +# 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. \ No newline at end of file diff --git a/python-portasclient/portasclient/client.py b/python-glazierclient/glazierclient/client.py similarity index 90% rename from python-portasclient/portasclient/client.py rename to python-glazierclient/glazierclient/client.py index 2c8c03a..84779d1 100644 --- a/python-portasclient/portasclient/client.py +++ b/python-glazierclient/glazierclient/client.py @@ -1,3 +1,5 @@ +# Copyright (c) 2013 Mirantis, Inc. +# # 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 @@ -9,8 +11,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 portasclient.common import utils +from glazierclient.common import utils def Client(version, *args, **kwargs): diff --git a/python-portasclient/portasclient/__init__.py b/python-glazierclient/glazierclient/common/__init__.py similarity index 100% rename from python-portasclient/portasclient/__init__.py rename to python-glazierclient/glazierclient/common/__init__.py diff --git a/python-portasclient/portasclient/common/base.py b/python-glazierclient/glazierclient/common/base.py similarity index 100% rename from python-portasclient/portasclient/common/base.py rename to python-glazierclient/glazierclient/common/base.py diff --git a/python-portasclient/portasclient/common/exceptions.py b/python-glazierclient/glazierclient/common/exceptions.py similarity index 100% rename from python-portasclient/portasclient/common/exceptions.py rename to python-glazierclient/glazierclient/common/exceptions.py diff --git a/python-portasclient/portasclient/common/http.py b/python-glazierclient/glazierclient/common/http.py similarity index 99% rename from python-portasclient/portasclient/common/http.py rename to python-glazierclient/glazierclient/common/http.py index 54a4736..3f1e26f 100644 --- a/python-portasclient/portasclient/common/http.py +++ b/python-glazierclient/glazierclient/common/http.py @@ -21,7 +21,7 @@ import StringIO import urlparse import os -from portasclient.common import exceptions +from glazierclient.common import exceptions try: @@ -41,7 +41,7 @@ if not hasattr(urlparse, 'parse_qsl'): urlparse.parse_qsl = cgi.parse_qsl LOG = logging.getLogger(__name__) -USER_AGENT = 'python-portasclient' +USER_AGENT = 'python-glazierclient' CHUNKSIZE = 1024 * 64 # 64kB diff --git a/python-portasclient/portasclient/common/utils.py b/python-glazierclient/glazierclient/common/utils.py similarity index 95% rename from python-portasclient/portasclient/common/utils.py rename to python-glazierclient/glazierclient/common/utils.py index 3b4d49d..7063e65 100644 --- a/python-portasclient/portasclient/common/utils.py +++ b/python-glazierclient/glazierclient/common/utils.py @@ -17,9 +17,9 @@ import sys import uuid import os -from portasclient.common import exceptions +from glazierclient.common import exceptions import prettytable -from portasclient.openstack.common import importutils +from glazierclient.openstack.common import importutils # Decorator for cli-args @@ -107,7 +107,7 @@ def env(*vars, **kwargs): def import_versioned_module(version, submodule=None): - module = 'portasclient.v%s' % version + module = 'glazierclient.v%s' % version if submodule: module = '.'.join((module, submodule)) return importutils.import_module(module) diff --git a/python-portasclient/portasclient/common/__init__.py b/python-glazierclient/glazierclient/openstack/__init__.py similarity index 100% rename from python-portasclient/portasclient/common/__init__.py rename to python-glazierclient/glazierclient/openstack/__init__.py diff --git a/python-portasclient/portasclient/openstack/__init__.py b/python-glazierclient/glazierclient/openstack/common/__init__.py similarity index 100% rename from python-portasclient/portasclient/openstack/__init__.py rename to python-glazierclient/glazierclient/openstack/common/__init__.py diff --git a/python-portasclient/portasclient/openstack/common/importutils.py b/python-glazierclient/glazierclient/openstack/common/importutils.py similarity index 100% rename from python-portasclient/portasclient/openstack/common/importutils.py rename to python-glazierclient/glazierclient/openstack/common/importutils.py diff --git a/python-portasclient/portasclient/openstack/common/setup.py b/python-glazierclient/glazierclient/openstack/common/setup.py similarity index 100% rename from python-portasclient/portasclient/openstack/common/setup.py rename to python-glazierclient/glazierclient/openstack/common/setup.py diff --git a/python-portasclient/portasclient/openstack/common/version.py b/python-glazierclient/glazierclient/openstack/common/version.py similarity index 98% rename from python-portasclient/portasclient/openstack/common/version.py rename to python-glazierclient/glazierclient/openstack/common/version.py index 349ed11..d0cad11 100644 --- a/python-portasclient/portasclient/openstack/common/version.py +++ b/python-glazierclient/glazierclient/openstack/common/version.py @@ -52,7 +52,7 @@ class VersionInfo(object): # The most likely cause for this is running tests in a tree # produced from a tarball where the package itself has not been # installed into anything. Revert to setup-time logic. - from portasclient.openstack.common import setup + from glazierclient.openstack.common import setup return setup.get_version(self.package) def release_string(self): diff --git a/python-portasclient/portasclient/shell.py b/python-glazierclient/glazierclient/shell.py similarity index 90% rename from python-portasclient/portasclient/shell.py rename to python-glazierclient/glazierclient/shell.py index 124f38b..bbadc89 100644 --- a/python-portasclient/portasclient/shell.py +++ b/python-glazierclient/glazierclient/shell.py @@ -1,3 +1,5 @@ +# Copyright (c) 2013 Mirantis, Inc. +# # 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 @@ -11,7 +13,7 @@ # under the License. """ -Command-line interface to the Windows Datacenter as a Service. +Command-line interface to the Glazier Project. """ import argparse @@ -20,19 +22,19 @@ import sys import httplib2 from keystoneclient.v2_0 import client as ksclient -from portasclient import client as portasclient -from portasclient.common import utils, exceptions +from glazierclient import client as glazierclient +from glazierclient.common import utils, exceptions logger = logging.getLogger(__name__) -class PortasShell(object): +class GlazierShell(object): def get_base_parser(self): parser = argparse.ArgumentParser( - prog='portas', + prog='glazier', description=__doc__.strip(), - epilog='See portas help COMMAND" ' + epilog='See glazier help COMMAND" ' 'for help on a specific command.', add_help=False, formatter_class=HelpFormatter, @@ -44,9 +46,9 @@ class PortasShell(object): help=argparse.SUPPRESS,) parser.add_argument('-d', '--debug', - default=bool(utils.env('PORTASCLIENT_DEBUG')), + default=bool(utils.env('GLAZIERCLIENT_DEBUG')), action='store_true', - help='Defaults to env[PORTASCLIENT_DEBUG]') + help='Defaults to env[GLAZIERCLIENT_DEBUG]') parser.add_argument('-v', '--verbose', default=False, action="store_true", @@ -55,7 +57,7 @@ class PortasShell(object): parser.add_argument('-k', '--insecure', default=False, action='store_true', - help="Explicitly allow portasclient to perform " + help="Explicitly allow glazierclient to perform " "\"insecure\" SSL (https) requests. " "The server's certificate will " "not be verified against any certificate " @@ -110,14 +112,14 @@ class PortasShell(object): default=utils.env('OS_AUTH_TOKEN'), help='Defaults to env[OS_AUTH_TOKEN]') - parser.add_argument('--portas-url', - default=utils.env('PORTAS_URL'), - help='Defaults to env[PORTAS_URL]') + parser.add_argument('--glazier-url', + default=utils.env('GLAZIER_URL'), + help='Defaults to env[GLAZIER_URL]') - parser.add_argument('--portas-api-version', + parser.add_argument('--glazier-api-version', default=utils.env( - 'PORTAS_API_VERSION', default='1'), - help='Defaults to env[PORTAS_API_VERSION] ' + 'GLAZIER_API_VERSION', default='1'), + help='Defaults to env[GLAZIER_API_VERSION] ' 'or 1') parser.add_argument('--os-service-type', @@ -202,7 +204,7 @@ class PortasShell(object): self._setup_debugging(options.debug) # build available subcommands based on version - api_version = options.portas_api_version + api_version = options.glazier_api_version subcommand_parser = self.get_subcommand_parser(api_version) self.parser = subcommand_parser @@ -220,9 +222,9 @@ class PortasShell(object): self.do_help(args) return 0 - if args.os_auth_token and args.portas_url: + if args.os_auth_token and args.glazier_url: token = args.os_auth_token - endpoint = args.portas_url + endpoint = args.glazier_url else: if not args.os_username: raise exceptions.CommandError("You must provide a username " @@ -256,7 +258,7 @@ class PortasShell(object): _ksclient = self._get_ksclient(**kwargs) token = args.os_auth_token or _ksclient.auth_token - url = args.portas_url + url = args.glazier_url endpoint = url or self._get_endpoint(_ksclient, **kwargs) kwargs = { @@ -268,7 +270,7 @@ class PortasShell(object): 'key_file': args.key_file, } - client = portasclient.Client(api_version, endpoint, **kwargs) + client = glazierclient.Client(api_version, endpoint, **kwargs) try: args.func(client, args) @@ -301,7 +303,7 @@ class HelpFormatter(argparse.HelpFormatter): def main(): try: - PortasShell().main(sys.argv[1:]) + GlazierShell().main(sys.argv[1:]) except Exception, e: print >> sys.stderr, e diff --git a/python-portasclient/portasclient/v1/__init__.py b/python-glazierclient/glazierclient/v1/__init__.py similarity index 85% rename from python-portasclient/portasclient/v1/__init__.py rename to python-glazierclient/glazierclient/v1/__init__.py index 8f17423..dbe3f04 100644 --- a/python-portasclient/portasclient/v1/__init__.py +++ b/python-glazierclient/glazierclient/v1/__init__.py @@ -1,5 +1,4 @@ -# Copyright 2012 OpenStack LLC. -# All Rights Reserved. +# Copyright (c) 2013 Mirantis, Inc. # # 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 @@ -13,4 +12,4 @@ # License for the specific language governing permissions and limitations # under the License. -from portasclient.v1.client import Client +from glazierclient.v1.client import Client diff --git a/python-portasclient/portasclient/v1/client.py b/python-glazierclient/glazierclient/v1/client.py similarity index 79% rename from python-portasclient/portasclient/v1/client.py rename to python-glazierclient/glazierclient/v1/client.py index 720142e..960691c 100644 --- a/python-portasclient/portasclient/v1/client.py +++ b/python-glazierclient/glazierclient/v1/client.py @@ -1,5 +1,4 @@ -# Copyright 2012 OpenStack LLC. -# All Rights Reserved. +# Copyright (c) 2013 Mirantis, Inc. # # 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 @@ -13,22 +12,21 @@ # License for the specific language governing permissions and limitations # under the License. -from portasclient.common import http -from portasclient.v1 import environments, sessions, services +from glazierclient.common import http +from glazierclient.v1 import environments, sessions, services class Client(http.HTTPClient): - """Client for the Portas v1 API. + """Client for the Glazier v1 API. - :param string endpoint: A user-supplied endpoint URL for the ceilometer - service. + :param string endpoint: A user-supplied endpoint URL for the service. :param string token: Token for authentication. :param integer timeout: Allows customization of the timeout for client http requests. (optional) """ def __init__(self, *args, **kwargs): - """ Initialize a new client for the Portas v1 API. """ + """ Initialize a new client for the Glazier v1 API. """ super(Client, self).__init__(*args, **kwargs) self.environments = environments.EnvironmentManager(self) self.sessions = sessions.SessionManager(self) diff --git a/python-portasclient/portasclient/v1/environments.py b/python-glazierclient/glazierclient/v1/environments.py similarity index 93% rename from python-portasclient/portasclient/v1/environments.py rename to python-glazierclient/glazierclient/v1/environments.py index 4b07d9a..43705c0 100644 --- a/python-portasclient/portasclient/v1/environments.py +++ b/python-glazierclient/glazierclient/v1/environments.py @@ -1,5 +1,4 @@ -# Copyright 2012 OpenMeter LLC. -# All Rights Reserved. +# Copyright (c) 2013 Mirantis, Inc. # # 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 @@ -13,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from portasclient.common import base +from glazierclient.common import base class Environment(base.Resource): diff --git a/python-portasclient/portasclient/v1/services.py b/python-glazierclient/glazierclient/v1/services.py similarity index 96% rename from python-portasclient/portasclient/v1/services.py rename to python-glazierclient/glazierclient/v1/services.py index 2f87be0..39874a6 100644 --- a/python-portasclient/portasclient/v1/services.py +++ b/python-glazierclient/glazierclient/v1/services.py @@ -1,5 +1,4 @@ -# Copyright 2012 OpenMeter LLC. -# All Rights Reserved. +# Copyright (c) 2013 Mirantis, Inc. # # 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 @@ -12,9 +11,8 @@ # 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 mercurial import patch -from portasclient.common import base +from glazierclient.common import base class ActiveDirectory(base.Resource): diff --git a/python-portasclient/portasclient/v1/sessions.py b/python-glazierclient/glazierclient/v1/sessions.py similarity index 95% rename from python-portasclient/portasclient/v1/sessions.py rename to python-glazierclient/glazierclient/v1/sessions.py index 83bfd4d..2efcf7f 100644 --- a/python-portasclient/portasclient/v1/sessions.py +++ b/python-glazierclient/glazierclient/v1/sessions.py @@ -1,5 +1,4 @@ -# Copyright 2012 OpenMeter LLC. -# All Rights Reserved. +# Copyright (c) 2013 Mirantis, Inc. # # 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 @@ -12,9 +11,8 @@ # 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 anyjson -from portasclient.common import base +from glazierclient.common import base class Session(base.Resource): diff --git a/python-portasclient/portasclient/v1/shell.py b/python-glazierclient/glazierclient/v1/shell.py similarity index 90% rename from python-portasclient/portasclient/v1/shell.py rename to python-glazierclient/glazierclient/v1/shell.py index 0675e96..8f4a619 100644 --- a/python-portasclient/portasclient/v1/shell.py +++ b/python-glazierclient/glazierclient/v1/shell.py @@ -1,5 +1,4 @@ -# Copyright 2012 OpenStack LLC. -# All Rights Reserved. +# Copyright (c) 2013 Mirantis, Inc. # # 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 @@ -13,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from portasclient.common import utils +from glazierclient.common import utils def do_environment_list(cc, args={}): diff --git a/python-portasclient/portasclient/version.py b/python-glazierclient/glazierclient/version.py similarity index 72% rename from python-portasclient/portasclient/version.py rename to python-glazierclient/glazierclient/version.py index c140d8d..8c38a38 100644 --- a/python-portasclient/portasclient/version.py +++ b/python-glazierclient/glazierclient/version.py @@ -1,6 +1,4 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2012 OpenStack Foundation +# Copyright (c) 2013 Mirantis, Inc. # # 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 @@ -15,6 +13,6 @@ # under the License. -from portasclient.openstack.common import version as common_version +from glazierclient.openstack.common import version as common_version -version_info = common_version.VersionInfo('python-portasclient') +version_info = common_version.VersionInfo('python-glazierclient') diff --git a/python-portasclient/openstack-common.conf b/python-glazierclient/openstack-common.conf similarity index 88% rename from python-portasclient/openstack-common.conf rename to python-glazierclient/openstack-common.conf index f3026c3..eefdecc 100644 --- a/python-portasclient/openstack-common.conf +++ b/python-glazierclient/openstack-common.conf @@ -4,4 +4,4 @@ modules=setup,importutils,version # The base module to hold the copy of openstack.common -base=portasclient +base=glazierclient diff --git a/python-portasclient/run_tests.sh b/python-glazierclient/run_tests.sh similarity index 95% rename from python-portasclient/run_tests.sh rename to python-glazierclient/run_tests.sh index ba2c9e0..1e79072 100755 --- a/python-portasclient/run_tests.sh +++ b/python-glazierclient/run_tests.sh @@ -2,7 +2,7 @@ function usage { echo "Usage: $0 [OPTION]..." - echo "Run python-portasclient's test suite(s)" + echo "Run python-glazierclient's test suite(s)" echo "" echo " -p, --pep8 Just run pep8" echo " -h, --help Print this usage message" diff --git a/python-portasclient/setup.cfg b/python-glazierclient/setup.cfg similarity index 88% rename from python-portasclient/setup.cfg rename to python-glazierclient/setup.cfg index 2676048..78493ec 100644 --- a/python-portasclient/setup.cfg +++ b/python-glazierclient/setup.cfg @@ -1,5 +1,5 @@ [nosetests] -cover-package = portasclient +cover-package = glazierclient cover-html = true cover-erase = true cover-inclusive = true diff --git a/python-glazierclient/setup.py b/python-glazierclient/setup.py new file mode 100644 index 0000000..56cbead --- /dev/null +++ b/python-glazierclient/setup.py @@ -0,0 +1,50 @@ +# Copyright (c) 2013 Mirantis, Inc. +# +# 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 setuptools + +from glazierclient.openstack.common import setup + +project = 'python-glazierclient' + + +setuptools.setup( + name=project, + version=setup.get_version(project, '2013.1'), + author='Mirantis, Inc.', + author_email='smelikyan@mirantis.com', + description="Client library for Glazier Project", + license='Apache', + url='http://glazier.mirantis.com/', + packages=setuptools.find_packages(exclude=['tests', 'tests.*']), + include_package_data=True, + install_requires=setup.parse_requirements(), + test_suite="nose.collector", + cmdclass=setup.get_cmdclass(), + classifiers=[ + 'Development Status :: 4 - Beta', + 'Environment :: Console', + 'Intended Audience :: Developers', + 'Intended Audience :: Information Technology', + 'License :: OSI Approved :: Apache Software License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + ], + entry_points={ + 'console_scripts': ['glazier = glazierclient.shell:main'] + }, + dependency_links=setup.parse_dependency_links(), + tests_require=setup.parse_requirements(['tools/test-requires']), + setup_requires=['setuptools-git>=0.4'], +) diff --git a/python-glazierclient/tests/__init__.py b/python-glazierclient/tests/__init__.py new file mode 100644 index 0000000..207fa15 --- /dev/null +++ b/python-glazierclient/tests/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2013 Mirantis, Inc. +# +# 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. \ No newline at end of file diff --git a/python-glazierclient/tests/glazierclient/__init__.py b/python-glazierclient/tests/glazierclient/__init__.py new file mode 100644 index 0000000..207fa15 --- /dev/null +++ b/python-glazierclient/tests/glazierclient/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2013 Mirantis, Inc. +# +# 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. \ No newline at end of file diff --git a/python-portasclient/tests/portasclient/test_client_with_fake_http.py b/python-glazierclient/tests/glazierclient/test_client_with_fake_http.py similarity index 92% rename from python-portasclient/tests/portasclient/test_client_with_fake_http.py rename to python-glazierclient/tests/glazierclient/test_client_with_fake_http.py index beedd7c..7c7eaad 100644 --- a/python-portasclient/tests/portasclient/test_client_with_fake_http.py +++ b/python-glazierclient/tests/glazierclient/test_client_with_fake_http.py @@ -1,22 +1,21 @@ -# Copyright (c) 2013 Mirantis Inc. +# Copyright (c) 2013 Mirantis, Inc. # -# 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 +# 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 +# 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. +# 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 unittest import logging from httpretty import HTTPretty, httprettified -from portasclient.client import Client +from glazierclient.client import Client LOG = logging.getLogger('Unit tests') diff --git a/python-portasclient/tests/portasclient/test_methods.py b/python-glazierclient/tests/glazierclient/test_methods.py similarity index 95% rename from python-portasclient/tests/portasclient/test_methods.py rename to python-glazierclient/tests/glazierclient/test_methods.py index cf23978..31b9751 100644 --- a/python-portasclient/tests/portasclient/test_methods.py +++ b/python-glazierclient/tests/glazierclient/test_methods.py @@ -1,26 +1,25 @@ -# Copyright (c) 2013 Mirantis Inc. +# Copyright (c) 2013 Mirantis, Inc. # -# 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 +# 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 +# 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. +# 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 unittest import logging from mock import MagicMock -from portasclient.client import Client -import portasclient.v1.environments as environments -import portasclient.v1.services as services -import portasclient.v1.sessions as sessions +from glazierclient.client import Client +import glazierclient.v1.environments as environments +import glazierclient.v1.services as services +import glazierclient.v1.sessions as sessions def my_mock(*a, **b): return [a, b] @@ -33,7 +32,7 @@ class UnitTestsForClassesAndFunctions(unittest.TestCase): def test_create_client_instance(self): - endpoint = 'http://no-resolved-host:8001' + endpoint = 'http://no-resolved-host:8001' test_client = Client('1', endpoint=endpoint, token='1', timeout=10) assert test_client.environments is not None diff --git a/python-portasclient/tools/install_venv.py b/python-glazierclient/tools/install_venv.py similarity index 87% rename from python-portasclient/tools/install_venv.py rename to python-glazierclient/tools/install_venv.py index d6dcbac..91903d6 100644 --- a/python-portasclient/tools/install_venv.py +++ b/python-glazierclient/tools/install_venv.py @@ -20,7 +20,7 @@ # under the License. """ -Installation script for python-portasclient's development virtualenv +Installation script for python-glazierclient's development virtualenv """ import os @@ -32,12 +32,12 @@ import install_venv_common as install_venv def print_help(): help = """ - Portas development environment setup is complete. + Glazier development environment setup is complete. - Portas development uses virtualenv to track and manage Python dependencies + Glazier development uses virtualenv to track and manage Python dependencies while in development and testing. - To activate the Portas virtualenv for the extent of your current shell session + To activate the Glazier virtualenv for the extent of your current shell session you can run: $ source .venv/bin/activate @@ -58,7 +58,7 @@ def main(argv): pip_requires = os.path.join(root, 'tools', 'pip-requires') test_requires = os.path.join(root, 'tools', 'test-requires') py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1]) - project = 'python-portasclient' + project = 'python-glazierclient' install = install_venv.InstallVenv(root, venv, pip_requires, test_requires, py_version, project) options = install.parse_args(argv) diff --git a/python-portasclient/tools/install_venv_common.py b/python-glazierclient/tools/install_venv_common.py similarity index 100% rename from python-portasclient/tools/install_venv_common.py rename to python-glazierclient/tools/install_venv_common.py diff --git a/python-portasclient/tools/pip-requires b/python-glazierclient/tools/pip-requires similarity index 100% rename from python-portasclient/tools/pip-requires rename to python-glazierclient/tools/pip-requires diff --git a/python-portasclient/tools/test-requires b/python-glazierclient/tools/test-requires similarity index 100% rename from python-portasclient/tools/test-requires rename to python-glazierclient/tools/test-requires diff --git a/python-portasclient/tools/with_venv.sh b/python-glazierclient/tools/with_venv.sh similarity index 100% rename from python-portasclient/tools/with_venv.sh rename to python-glazierclient/tools/with_venv.sh diff --git a/python-portasclient/tox.ini b/python-glazierclient/tox.ini similarity index 79% rename from python-portasclient/tox.ini rename to python-glazierclient/tox.ini index e7e306c..244d2b6 100644 --- a/python-portasclient/tox.ini +++ b/python-glazierclient/tox.ini @@ -14,13 +14,13 @@ commands = nosetests [testenv:pep8] deps = pep8==1.3.3 -commands = pep8 --repeat --show-source portasclient setup.py +commands = pep8 --repeat --show-source glazierclient setup.py [testenv:venv] commands = {posargs} [testenv:cover] -commands = nosetests --cover-erase --cover-package=portasclient --with-xcoverage +commands = nosetests --cover-erase --cover-package=glazierclient --with-xcoverage [tox:jenkins] downloadcache = ~/cache/pip @@ -38,7 +38,7 @@ deps = file://{toxinidir}/.cache.bundle [testenv:jenkinscover] deps = file://{toxinidir}/.cache.bundle setenv = NOSE_WITH_XUNIT=1 -commands = nosetests --cover-erase --cover-package=portasclient --with-xcoverage +commands = nosetests --cover-erase --cover-package=glazierclient --with-xcoverage [testenv:jenkinsvenv] deps = file://{toxinidir}/.cache.bundle diff --git a/python-portasclient/README.md b/python-portasclient/README.md deleted file mode 100644 index 46b5225..0000000 --- a/python-portasclient/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Python bindings to the Portas API -===================================== - -This is a client library for Portas built on the Portas API. It -provides a Python API (the ``portasclient`` module) and a command-line tool -(``portas``). \ No newline at end of file diff --git a/python-portasclient/README.rst b/python-portasclient/README.rst deleted file mode 100644 index 1deddd1..0000000 --- a/python-portasclient/README.rst +++ /dev/null @@ -1,7 +0,0 @@ -Keero Portas Client README -===================== -Portas Client provides CLI and Pythin bindings to Portas API. - -SEE ALSO --------- -* `Keero `__ diff --git a/python-portasclient/portasclient/openstack/common/__init__.py b/python-portasclient/portasclient/openstack/common/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python-portasclient/setup.py b/python-portasclient/setup.py deleted file mode 100644 index d16c99e..0000000 --- a/python-portasclient/setup.py +++ /dev/null @@ -1,48 +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 setuptools - -from portasclient.openstack.common import setup - -project = 'python-portasclient' - - -setuptools.setup( - name=project, - version=setup.get_version(project, '2013.1'), - author='OpenStack', - author_email='openstack@lists.launchpad.net', - description="Client library for portas", - license='Apache', - url='http://portas.openstack.org/', - packages=setuptools.find_packages(exclude=['tests', 'tests.*']), - include_package_data=True, - install_requires=setup.parse_requirements(), - test_suite="nose.collector", - cmdclass=setup.get_cmdclass(), - classifiers=[ - 'Development Status :: 4 - Beta', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'Intended Audience :: Information Technology', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - ], - entry_points={ - 'console_scripts': ['portas = portasclient.shell:main'] - }, - dependency_links=setup.parse_dependency_links(), - tests_require=setup.parse_requirements(['tools/test-requires']), - setup_requires=['setuptools-git>=0.4'], -) diff --git a/python-portasclient/tests/__init__.py b/python-portasclient/tests/__init__.py deleted file mode 100644 index e3f3e8d..0000000 --- a/python-portasclient/tests/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# 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. diff --git a/python-portasclient/tests/portasclient/.project b/python-portasclient/tests/portasclient/.project deleted file mode 100644 index a099945..0000000 --- a/python-portasclient/tests/portasclient/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - portasclient - - - - - - org.python.pydev.PyDevBuilder - - - - - - org.python.pydev.pythonNature - - diff --git a/python-portasclient/tests/portasclient/.pydevproject b/python-portasclient/tests/portasclient/.pydevproject deleted file mode 100644 index 5d866ac..0000000 --- a/python-portasclient/tests/portasclient/.pydevproject +++ /dev/null @@ -1,8 +0,0 @@ - - - -/portasclient - -python 2.7 -Default - diff --git a/python-portasclient/tests/portasclient/__init__.py b/python-portasclient/tests/portasclient/__init__.py deleted file mode 100644 index e3f3e8d..0000000 --- a/python-portasclient/tests/portasclient/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Mirantis Inc. -# -# 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.