diff options
| author | James Page <james.page@ubuntu.com> | 2017-06-02 09:27:35 +0100 |
|---|---|---|
| committer | git-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com> | 2017-06-08 15:42:36 +0000 |
| commit | ec6807136301ddaf019f0c9f7a6ae60dca00a832 (patch) | |
| tree | b6d1c1116b810cccd2796c823e2c0079d6d5cd97 | |
| parent | aa2975f0b39a4897651e15ac6c48e7a468360f84 (diff) | |
| parent | 2ae3e1a6f65c8ef9af75e3c14d4b304760661acd (diff) | |
1.1.0-0ubuntu1 (patches applied)applied/1.1.0-0ubuntu1
Imported using git-ubuntu import.
86 files changed, 928 insertions, 579 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4bb30b7..0000000 --- a/.gitignore +++ /dev/null @@ -1,57 +0,0 @@ -*.py[cod] - -# C extensions -*.so - -# Packages -*.egg -*.egg-info -dist -build -eggs -parts -bin -var -sdist -develop-eggs -.installed.cfg -lib -lib64 - -# Installer logs -pip-log.txt - -# Unit test / coverage reports -.coverage -.tox -nosetests.xml -.testrepository -.venv - -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# Complexity -output/*.html -output/*/index.html - -# Sphinx -doc/build -doc/source/api - -# pbr generates these -AUTHORS -ChangeLog - -# Editors -*~ -.*.swp -.*sw? - -sftp-config.json -/.idea/ diff --git a/.gitreview b/.gitreview deleted file mode 100644 index abcd52f..0000000 --- a/.gitreview +++ /dev/null @@ -1,4 +0,0 @@ -[gerrit] -host=review.openstack.org -port=29418 -project=openstack/python-watcherclient.git @@ -0,0 +1,48 @@ +Alexander Chadin <a.chadin@servionica.ru> +Alexandr Stavitskiy <stavitskiy@servionica.ru> +Andreas Jaeger <aj@suse.com> +Antoine Cabot <antoine.cabot@b-com.com> +Cao Xuan Hoang <hoangcx@vn.fujitsu.com> +Chihiro Yokoyama <c.yokoyama@ntt.com> +Chris Spencer <christopher.m.spencer@intel.com> +Daniel Pawlik <daniel.pawlik@corp.ovh.com> +David TARDIVEL <David.TARDIVEL@b-com.com> +David.T <David.TARDIVEL@b-com.com> +DeepaJon <deepak.kumar@nectechnologies.in> +Dougal Matthews <dougal@redhat.com> +Edwin Zhai <edwin.zhai@intel.com> +Flavio Percoco <flaper87@gmail.com> +Jean-Emile DARTOIS <jean-emile.dartois@b-com.com> +Jeremy Liu <liujiong@gohighsec.com> +Jeremy Stanley <fungi@yuggoth.org> +Larry Rensing <lr699s@att.com> +Lucky samadhiya <lucky.samadhiya@nectechnologies.in> +Luong Anh Tuan <tuanla@vn.fujitsu.com> +PanFengyun <fengyun.pan@easystack.cn> +Prashanth Hari <prashanth.hari@walmart.com> +Steve Martinelli <stevemar@ca.ibm.com> +Swapnil Kulkarni (coolsvap) <me@coolsvap.net> +Taylor Peoples <tpeoples@us.ibm.com> +Tin Lam <tinlam@gmail.com> +Tin Lam <tl3438@att.com> +Tomasz Kaczynski <tomasz.kaczynski@intel.com> +Tony Xu <hhktony@gmail.com> +Vincent Francoise <Vincent.FRANCOISE@b-com.com> +Vladimir Ostroverkhov <ostroverkhov@servionica.ru> +avnish <avnish.pal@nectechnologies.in> +caihui <cai.hui@zte.com.cn> +daohanli <dhli5759@fiberhome.com> +digambar <digambarpatil15@yahoo.co.in> +ericxiett <eric_xiett@163.com> +gecong1973 <ge.cong@zte.com.cn> +gengchc2 <geng.changcai2@zte.com.cn> +hongzhezheng <zheng.hongzhe32@zte.com.cn> +licanwei <li.canwei2@zte.com.cn> +qinchunhua <qin.chunhua@zte.com.cn> +ricolin <rico.l@inwinstack.com> +ricolin <rico.lin@easystack.cn> +shu-mutou <shu-mutou@rf.jp.nec.com> +venkatamahesh <venkatamaheshkotha@gmail.com> +zhangguoqing <zhang.guoqing@99cloud.net> +zhuzeyu <zhu.zeyu@zte.com.cn> +zte-hanrong <han.rong3@zte.com.cn> diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..c35a83c --- /dev/null +++ b/ChangeLog @@ -0,0 +1,173 @@ +CHANGES +======= + +1.1.0 +----- + +* Updated from global requirements +* Remove log translations +* Indicating the location tests directory in oslo_debug_helper +* Using assert methods instead of assertTrue +* Updated from global requirements +* [Fix gate]Update test requirement +* Remove RST files located in doc/source/api +* Remove support for py34 +* update help description about actionplan create +* Using jsonutils instead of json +* Updated from global requirements +* Remove useless utf-8 coding +* Add functional env to tox + +1.0.0 +----- + +* update '--detail' help in goal list +* Updated from global requirements +* Add functional tests to watcherclient +* Support parents field along with planner changes +* changes to make consistent with other openstack component +* Use keystoneauth instead of keystoneclient +* Remove unused files +* Enable coverage report in console output +* Add param 'goal' and 'strategy' in list() +* Removes unnecessary utf-8 encoding +* update audit create '--interval' description +* Add unit for continuous audit's interval +* Fix a typo in audittemplate help +* use 'auto' instead of None +* Add auto_trigger support +* Fix TOKENID format which should without dashed +* too many digits after the decimal point + +0.27.0 +------ + +* Remove readme reference because of sphinx error +* Replace six.iteritems() with .items() +* Updated from global requirements +* Show team and repo badges on README +* Updated from global requirements +* Use uuidutils instead of uuid.uuid4() + +0.26.0 +------ + +* Updated from global requirements +* Remove obsolete object attributes +* Fix a typo error in a help message in the client +* Updated from global requirements +* Remove unnecessary ')' +* Add Python 3.5 classifier and venv +* Add __ne__ built-in function +* Updated from global requirements +* Add support for Audit Scope +* Add parameters in Audit creation attributes list +* Updated from global requirements +* Added support for Client creation from KS session +* Updated from global requirements +* Add fixtures to test-requirements +* Add constraint target to tox.ini and remove 1 dep +* Add service support +* python-openstackclient ClientManager interface changed +* Update home page link in cfg file +* Clean imports in code + +0.25.0 +------ + +* Add again parameters as Audit creation attributes +* Updated from global requirements +* Add strategy name in action plan fields +* Updated from global requirements +* remove redundant ')' +* Add goal_id, strategy_id and host_aggregate CLI options to audit +* Optimiz the help information for audit type parameter +* Updated from global requirements +* Add scoring engine commands +* Remove discover from test-requirements +* Updated from global requirements +* Updated from global requirements +* Fix for importing osc-lib instead openstackclient +* Updated from global requirements + +0.24.0 +------ + +* Fix for error importing of exception class +* Add support continuously-optimization +* Remove the blank space between the function name and the parenthesis +* Prints '-' instead of 'None' when data is None +* Enable strategy parameter +* Fix field type to audit_type +* Add license file +* Updated from global requirements +* Remove tempest-lib +* Updated from global requirements +* Revert "Add support continuously-optimization" +* Replaced UUID of goal with name +* Remove useless index on root doc page +* Updated CLI to display efficacy related fields +* Updated from global requirements +* Add support continuously-optimization + +0.23.0 +------ + +* Update Watcher CLI documentation +* Use goal name as strategy list filter +* Replaced UUID of goal and strategy with name +* Flatten the project structure +* Switch Watcher CLI to an OSC-compatible version +* OpenStackClient plugin for action +* OpenStackClient plugin for action plan +* OpenStackClient plugin for audit +* OpenStackClient plugin for audit template +* OpenStackClient plugin for strategy +* OpenStackClient plugin for goal +* Tidy up +* Use the correct capitalization of OpenStack +* Support for refactored /audit_templates endpoint +* Added Strategy support in Watcher CLI +* Updated CLI for new /goals API +* Add PrettyTable module +* Fixed audit creation bug in CLI +* Removed unused 'alarm' field +* Add audit-template name checking in CLI +* Updated from global requirements + +0.22.0 +------ + +* Rename TRIGGERED state as PENDING +* Updated from global requirements +* Updated from global requirements +* Replace deprecated LOG.warn with LOG.warning +* Removed host_aggregate filter for Audit Template +* Removed useless '--name' in audit-template-list +* Sync with openstack/requirements master branch + +0.21.0 +------ + +* Updated STARTING to TRIGGERED +* Remove argparse from requirements +* Fix extraction of _LI _LW _LE _LC for translation +* Update Watcher documentation in README +* i18n - Make string translatable +* Respect the import order template +* Sync Action resource fields +* Sync with oslo-incubator +* use keystoneclient exceptions instead of oslo-incubator code +* Drop py33 support + +0.20.0 +------ + +* Remove py26 support +* Update requirements from OS Global Requirements +* bug and requirements fixes +* Change stackforge to openstack +* Update .gitreview for new namespace +* update README.rst file +* push initial version +* Added .gitreview diff --git a/PKG-INFO b/PKG-INFO new file mode 100644 index 0000000..ccf9fdb --- /dev/null +++ b/PKG-INFO @@ -0,0 +1,174 @@ +Metadata-Version: 1.1 +Name: python-watcherclient +Version: 1.1.0 +Summary: Python client library for Watcher API +Home-page: http://docs.openstack.org/developer/python-watcherclient +Author: OpenStack +Author-email: openstack-dev@lists.openstack.org +License: UNKNOWN +Description: ======================== + Team and repository tags + ======================== + + .. image:: http://governance.openstack.org/badges/python-watcherclient.svg + :target: http://governance.openstack.org/reference/tags/index.html + + .. Change things from this point on + + ==================== + python-watcherclient + ==================== + + Client for resource optimization service for OpenStack. + + OpenStack Watcher provides a flexible and scalable resource optimization + service for multi-tenant OpenStack-based clouds. + Watcher provides a complete optimization loop-including everything from a + metrics receiver, complex event processor and profiler, optimization processor + and an action plan applier. This provides a robust framework to realize a wide + range of cloud optimization goals, including the reduction of data center + operating costs, increased system performance via intelligent virtual machine + migration, increased energy efficiency-and more! + + * Free software: Apache license + * Wiki: http://wiki.openstack.org/wiki/Watcher + * Source: http://git.openstack.org/cgit/openstack/python-watcher + * Bugs: http://bugs.launchpad.net/watcher + + Installation + ============ + + Install the prerequisite packages + --------------------------------- + + On Ubuntu (tested on 14.04-64) + + .. code:: + + sudo apt-get install python-dev libssl-dev python-pip git-core libmysqlclient-dev libffi-dev + + On Fedora-based distributions e.g., Fedora/RHEL/CentOS/Scientific Linux (tested on CentOS 6.5) + + .. code:: + + sudo yum install python-virtualenv openssl-devel python-pip git gcc libffi-devel mysql-devel postgresql-devel + + On openSUSE-based distributions (SLES 12, openSUSE 13.1, Factory or Tumbleweed) + + .. code:: + + sudo zypper install gcc git libmysqlclient-devel libopenssl-devel postgresql-devel python-devel python-pip + + Install the Watcher client + -------------------------- + + You can install the Watcher CLI with the following command: + + .. code:: + + sudo pip install python-watcherclient + + + You can also use the `OpenStack client <http://docs.openstack.org/cli-reference/overview.html>`_ + with Watcher (our watcher plugin for OpenStack client is included in the + python-watcherclient package). To install it, you have just to run this command: + + .. code:: + + sudo pip install python-openstackclient + + Configuration + ============= + + Create a **creds** file containing your OpenStack credentials: + + .. code:: + + export OS_IDENTITY_API_VERSION=3 + export OS_AUTH_URL=http://<your-keystone-server>:5000/v3 + export OS_PROJECT_DOMAIN_ID=default + export OS_USER_DOMAIN_ID=default + export OS_USERNAME=admin + export OS_PASSWORD=<your-password> + export OS_PROJECT_NAME=<your-project-name> + + Source these credentials into your current shell session: + + .. code:: + + # source creds + + You should be able to launch the following command which gets the list of + previously created Audit Templates: + + .. code:: + + # watcher audittemplate list + + or:: + + # openstack optimize audittemplate list + +--------------------------------+------+----------------------+----------+ + | UUID | Name | Goal | Strategy | + +--------------------------------+------+----------------------+----------+ + +--------------------------------+------+----------------------+----------+ + + + You can view the entire list of available Watcher commands and options using + this command: + + .. code:: + + # watcher help + + or:: + + # openstack help optimize + + + Troubleshootings + ================ + + If any watcher command fails, you can obtain more details with the **--debug** + option : + + .. code:: + + # watcher --debug audittemplate list + + or:: + + # openstack --debug optimize audittemplate list + + + Install the openstack CLI : + + .. code:: + + # pip install python-openstackclient + + Make sure that your Openstack credentials are correct. If so, you should be able + to verify that the watcher user has been declared in your Openstack keystone : + + .. code:: + + # openstack user list + + and that the watcher endpoints have been declared as well : + + .. code:: + + # openstack endpoint list + + +Platform: UNKNOWN +Classifier: Environment :: OpenStack +Classifier: Intended Audience :: Information Technology +Classifier: Intended Audience :: System Administrators +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Operating System :: POSIX :: Linux +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.5 diff --git a/debian/changelog b/debian/changelog index 8d6f842..fc9a2fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +python-watcherclient (1.1.0-0ubuntu1) artful; urgency=medium + + * d/watch: Use pypi.debian.net. + * New upstream release. + * d/control: Align (Build-)Depends with upstream. + + -- James Page <james.page@ubuntu.com> Fri, 02 Jun 2017 09:27:35 +0100 + python-watcherclient (1.0.0-0ubuntu1) zesty; urgency=medium * New upstream release. diff --git a/debian/control b/debian/control index 1bdbdfc..1a51584 100644 --- a/debian/control +++ b/debian/control @@ -8,27 +8,28 @@ Build-Depends: debhelper (>= 9), dh-python, openstack-pkg-tools (>= 52~), python-all, - python-pbr (>= 1.8), + python-pbr (>= 2.0.0), python-setuptools, - python-sphinx, + python-sphinx (>= 1.5.1), python3-all, - python3-pbr (>= 1.8), + python3-pbr (>= 2.0.0), python3-setuptools, Build-Depends-Indep: python-babel (>= 2.3.4), python-cliff (>= 2.3.0), python-coverage, python-fixtures (>= 3.0.0), python-hacking, - python-keystoneauth1 (>= 2.17.0), + python-keystoneauth1 (>= 2.20.0), python-mock (>= 2.0), - python-osc-lib (>= 1.2.0), + python-os-testr, + python-osc-lib (>= 1.5.1), python-oslo.i18n (>= 2.1.0), - python-oslo.utils (>= 3.18.0), + python-oslo.utils (>= 3.20.0), python-oslosphinx, python-oslotest (>= 1:1.10.0), - python-os-testr, python-prettytable (>= 0.7.1), python-six (>= 1.9.0), + python-tempest (>= 1:14.0.0), python-testscenarios, python-testtools (>= 1.4.0), python-yaml (>= 3.10.0), @@ -37,22 +38,23 @@ Build-Depends-Indep: python-babel (>= 2.3.4), python3-coverage, python3-fixtures (>= 3.0.0), python3-hacking, - python3-keystoneauth1 (>= 2.17.0), + python3-keystoneauth1 (>= 2.20.0), python3-mock (>= 2.0), - python3-osc-lib (>= 1.2.0), + python3-os-testr, + python3-osc-lib (>= 1.5.1), python3-oslo.i18n (>= 2.1.0), - python3-oslo.utils (>= 3.18.0), + python3-oslo.utils (>= 3.20.0), python3-oslosphinx (>= 4.7.0), python3-oslotest (>= 1:1.10.0), - python3-os-testr, python3-prettytable (>= 0.7.1), python3-six (>= 1.9.0), - python3-sphinx (>= 1.2.1), + python3-sphinx (>= 1.5.1), python3-subunit, + python3-tempest (>= 1:14.0.0), python3-testscenarios, python3-testtools (>= 1.4.0), python3-yaml (>= 3.10.0), - subunit + subunit, Standards-Version: 3.9.8 Vcs-Browser: https://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/python-watcherclient Vcs-Git: git://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/python-watcherclient @@ -63,16 +65,16 @@ Architecture: all Depends: python-babel (>= 2.3.4), python-cliff (>= 2.3.0), python-fixtures (>= 3.0.0), - python-keystoneauth1 (>= 2.17.0), - python-osc-lib (>= 1.2.0), + python-keystoneauth1 (>= 2.20.0), + python-osc-lib (>= 1.5.1), python-oslo.i18n (>= 2.1.0), - python-oslo.utils (>= 3.18.0), - python-pbr (>= 1.8), + python-oslo.utils (>= 3.20.0), + python-pbr (>= 2.0.0), python-prettytable (>= 0.7.1), python-six (>= 1.9.0), python-yaml (>= 3.10.0), ${misc:Depends}, - ${python:Depends} + ${python:Depends}, Description: OpenStack Cloud Optimization as a Service client - Python 2.7 OpenStack Watcher provides a flexible and scalable resource optimization service for multi-tenant OpenStack-based clouds. Watcher provides a complete @@ -90,16 +92,16 @@ Architecture: all Depends: python3-babel (>= 2.3.4), python3-cliff (>= 2.3.0), python3-fixtures (>= 3.0.0), - python3-keystoneauth1 (>= 2.17.0), - python3-osc-lib (>= 1.2.0), + python3-keystoneauth1 (>= 2.20.0), + python3-osc-lib (>= 1.5.1), python3-oslo.i18n (>= 2.1.0), - python3-oslo.utils (>= 3.18.0), - python3-pbr (>= 1.8), + python3-oslo.utils (>= 3.20.0), + python3-pbr (>= 2.0.0), python3-prettytable (>= 0.7.1), python3-six (>= 1.9.0), python3-yaml (>= 3.10.0), ${misc:Depends}, - ${python3:Depends} + ${python3:Depends}, Description: OpenStack Cloud Optimization as a Service client - Python 3.x OpenStack Watcher provides a flexible and scalable resource optimization service for multi-tenant OpenStack-based clouds. Watcher provides a complete diff --git a/debian/watch b/debian/watch index 4fb4cb5..e774d8c 100644 --- a/debian/watch +++ b/debian/watch @@ -1,3 +1,3 @@ version=3 -opts="uversionmangle=s/\.(b|rc)/~$1/" \ -https://github.com/openstack/python-watcherclient/tags .*/(\d[\d\.]+)\.tar\.gz +opts=uversionmangle=s/(rc|a|b|c)/~$1/ \ +http://pypi.debian.net/python-watcherclient/python-watcherclient-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff --git a/doc/source/api/watcherclient.client.rst b/doc/source/api/watcherclient.client.rst deleted file mode 100644 index 9e2dfca..0000000 --- a/doc/source/api/watcherclient.client.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.client` Module -====================================== - -.. automodule:: watcherclient.client - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.common.apiclient.auth.rst b/doc/source/api/watcherclient.common.apiclient.auth.rst deleted file mode 100644 index b9b5255..0000000 --- a/doc/source/api/watcherclient.common.apiclient.auth.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.common.apiclient.auth` Module -===================================================== - -.. automodule:: watcherclient.common.apiclient.auth - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.common.apiclient.base.rst b/doc/source/api/watcherclient.common.apiclient.base.rst deleted file mode 100644 index 78bd7ef..0000000 --- a/doc/source/api/watcherclient.common.apiclient.base.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.common.apiclient.base` Module -===================================================== - -.. automodule:: watcherclient.common.apiclient.base - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.common.apiclient.client.rst b/doc/source/api/watcherclient.common.apiclient.client.rst deleted file mode 100644 index 021e198..0000000 --- a/doc/source/api/watcherclient.common.apiclient.client.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.common.apiclient.client` Module -======================================================= - -.. automodule:: watcherclient.common.apiclient.client - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.common.apiclient.exceptions.rst b/doc/source/api/watcherclient.common.apiclient.exceptions.rst deleted file mode 100644 index b8118e7..0000000 --- a/doc/source/api/watcherclient.common.apiclient.exceptions.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.common.apiclient.exceptions` Module -=========================================================== - -.. automodule:: watcherclient.common.apiclient.exceptions - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.common.apiclient.utils.rst b/doc/source/api/watcherclient.common.apiclient.utils.rst deleted file mode 100644 index 1c2be79..0000000 --- a/doc/source/api/watcherclient.common.apiclient.utils.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.common.apiclient.utils` Module -====================================================== - -.. automodule:: watcherclient.common.apiclient.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.common.base.rst b/doc/source/api/watcherclient.common.base.rst deleted file mode 100644 index 65b2520..0000000 --- a/doc/source/api/watcherclient.common.base.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.common.base` Module -=========================================== - -.. automodule:: watcherclient.common.base - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.common.cliutils.rst b/doc/source/api/watcherclient.common.cliutils.rst deleted file mode 100644 index 0fc9362..0000000 --- a/doc/source/api/watcherclient.common.cliutils.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.common.cliutils` Module -=============================================== - -.. automodule:: watcherclient.common.cliutils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.common.http.rst b/doc/source/api/watcherclient.common.http.rst deleted file mode 100644 index 42a010f..0000000 --- a/doc/source/api/watcherclient.common.http.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.common.http` Module -=========================================== - -.. automodule:: watcherclient.common.http - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.common.i18n.rst b/doc/source/api/watcherclient.common.i18n.rst deleted file mode 100644 index 2aa1054..0000000 --- a/doc/source/api/watcherclient.common.i18n.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.common.i18n` Module -=========================================== - -.. automodule:: watcherclient.common.i18n - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.common.utils.rst b/doc/source/api/watcherclient.common.utils.rst deleted file mode 100644 index 94550c9..0000000 --- a/doc/source/api/watcherclient.common.utils.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.common.utils` Module -============================================ - -.. automodule:: watcherclient.common.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.exceptions.rst b/doc/source/api/watcherclient.exceptions.rst deleted file mode 100644 index 024f942..0000000 --- a/doc/source/api/watcherclient.exceptions.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.exceptions` Module -========================================== - -.. automodule:: watcherclient.exceptions - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.shell.rst b/doc/source/api/watcherclient.shell.rst deleted file mode 100644 index ef9d8c6..0000000 --- a/doc/source/api/watcherclient.shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.shell` Module -===================================== - -.. automodule:: watcherclient.shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.keystone_client_fixtures.rst b/doc/source/api/watcherclient.tests.keystone_client_fixtures.rst deleted file mode 100644 index 1462ffd..0000000 --- a/doc/source/api/watcherclient.tests.keystone_client_fixtures.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.keystone_client_fixtures` Module -============================================================== - -.. automodule:: watcherclient.tests.keystone_client_fixtures - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.test_client.rst b/doc/source/api/watcherclient.tests.test_client.rst deleted file mode 100644 index 571967b..0000000 --- a/doc/source/api/watcherclient.tests.test_client.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.test_client` Module -================================================= - -.. automodule:: watcherclient.tests.test_client - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.test_http.rst b/doc/source/api/watcherclient.tests.test_http.rst deleted file mode 100644 index 1afd0d4..0000000 --- a/doc/source/api/watcherclient.tests.test_http.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.test_http` Module -=============================================== - -.. automodule:: watcherclient.tests.test_http - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.test_import.rst b/doc/source/api/watcherclient.tests.test_import.rst deleted file mode 100644 index 52e901c..0000000 --- a/doc/source/api/watcherclient.tests.test_import.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.test_import` Module -================================================= - -.. automodule:: watcherclient.tests.test_import - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.test_shell.rst b/doc/source/api/watcherclient.tests.test_shell.rst deleted file mode 100644 index fbb5caa..0000000 --- a/doc/source/api/watcherclient.tests.test_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.test_shell` Module -================================================ - -.. automodule:: watcherclient.tests.test_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.test_utils.rst b/doc/source/api/watcherclient.tests.test_utils.rst deleted file mode 100644 index 9126aa1..0000000 --- a/doc/source/api/watcherclient.tests.test_utils.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.test_utils` Module -================================================ - -.. automodule:: watcherclient.tests.test_utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.utils.rst b/doc/source/api/watcherclient.tests.utils.rst deleted file mode 100644 index 6fcb3d8..0000000 --- a/doc/source/api/watcherclient.tests.utils.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.utils` Module -=========================================== - -.. automodule:: watcherclient.tests.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_action.rst b/doc/source/api/watcherclient.tests.v1.test_action.rst deleted file mode 100644 index c8a6fca..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_action` Module -==================================================== - -.. automodule:: watcherclient.tests.v1.test_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_action_plan.rst b/doc/source/api/watcherclient.tests.v1.test_action_plan.rst deleted file mode 100644 index 530c3ee..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_action_plan.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_action_plan` Module -========================================================= - -.. automodule:: watcherclient.tests.v1.test_action_plan - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_action_plan_shell.rst b/doc/source/api/watcherclient.tests.v1.test_action_plan_shell.rst deleted file mode 100644 index c443c5b..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_action_plan_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_action_plan_shell` Module -=============================================================== - -.. automodule:: watcherclient.tests.v1.test_action_plan_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_action_shell.rst b/doc/source/api/watcherclient.tests.v1.test_action_shell.rst deleted file mode 100644 index b17fa43..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_action_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_action_shell` Module -========================================================== - -.. automodule:: watcherclient.tests.v1.test_action_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_audit.rst b/doc/source/api/watcherclient.tests.v1.test_audit.rst deleted file mode 100644 index bf95718..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_audit.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_audit` Module -=================================================== - -.. automodule:: watcherclient.tests.v1.test_audit - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_audit_shell.rst b/doc/source/api/watcherclient.tests.v1.test_audit_shell.rst deleted file mode 100644 index 76ec7c1..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_audit_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_audit_shell` Module -========================================================= - -.. automodule:: watcherclient.tests.v1.test_audit_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_audit_template.rst b/doc/source/api/watcherclient.tests.v1.test_audit_template.rst deleted file mode 100644 index 72e4e79..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_audit_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_audit_template` Module -============================================================ - -.. automodule:: watcherclient.tests.v1.test_audit_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_audit_template_shell.rst b/doc/source/api/watcherclient.tests.v1.test_audit_template_shell.rst deleted file mode 100644 index b69051a..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_audit_template_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_audit_template_shell` Module -================================================================== - -.. automodule:: watcherclient.tests.v1.test_audit_template_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_goal.rst b/doc/source/api/watcherclient.tests.v1.test_goal.rst deleted file mode 100644 index 1cc12d8..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_goal.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_goal` Module -================================================== - -.. automodule:: watcherclient.tests.v1.test_goal - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_goal_shell.rst b/doc/source/api/watcherclient.tests.v1.test_goal_shell.rst deleted file mode 100644 index 8cdc8d8..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_goal_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_goal_shell` Module -======================================================== - -.. automodule:: watcherclient.tests.v1.test_goal_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_metric_collector.rst b/doc/source/api/watcherclient.tests.v1.test_metric_collector.rst deleted file mode 100644 index 01e5ab2..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_metric_collector.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_metric_collector` Module -============================================================== - -.. automodule:: watcherclient.tests.v1.test_metric_collector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.tests.v1.test_metric_collector_shell.rst b/doc/source/api/watcherclient.tests.v1.test_metric_collector_shell.rst deleted file mode 100644 index 113fa8c..0000000 --- a/doc/source/api/watcherclient.tests.v1.test_metric_collector_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.tests.v1.test_metric_collector_shell` Module -==================================================================== - -.. automodule:: watcherclient.tests.v1.test_metric_collector_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.action.rst b/doc/source/api/watcherclient.v1.action.rst deleted file mode 100644 index fbae324..0000000 --- a/doc/source/api/watcherclient.v1.action.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.action` Module -========================================= - -.. automodule:: watcherclient.v1.action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.action_plan.rst b/doc/source/api/watcherclient.v1.action_plan.rst deleted file mode 100644 index 928d0e3..0000000 --- a/doc/source/api/watcherclient.v1.action_plan.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.action_plan` Module -============================================== - -.. automodule:: watcherclient.v1.action_plan - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.action_plan_shell.rst b/doc/source/api/watcherclient.v1.action_plan_shell.rst deleted file mode 100644 index 194ca8b..0000000 --- a/doc/source/api/watcherclient.v1.action_plan_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.action_plan_shell` Module -==================================================== - -.. automodule:: watcherclient.v1.action_plan_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.action_shell.rst b/doc/source/api/watcherclient.v1.action_shell.rst deleted file mode 100644 index 7d8e005..0000000 --- a/doc/source/api/watcherclient.v1.action_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.action_shell` Module -=============================================== - -.. automodule:: watcherclient.v1.action_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.audit.rst b/doc/source/api/watcherclient.v1.audit.rst deleted file mode 100644 index 8cff998..0000000 --- a/doc/source/api/watcherclient.v1.audit.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.audit` Module -======================================== - -.. automodule:: watcherclient.v1.audit - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.audit_shell.rst b/doc/source/api/watcherclient.v1.audit_shell.rst deleted file mode 100644 index a2e6bf0..0000000 --- a/doc/source/api/watcherclient.v1.audit_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.audit_shell` Module -============================================== - -.. automodule:: watcherclient.v1.audit_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.audit_template.rst b/doc/source/api/watcherclient.v1.audit_template.rst deleted file mode 100644 index 5069267..0000000 --- a/doc/source/api/watcherclient.v1.audit_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.audit_template` Module -================================================= - -.. automodule:: watcherclient.v1.audit_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.audit_template_shell.rst b/doc/source/api/watcherclient.v1.audit_template_shell.rst deleted file mode 100644 index df75aca..0000000 --- a/doc/source/api/watcherclient.v1.audit_template_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.audit_template_shell` Module -======================================================= - -.. automodule:: watcherclient.v1.audit_template_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.client.rst b/doc/source/api/watcherclient.v1.client.rst deleted file mode 100644 index e72a79b..0000000 --- a/doc/source/api/watcherclient.v1.client.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.client` Module -========================================= - -.. automodule:: watcherclient.v1.client - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.goal.rst b/doc/source/api/watcherclient.v1.goal.rst deleted file mode 100644 index f5856e2..0000000 --- a/doc/source/api/watcherclient.v1.goal.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.goal` Module -======================================= - -.. automodule:: watcherclient.v1.goal - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.goal_shell.rst b/doc/source/api/watcherclient.v1.goal_shell.rst deleted file mode 100644 index f6bfe11..0000000 --- a/doc/source/api/watcherclient.v1.goal_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.goal_shell` Module -============================================= - -.. automodule:: watcherclient.v1.goal_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.metric_collector.rst b/doc/source/api/watcherclient.v1.metric_collector.rst deleted file mode 100644 index e8028df..0000000 --- a/doc/source/api/watcherclient.v1.metric_collector.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.metric_collector` Module -=================================================== - -.. automodule:: watcherclient.v1.metric_collector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.metric_collector_shell.rst b/doc/source/api/watcherclient.v1.metric_collector_shell.rst deleted file mode 100644 index 50e64aa..0000000 --- a/doc/source/api/watcherclient.v1.metric_collector_shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.metric_collector_shell` Module -========================================================= - -.. automodule:: watcherclient.v1.metric_collector_shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.resource_fields.rst b/doc/source/api/watcherclient.v1.resource_fields.rst deleted file mode 100644 index ddc846e..0000000 --- a/doc/source/api/watcherclient.v1.resource_fields.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.resource_fields` Module -================================================== - -.. automodule:: watcherclient.v1.resource_fields - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.v1.shell.rst b/doc/source/api/watcherclient.v1.shell.rst deleted file mode 100644 index 3462b48..0000000 --- a/doc/source/api/watcherclient.v1.shell.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.v1.shell` Module -======================================== - -.. automodule:: watcherclient.v1.shell - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/api/watcherclient.version.rst b/doc/source/api/watcherclient.version.rst deleted file mode 100644 index f7f64e8..0000000 --- a/doc/source/api/watcherclient.version.rst +++ /dev/null @@ -1,7 +0,0 @@ -The :mod:`watcherclient.version` Module -======================================= - -.. automodule:: watcherclient.version - :members: - :undoc-members: - :show-inheritance: diff --git a/python_watcherclient.egg-info/PKG-INFO b/python_watcherclient.egg-info/PKG-INFO new file mode 100644 index 0000000..ccf9fdb --- /dev/null +++ b/python_watcherclient.egg-info/PKG-INFO @@ -0,0 +1,174 @@ +Metadata-Version: 1.1 +Name: python-watcherclient +Version: 1.1.0 +Summary: Python client library for Watcher API +Home-page: http://docs.openstack.org/developer/python-watcherclient +Author: OpenStack +Author-email: openstack-dev@lists.openstack.org +License: UNKNOWN +Description: ======================== + Team and repository tags + ======================== + + .. image:: http://governance.openstack.org/badges/python-watcherclient.svg + :target: http://governance.openstack.org/reference/tags/index.html + + .. Change things from this point on + + ==================== + python-watcherclient + ==================== + + Client for resource optimization service for OpenStack. + + OpenStack Watcher provides a flexible and scalable resource optimization + service for multi-tenant OpenStack-based clouds. + Watcher provides a complete optimization loop-including everything from a + metrics receiver, complex event processor and profiler, optimization processor + and an action plan applier. This provides a robust framework to realize a wide + range of cloud optimization goals, including the reduction of data center + operating costs, increased system performance via intelligent virtual machine + migration, increased energy efficiency-and more! + + * Free software: Apache license + * Wiki: http://wiki.openstack.org/wiki/Watcher + * Source: http://git.openstack.org/cgit/openstack/python-watcher + * Bugs: http://bugs.launchpad.net/watcher + + Installation + ============ + + Install the prerequisite packages + --------------------------------- + + On Ubuntu (tested on 14.04-64) + + .. code:: + + sudo apt-get install python-dev libssl-dev python-pip git-core libmysqlclient-dev libffi-dev + + On Fedora-based distributions e.g., Fedora/RHEL/CentOS/Scientific Linux (tested on CentOS 6.5) + + .. code:: + + sudo yum install python-virtualenv openssl-devel python-pip git gcc libffi-devel mysql-devel postgresql-devel + + On openSUSE-based distributions (SLES 12, openSUSE 13.1, Factory or Tumbleweed) + + .. code:: + + sudo zypper install gcc git libmysqlclient-devel libopenssl-devel postgresql-devel python-devel python-pip + + Install the Watcher client + -------------------------- + + You can install the Watcher CLI with the following command: + + .. code:: + + sudo pip install python-watcherclient + + + You can also use the `OpenStack client <http://docs.openstack.org/cli-reference/overview.html>`_ + with Watcher (our watcher plugin for OpenStack client is included in the + python-watcherclient package). To install it, you have just to run this command: + + .. code:: + + sudo pip install python-openstackclient + + Configuration + ============= + + Create a **creds** file containing your OpenStack credentials: + + .. code:: + + export OS_IDENTITY_API_VERSION=3 + export OS_AUTH_URL=http://<your-keystone-server>:5000/v3 + export OS_PROJECT_DOMAIN_ID=default + export OS_USER_DOMAIN_ID=default + export OS_USERNAME=admin + export OS_PASSWORD=<your-password> + export OS_PROJECT_NAME=<your-project-name> + + Source these credentials into your current shell session: + + .. code:: + + # source creds + + You should be able to launch the following command which gets the list of + previously created Audit Templates: + + .. code:: + + # watcher audittemplate list + + or:: + + # openstack optimize audittemplate list + +--------------------------------+------+----------------------+----------+ + | UUID | Name | Goal | Strategy | + +--------------------------------+------+----------------------+----------+ + +--------------------------------+------+----------------------+----------+ + + + You can view the entire list of available Watcher commands and options using + this command: + + .. code:: + + # watcher help + + or:: + + # openstack help optimize + + + Troubleshootings + ================ + + If any watcher command fails, you can obtain more details with the **--debug** + option : + + .. code:: + + # watcher --debug audittemplate list + + or:: + + # openstack --debug optimize audittemplate list + + + Install the openstack CLI : + + .. code:: + + # pip install python-openstackclient + + Make sure that your Openstack credentials are correct. If so, you should be able + to verify that the watcher user has been declared in your Openstack keystone : + + .. code:: + + # openstack user list + + and that the watcher endpoints have been declared as well : + + .. code:: + + # openstack endpoint list + + +Platform: UNKNOWN +Classifier: Environment :: OpenStack +Classifier: Intended Audience :: Information Technology +Classifier: Intended Audience :: System Administrators +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Operating System :: POSIX :: Linux +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.5 diff --git a/python_watcherclient.egg-info/SOURCES.txt b/python_watcherclient.egg-info/SOURCES.txt new file mode 100644 index 0000000..0d7e1f5 --- /dev/null +++ b/python_watcherclient.egg-info/SOURCES.txt @@ -0,0 +1,107 @@ +.testr.conf +AUTHORS +CONTRIBUTING.rst +ChangeLog +HACKING.rst +LICENSE +README.rst +babel.cfg +requirements.txt +setup.cfg +setup.py +test-requirements.txt +tox.ini +doc/source/api_v1.rst +doc/source/cli.rst +doc/source/conf.py +doc/source/contributing.rst +doc/source/index.rst +doc/source/installation.rst +doc/source/openstack_cli.rst +python_watcherclient.egg-info/PKG-INFO +python_watcherclient.egg-info/SOURCES.txt +python_watcherclient.egg-info/dependency_links.txt +python_watcherclient.egg-info/entry_points.txt +python_watcherclient.egg-info/not-zip-safe +python_watcherclient.egg-info/pbr.json +python_watcherclient.egg-info/requires.txt +python_watcherclient.egg-info/top_level.txt +tools/watcher.bash_completion +watcherclient/__init__.py +watcherclient/_i18n.py +watcherclient/client.py +watcherclient/exceptions.py +watcherclient/shell.py +watcherclient/version.py +watcherclient/common/__init__.py +watcherclient/common/api_versioning.py +watcherclient/common/base.py +watcherclient/common/cliutils.py +watcherclient/common/command.py +watcherclient/common/httpclient.py +watcherclient/common/utils.py +watcherclient/common/apiclient/__init__.py +watcherclient/common/apiclient/base.py +watcherclient/common/apiclient/exceptions.py +watcherclient/locale/watcherclient.pot +watcherclient/locale/fr/LC_MESSAGES/watcherclient.po +watcherclient/osc/__init__.py +watcherclient/osc/plugin.py +watcherclient/tests/README.rst +watcherclient/tests/__init__.py +watcherclient/tests/functional/__init__.py +watcherclient/tests/functional/v1/__init__.py +watcherclient/tests/functional/v1/base.py +watcherclient/tests/functional/v1/test_action.py +watcherclient/tests/functional/v1/test_action_plan.py +watcherclient/tests/functional/v1/test_audit.py +watcherclient/tests/functional/v1/test_audit_template.py +watcherclient/tests/functional/v1/test_goal.py +watcherclient/tests/functional/v1/test_scoring_engine.py +watcherclient/tests/functional/v1/test_service.py +watcherclient/tests/functional/v1/test_strategy.py +watcherclient/tests/unit/__init__.py +watcherclient/tests/unit/keystone_client_fixtures.py +watcherclient/tests/unit/test_client.py +watcherclient/tests/unit/test_import.py +watcherclient/tests/unit/test_utils.py +watcherclient/tests/unit/utils.py +watcherclient/tests/unit/common/__init__.py +watcherclient/tests/unit/common/test_api_versioning.py +watcherclient/tests/unit/v1/__init__.py +watcherclient/tests/unit/v1/base.py +watcherclient/tests/unit/v1/test_action.py +watcherclient/tests/unit/v1/test_action_plan.py +watcherclient/tests/unit/v1/test_action_plan_shell.py +watcherclient/tests/unit/v1/test_action_shell.py +watcherclient/tests/unit/v1/test_audit.py +watcherclient/tests/unit/v1/test_audit_shell.py +watcherclient/tests/unit/v1/test_audit_template.py +watcherclient/tests/unit/v1/test_audit_template_shell.py +watcherclient/tests/unit/v1/test_goal.py +watcherclient/tests/unit/v1/test_goal_shell.py +watcherclient/tests/unit/v1/test_scoring_engine.py +watcherclient/tests/unit/v1/test_scoring_engine_shell.py +watcherclient/tests/unit/v1/test_service.py +watcherclient/tests/unit/v1/test_service_shell.py +watcherclient/tests/unit/v1/test_strategy.py +watcherclient/tests/unit/v1/test_strategy_shell.py +watcherclient/v1/__init__.py +watcherclient/v1/action.py +watcherclient/v1/action_plan.py +watcherclient/v1/action_plan_shell.py +watcherclient/v1/action_shell.py +watcherclient/v1/audit.py +watcherclient/v1/audit_shell.py +watcherclient/v1/audit_template.py +watcherclient/v1/audit_template_shell.py +watcherclient/v1/client.py +watcherclient/v1/goal.py +watcherclient/v1/goal_shell.py +watcherclient/v1/resource_fields.py +watcherclient/v1/scoring_engine.py +watcherclient/v1/scoring_engine_shell.py +watcherclient/v1/service.py +watcherclient/v1/service_shell.py +watcherclient/v1/strategy.py +watcherclient/v1/strategy_shell.py
\ No newline at end of file diff --git a/python_watcherclient.egg-info/dependency_links.txt b/python_watcherclient.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/python_watcherclient.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/python_watcherclient.egg-info/entry_points.txt b/python_watcherclient.egg-info/entry_points.txt new file mode 100644 index 0000000..6b11da4 --- /dev/null +++ b/python_watcherclient.egg-info/entry_points.txt @@ -0,0 +1,61 @@ +[console_scripts] +watcher = watcherclient.shell:main + +[openstack.cli.extension] +infra_optim = watcherclient.osc.plugin + +[openstack.infra_optim.v1] +optimize_action_list = watcherclient.v1.action_shell:ListAction +optimize_action_show = watcherclient.v1.action_shell:ShowAction +optimize_actionplan_create = watcherclient.v1.action_plan_shell:CreateActionPlan +optimize_actionplan_list = watcherclient.v1.action_plan_shell:ListActionPlan +optimize_actionplan_show = watcherclient.v1.action_plan_shell:ShowActionPlan +optimize_actionplan_start = watcherclient.v1.action_plan_shell:StartActionPlan +optimize_actionplan_update = watcherclient.v1.action_plan_shell:UpdateActionPlan +optimize_audit_create = watcherclient.v1.audit_shell:CreateAudit +optimize_audit_delete = watcherclient.v1.audit_shell:DeleteAudit +optimize_audit_list = watcherclient.v1.audit_shell:ListAudit +optimize_audit_show = watcherclient.v1.audit_shell:ShowAudit +optimize_audit_update = watcherclient.v1.audit_shell:UpdateAudit +optimize_audittemplate_create = watcherclient.v1.audit_template_shell:CreateAuditTemplate +optimize_audittemplate_delete = watcherclient.v1.audit_template_shell:DeleteAuditTemplate +optimize_audittemplate_list = watcherclient.v1.audit_template_shell:ListAuditTemplate +optimize_audittemplate_show = watcherclient.v1.audit_template_shell:ShowAuditTemplate +optimize_audittemplate_update = watcherclient.v1.audit_template_shell:UpdateAuditTemplate +optimize_goal_list = watcherclient.v1.goal_shell:ListGoal +optimize_goal_show = watcherclient.v1.goal_shell:ShowGoal +optimize_scoringengine_list = watcherclient.v1.scoring_engine_shell:ListScoringEngine +optimize_scoringengine_show = watcherclient.v1.scoring_engine_shell:ShowScoringEngine +optimize_service_list = watcherclient.v1.service_shell:ListService +optimize_service_show = watcherclient.v1.service_shell:ShowService +optimize_strategy_list = watcherclient.v1.strategy_shell:ListStrategy +optimize_strategy_show = watcherclient.v1.strategy_shell:ShowStrategy + +[watcherclient.v1] +action_list = watcherclient.v1.action_shell:ListAction +action_show = watcherclient.v1.action_shell:ShowAction +actionplan_create = watcherclient.v1.action_plan_shell:CreateActionPlan +actionplan_delete = watcherclient.v1.action_plan_shell:DeleteActionPlan +actionplan_list = watcherclient.v1.action_plan_shell:ListActionPlan +actionplan_show = watcherclient.v1.action_plan_shell:ShowActionPlan +actionplan_start = watcherclient.v1.action_plan_shell:StartActionPlan +actionplan_update = watcherclient.v1.action_plan_shell:UpdateActionPlan +audit_create = watcherclient.v1.audit_shell:CreateAudit +audit_delete = watcherclient.v1.audit_shell:DeleteAudit +audit_list = watcherclient.v1.audit_shell:ListAudit +audit_show = watcherclient.v1.audit_shell:ShowAudit +audit_update = watcherclient.v1.audit_shell:UpdateAudit +audittemplate_create = watcherclient.v1.audit_template_shell:CreateAuditTemplate +audittemplate_delete = watcherclient.v1.audit_template_shell:DeleteAuditTemplate +audittemplate_list = watcherclient.v1.audit_template_shell:ListAuditTemplate +audittemplate_show = watcherclient.v1.audit_template_shell:ShowAuditTemplate +audittemplate_update = watcherclient.v1.audit_template_shell:UpdateAuditTemplate +goal_list = watcherclient.v1.goal_shell:ListGoal +goal_show = watcherclient.v1.goal_shell:ShowGoal +scoringengine_list = watcherclient.v1.scoring_engine_shell:ListScoringEngine +scoringengine_show = watcherclient.v1.scoring_engine_shell:ShowScoringEngine +service_list = watcherclient.v1.service_shell:ListService +service_show = watcherclient.v1.service_shell:ShowService +strategy_list = watcherclient.v1.strategy_shell:ListStrategy +strategy_show = watcherclient.v1.strategy_shell:ShowStrategy + diff --git a/python_watcherclient.egg-info/not-zip-safe b/python_watcherclient.egg-info/not-zip-safe new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/python_watcherclient.egg-info/not-zip-safe @@ -0,0 +1 @@ + diff --git a/python_watcherclient.egg-info/pbr.json b/python_watcherclient.egg-info/pbr.json new file mode 100644 index 0000000..7bc9054 --- /dev/null +++ b/python_watcherclient.egg-info/pbr.json @@ -0,0 +1 @@ +{"git_version": "723d39c", "is_release": true}
\ No newline at end of file diff --git a/python_watcherclient.egg-info/requires.txt b/python_watcherclient.egg-info/requires.txt new file mode 100644 index 0000000..8056f37 --- /dev/null +++ b/python_watcherclient.egg-info/requires.txt @@ -0,0 +1,10 @@ +Babel!=2.4.0,>=2.3.4 +cliff>=2.3.0 +osc-lib>=1.2.0 +oslo.i18n>=2.1.0 +oslo.utils>=3.20.0 +pbr!=2.1.0,>=2.0.0 +PrettyTable<0.8,>=0.7.1 +keystoneauth1>=2.18.0 +six>=1.9.0 +PyYAML>=3.10.0 diff --git a/python_watcherclient.egg-info/top_level.txt b/python_watcherclient.egg-info/top_level.txt new file mode 100644 index 0000000..c074475 --- /dev/null +++ b/python_watcherclient.egg-info/top_level.txt @@ -0,0 +1 @@ +watcherclient diff --git a/requirements.txt b/requirements.txt index 97beb3d..8579f94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,13 +2,13 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -Babel>=2.3.4 # BSD +Babel!=2.4.0,>=2.3.4 # BSD cliff>=2.3.0 # Apache-2.0 osc-lib>=1.2.0 # Apache-2.0 oslo.i18n>=2.1.0 # Apache-2.0 -oslo.utils>=3.18.0 # Apache-2.0 -pbr>=1.8 # Apache-2.0 +oslo.utils>=3.20.0 # Apache-2.0 +pbr!=2.1.0,>=2.0.0 # Apache-2.0 PrettyTable<0.8,>=0.7.1 # BSD -keystoneauth1>=2.17.0 # Apache-2.0 +keystoneauth1>=2.18.0 # Apache-2.0 six>=1.9.0 # MIT PyYAML>=3.10.0 # MIT @@ -1,105 +1,85 @@ [metadata] name = python-watcherclient summary = Python client library for Watcher API -description-file = - README.rst +description-file = + README.rst author = OpenStack author-email = openstack-dev@lists.openstack.org -home-page = http://docs.openstack.org/developer/python-watcherclient -classifier = - Environment :: OpenStack - Intended Audience :: Information Technology - Intended Audience :: System Administrators - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.4 - Programming Language :: Python :: 3.5 +home-page = http://docs.openstack.org/developer/python-watcherclient +classifier = + Environment :: OpenStack + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 [files] -packages = - watcherclient +packages = + watcherclient [entry_points] -console_scripts = - watcher = watcherclient.shell:main - -openstack.cli.extension = - infra_optim = watcherclient.osc.plugin - -# Entry points for the 'openstack' command -openstack.infra_optim.v1 = - optimize_goal_show = watcherclient.v1.goal_shell:ShowGoal - optimize_goal_list = watcherclient.v1.goal_shell:ListGoal - - optimize_strategy_show = watcherclient.v1.strategy_shell:ShowStrategy - optimize_strategy_list = watcherclient.v1.strategy_shell:ListStrategy - - optimize_audittemplate_show = watcherclient.v1.audit_template_shell:ShowAuditTemplate - optimize_audittemplate_list = watcherclient.v1.audit_template_shell:ListAuditTemplate - optimize_audittemplate_create = watcherclient.v1.audit_template_shell:CreateAuditTemplate - optimize_audittemplate_update = watcherclient.v1.audit_template_shell:UpdateAuditTemplate - optimize_audittemplate_delete = watcherclient.v1.audit_template_shell:DeleteAuditTemplate - - optimize_audit_show = watcherclient.v1.audit_shell:ShowAudit - optimize_audit_list = watcherclient.v1.audit_shell:ListAudit - optimize_audit_create = watcherclient.v1.audit_shell:CreateAudit - optimize_audit_update = watcherclient.v1.audit_shell:UpdateAudit - optimize_audit_delete = watcherclient.v1.audit_shell:DeleteAudit - - optimize_actionplan_show = watcherclient.v1.action_plan_shell:ShowActionPlan - optimize_actionplan_list = watcherclient.v1.action_plan_shell:ListActionPlan - optimize_actionplan_create = watcherclient.v1.action_plan_shell:CreateActionPlan - optimize_actionplan_update = watcherclient.v1.action_plan_shell:UpdateActionPlan - optimize_actionplan_start = watcherclient.v1.action_plan_shell:StartActionPlan - - optimize_action_show = watcherclient.v1.action_shell:ShowAction - optimize_action_list = watcherclient.v1.action_shell:ListAction - - optimize_scoringengine_show = watcherclient.v1.scoring_engine_shell:ShowScoringEngine - optimize_scoringengine_list = watcherclient.v1.scoring_engine_shell:ListScoringEngine - - optimize_service_show = watcherclient.v1.service_shell:ShowService - optimize_service_list = watcherclient.v1.service_shell:ListService - -# The same as above but used by the 'watcher' command -watcherclient.v1 = - goal_show = watcherclient.v1.goal_shell:ShowGoal - goal_list = watcherclient.v1.goal_shell:ListGoal - - strategy_show = watcherclient.v1.strategy_shell:ShowStrategy - strategy_list = watcherclient.v1.strategy_shell:ListStrategy - - audittemplate_show = watcherclient.v1.audit_template_shell:ShowAuditTemplate - audittemplate_list = watcherclient.v1.audit_template_shell:ListAuditTemplate - audittemplate_create = watcherclient.v1.audit_template_shell:CreateAuditTemplate - audittemplate_update = watcherclient.v1.audit_template_shell:UpdateAuditTemplate - audittemplate_delete = watcherclient.v1.audit_template_shell:DeleteAuditTemplate - - audit_show = watcherclient.v1.audit_shell:ShowAudit - audit_list = watcherclient.v1.audit_shell:ListAudit - audit_create = watcherclient.v1.audit_shell:CreateAudit - audit_update = watcherclient.v1.audit_shell:UpdateAudit - audit_delete = watcherclient.v1.audit_shell:DeleteAudit - - actionplan_show = watcherclient.v1.action_plan_shell:ShowActionPlan - actionplan_list = watcherclient.v1.action_plan_shell:ListActionPlan - actionplan_create = watcherclient.v1.action_plan_shell:CreateActionPlan - actionplan_update = watcherclient.v1.action_plan_shell:UpdateActionPlan - actionplan_start = watcherclient.v1.action_plan_shell:StartActionPlan - actionplan_delete = watcherclient.v1.action_plan_shell:DeleteActionPlan - - action_show = watcherclient.v1.action_shell:ShowAction - action_list = watcherclient.v1.action_shell:ListAction - - scoringengine_show = watcherclient.v1.scoring_engine_shell:ShowScoringEngine - scoringengine_list = watcherclient.v1.scoring_engine_shell:ListScoringEngine - - service_show = watcherclient.v1.service_shell:ShowService - service_list = watcherclient.v1.service_shell:ListService +console_scripts = + watcher = watcherclient.shell:main +openstack.cli.extension = + infra_optim = watcherclient.osc.plugin +openstack.infra_optim.v1 = + optimize_goal_show = watcherclient.v1.goal_shell:ShowGoal + optimize_goal_list = watcherclient.v1.goal_shell:ListGoal + optimize_strategy_show = watcherclient.v1.strategy_shell:ShowStrategy + optimize_strategy_list = watcherclient.v1.strategy_shell:ListStrategy + optimize_audittemplate_show = watcherclient.v1.audit_template_shell:ShowAuditTemplate + optimize_audittemplate_list = watcherclient.v1.audit_template_shell:ListAuditTemplate + optimize_audittemplate_create = watcherclient.v1.audit_template_shell:CreateAuditTemplate + optimize_audittemplate_update = watcherclient.v1.audit_template_shell:UpdateAuditTemplate + optimize_audittemplate_delete = watcherclient.v1.audit_template_shell:DeleteAuditTemplate + optimize_audit_show = watcherclient.v1.audit_shell:ShowAudit + optimize_audit_list = watcherclient.v1.audit_shell:ListAudit + optimize_audit_create = watcherclient.v1.audit_shell:CreateAudit + optimize_audit_update = watcherclient.v1.audit_shell:UpdateAudit + optimize_audit_delete = watcherclient.v1.audit_shell:DeleteAudit + optimize_actionplan_show = watcherclient.v1.action_plan_shell:ShowActionPlan + optimize_actionplan_list = watcherclient.v1.action_plan_shell:ListActionPlan + optimize_actionplan_create = watcherclient.v1.action_plan_shell:CreateActionPlan + optimize_actionplan_update = watcherclient.v1.action_plan_shell:UpdateActionPlan + optimize_actionplan_start = watcherclient.v1.action_plan_shell:StartActionPlan + optimize_action_show = watcherclient.v1.action_shell:ShowAction + optimize_action_list = watcherclient.v1.action_shell:ListAction + optimize_scoringengine_show = watcherclient.v1.scoring_engine_shell:ShowScoringEngine + optimize_scoringengine_list = watcherclient.v1.scoring_engine_shell:ListScoringEngine + optimize_service_show = watcherclient.v1.service_shell:ShowService + optimize_service_list = watcherclient.v1.service_shell:ListService +watcherclient.v1 = + goal_show = watcherclient.v1.goal_shell:ShowGoal + goal_list = watcherclient.v1.goal_shell:ListGoal + strategy_show = watcherclient.v1.strategy_shell:ShowStrategy + strategy_list = watcherclient.v1.strategy_shell:ListStrategy + audittemplate_show = watcherclient.v1.audit_template_shell:ShowAuditTemplate + audittemplate_list = watcherclient.v1.audit_template_shell:ListAuditTemplate + audittemplate_create = watcherclient.v1.audit_template_shell:CreateAuditTemplate + audittemplate_update = watcherclient.v1.audit_template_shell:UpdateAuditTemplate + audittemplate_delete = watcherclient.v1.audit_template_shell:DeleteAuditTemplate + audit_show = watcherclient.v1.audit_shell:ShowAudit + audit_list = watcherclient.v1.audit_shell:ListAudit + audit_create = watcherclient.v1.audit_shell:CreateAudit + audit_update = watcherclient.v1.audit_shell:UpdateAudit + audit_delete = watcherclient.v1.audit_shell:DeleteAudit + actionplan_show = watcherclient.v1.action_plan_shell:ShowActionPlan + actionplan_list = watcherclient.v1.action_plan_shell:ListActionPlan + actionplan_create = watcherclient.v1.action_plan_shell:CreateActionPlan + actionplan_update = watcherclient.v1.action_plan_shell:UpdateActionPlan + actionplan_start = watcherclient.v1.action_plan_shell:StartActionPlan + actionplan_delete = watcherclient.v1.action_plan_shell:DeleteActionPlan + action_show = watcherclient.v1.action_shell:ShowAction + action_list = watcherclient.v1.action_shell:ListAction + scoringengine_show = watcherclient.v1.scoring_engine_shell:ShowScoringEngine + scoringengine_list = watcherclient.v1.scoring_engine_shell:ListScoringEngine + service_show = watcherclient.v1.service_shell:ShowService + service_list = watcherclient.v1.service_shell:ListService [pbr] autodoc_index_modules = True @@ -125,3 +105,8 @@ input_file = watcherclient/locale/watcherclient.pot keywords = _ gettext ngettext l_ lazy_gettext _LI _LW _LE _LC mapping_file = babel.cfg output_file = watcherclient/locale/watcherclient.pot + +[egg_info] +tag_build = +tag_date = 0 + @@ -25,5 +25,5 @@ except ImportError: pass setuptools.setup( - setup_requires=['pbr>=1.8'], + setup_requires=['pbr>=2.0.0'], pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt index 24b5276..4f55831 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,15 +4,16 @@ coverage>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD -hacking<0.11,>=0.10.2 +hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 mock>=2.0 # BSD oslosphinx>=4.7.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0 python-subunit>=0.0.18 # Apache-2.0/BSD -sphinx!=1.3b1,<1.4,>=1.2.1 # BSD +sphinx>=1.5.1 # BSD testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=1.4.0 # MIT +tempest>=14.0.0 # Apache-2.0 # Needed for pypi packaging wheel # MIT @@ -1,6 +1,6 @@ [tox] minversion = 1.8 -envlist = py35,py34,py27,pep8 +envlist = py35,py27,pep8 skipsdist = True [testenv] @@ -29,7 +29,22 @@ commands = commands = python setup.py build_sphinx [testenv:debug] -commands = oslo_debug_helper {posargs} +commands = oslo_debug_helper -t watcherclient/tests/unit {posargs} + +[testenv:functional] +basepython = python2.7 +passenv = + OS_PROJECT_DOMAIN_NAME + OS_USER_DOMAIN_NAME + OS_PROJECT_NAME + OS_USERNAME + OS_PASSWORD + OS_AUTH_URL + OS_IDENTITY_API_VERSION + OS_IMAGE_API_VERSION +setenv = + OS_TEST_PATH = ./watcherclient/tests/functional +commands = python setup.py testr --slowest --testr-args='--concurrency=1 {posargs}' [flake8] # E123, E125 skipped as they are invalid PEP-8. diff --git a/watcherclient/_i18n.py b/watcherclient/_i18n.py index cafe853..4f370d3 100644 --- a/watcherclient/_i18n.py +++ b/watcherclient/_i18n.py @@ -30,16 +30,6 @@ _C = _translators.contextual_form # requires oslo.i18n >=2.1.0 _P = _translators.plural_form -# Translators for log levels. -# -# The abbreviated names are meant to reflect the usual use of a short -# name like '_'. The "L" is for "log" and the other letter comes from -# the level. -_LI = _translators.log_info -_LW = _translators.log_warning -_LE = _translators.log_error -_LC = _translators.log_critical - def get_available_languages(): return oslo_i18n.get_available_languages(DOMAIN) diff --git a/watcherclient/common/api_versioning.py b/watcherclient/common/api_versioning.py index 50959d9..40c546c 100644 --- a/watcherclient/common/api_versioning.py +++ b/watcherclient/common/api_versioning.py @@ -18,7 +18,7 @@ import re from oslo_utils import strutils -from watcherclient._i18n import _, _LW +from watcherclient._i18n import _ from watcherclient import exceptions LOG = logging.getLogger(__name__) @@ -202,8 +202,8 @@ def get_api_version(version_string): version_string = str(version_string) if version_string in DEPRECATED_VERSIONS: LOG.warning( - _LW("Version %(deprecated_version)s is deprecated, using " - "alternative version %(alternative)s instead."), + "Version %(deprecated_version)s is deprecated, using " + "alternative version %(alternative)s instead.", {"deprecated_version": version_string, "alternative": DEPRECATED_VERSIONS[version_string]}) version_string = DEPRECATED_VERSIONS[version_string] diff --git a/watcherclient/common/httpclient.py b/watcherclient/common/httpclient.py index 7df2326..04e9908 100644 --- a/watcherclient/common/httpclient.py +++ b/watcherclient/common/httpclient.py @@ -17,7 +17,6 @@ import copy from distutils import version import functools import hashlib -import json import logging import os import socket @@ -27,13 +26,14 @@ import time from keystoneauth1 import adapter from keystoneauth1 import exceptions as kexceptions +from oslo_serialization import jsonutils from oslo_utils import strutils import requests import six from six.moves import http_client import six.moves.urllib.parse as urlparse -from watcherclient._i18n import _, _LE, _LW +from watcherclient._i18n import _ from watcherclient import exceptions @@ -70,10 +70,10 @@ def _extract_error_json(body): """Return error_message from the HTTP response body.""" error_json = {} try: - body_json = json.loads(body) + body_json = jsonutils.loads(body) if 'error_message' in body_json: raw_msg = body_json['error_message'] - error_json = json.loads(raw_msg) + error_json = jsonutils.loads(raw_msg) except ValueError: pass @@ -185,8 +185,8 @@ def with_retries(func): try: return func(self, url, method, **kwargs) except _RETRY_EXCEPTIONS as error: - msg = (_LE("Error contacting Watcher server: %(error)s. " - "Attempt %(attempt)d of %(total)d") % + msg = ("Error contacting Watcher server: %(error)s. " + "Attempt %(attempt)d of %(total)d" % {'attempt': attempt, 'total': num_attempts, 'error': error}) @@ -382,7 +382,7 @@ class HTTPClient(VersionNegotiationMixin): kwargs['headers'].setdefault('Accept', 'application/json') if 'body' in kwargs: - kwargs['body'] = json.dumps(kwargs['body']) + kwargs['body'] = jsonutils.dumps(kwargs['body']) resp, body_iter = self._http_request(url, method, **kwargs) content_type = resp.headers.get('Content-Type') @@ -395,9 +395,9 @@ class HTTPClient(VersionNegotiationMixin): if 'application/json' in content_type: body = ''.join([chunk for chunk in body_iter]) try: - body = json.loads(body) + body = jsonutils.loads(body) except ValueError: - LOG.error(_LE('Could not decode response body as JSON')) + LOG.error('Could not decode response body as JSON') else: body = None @@ -545,7 +545,7 @@ class SessionClient(VersionNegotiationMixin, adapter.LegacyJsonAdapter): kwargs['headers'].setdefault('Accept', 'application/json') if 'body' in kwargs: - kwargs['data'] = json.dumps(kwargs.pop('body')) + kwargs['data'] = jsonutils.dumps(kwargs.pop('body')) resp = self._http_request(url, method, **kwargs) body = resp.content @@ -558,7 +558,7 @@ class SessionClient(VersionNegotiationMixin, adapter.LegacyJsonAdapter): try: body = resp.json() except ValueError: - LOG.error(_LE('Could not decode response body as JSON')) + LOG.error('Could not decode response body as JSON') else: body = None @@ -602,8 +602,8 @@ def _construct_http_client(endpoint=None, dvars = [k for k, v in ignored.items() if v] if dvars: - LOG.warning(_LW('The following arguments are ignored when using ' - 'the session to construct a client: %s'), + LOG.warning('The following arguments are ignored when using ' + 'the session to construct a client: %s', ', '.join(dvars)) return SessionClient(session=session, @@ -615,8 +615,8 @@ def _construct_http_client(endpoint=None, **kwargs) else: if kwargs: - LOG.warning(_LW('The following arguments are being ignored when ' - 'constructing the client: %s'), ', '.join(kwargs)) + LOG.warning('The following arguments are being ignored when ' + 'constructing the client: %s', ', '.join(kwargs)) return HTTPClient(endpoint=endpoint, token=token, diff --git a/watcherclient/common/utils.py b/watcherclient/common/utils.py index a11c799..4778404 100644 --- a/watcherclient/common/utils.py +++ b/watcherclient/common/utils.py @@ -17,11 +17,11 @@ from __future__ import print_function import argparse -import json import os import uuid import yaml +from oslo_serialization import jsonutils from oslo_utils import importutils from watcherclient._i18n import _ @@ -89,7 +89,7 @@ def split_and_deserialize(string): raise exc.CommandError(_('Attributes must be a list of ' 'PATH=VALUE not "%s"') % string) try: - value = json.loads(value) + value = jsonutils.loads(value) except ValueError: pass diff --git a/watcherclient/tests/functional/v1/test_action.py b/watcherclient/tests/functional/v1/test_action.py index c87a164..042aec8 100644 --- a/watcherclient/tests/functional/v1/test_action.py +++ b/watcherclient/tests/functional/v1/test_action.py @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # Copyright (c) 2016 Servionica # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/watcherclient/tests/functional/v1/test_action_plan.py b/watcherclient/tests/functional/v1/test_action_plan.py index 3f95c58..d4e4632 100644 --- a/watcherclient/tests/functional/v1/test_action_plan.py +++ b/watcherclient/tests/functional/v1/test_action_plan.py @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # Copyright (c) 2016 Servionica # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/watcherclient/tests/functional/v1/test_audit.py b/watcherclient/tests/functional/v1/test_audit.py index b5d02dc..cb935b6 100644 --- a/watcherclient/tests/functional/v1/test_audit.py +++ b/watcherclient/tests/functional/v1/test_audit.py @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # Copyright (c) 2016 Servionica # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/watcherclient/tests/functional/v1/test_audit_template.py b/watcherclient/tests/functional/v1/test_audit_template.py index b00a912..7010f13 100644 --- a/watcherclient/tests/functional/v1/test_audit_template.py +++ b/watcherclient/tests/functional/v1/test_audit_template.py @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # Copyright (c) 2016 Servionica # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/watcherclient/tests/functional/v1/test_goal.py b/watcherclient/tests/functional/v1/test_goal.py index 7005e0b..31d654f 100644 --- a/watcherclient/tests/functional/v1/test_goal.py +++ b/watcherclient/tests/functional/v1/test_goal.py @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # Copyright (c) 2016 Servionica # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/watcherclient/tests/functional/v1/test_scoring_engine.py b/watcherclient/tests/functional/v1/test_scoring_engine.py index 5c46be5..3a062b3 100644 --- a/watcherclient/tests/functional/v1/test_scoring_engine.py +++ b/watcherclient/tests/functional/v1/test_scoring_engine.py @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # Copyright (c) 2016 Servionica # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/watcherclient/tests/functional/v1/test_service.py b/watcherclient/tests/functional/v1/test_service.py index 8c4ebb7..e8e6eac 100644 --- a/watcherclient/tests/functional/v1/test_service.py +++ b/watcherclient/tests/functional/v1/test_service.py @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # Copyright (c) 2016 Servionica # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/watcherclient/tests/functional/v1/test_strategy.py b/watcherclient/tests/functional/v1/test_strategy.py index 329c382..5a75919 100644 --- a/watcherclient/tests/functional/v1/test_strategy.py +++ b/watcherclient/tests/functional/v1/test_strategy.py @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # Copyright (c) 2016 Servionica # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/watcherclient/tests/unit/common/test_api_versioning.py b/watcherclient/tests/unit/common/test_api_versioning.py index b524b6d..f2b9528 100644 --- a/watcherclient/tests/unit/common/test_api_versioning.py +++ b/watcherclient/tests/unit/common/test_api_versioning.py @@ -82,12 +82,12 @@ class APIVersionTestCase(utils.BaseTestCase): v4 = api_versioning.APIVersion("2.0") v_null = api_versioning.APIVersion() - self.assertTrue(v1 < v2) - self.assertTrue(v3 > v2) - self.assertTrue(v1 != v2) - self.assertTrue(v1 == v4) - self.assertTrue(v1 != v_null) - self.assertTrue(v_null == v_null) + self.assertLess(v1, v2) + self.assertGreater(v3, v2) + self.assertNotEqual(v1, v2) + self.assertEqual(v1, v4) + self.assertNotEqual(v1, v_null) + self.assertEqual(v_null, v_null) self.assertRaises(TypeError, v1.__le__, "2.1") def test_version_matches(self): diff --git a/watcherclient/tests/unit/keystone_client_fixtures.py b/watcherclient/tests/unit/keystone_client_fixtures.py index 562de76..a3aadb9 100644 --- a/watcherclient/tests/unit/keystone_client_fixtures.py +++ b/watcherclient/tests/unit/keystone_client_fixtures.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json +from oslo_serialization import jsonutils from oslo_utils import uuidutils from keystoneauth1.fixture import v2 as ks_v2_fixture @@ -53,11 +53,11 @@ TOKENID = uuidutils.generate_uuid(dashed=False) def _create_version_list(versions): - return json.dumps({'versions': {'values': versions}}) + return jsonutils.dumps({'versions': {'values': versions}}) def _create_single_version(version): - return json.dumps({'version': version}) + return jsonutils.dumps({'version': version}) V3_VERSION_LIST = _create_version_list([V3_VERSION, V2_VERSION]) @@ -74,8 +74,8 @@ def keystone_request_callback(request, uri, headers): return (200, headers, V3_VERSION_LIST) elif uri == BASE_URL + "/v2.0": v2_token = ks_v2_fixture.Token(token_id) - return (200, response_headers, json.dumps(v2_token)) + return (200, response_headers, jsonutils.dumps(v2_token)) elif uri == BASE_URL + "/v3": v3_token = ks_v3_fixture.Token() response_headers["X-Subject-Token"] = token_id - return (201, response_headers, json.dumps(v3_token)) + return (201, response_headers, jsonutils.dumps(v3_token)) diff --git a/watcherclient/tests/unit/v1/base.py b/watcherclient/tests/unit/v1/base.py index d8bec08..e50eebf 100644 --- a/watcherclient/tests/unit/v1/base.py +++ b/watcherclient/tests/unit/v1/base.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import shlex import mock from osc_lib import utils as oscutils +from oslo_serialization import jsonutils from watcherclient.common import httpclient from watcherclient.tests.unit import utils @@ -55,7 +55,7 @@ class CommandTestCase(utils.BaseTestCase): def run_cmd(self, cmd, formatting='json'): if formatting: formatter_arg = " -f %s" % formatting - formatter = json.loads + formatter = jsonutils.loads else: formatter_arg = '' formatter = str diff --git a/watcherclient/v1/action_plan_shell.py b/watcherclient/v1/action_plan_shell.py index 4197201..435f76e 100644 --- a/watcherclient/v1/action_plan_shell.py +++ b/watcherclient/v1/action_plan_shell.py @@ -181,13 +181,15 @@ class CreateActionPlan(command.ShowOne): required=True, dest='audit_template_uuid', metavar='<audit_template>', - help=_('ActionPlan template used for this audit (name or uuid).')) + help=_('Audit template used for this audit (name or uuid).')) parser.add_argument( '-t', '--audit_type', dest='audit_type', metavar='<audit_type>', default='ONESHOT', - help=_("ActionPlan type.")) + choices=['ONESHOT', 'CONTINUOUS'], + help=_("Audit type. It must be ONESHOT or CONTINUOUS. " + "Default is ONESHOT.")) return parser diff --git a/watcherclient/v1/strategy_shell.py b/watcherclient/v1/strategy_shell.py index 4ecf7bb..edb4e58 100644 --- a/watcherclient/v1/strategy_shell.py +++ b/watcherclient/v1/strategy_shell.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json from osc_lib import utils +from oslo_serialization import jsonutils from watcherclient._i18n import _ from watcherclient.common import command @@ -38,7 +38,7 @@ class ShowStrategy(command.ShowOne): def _format_spec(self, strategy): parameters_spec = strategy.parameters_spec.get('properties') if parameters_spec: - return json.dumps(parameters_spec, indent=2) + return jsonutils.dumps(parameters_spec, indent=2) return {} |
