summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUbuntu Git Importer <usd-importer-do-not-mail@canonical.com>2022-09-04 03:39:58 +0000
committerUbuntu Git Importer <usd-importer-do-not-mail@canonical.com>2022-09-04 03:39:58 +0000
commit236cc2f4663265420b84db3ef2ca31882ee00bd4 (patch)
tree45caf7e7ddd341cd595882afae5d03bdf2e6d349
parent4cd8d8593c477a50d6a1103233d33744ad351f98 (diff)
New upstream version 1.4.0upstream/ubuntu/1.4.0.gz
-rw-r--r--AUTHORS2
-rw-r--r--CONTRIBUTING.rst4
-rw-r--r--ChangeLog16
-rw-r--r--HACKING.rst2
-rw-r--r--PKG-INFO13
-rw-r--r--README.rst8
-rw-r--r--doc/source/cli/details.rst1012
-rw-r--r--doc/source/cli/index.rst1
-rw-r--r--doc/source/cli/watcher.rst2
-rw-r--r--doc/source/contributing.rst6
-rw-r--r--python_watcherclient.egg-info/PKG-INFO13
-rw-r--r--python_watcherclient.egg-info/SOURCES.txt1
-rw-r--r--python_watcherclient.egg-info/pbr.json2
-rw-r--r--python_watcherclient.egg-info/requires.txt10
-rw-r--r--requirements.txt10
-rw-r--r--setup.cfg2
-rw-r--r--test-requirements.txt6
-rw-r--r--watcherclient/common/utils.py16
-rw-r--r--watcherclient/tests/README.rst2
-rw-r--r--watcherclient/tests/functional/v1/base.py17
-rwxr-xr-x[-rw-r--r--]watcherclient/tests/unit/v1/test_action_shell.py3
-rw-r--r--watcherclient/v1/audit_shell.py3
-rwxr-xr-x[-rw-r--r--]watcherclient/v1/resource_fields.py4
23 files changed, 1106 insertions, 49 deletions
diff --git a/AUTHORS b/AUTHORS
index a9b5050..fd53a45 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -12,6 +12,8 @@ DeepaJon <deepak.kumar@nectechnologies.in>
Dougal Matthews <dougal@redhat.com>
Edwin Zhai <edwin.zhai@intel.com>
Flavio Percoco <flaper87@gmail.com>
+Hangdong Zhang <hdzhang@fiberhome.com>
+Hidekazu Nakamura <hid-nakamura@vf.jp.nec.com>
Jean-Emile DARTOIS <jean-emile.dartois@b-com.com>
Jeremy Liu <liujiong@gohighsec.com>
Jeremy Stanley <fungi@yuggoth.org>
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index aab7158..1b7123c 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -1,13 +1,13 @@
If you would like to contribute to the development of OpenStack,
you must follow the steps in this page:
- http://docs.openstack.org/infra/manual/developers.html
+ https://docs.openstack.org/infra/manual/developers.html
Once those steps have been completed, changes to OpenStack
should be submitted for review via the Gerrit tool, following
the workflow documented at:
- http://docs.openstack.org/infra/manual/developers.html#development-workflow
+ https://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
diff --git a/ChangeLog b/ChangeLog
index 2b1d2ea..28899a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,26 @@
CHANGES
=======
+1.4.0
+-----
+
+* Updated from global requirements
+* Fix gate-watcherclient-dsvm-functional-ubuntu-xenial job
+* Updated from global requirements
+* Updated from global requirements
+* Updated from global requirements
+* Fix to use "." to source script files
+* import content from cli-reference in openstack-manuals
+* Updated from global requirements
+* Updated from global requirements
+* Add the filed of description to shell command for action
+
1.3.0
-----
* Update .gitignore because of doc migration
+* Fix Audit Update functional test
+* Update the documentation link for doc migration
* Updated from global requirements
* Update permissions for post\_test\_hook.sh
* Update URLs in documents according to document migration
diff --git a/HACKING.rst b/HACKING.rst
index 000463b..5df386d 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -1,4 +1,4 @@
python-watcherclient Style Commandments
=======================================
-Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
+Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/
diff --git a/PKG-INFO b/PKG-INFO
index 4623190..c730811 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,11 +1,12 @@
Metadata-Version: 1.1
Name: python-watcherclient
-Version: 1.3.0
+Version: 1.4.0
Summary: Python client library for Watcher API
-Home-page: http://docs.openstack.org/developer/python-watcherclient
+Home-page: https://docs.openstack.org/python-watcherclient/latest/
Author: OpenStack
Author-email: openstack-dev@lists.openstack.org
License: UNKNOWN
+Description-Content-Type: UNKNOWN
Description: ========================
Team and repository tags
========================
@@ -31,9 +32,9 @@ Description: ========================
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
+ * Wiki: https://wiki.openstack.org/wiki/Watcher
+ * Source: https://git.openstack.org/cgit/openstack/python-watcher
+ * Bugs: https://bugs.launchpad.net/watcher
Installation
============
@@ -69,7 +70,7 @@ Description: ========================
sudo pip install python-watcherclient
- You can also use the `OpenStack client <http://docs.openstack.org/cli-reference/overview.html>`_
+ You can also use the `OpenStack client <https://docs.openstack.org/python-openstackclient/latest/>`_
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:
diff --git a/README.rst b/README.rst
index d729269..1df1d7f 100644
--- a/README.rst
+++ b/README.rst
@@ -23,9 +23,9 @@ 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
+* Wiki: https://wiki.openstack.org/wiki/Watcher
+* Source: https://git.openstack.org/cgit/openstack/python-watcher
+* Bugs: https://bugs.launchpad.net/watcher
Installation
============
@@ -61,7 +61,7 @@ You can install the Watcher CLI with the following command:
sudo pip install python-watcherclient
-You can also use the `OpenStack client <http://docs.openstack.org/cli-reference/overview.html>`_
+You can also use the `OpenStack client <https://docs.openstack.org/python-openstackclient/latest/>`_
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:
diff --git a/doc/source/cli/details.rst b/doc/source/cli/details.rst
new file mode 100644
index 0000000..8671508
--- /dev/null
+++ b/doc/source/cli/details.rst
@@ -0,0 +1,1012 @@
+.. ###################################################
+.. ## WARNING ######################################
+.. ############## WARNING ##########################
+.. ########################## WARNING ##############
+.. ###################################### WARNING ##
+.. ###################################################
+.. ###################################################
+.. ##
+.. This file is tool-generated. Do not edit manually.
+.. http://docs.openstack.org/contributor-guide/
+.. doc-tools/cli-reference.html
+.. ##
+.. ## WARNING ######################################
+.. ############## WARNING ##########################
+.. ########################## WARNING ##############
+.. ###################################### WARNING ##
+.. ###################################################
+
+=================================================================
+Infrastructure Optimization service (watcher) command-line client
+=================================================================
+
+The watcher client is the command-line interface (CLI) for the
+Infrastructure Optimization service (watcher) API
+and its extensions.
+
+This chapter documents :command:`watcher` version ``1.3.0``.
+
+For help on a specific :command:`watcher` command, enter:
+
+.. code-block:: console
+
+ $ watcher help COMMAND
+
+.. _watcher_command_usage:
+
+watcher usage
+~~~~~~~~~~~~~
+
+.. code-block:: console
+
+ usage: watcher [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]
+ [--no-auth] [--os-identity-api-version <identity-api-version>]
+ [--os-auth-url <auth-url>] [--os-region-name <region-name>]
+ [--os-username <auth-user-name>] [--os-user-id <auth-user-id>]
+ [--os-password <auth-password>]
+ [--os-user-domain-id <auth-user-domain-id>]
+ [--os-user-domain-name <auth-user-domain-name>]
+ [--os-tenant-name <auth-tenant-name>]
+ [--os-tenant-id <tenant-id>]
+ [--os-project-id <auth-project-id>]
+ [--os-project-name <auth-project-name>]
+ [--os-project-domain-id <auth-project-domain-id>]
+ [--os-project-domain-name <auth-project-domain-name>]
+ [--os-auth-token <auth-token>]
+ [--os-watcher-api-version <os-watcher-api-version>]
+ [--os-endpoint-type OS_ENDPOINT_TYPE]
+ [--os-endpoint-override <endpoint-override>] [--insecure]
+ [--os-cacert <ca-certificate>] [--os-cert <certificate>]
+ [--os-key <key>] [--timeout <seconds>]
+
+.. _watcher_command_options:
+
+watcher optional arguments
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``--version``
+ show program's version number and exit
+
+``-v, --verbose``
+ Increase verbosity of output. Can be repeated.
+
+``-q, --quiet``
+ Suppress output except warnings and errors.
+
+``--log-file LOG_FILE``
+ Specify a file to log output. Disabled by default.
+
+``-h, --help``
+ Show help message and exit.
+
+``--debug``
+ Show tracebacks on errors.
+
+``--no-auth, -N``
+ Do not use authentication.
+
+``--os-identity-api-version <identity-api-version>``
+ Specify Identity API version to use. Defaults to
+ ``env[OS_IDENTITY_API_VERSION]`` or 3.
+
+``--os-auth-url <auth-url>, -A <auth-url>``
+ Defaults to ``env[OS_AUTH_URL]``.
+
+``--os-region-name <region-name>, -R <region-name>``
+ Defaults to ``env[OS_REGION_NAME]``.
+
+``--os-username <auth-user-name>, -U <auth-user-name>``
+ Defaults to ``env[OS_USERNAME]``.
+
+``--os-user-id <auth-user-id>``
+ Defaults to ``env[OS_USER_ID]``.
+
+``--os-password <auth-password>, -P <auth-password>``
+ Defaults to ``env[OS_PASSWORD]``.
+
+``--os-user-domain-id <auth-user-domain-id>``
+ Defaults to ``env[OS_USER_DOMAIN_ID]``.
+
+``--os-user-domain-name <auth-user-domain-name>``
+ Defaults to ``env[OS_USER_DOMAIN_NAME]``.
+
+``--os-tenant-name <auth-tenant-name>, -T <auth-tenant-name>``
+ Defaults to ``env[OS_TENANT_NAME]``.
+
+``--os-tenant-id <tenant-id>, -I <tenant-id>``
+ Defaults to ``env[OS_TENANT_ID]``.
+
+``--os-project-id <auth-project-id>``
+ Another way to specify tenant ID. This option is
+ mutually exclusive with --os-tenant-id. Defaults to
+ ``env[OS_PROJECT_ID]``.
+
+``--os-project-name <auth-project-name>``
+ Another way to specify tenant name. This option is
+ mutually exclusive with --os-tenant-name. Defaults to
+ ``env[OS_PROJECT_NAME]``.
+
+``--os-project-domain-id <auth-project-domain-id>``
+ Defaults to ``env[OS_PROJECT_DOMAIN_ID]``.
+
+``--os-project-domain-name <auth-project-domain-name>``
+ Defaults to ``env[OS_PROJECT_DOMAIN_NAME]``.
+
+``--os-auth-token <auth-token>``
+ Defaults to ``env[OS_AUTH_TOKEN]``.
+
+``--os-watcher-api-version <os-watcher-api-version>``
+ Defaults to ``env[OS_WATCHER_API_VERSION]``.
+
+``--os-endpoint-type OS_ENDPOINT_TYPE``
+ Defaults to ``env[OS_ENDPOINT_TYPE]`` or "publicURL"
+
+``--os-endpoint-override <endpoint-override>``
+ Use this API endpoint instead of the Service Catalog.
+
+.. _watcher_action_list:
+
+watcher action list
+-------------------
+
+.. code-block:: console
+
+ usage: watcher action list [-h] [-f {csv,html,json,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent]
+ [--quote {all,minimal,none,nonnumeric}]
+ [--action-plan <action-plan>] [--audit <audit>]
+ [--detail] [--limit <limit>] [--sort-key <field>]
+ [--sort-dir <direction>]
+
+List information on retrieved actions.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``--action-plan <action-plan>``
+ UUID of the action plan used for filtering.
+
+``--audit <audit>``
+ UUID of the audit used for filtering.
+
+``--detail``
+ Show detailed information about actions.
+
+``--limit <limit>``
+ Maximum number of actions to return per request, 0 for
+ no limit. Default is the maximum number used by the
+ Watcher API Service.
+
+``--sort-key <field>``
+ Action field that will be used for sorting.
+
+``--sort-dir <direction>``
+ Sort direction: "asc" (the default) or "desc".
+
+.. _watcher_action_show:
+
+watcher action show
+-------------------
+
+.. code-block:: console
+
+ usage: watcher action show [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent] [--prefix PREFIX]
+ <action>
+
+Show detailed information about a given action.
+
+**Positional arguments:**
+
+``<action>``
+ UUID of the action
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_actionplan_cancel:
+
+watcher actionplan cancel
+-------------------------
+
+.. code-block:: console
+
+ usage: watcher actionplan cancel [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--prefix PREFIX]
+ <action-plan>
+
+Cancel action plan command.
+
+**Positional arguments:**
+
+``<action-plan>``
+ UUID of the action_plan.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_actionplan_create:
+
+watcher actionplan create
+-------------------------
+
+.. code-block:: console
+
+ usage: watcher actionplan create [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--prefix PREFIX] -a <audit_template>
+ [-t <audit_type>]
+
+Create new audit.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``-a <audit_template>, --audit-template <audit_template>``
+ Audit template used for this audit (name or uuid).
+
+``-t <audit_type>, --audit_type <audit_type>``
+ Audit type. It must be ONESHOT or CONTINUOUS. Default
+ is ONESHOT.
+
+.. _watcher_actionplan_delete:
+
+watcher actionplan delete
+-------------------------
+
+.. code-block:: console
+
+ usage: watcher actionplan delete [-h] <action-plan> [<action-plan> ...]
+
+Delete action plan command.
+
+**Positional arguments:**
+
+``<action-plan>``
+ UUID of the action plan
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_actionplan_list:
+
+watcher actionplan list
+-----------------------
+
+.. code-block:: console
+
+ usage: watcher actionplan list [-h] [-f {csv,html,json,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--quote {all,minimal,none,nonnumeric}]
+ [--audit <audit>] [--detail] [--limit <limit>]
+ [--sort-key <field>] [--sort-dir <direction>]
+
+List information on retrieved action plans.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``--audit <audit>``
+ UUID of an audit used for filtering.
+
+``--detail``
+ Show detailed information about action plans.
+
+``--limit <limit>``
+ Maximum number of action plans to return per request,
+ 0 for no limit. Default is the maximum number used by
+ the Watcher API Service.
+
+``--sort-key <field>``
+ Action Plan field that will be used for sorting.
+
+``--sort-dir <direction>``
+ Sort direction: "asc" (the default) or "desc".
+
+.. _watcher_actionplan_show:
+
+watcher actionplan show
+-----------------------
+
+.. code-block:: console
+
+ usage: watcher actionplan show [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--prefix PREFIX]
+ <action-plan>
+
+Show detailed information about a given action plan.
+
+**Positional arguments:**
+
+``<action-plan>``
+ UUID of the action plan
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_actionplan_start:
+
+watcher actionplan start
+------------------------
+
+.. code-block:: console
+
+ usage: watcher actionplan start [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--prefix PREFIX]
+ <action-plan>
+
+Start action plan command.
+
+**Positional arguments:**
+
+``<action-plan>``
+ UUID of the action_plan.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_actionplan_update:
+
+watcher actionplan update
+-------------------------
+
+.. code-block:: console
+
+ usage: watcher actionplan update [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--prefix PREFIX]
+ <action-plan> <op> <path=value>
+ [<path=value> ...]
+
+Update action plan command.
+
+**Positional arguments:**
+
+``<action-plan>``
+ UUID of the action_plan.
+
+``<op>``
+ Operation: 'add', 'replace', or 'remove'.
+
+``<path=value>``
+ Attribute to add, replace, or remove. Can be specified
+ multiple times. For 'remove', only <path> is
+ necessary.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_audit_create:
+
+watcher audit create
+--------------------
+
+.. code-block:: console
+
+ usage: watcher audit create [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent] [--prefix PREFIX]
+ [-t <audit_type>] [-p <name=value>]
+ [-i <interval>] [-g <goal>] [-s <strategy>]
+ [-a <audit_template>] [--auto-trigger]
+
+Create new audit.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``-t <audit_type>, --audit_type <audit_type>``
+ Audit type. It must be ONESHOT or CONTINUOUS. Default
+ is ONESHOT.
+
+``-p <name=value>, --parameter <name=value>``
+ Record strategy parameter/value metadata. Can be
+ specified multiple times.
+
+``-i <interval>, --interval <interval>``
+ Audit interval (in seconds or cron format). Cron
+ inteval can be used like: "\*/5 \* \* \* \*". Only used if
+ the audit is CONTINUOUS.
+
+``-g <goal>, --goal <goal>``
+ Goal UUID or name associated to this audit.
+
+``-s <strategy>, --strategy <strategy>``
+ Strategy UUID or name associated to this audit.
+
+``-a <audit_template>, --audit-template <audit_template>``
+ Audit template used for this audit (name or uuid).
+
+``--auto-trigger``
+ Trigger automatically action plan once audit is
+ succeeded.
+
+.. _watcher_audit_delete:
+
+watcher audit delete
+--------------------
+
+.. code-block:: console
+
+ usage: watcher audit delete [-h] <audit> [<audit> ...]
+
+Delete audit command.
+
+**Positional arguments:**
+
+``<audit>``
+ UUID of the audit
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_audit_list:
+
+watcher audit list
+------------------
+
+.. code-block:: console
+
+ usage: watcher audit list [-h] [-f {csv,html,json,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent]
+ [--quote {all,minimal,none,nonnumeric}] [--detail]
+ [--goal <goal>] [--strategy <strategy>]
+ [--limit <limit>] [--sort-key <field>]
+ [--sort-dir <direction>]
+
+List information on retrieved audits.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``--detail``
+ Show detailed information about audits.
+
+``--goal <goal>``
+ UUID or name of the goal used for filtering.
+
+``--strategy <strategy>``
+ UUID or name of the strategy used for filtering.
+
+``--limit <limit>``
+ Maximum number of audits to return per request, 0 for
+ no limit. Default is the maximum number used by the
+ Watcher API Service.
+
+``--sort-key <field>``
+ Audit field that will be used for sorting.
+
+``--sort-dir <direction>``
+ Sort direction: "asc" (the default) or "desc".
+
+.. _watcher_audit_show:
+
+watcher audit show
+------------------
+
+.. code-block:: console
+
+ usage: watcher audit show [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent] [--prefix PREFIX]
+ <audit>
+
+Show detailed information about a given audit.
+
+**Positional arguments:**
+
+``<audit>``
+ UUID of the audit
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_audit_update:
+
+watcher audit update
+--------------------
+
+.. code-block:: console
+
+ usage: watcher audit update [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent] [--prefix PREFIX]
+ <audit> <op> <path=value> [<path=value> ...]
+
+Update audit command.
+
+**Positional arguments:**
+
+``<audit>``
+ UUID of the audit.
+
+``<op>``
+ Operation: 'add', 'replace', or 'remove'.
+
+``<path=value>``
+ Attribute to add, replace, or remove. Can be specified
+ multiple times. For 'remove', only <path> is
+ necessary.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_audittemplate_create:
+
+watcher audittemplate create
+----------------------------
+
+.. code-block:: console
+
+ usage: watcher audittemplate create [-h]
+ [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--prefix PREFIX] [-s <strategy>]
+ [-d <description>] [--scope <path>]
+ <name> <goal>
+
+Create new audit template.
+
+**Positional arguments:**
+
+``<name>``
+ Name for this audit template.
+
+``<goal>``
+ Goal UUID or name associated to this audit template.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``-s <strategy>, --strategy <strategy>``
+ Strategy UUID or name associated to this audit
+ template.
+
+``-d <description>, --description <description>``
+ Description of the audit template.
+
+``--scope <path>``
+ Part of the cluster on which an audit will be done.
+ Can be provided either in yaml or json file.
+ YAML example:
+ ---- host_aggregates:
+ - id: 1
+ - id: 2
+ - id: 3
+ - availability_zones:
+ - name: AZ1
+ - name: AZ2
+ - exclude:
+ - instances:
+ - uuid: UUID1
+ - uuid: UUID2
+ - compute_nodes:
+ - name: compute1
+
+ JSON example:
+ [{'host_aggregates': [
+ {'id': 1},
+ {'id': 2},
+ {'id': 3}]},
+ {'availability_zones': [
+ {'name': 'AZ1'},
+ {'name': 'AZ2'}]},
+ {'exclude': [
+ {'instances': [
+ {'uuid': 'UUID1'},
+ {'uuid': 'UUID2'}
+ ]},
+ {'compute_nodes': [
+ {'name': 'compute1'}
+ ]}
+ ]}]
+
+.. _watcher_audittemplate_delete:
+
+watcher audittemplate delete
+----------------------------
+
+.. code-block:: console
+
+ usage: watcher audittemplate delete [-h]
+ <audit-template> [<audit-template> ...]
+
+Delete audit template command.
+
+**Positional arguments:**
+
+``<audit-template>``
+ UUID or name of the audit template
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_audittemplate_list:
+
+watcher audittemplate list
+--------------------------
+
+.. code-block:: console
+
+ usage: watcher audittemplate list [-h] [-f {csv,html,json,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--quote {all,minimal,none,nonnumeric}]
+ [--detail] [--goal <goal>]
+ [--strategy <strategy>] [--limit <limit>]
+ [--sort-key <field>]
+ [--sort-dir <direction>]
+
+List information on retrieved audit templates.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``--detail``
+ Show detailed information about audit templates.
+
+``--goal <goal>``
+ UUID or name of the goal used for filtering.
+
+``--strategy <strategy>``
+ UUID or name of the strategy used for filtering.
+
+``--limit <limit>``
+ Maximum number of audit templates to return per
+ request, 0 for no limit. Default is the maximum number
+ used by the Watcher API Service.
+
+``--sort-key <field>``
+ Audit template field that will be used for sorting.
+
+``--sort-dir <direction>``
+ Sort direction: "asc" (the default) or "desc".
+
+.. _watcher_audittemplate_show:
+
+watcher audittemplate show
+--------------------------
+
+.. code-block:: console
+
+ usage: watcher audittemplate show [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--prefix PREFIX]
+ <audit-template>
+
+Show detailed information about a given audit template.
+
+**Positional arguments:**
+
+``<audit-template>``
+ UUID or name of the audit template
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_audittemplate_update:
+
+watcher audittemplate update
+----------------------------
+
+.. code-block:: console
+
+ usage: watcher audittemplate update [-h]
+ [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--prefix PREFIX]
+ <audit-template> <op> <path=value>
+ [<path=value> ...]
+
+Update audit template command.
+
+**Positional arguments:**
+
+``<audit-template>``
+ UUID or name of the audit_template.
+
+``<op>``
+ Operation: 'add', 'replace', or 'remove'.
+
+``<path=value>``
+ Attribute to add, replace, or remove. Can be specified
+ multiple times. For 'remove', only <path> is
+ necessary.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_goal_list:
+
+watcher goal list
+-----------------
+
+.. code-block:: console
+
+ usage: watcher goal list [-h] [-f {csv,html,json,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent]
+ [--quote {all,minimal,none,nonnumeric}] [--detail]
+ [--limit <limit>] [--sort-key <field>]
+ [--sort-dir <direction>]
+
+List information on retrieved goals.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``--detail``
+ Show detailed information about each goal.
+
+``--limit <limit>``
+ Maximum number of goals to return per request, 0 for
+ no limit. Default is the maximum number used by the
+ Watcher API Service.
+
+``--sort-key <field>``
+ Goal field that will be used for sorting.
+
+``--sort-dir <direction>``
+ Sort direction: "asc" (the default) or "desc".
+
+.. _watcher_goal_show:
+
+watcher goal show
+-----------------
+
+.. code-block:: console
+
+ usage: watcher goal show [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent] [--prefix PREFIX]
+ <goal>
+
+Show detailed information about a given goal.
+
+**Positional arguments:**
+
+``<goal>``
+ UUID or name of the goal
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_scoringengine_list:
+
+watcher scoringengine list
+--------------------------
+
+.. code-block:: console
+
+ usage: watcher scoringengine list [-h] [-f {csv,html,json,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--quote {all,minimal,none,nonnumeric}]
+ [--detail] [--limit <limit>]
+ [--sort-key <field>]
+ [--sort-dir <direction>]
+
+List information on retrieved scoring engines.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``--detail``
+ Show detailed information about scoring engines.
+
+``--limit <limit>``
+ Maximum number of actions to return per request, 0 for
+ no limit. Default is the maximum number used by the
+ Watcher API Service.
+
+``--sort-key <field>``
+ Action field that will be used for sorting.
+
+``--sort-dir <direction>``
+ Sort direction: "asc" (the default) or "desc".
+
+.. _watcher_scoringengine_show:
+
+watcher scoringengine show
+--------------------------
+
+.. code-block:: console
+
+ usage: watcher scoringengine show [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>]
+ [--fit-width] [--print-empty] [--noindent]
+ [--prefix PREFIX]
+ <scoring_engine>
+
+Show detailed information about a given scoring engine.
+
+**Positional arguments:**
+
+``<scoring_engine>``
+ Name of the scoring engine
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_service_list:
+
+watcher service list
+--------------------
+
+.. code-block:: console
+
+ usage: watcher service list [-h] [-f {csv,html,json,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent]
+ [--quote {all,minimal,none,nonnumeric}] [--detail]
+ [--limit <limit>] [--sort-key <field>]
+ [--sort-dir <direction>]
+
+List information on retrieved services.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``--detail``
+ Show detailed information about each service.
+
+``--limit <limit>``
+ Maximum number of services to return per request, 0
+ for no limit. Default is the maximum number used by
+ the Watcher API Service.
+
+``--sort-key <field>``
+ Goal field that will be used for sorting.
+
+``--sort-dir <direction>``
+ Sort direction: "asc" (the default) or "desc".
+
+.. _watcher_service_show:
+
+watcher service show
+--------------------
+
+.. code-block:: console
+
+ usage: watcher service show [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent] [--prefix PREFIX]
+ <service>
+
+Show detailed information about a given service.
+
+**Positional arguments:**
+
+``<service>``
+ ID or name of the service
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+.. _watcher_strategy_list:
+
+watcher strategy list
+---------------------
+
+.. code-block:: console
+
+ usage: watcher strategy list [-h] [-f {csv,html,json,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent]
+ [--quote {all,minimal,none,nonnumeric}]
+ [--goal <goal>] [--detail] [--limit <limit>]
+ [--sort-key <field>] [--sort-dir <direction>]
+
+List information on retrieved strategies.
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
+``--goal <goal>``
+ UUID or name of the goal
+
+``--detail``
+ Show detailed information about each strategy.
+
+``--limit <limit>``
+ Maximum number of strategies to return per request, 0
+ for no limit. Default is the maximum number used by
+ the Watcher API Service.
+
+``--sort-key <field>``
+ Goal field that will be used for sorting.
+
+``--sort-dir <direction>``
+ Sort direction: "asc" (the default) or "desc".
+
+.. _watcher_strategy_show:
+
+watcher strategy show
+---------------------
+
+.. code-block:: console
+
+ usage: watcher strategy show [-h] [-f {html,json,shell,table,value,yaml}]
+ [-c COLUMN] [--max-width <integer>] [--fit-width]
+ [--print-empty] [--noindent] [--prefix PREFIX]
+ <strategy>
+
+Show detailed information about a given strategy.
+
+**Positional arguments:**
+
+``<strategy>``
+ UUID or name of the strategy
+
+**Optional arguments:**
+
+``-h, --help``
+ show this help message and exit
+
diff --git a/doc/source/cli/index.rst b/doc/source/cli/index.rst
index e75b8c3..9a3c22a 100644
--- a/doc/source/cli/index.rst
+++ b/doc/source/cli/index.rst
@@ -29,3 +29,4 @@ Once you've configured your authentication parameters, you can run
watcher
openstack_cli
+ details
diff --git a/doc/source/cli/watcher.rst b/doc/source/cli/watcher.rst
index 4500098..3e7e9ac 100644
--- a/doc/source/cli/watcher.rst
+++ b/doc/source/cli/watcher.rst
@@ -55,7 +55,7 @@ fill partially typed commands. To use this feature, source the below file
https://git.openstack.org/cgit/openstack/python-watcherclient/tree/tools/watcher.bash_completion)
to your terminal and then bash completion should work::
- $ source watcher.bash_completion
+ $ . watcher.bash_completion
To avoid doing this every time, add this to your ``.bashrc`` or copy the
watcher.bash_completion file to the default bash completion scripts directory
diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst
index 45bdc0e..a9a16a4 100644
--- a/doc/source/contributing.rst
+++ b/doc/source/contributing.rst
@@ -19,8 +19,8 @@ signed OpenStack's contributor's agreement.
.. seealso::
- * http://docs.openstack.org/infra/manual/developers.html
- * http://wiki.openstack.org/CLA
+ * https://docs.openstack.org/infra/manual/developers.html
+ * https://wiki.openstack.org/CLA
LaunchPad Project
-----------------
@@ -41,7 +41,7 @@ Project Hosting Details
-------------------------
Bug tracker
- http://launchpad.net/python-watcherclient
+ https://launchpad.net/python-watcherclient
Mailing list (prefix subjects with ``[watcher]`` for faster responses)
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
diff --git a/python_watcherclient.egg-info/PKG-INFO b/python_watcherclient.egg-info/PKG-INFO
index 4623190..c730811 100644
--- a/python_watcherclient.egg-info/PKG-INFO
+++ b/python_watcherclient.egg-info/PKG-INFO
@@ -1,11 +1,12 @@
Metadata-Version: 1.1
Name: python-watcherclient
-Version: 1.3.0
+Version: 1.4.0
Summary: Python client library for Watcher API
-Home-page: http://docs.openstack.org/developer/python-watcherclient
+Home-page: https://docs.openstack.org/python-watcherclient/latest/
Author: OpenStack
Author-email: openstack-dev@lists.openstack.org
License: UNKNOWN
+Description-Content-Type: UNKNOWN
Description: ========================
Team and repository tags
========================
@@ -31,9 +32,9 @@ Description: ========================
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
+ * Wiki: https://wiki.openstack.org/wiki/Watcher
+ * Source: https://git.openstack.org/cgit/openstack/python-watcher
+ * Bugs: https://bugs.launchpad.net/watcher
Installation
============
@@ -69,7 +70,7 @@ Description: ========================
sudo pip install python-watcherclient
- You can also use the `OpenStack client <http://docs.openstack.org/cli-reference/overview.html>`_
+ You can also use the `OpenStack client <https://docs.openstack.org/python-openstackclient/latest/>`_
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:
diff --git a/python_watcherclient.egg-info/SOURCES.txt b/python_watcherclient.egg-info/SOURCES.txt
index 59c6076..66a1e97 100644
--- a/python_watcherclient.egg-info/SOURCES.txt
+++ b/python_watcherclient.egg-info/SOURCES.txt
@@ -15,6 +15,7 @@ doc/source/conf.py
doc/source/contributing.rst
doc/source/index.rst
doc/source/installation.rst
+doc/source/cli/details.rst
doc/source/cli/index.rst
doc/source/cli/openstack_cli.rst
doc/source/cli/watcher.rst
diff --git a/python_watcherclient.egg-info/pbr.json b/python_watcherclient.egg-info/pbr.json
index 0077693..4616bd2 100644
--- a/python_watcherclient.egg-info/pbr.json
+++ b/python_watcherclient.egg-info/pbr.json
@@ -1 +1 @@
-{"git_version": "c02f584", "is_release": true} \ No newline at end of file
+{"git_version": "0fd1b11", "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
index 412a0e3..4e5fcd6 100644
--- a/python_watcherclient.egg-info/requires.txt
+++ b/python_watcherclient.egg-info/requires.txt
@@ -1,10 +1,10 @@
Babel!=2.4.0,>=2.3.4
-cliff>=2.8.0
+cliff!=2.9.0,>=2.8.0
osc-lib>=1.7.0
-oslo.i18n!=3.15.2,>=2.1.0
-oslo.utils>=3.20.0
+oslo.i18n>=3.15.3
+oslo.utils>=3.28.0
pbr!=2.1.0,>=2.0.0
PrettyTable<0.8,>=0.7.1
-keystoneauth1>=3.0.1
+keystoneauth1>=3.2.0
six>=1.9.0
-PyYAML>=3.10.0
+PyYAML>=3.10
diff --git a/requirements.txt b/requirements.txt
index 5494793..9b4fdbd 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,12 +3,12 @@
# process, which may cause wedges in the gate later.
Babel!=2.4.0,>=2.3.4 # BSD
-cliff>=2.8.0 # Apache-2.0
+cliff!=2.9.0,>=2.8.0 # Apache-2.0
osc-lib>=1.7.0 # Apache-2.0
-oslo.i18n!=3.15.2,>=2.1.0 # Apache-2.0
-oslo.utils>=3.20.0 # Apache-2.0
+oslo.i18n>=3.15.3 # Apache-2.0
+oslo.utils>=3.28.0 # Apache-2.0
pbr!=2.1.0,>=2.0.0 # Apache-2.0
PrettyTable<0.8,>=0.7.1 # BSD
-keystoneauth1>=3.0.1 # Apache-2.0
+keystoneauth1>=3.2.0 # Apache-2.0
six>=1.9.0 # MIT
-PyYAML>=3.10.0 # MIT
+PyYAML>=3.10 # MIT
diff --git a/setup.cfg b/setup.cfg
index 29f31a6..e6844ef 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,7 @@ description-file =
README.rst
author = OpenStack
author-email = openstack-dev@lists.openstack.org
-home-page = http://docs.openstack.org/developer/python-watcherclient
+home-page = https://docs.openstack.org/python-watcherclient/latest/
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
diff --git a/test-requirements.txt b/test-requirements.txt
index df1140b..b3e00be 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -5,8 +5,8 @@
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
-mock>=2.0 # BSD
-openstackdocstheme>=1.11.0 # Apache-2.0
+mock>=2.0.0 # BSD
+openstackdocstheme>=1.17.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD
sphinx>=1.6.2 # BSD
@@ -16,4 +16,4 @@ testtools>=1.4.0 # MIT
tempest>=16.1.0 # Apache-2.0
# Needed for pypi packaging
-wheel # MIT
+wheel>=0.24.0 # MIT
diff --git a/watcherclient/common/utils.py b/watcherclient/common/utils.py
index 4778404..943ba87 100644
--- a/watcherclient/common/utils.py
+++ b/watcherclient/common/utils.py
@@ -75,7 +75,7 @@ def import_versioned_module(version, submodule=None):
return importutils.import_module(module)
-def split_and_deserialize(string):
+def split_and_deserialize(string, exclude_fields=[]):
"""Split and try to JSON deserialize a string.
Gets a string with the KEY=VALUE format, split it (using '=' as the
@@ -88,10 +88,11 @@ def split_and_deserialize(string):
except ValueError:
raise exc.CommandError(_('Attributes must be a list of '
'PATH=VALUE not "%s"') % string)
- try:
- value = jsonutils.loads(value)
- except ValueError:
- pass
+ if key not in exclude_fields:
+ try:
+ value = jsonutils.loads(value)
+ except ValueError:
+ pass
return (key, value)
@@ -104,7 +105,7 @@ def args_array_to_dict(kwargs, key_to_convert):
return kwargs
-def args_array_to_patch(op, attributes):
+def args_array_to_patch(op, attributes, exclude_fields=[]):
patch = []
for attr in attributes:
# Sanitize
@@ -112,7 +113,8 @@ def args_array_to_patch(op, attributes):
attr = '/' + attr
if op in ['add', 'replace']:
- path, value = split_and_deserialize(attr)
+ path, value = split_and_deserialize(attr,
+ exclude_fields=exclude_fields)
patch.append({'op': op, 'path': path, 'value': value})
elif op == "remove":
diff --git a/watcherclient/tests/README.rst b/watcherclient/tests/README.rst
index 9b7344b..7600e1f 100644
--- a/watcherclient/tests/README.rst
+++ b/watcherclient/tests/README.rst
@@ -26,7 +26,7 @@ You need to install virtualenv, create a virtual environment and activate it::
$ pip install virtualenv
$ virtualenv watcher-env
- $ source watcher-env/bin/activate
+ $ . watcher-env/bin/activate
Then, to install Tempest you can issue the following commands::
diff --git a/watcherclient/tests/functional/v1/base.py b/watcherclient/tests/functional/v1/base.py
index 7f53139..24006b6 100644
--- a/watcherclient/tests/functional/v1/base.py
+++ b/watcherclient/tests/functional/v1/base.py
@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+import os
+
import re
import shlex
import subprocess
@@ -20,9 +22,24 @@ from tempest.lib.cli import output_parser
from tempest.lib import exceptions
+def credentials():
+ creds = {
+ '--os-username': os.environ.get('OS_USERNAME', 'admin'),
+ '--os-password': os.environ.get('OS_PASSWORD', 'secretadmin'),
+ '--os-project-name': os.environ.get('OS_PROJECT_NAME', 'admin'),
+ '--os-auth-url': os.environ.get('OS_AUTH_URL',
+ 'http://10.0.1.94/identity'),
+ '--os-project-domain-id': os.environ.get('OS_PROJECT_DOMAIN_ID',
+ 'default'),
+ '--os-user-domain-id': os.environ.get('OS_USER_DOMAIN_ID', 'default'),
+ }
+ return [x for sub in creds.items() for x in sub]
+
+
def execute(cmd, fail_ok=False, merge_stderr=False):
"""Executes specified command for the given action."""
cmdlist = shlex.split(cmd)
+ cmdlist.extend(credentials())
stdout = subprocess.PIPE
stderr = subprocess.STDOUT if merge_stderr else subprocess.PIPE
proc = subprocess.Popen(cmdlist, stdout=stdout, stderr=stderr)
diff --git a/watcherclient/tests/unit/v1/test_action_shell.py b/watcherclient/tests/unit/v1/test_action_shell.py
index cb259e3..3f06ac7 100644..100755
--- a/watcherclient/tests/unit/v1/test_action_shell.py
+++ b/watcherclient/tests/unit/v1/test_action_shell.py
@@ -30,6 +30,7 @@ ACTION_1 = {
'action_type': 'migrate',
'parents': ['239f02a5-9649-4e14-9d33-ac2bf67cb755'],
'input_parameters': {"test": 1},
+ 'description': 'test',
'created_at': datetime.datetime.now().isoformat(),
'updated_at': None,
'deleted_at': None,
@@ -42,6 +43,7 @@ ACTION_2 = {
'action_type': 'migrate',
'parents': ['67653274-eb24-c7ba-70f6-a84e73d80843'],
'input_parameters': {"test": 2},
+ 'description': 'test',
'created_at': datetime.datetime.now().isoformat(),
'updated_at': None,
'deleted_at': None,
@@ -53,6 +55,7 @@ ACTION_3 = {
'parents': [],
'state': 'PENDING',
'action_type': 'sleep',
+ 'description': 'test',
'created_at': datetime.datetime.now().isoformat(),
'updated_at': None,
'deleted_at': None,
diff --git a/watcherclient/v1/audit_shell.py b/watcherclient/v1/audit_shell.py
index c678d6c..6f48fb6 100644
--- a/watcherclient/v1/audit_shell.py
+++ b/watcherclient/v1/audit_shell.py
@@ -243,7 +243,8 @@ class UpdateAudit(command.ShowOne):
raise exceptions.ValidationError()
patch = common_utils.args_array_to_patch(
- parsed_args.op, parsed_args.attributes[0])
+ parsed_args.op, parsed_args.attributes[0],
+ exclude_fields=['/interval'])
audit = client.audit.update(parsed_args.audit, patch)
diff --git a/watcherclient/v1/resource_fields.py b/watcherclient/v1/resource_fields.py
index e34d114..7ef9802 100644..100755
--- a/watcherclient/v1/resource_fields.py
+++ b/watcherclient/v1/resource_fields.py
@@ -64,11 +64,11 @@ ACTION_PLAN_SHORT_LIST_FIELD_LABELS = ['UUID', 'Audit', 'State',
# Action
ACTION_FIELDS = ['uuid', 'created_at', 'updated_at', 'deleted_at', 'parents',
'state', 'action_plan_uuid', 'action_type',
- 'input_parameters']
+ 'input_parameters', 'description']
ACTION_FIELD_LABELS = ['UUID', 'Created At', 'Updated At', 'Deleted At',
'Parents', 'State', 'Action Plan', 'Action',
- 'Parameters']
+ 'Parameters', 'Description']
ACTION_SHORT_LIST_FIELDS = ['uuid', 'parents',
'state', 'action_plan_uuid', 'action_type']