Renamed and licensed python-glazierclient

This commit is contained in:
Serg Melikyan 2013-04-05 16:11:40 +04:00
parent ca4ad79179
commit f354f73aac
49 changed files with 193 additions and 219 deletions

View File

@ -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 <http://glazier.mirantis.com>`__

View File

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

View File

@ -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:: 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 >>> from glazierclient import Client
>>> portas = Client('1', endpoint=PORTAS_URL, token=OS_AUTH_TOKEN) >>> 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:: 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 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 Release Notes

View File

@ -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.

View File

@ -1,3 +1,5 @@
# Copyright (c) 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may # 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 # not use this file except in compliance with the License. You may obtain
# a copy of the License at # a copy of the License at
@ -9,8 +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 portasclient.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 portasclient.common import exceptions from glazierclient.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-portasclient' USER_AGENT = 'python-glazierclient'
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 portasclient.common import exceptions from glazierclient.common import exceptions
import prettytable import prettytable
from portasclient.openstack.common import importutils from glazierclient.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 = 'portasclient.v%s' % version module = 'glazierclient.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 portasclient.openstack.common import setup from glazierclient.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

@ -1,3 +1,5 @@
# Copyright (c) 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may # 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 # not use this file except in compliance with the License. You may obtain
# a copy of the License at # a copy of the License at
@ -11,7 +13,7 @@
# under the License. # under the License.
""" """
Command-line interface to the Windows Datacenter as a Service. Command-line interface to the Glazier Project.
""" """
import argparse import argparse
@ -20,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 portasclient import client as portasclient from glazierclient import client as glazierclient
from portasclient.common import utils, exceptions from glazierclient.common import utils, exceptions
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class PortasShell(object): class GlazierShell(object):
def get_base_parser(self): def get_base_parser(self):
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
prog='portas', prog='glazier',
description=__doc__.strip(), description=__doc__.strip(),
epilog='See portas help COMMAND" ' epilog='See glazier 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,
@ -44,9 +46,9 @@ class PortasShell(object):
help=argparse.SUPPRESS,) help=argparse.SUPPRESS,)
parser.add_argument('-d', '--debug', parser.add_argument('-d', '--debug',
default=bool(utils.env('PORTASCLIENT_DEBUG')), default=bool(utils.env('GLAZIERCLIENT_DEBUG')),
action='store_true', action='store_true',
help='Defaults to env[PORTASCLIENT_DEBUG]') help='Defaults to env[GLAZIERCLIENT_DEBUG]')
parser.add_argument('-v', '--verbose', parser.add_argument('-v', '--verbose',
default=False, action="store_true", default=False, action="store_true",
@ -55,7 +57,7 @@ class PortasShell(object):
parser.add_argument('-k', '--insecure', parser.add_argument('-k', '--insecure',
default=False, default=False,
action='store_true', action='store_true',
help="Explicitly allow portasclient to perform " help="Explicitly allow glazierclient 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 "
@ -110,14 +112,14 @@ class PortasShell(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('--portas-url', parser.add_argument('--glazier-url',
default=utils.env('PORTAS_URL'), default=utils.env('GLAZIER_URL'),
help='Defaults to env[PORTAS_URL]') help='Defaults to env[GLAZIER_URL]')
parser.add_argument('--portas-api-version', parser.add_argument('--glazier-api-version',
default=utils.env( default=utils.env(
'PORTAS_API_VERSION', default='1'), 'GLAZIER_API_VERSION', default='1'),
help='Defaults to env[PORTAS_API_VERSION] ' help='Defaults to env[GLAZIER_API_VERSION] '
'or 1') 'or 1')
parser.add_argument('--os-service-type', parser.add_argument('--os-service-type',
@ -202,7 +204,7 @@ class PortasShell(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.portas_api_version api_version = options.glazier_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
@ -220,9 +222,9 @@ class PortasShell(object):
self.do_help(args) self.do_help(args)
return 0 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 token = args.os_auth_token
endpoint = args.portas_url endpoint = args.glazier_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 "
@ -256,7 +258,7 @@ class PortasShell(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.portas_url url = args.glazier_url
endpoint = url or self._get_endpoint(_ksclient, **kwargs) endpoint = url or self._get_endpoint(_ksclient, **kwargs)
kwargs = { kwargs = {
@ -268,7 +270,7 @@ class PortasShell(object):
'key_file': args.key_file, 'key_file': args.key_file,
} }
client = portasclient.Client(api_version, endpoint, **kwargs) client = glazierclient.Client(api_version, endpoint, **kwargs)
try: try:
args.func(client, args) args.func(client, args)
@ -301,7 +303,7 @@ class HelpFormatter(argparse.HelpFormatter):
def main(): def main():
try: try:
PortasShell().main(sys.argv[1:]) GlazierShell().main(sys.argv[1:])
except Exception, e: except Exception, e:
print >> sys.stderr, e print >> sys.stderr, e

View File

@ -1,5 +1,4 @@
# Copyright 2012 OpenStack LLC. # Copyright (c) 2013 Mirantis, Inc.
# All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may # 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 # 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from portasclient.v1.client import Client from glazierclient.v1.client import Client

View File

@ -1,5 +1,4 @@
# Copyright 2012 OpenStack LLC. # Copyright (c) 2013 Mirantis, Inc.
# All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may # 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 # 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from portasclient.common import http from glazierclient.common import http
from portasclient.v1 import environments, sessions, services from glazierclient.v1 import environments, sessions, services
class Client(http.HTTPClient): 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 :param string endpoint: A user-supplied endpoint URL for the service.
service.
:param string token: Token for authentication. :param string token: Token for authentication.
:param integer timeout: Allows customization of the timeout for client :param integer timeout: Allows customization of the timeout for client
http requests. (optional) http requests. (optional)
""" """
def __init__(self, *args, **kwargs): 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) 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

@ -1,5 +1,4 @@
# Copyright 2012 OpenMeter LLC. # Copyright (c) 2013 Mirantis, Inc.
# All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may # 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 # 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from portasclient.common import base from glazierclient.common import base
class Environment(base.Resource): class Environment(base.Resource):

View File

@ -1,5 +1,4 @@
# Copyright 2012 OpenMeter LLC. # Copyright (c) 2013 Mirantis, Inc.
# All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may # 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 # 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 # 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 mercurial import patch
from portasclient.common import base from glazierclient.common import base
class ActiveDirectory(base.Resource): class ActiveDirectory(base.Resource):

View File

@ -1,5 +1,4 @@
# Copyright 2012 OpenMeter LLC. # Copyright (c) 2013 Mirantis, Inc.
# All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may # 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 # 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 # 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.
import anyjson
from portasclient.common import base from glazierclient.common import base
class Session(base.Resource): class Session(base.Resource):

View File

@ -1,5 +1,4 @@
# Copyright 2012 OpenStack LLC. # Copyright (c) 2013 Mirantis, Inc.
# All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may # 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 # 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.
from portasclient.common import utils from glazierclient.common import utils
def do_environment_list(cc, args={}): def do_environment_list(cc, args={}):

View File

@ -1,6 +1,4 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 Mirantis, Inc.
# Copyright 2012 OpenStack Foundation
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may # 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 # not use this file except in compliance with the License. You may obtain
@ -15,6 +13,6 @@
# under the License. # 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')

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=portasclient base=glazierclient

View File

@ -2,7 +2,7 @@
function usage { function usage {
echo "Usage: $0 [OPTION]..." echo "Usage: $0 [OPTION]..."
echo "Run python-portasclient's test suite(s)" echo "Run python-glazierclient'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 = portasclient cover-package = glazierclient
cover-html = true cover-html = true
cover-erase = true cover-erase = true
cover-inclusive = true cover-inclusive = true

View File

@ -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'],
)

View File

@ -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.

View File

@ -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.

View File

@ -1,22 +1,21 @@
# Copyright (c) 2013 Mirantis Inc. # Copyright (c) 2013 Mirantis, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License"); you may
# you may not use this file except in compliance with the License. # not use this file except in compliance with the License. You may obtain
# You may obtain a copy of the License at # 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 # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# implied. # License for the specific language governing permissions and limitations
# See the License for the specific language governing permissions and # under the License.
# limitations under the License.
import unittest import unittest
import logging import logging
from httpretty import HTTPretty, httprettified from httpretty import HTTPretty, httprettified
from portasclient.client import Client from glazierclient.client import Client
LOG = logging.getLogger('Unit tests') LOG = logging.getLogger('Unit tests')

View File

@ -1,26 +1,25 @@
# Copyright (c) 2013 Mirantis Inc. # Copyright (c) 2013 Mirantis, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License"); you may
# you may not use this file except in compliance with the License. # not use this file except in compliance with the License. You may obtain
# You may obtain a copy of the License at # 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 # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# implied. # License for the specific language governing permissions and limitations
# See the License for the specific language governing permissions and # under the License.
# limitations under the License.
import unittest import unittest
import logging import logging
from mock import MagicMock from mock import MagicMock
from portasclient.client import Client from glazierclient.client import Client
import portasclient.v1.environments as environments import glazierclient.v1.environments as environments
import portasclient.v1.services as services import glazierclient.v1.services as services
import portasclient.v1.sessions as sessions import glazierclient.v1.sessions as sessions
def my_mock(*a, **b): def my_mock(*a, **b):
return [a, b] return [a, b]
@ -33,7 +32,7 @@ class UnitTestsForClassesAndFunctions(unittest.TestCase):
def test_create_client_instance(self): 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) test_client = Client('1', endpoint=endpoint, token='1', timeout=10)
assert test_client.environments is not None assert test_client.environments is not None

View File

@ -20,7 +20,7 @@
# under the License. # under the License.
""" """
Installation script for python-portasclient's development virtualenv Installation script for python-glazierclient'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 = """
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. 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: 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-portasclient' project = 'python-glazierclient'
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 portasclient setup.py commands = pep8 --repeat --show-source glazierclient setup.py
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
commands = nosetests --cover-erase --cover-package=portasclient --with-xcoverage commands = nosetests --cover-erase --cover-package=glazierclient --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=portasclient --with-xcoverage commands = nosetests --cover-erase --cover-package=glazierclient --with-xcoverage
[testenv:jenkinsvenv] [testenv:jenkinsvenv]
deps = file://{toxinidir}/.cache.bundle deps = file://{toxinidir}/.cache.bundle

View File

@ -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``).

View File

@ -1,7 +0,0 @@
Keero Portas Client README
=====================
Portas Client provides CLI and Pythin bindings to Portas API.
SEE ALSO
--------
* `Keero <http://keero.mirantis.com>`__

View File

@ -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'],
)

View File

@ -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.

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>portasclient</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/portasclient</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>

View File

@ -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.