diff -Nru python-monascaclient-1.10.0/AUTHORS python-monascaclient-1.14.0/AUTHORS --- python-monascaclient-1.10.0/AUTHORS 2018-01-22 17:26:19.000000000 +0000 +++ python-monascaclient-1.14.0/AUTHORS 2019-03-07 10:21:51.000000000 +0000 @@ -1,17 +1,25 @@ +98k <18552437190@163.com> +Adrian Czarnecki +Amir Mofakhar Andreas Jaeger Angelo Mendonca Anh Tran Artur Basiak Cao Xuan Hoang +Charles Short Christian Berendt Cindy O Neill +Corey Bryant Craig Bryant Craig Bryant Dao Cong Tien Deepak +Denis Poisson Dexter Fryar Dirk Mueller +Dobroslaw Zybort Doug Hellmann +Doug Szumski Eyal Flavio Percoco Haiwei Xu @@ -28,8 +36,10 @@ Luong Anh Tuan Mark Reynolds Michael James Hoppal +Nguyen Hai Truong Nguyen Tuong Thanh Ondřej Nový +OpenStack Release Bot Paulo Ewerton Rob Raymond Roland Hochmuth @@ -37,6 +47,7 @@ Ryan Bak Ryan Brandt SamKirsch10 +Sean McGinnis Shinya Kawabata Stefan Caraiman Steve Martinelli @@ -48,19 +59,26 @@ Tomasz Trębski Tony Breeds Victor Ion Munteanu +Vieri <15050873171@163.com> +Vu Cong Tuan Witold Bedyk ZhiQiang Fan -Zuul +ZhijunWei bklei +cao.yuan cindy oneill gecong1973 gengchc2 haali1 henriquetruta howardlee +jacky06 kornicameister lingyongxu +melissaml oneilcin +qingszhao rajat29 +ricolin venkatamahesh xhzhf diff -Nru python-monascaclient-1.10.0/ChangeLog python-monascaclient-1.14.0/ChangeLog --- python-monascaclient-1.10.0/ChangeLog 2018-01-22 17:26:19.000000000 +0000 +++ python-monascaclient-1.14.0/ChangeLog 2019-03-07 10:21:51.000000000 +0000 @@ -1,6 +1,64 @@ CHANGES ======= +1.14.0 +------ + +* Update hacking version +* Update json module to jsonutils +* add python 3.7 unit test job + +1.13.0 +------ + +* Fix alarm-definition-list in Python 3 +* Return status from running command +* Change openstack-dev to openstack-discuss +* Add Python 3.6 classifier to setup.cfg +* Add python 3.6 unit test job +* Remove setup.py check from pep8 job +* Don't quote {posargs} in tox.ini +* fix tox python3 overrides +* Use templates for docs, cover and lower-constraints +* Add using requirements.txt to tox tests run +* add python 3.6 unit test job +* switch documentation job to new PTI +* import zuul job settings from project-config +* Update reno for stable/rocky + +1.12.1 +------ + +* Clean up README.rst +* Move CLI usage examples to doc/cli directory +* Add syntax check for reStructuredText +* Restore old content of reference/index.rst + +1.12.0 +------ + +* Fix rst errors in README +* Remove unused TimingSession class +* Remove testrepository and .testr.conf +* Remove the duplicated word +* fix tox python3 overrides +* replace unicode with six.text\_type +* Switch to using stestr +* Redistribute README to doc/source +* Trivial: Update pypi url to new url + +1.11.0 +------ + +* Update pep8 checks +* Clean up tox.ini +* add lower-constraints job +* Updated from global requirements +* Update links in README +* Updated from global requirements +* Updated from global requirements +* Update reno for stable/queens + 1.10.0 ------ diff -Nru python-monascaclient-1.10.0/debian/changelog python-monascaclient-1.14.0/debian/changelog --- python-monascaclient-1.10.0/debian/changelog 2018-02-12 14:29:36.000000000 +0000 +++ python-monascaclient-1.14.0/debian/changelog 2019-03-11 21:26:46.000000000 +0000 @@ -1,3 +1,51 @@ +python-monascaclient (1.14.0-0ubuntu1~cloud0) bionic-stein; urgency=medium + + * New update for the Ubuntu Cloud Archive. + + -- Openstack Ubuntu Testing Bot Mon, 11 Mar 2019 21:26:46 +0000 + +python-monascaclient (1.14.0-0ubuntu1) disco; urgency=medium + + * New upstream release for OpenStack Stein. + * d/control: Align (Build-)Depends with upstream. + + -- Corey Bryant Mon, 11 Mar 2019 15:36:30 -0400 + +python-monascaclient (1.12.1-0ubuntu1) cosmic; urgency=low + + * Merge from Debian unstable. Remaining changes: + - d/gbp.conf: Retain for pristine-tar. + - d/control: Enable autopkgtest-pkg-python testsuite. + - d/watch: Get tarball from tarballs.openstack.org. + * New upstream release for OpenStack Rocky. + * d/control: Align (Build-)Depends with upstream. + + -- Corey Bryant Fri, 03 Aug 2018 13:16:57 -0400 + +python-monascaclient (1.10.0-3) unstable; urgency=medium + + * Fixed python3 shebang. + + -- Thomas Goirand Sun, 18 Mar 2018 18:28:05 +0000 + +python-monascaclient (1.10.0-2) unstable; urgency=medium + + * Python 3 has now priority over Python 2. + + -- Thomas Goirand Sun, 11 Mar 2018 13:11:35 +0100 + +python-monascaclient (1.10.0-1) unstable; urgency=medium + + [ Ondřej Nový ] + * d/control: Set Vcs-* to salsa.debian.org + + [ Thomas Goirand ] + * New upstream release. + * Fixed (build-)depends for this release. + * Standards-Version is now 4.1.3. + + -- Thomas Goirand Tue, 13 Feb 2018 14:39:04 +0000 + python-monascaclient (1.10.0-0ubuntu1) bionic; urgency=medium * New upstream release. @@ -22,6 +70,35 @@ -- Corey Bryant Mon, 13 Nov 2017 13:49:30 -0500 +python-monascaclient (1.7.0-2) unstable; urgency=medium + + * Uploading to unstable. + + -- Thomas Goirand Thu, 02 Nov 2017 00:20:43 +0000 + +python-monascaclient (1.7.0-1) experimental; urgency=medium + + [ Ondřej Nový ] + * Bumped debhelper compat version to 10 + + [ Daniel Baumann ] + * Updating vcs fields. + * Updating copyright format url. + * Running wrap-and-sort -bast. + * Updating maintainer field. + * Updating standards version to 4.0.0. + * Removing gbp.conf, not used anymore or should be specified in the + developers dotfiles. + * Correcting permissions in debian packaging files. + * Updating standards version to 4.0.1. + * Updating standards version to 4.1.0. + + [ Thomas Goirand ] + * New uptream release. + * Fixed (build-)depends for this release. + + -- Thomas Goirand Wed, 04 Oct 2017 21:28:25 +0200 + python-monascaclient (1.7.0-0ubuntu1) artful; urgency=medium * d/watch: Get tarball from tarballs.openstack.org. @@ -68,6 +145,29 @@ -- Corey Bryant Fri, 16 Dec 2016 11:35:35 -0500 +python-monascaclient (1.2.0-2) unstable; urgency=medium + + [ Thomas Goirand ] + * Uploading to unstable. + * Fixed missing EPOC in oslo.config (build-)depends. + + [ Ondřej Nový ] + * d/s/options: extend-diff-ignore of .gitreview + * d/control: Using OpenStack's Gerrit as VCS URLs. + + -- Thomas Goirand Wed, 20 Jul 2016 13:22:57 +0200 + +python-monascaclient (1.2.0-1) experimental; urgency=medium + + [ David Della Vecchia ] + * New upstream release. + * d/control: Align (build-)depends with upstream. + + [ Corey Bryant ] + * d/control: Bump min python-pbr to 1.8. + + -- Corey Bryant Fri, 15 Jul 2016 17:44:20 +0000 + python-monascaclient (1.2.0-0ubuntu1) yakkety; urgency=medium [ David Della Vecchia ] @@ -83,6 +183,7 @@ * Do not run dh_auto_clean. * Added missing build-depends-indep: testrepository and subunit. + * Run dh_clean. -- Thomas Goirand Sat, 11 Jun 2016 19:14:45 +0200 @@ -107,3 +208,4 @@ * Initial package (Closes: #824559). -- James Page Tue, 17 May 2016 14:06:58 +0100 + diff -Nru python-monascaclient-1.10.0/debian/control python-monascaclient-1.14.0/debian/control --- python-monascaclient-1.10.0/debian/control 2018-02-12 14:29:36.000000000 +0000 +++ python-monascaclient-1.14.0/debian/control 2019-03-11 19:36:30.000000000 +0000 @@ -2,7 +2,7 @@ Section: python Priority: optional Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: PKG OpenStack +XSBC-Original-Maintainer: Debian OpenStack Uploaders: James Page , Thomas Goirand , @@ -14,21 +14,21 @@ python-all, python-pbr (>= 2.0.0), python-setuptools, - python-sphinx (>= 1.6.2), + python-sphinx (>= 1.6.5), python3-all, python3-pbr (>= 2.0.0), python3-setuptools, - python3-sphinx (>= 1.6.2), + python3-sphinx (>= 1.6.5), Build-Depends-Indep: python-babel (>= 2.3.4), python-coverage (>= 4.0), python-fixtures (>= 3.0.0), - python-hacking (>= 0.12.0), + python-hacking (>= 1.1.0), python-iso8601 (>= 0.1.11), python-keystoneclient (>= 1:3.8.0), python-mock (>= 2.0), python-mox3 (>= 0.7.0), - python-openstackdocstheme (>= 1.17.0), + python-openstackdocstheme (>= 1.18.1), python-os-testr (>= 1.0.0), python-osc-lib (>= 1.8.0), python-oslo.concurrency (>= 3.8.0), @@ -40,23 +40,25 @@ python-oslo.service (>= 1.10.0), python-oslo.utils (>= 3.33.0), python-oslotest (>= 1:3.2.0), - python-prettytable (>= 0.7.1), + python-prettytable (>= 0.7.2), + python-reno (>= 2.5.0), python-requests (>= 2.10.0), python-requests-mock (>= 1.1), python-six (>= 1.10.0), + python-stestr (>= 1.0.0), python-testrepository (>= 0.0.18), python-testscenarios (>= 0.4), python-testtools (>= 2.2.0), - python-yaml (>= 3.10), + python-yaml (>= 3.12), python3-babel (>= 2.3.4), python3-coverage (>= 4.0), python3-fixtures (>= 3.0.0), - python3-hacking (>= 0.12.0), + python3-hacking (>= 1.1.0), python3-iso8601 (>= 0.1.11), python3-keystoneclient (>= 1:3.8.0), python3-mock (>= 2.0), python3-mox3 (>= 0.7.0), - python3-openstackdocstheme (>= 1.17.0), + python3-openstackdocstheme (>= 1.18.1), python3-os-testr (>= 1.0.0), python3-osc-lib (>= 1.8.0), python3-oslo.concurrency (>= 3.8.0), @@ -68,21 +70,24 @@ python3-oslo.service (>= 1.10.0), python3-oslo.utils (>= 3.33.0), python3-oslotest (>= 1:3.2.0), - python3-prettytable (>= 0.7.1), + python3-prettytable (>= 0.7.2), + python3-reno (>= 2.5.0), python3-requests (>= 2.10.0), python3-requests-mock (>= 1.1), python3-six (>= 1.10.0), + python3-stestr (>= 1.0.0), python3-subunit, python3-testrepository (>= 0.0.18), python3-testscenarios (>= 0.4), python3-testtools (>= 2.2.0), - python3-yaml (>= 3.10), + python3-yaml (>= 3.12), subunit, testrepository, -Standards-Version: 4.1.2 +Standards-Version: 4.1.3 Homepage: https://github.com/openstack/python-monascaclient -Vcs-Git: git://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/python-monascaclient +Vcs-Git: https://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/python-monascaclient Vcs-Browser: https://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/python-monascaclient +Testsuite: autopkgtest-pkg-python Package: python-monascaclient Architecture: all @@ -100,10 +105,10 @@ python-oslo.service (>= 1.10.0), python-oslo.utils (>= 3.33.0), python-pbr (>= 2.0.0), - python-prettytable (>= 0.7.1), + python-prettytable (>= 0.7.2), python-requests (>= 2.10.0), python-six (>= 1.10.0), - python-yaml (>= 3.10), + python-yaml (>= 3.12), ${misc:Depends}, ${python:Depends}, Description: client bindings for the Monasca API - Python 2.7 @@ -130,10 +135,10 @@ python3-oslo.service (>= 1.10.0), python3-oslo.utils (>= 3.33.0), python3-pbr (>= 2.0.0), - python3-prettytable (>= 0.7.1), + python3-prettytable (>= 0.7.2), python3-requests (>= 2.10.0), python3-six (>= 1.10.0), - python3-yaml (>= 3.10), + python3-yaml (>= 3.12), ${misc:Depends}, ${python3:Depends}, Description: client bindings for the Monasca API - Python 3.x diff -Nru python-monascaclient-1.10.0/debian/copyright python-monascaclient-1.14.0/debian/copyright --- python-monascaclient-1.10.0/debian/copyright 2018-02-12 14:29:36.000000000 +0000 +++ python-monascaclient-1.14.0/debian/copyright 2019-03-11 19:36:30.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: python-monascaclient Source: https://github.com/openstack/python-monasacaclient Files-Excluded: debian diff -Nru python-monascaclient-1.10.0/debian/python3-monascaclient.postinst python-monascaclient-1.14.0/debian/python3-monascaclient.postinst --- python-monascaclient-1.10.0/debian/python3-monascaclient.postinst 2018-02-12 14:29:36.000000000 +0000 +++ python-monascaclient-1.14.0/debian/python3-monascaclient.postinst 2019-03-11 19:36:30.000000000 +0000 @@ -3,7 +3,7 @@ set -e if [ "$1" = "configure" ] ; then - update-alternatives --install /usr/bin/monasca monasca /usr/bin/python3-monasca 200 + update-alternatives --install /usr/bin/monasca monasca /usr/bin/python3-monasca 400 fi #DEBHELPER# diff -Nru python-monascaclient-1.10.0/debian/rules python-monascaclient-1.14.0/debian/rules --- python-monascaclient-1.10.0/debian/rules 2018-02-12 14:29:36.000000000 +0000 +++ python-monascaclient-1.14.0/debian/rules 2019-03-11 19:36:30.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/make -f -UPSTREAM_GIT = git://github.com/openstack/python-monascaclient.git +UPSTREAM_GIT = https://github.com/openstack/python-monascaclient.git include /usr/share/openstack-pkg-tools/pkgos.make %: @@ -24,3 +24,6 @@ override_dh_auto_clean: echo "Do not autoclean" + +override_dh_python3: + dh_python3 --shebang=/usr/bin/python3 diff -Nru python-monascaclient-1.10.0/debian/source/options python-monascaclient-1.14.0/debian/source/options --- python-monascaclient-1.10.0/debian/source/options 2018-02-12 14:29:36.000000000 +0000 +++ python-monascaclient-1.14.0/debian/source/options 2019-03-11 19:36:30.000000000 +0000 @@ -1 +1,2 @@ extend-diff-ignore = "^[^/]*[.]egg-info/" +extend-diff-ignore = "^[.]gitreview$" diff -Nru python-monascaclient-1.10.0/doc/source/cli/index.rst python-monascaclient-1.14.0/doc/source/cli/index.rst --- python-monascaclient-1.10.0/doc/source/cli/index.rst 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/doc/source/cli/index.rst 2019-03-07 10:18:40.000000000 +0000 @@ -11,3 +11,351 @@ monasca CLI guide monasca CLI formatting monasca CLI debugging + + +Usage +----- + +You'll find complete documentation on the shell by running + +``monasca help``:: + + usage: monasca [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug] + [--os-cloud ] + [--os-region-name ] + [--os-cacert ] [--os-cert ] + [--os-key ] [--verify | --insecure] + [--os-default-domain ] + [--os-interface ] [--timing] [--os-beta-command] + [--os-auth-type ] [--os-code ] + [--os-protocol ] + [--os-project-name ] + [--os-trust-id ] + [--os-domain-name ] + [--os-user-domain-id ] + [--os-access-token-type ] + [--os-default-domain-name ] + [--os-access-token-endpoint ] + [--os-access-token ] + [--os-domain-id ] + [--os-user-domain-name ] + [--os-openid-scope ] + [--os-user-id ] + [--os-identity-provider ] + [--os-username ] [--os-auth-url ] + [--os-client-secret ] + [--os-default-domain-id ] + [--os-discovery-endpoint ] + [--os-client-id ] + [--os-project-domain-name ] + [--os-project-domain-id ] + [--os-password ] + [--os-redirect-uri ] + [--os-endpoint ] [--os-token ] + [--os-passcode ] + [--os-project-id ] + [--monasca-api-url MONASCA_API_URL] + [--monasca-api-version MONASCA_API_VERSION] + + Command-line interface to the OpenStack APIs + + 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. + --os-cloud + Cloud name in clouds.yaml (Env: OS_CLOUD) + --os-region-name + Authentication region name (Env: OS_REGION_NAME) + --os-cacert + CA certificate bundle file (Env: OS_CACERT) + --os-cert + Client certificate bundle file (Env: OS_CERT) + --os-key Client certificate key file (Env: OS_KEY) + --verify Verify server certificate (default) + --insecure Disable server certificate verification + --os-default-domain + Default domain ID, default=default. (Env: + OS_DEFAULT_DOMAIN) + --os-interface + Select an interface type. Valid interface types: + [admin, public, internal]. (Env: OS_INTERFACE) + --timing Print API call timing info + --os-beta-command Enable beta commands which are subject to change + --os-auth-type + Select an authentication type. Available types: + v2token, admin_token, v3oidcauthcode, v2password, + v3password, v3oidcaccesstoken, v3oidcpassword, token, + v3oidcclientcredentials, v3tokenlessauth, v3token, + v3totp, password. Default: selected based on --os- + username/--os-token (Env: OS_AUTH_TYPE) + --os-code + With v3oidcauthcode: OAuth 2.0 Authorization Code + (Env: OS_CODE) + --os-protocol + With v3oidcauthcode: Protocol for federated plugin + With v3oidcaccesstoken: Protocol for federated plugin + With v3oidcpassword: Protocol for federated plugin + With v3oidcclientcredentials: Protocol for federated + plugin (Env: OS_PROTOCOL) + --os-project-name + With v3oidcauthcode: Project name to scope to With + v3password: Project name to scope to With + v3oidcaccesstoken: Project name to scope to With + v3oidcpassword: Project name to scope to With token: + Project name to scope to With v3oidcclientcredentials: + Project name to scope to With v3tokenlessauth: Project + name to scope to With v3token: Project name to scope + to With v3totp: Project name to scope to With + password: Project name to scope to (Env: + OS_PROJECT_NAME) + --os-trust-id + With v2token: Trust ID With v3oidcauthcode: Trust ID + With v2password: Trust ID With v3password: Trust ID + With v3oidcaccesstoken: Trust ID With v3oidcpassword: + Trust ID With token: Trust ID With + v3oidcclientcredentials: Trust ID With v3token: Trust + ID With v3totp: Trust ID With password: Trust ID (Env: + OS_TRUST_ID) + --os-domain-name + With v3oidcauthcode: Domain name to scope to With + v3password: Domain name to scope to With + v3oidcaccesstoken: Domain name to scope to With + v3oidcpassword: Domain name to scope to With token: + Domain name to scope to With v3oidcclientcredentials: + Domain name to scope to With v3tokenlessauth: Domain + name to scope to With v3token: Domain name to scope to + With v3totp: Domain name to scope to With password: + Domain name to scope to (Env: OS_DOMAIN_NAME) + --os-user-domain-id + With v3password: User's domain id With v3totp: User's + domain id With password: User's domain id (Env: + OS_USER_DOMAIN_ID) + --os-access-token-type + With v3oidcauthcode: OAuth 2.0 Authorization Server + Introspection token type, it is used to decide which + type of token will be used when processing token + introspection. Valid values are: "access_token" or + "id_token" With v3oidcpassword: OAuth 2.0 + Authorization Server Introspection token type, it is + used to decide which type of token will be used when + processing token introspection. Valid values are: + "access_token" or "id_token" With + v3oidcclientcredentials: OAuth 2.0 Authorization + Server Introspection token type, it is used to decide + which type of token will be used when processing token + introspection. Valid values are: "access_token" or + "id_token" (Env: OS_ACCESS_TOKEN_TYPE) + --os-default-domain-name + With token: Optional domain name to use with v3 API + and v2 parameters. It will be used for both the user + and project domain in v3 and ignored in v2 + authentication. With password: Optional domain name to + use with v3 API and v2 parameters. It will be used for + both the user and project domain in v3 and ignored in + v2 authentication. (Env: OS_DEFAULT_DOMAIN_NAME) + --os-access-token-endpoint + With v3oidcauthcode: OpenID Connect Provider Token + Endpoint. Note that if a discovery document is being + passed this option will override the endpoint provided + by the server in the discovery document. With + v3oidcpassword: OpenID Connect Provider Token + Endpoint. Note that if a discovery document is being + passed this option will override the endpoint provided + by the server in the discovery document. With + v3oidcclientcredentials: OpenID Connect Provider Token + Endpoint. Note that if a discovery document is being + passed this option will override the endpoint provided + by the server in the discovery document. (Env: + OS_ACCESS_TOKEN_ENDPOINT) + --os-access-token + With v3oidcaccesstoken: OAuth 2.0 Access Token (Env: + OS_ACCESS_TOKEN) + --os-domain-id + With v3oidcauthcode: Domain ID to scope to With + v3password: Domain ID to scope to With + v3oidcaccesstoken: Domain ID to scope to With + v3oidcpassword: Domain ID to scope to With token: + Domain ID to scope to With v3oidcclientcredentials: + Domain ID to scope to With v3tokenlessauth: Domain ID + to scope to With v3token: Domain ID to scope to With + v3totp: Domain ID to scope to With password: Domain ID + to scope to (Env: OS_DOMAIN_ID) + --os-user-domain-name + With v3password: User's domain name With v3totp: + User's domain name With password: User's domain name + (Env: OS_USER_DOMAIN_NAME) + --os-openid-scope + With v3oidcauthcode: OpenID Connect scope that is + requested from authorization server. Note that the + OpenID Connect specification states that "openid" must + be always specified. With v3oidcpassword: OpenID + Connect scope that is requested from authorization + server. Note that the OpenID Connect specification + states that "openid" must be always specified. With + v3oidcclientcredentials: OpenID Connect scope that is + requested from authorization server. Note that the + OpenID Connect specification states that "openid" must + be always specified. (Env: OS_OPENID_SCOPE) + --os-user-id + With v2password: User ID to login with With + v3password: User ID With v3totp: User ID With + password: User id (Env: OS_USER_ID) + --os-identity-provider + With v3oidcauthcode: Identity Provider's name With + v3oidcaccesstoken: Identity Provider's name With + v3oidcpassword: Identity Provider's name With + v3oidcclientcredentials: Identity Provider's name + (Env: OS_IDENTITY_PROVIDER) + --os-username + With v2password: Username to login with With + v3password: Username With v3oidcpassword: Username + With v3totp: Username With password: Username (Env: + OS_USERNAME) + --os-auth-url + With v2token: Authentication URL With v3oidcauthcode: + Authentication URL With v2password: Authentication URL + With v3password: Authentication URL With + v3oidcaccesstoken: Authentication URL With + v3oidcpassword: Authentication URL With token: + Authentication URL With v3oidcclientcredentials: + Authentication URL With v3tokenlessauth: + Authentication URL With v3token: Authentication URL + With v3totp: Authentication URL With password: + Authentication URL (Env: OS_AUTH_URL) + --os-client-secret + With v3oidcauthcode: OAuth 2.0 Client Secret With + v3oidcpassword: OAuth 2.0 Client Secret With + v3oidcclientcredentials: OAuth 2.0 Client Secret (Env: + OS_CLIENT_SECRET) + --os-default-domain-id + With token: Optional domain ID to use with v3 and v2 + parameters. It will be used for both the user and + project domain in v3 and ignored in v2 authentication. + With password: Optional domain ID to use with v3 and + v2 parameters. It will be used for both the user and + project domain in v3 and ignored in v2 authentication. + (Env: OS_DEFAULT_DOMAIN_ID) + --os-discovery-endpoint + With v3oidcauthcode: OpenID Connect Discovery Document + URL. The discovery document will be used to obtain the + values of the access token endpoint and the + authentication endpoint. This URL should look like + https://idp.example.org/.well-known/openid- + configuration With v3oidcpassword: OpenID Connect + Discovery Document URL. The discovery document will be + used to obtain the values of the access token endpoint + and the authentication endpoint. This URL should look + like https://idp.example.org/.well-known/openid- + configuration With v3oidcclientcredentials: OpenID + Connect Discovery Document URL. The discovery document + will be used to obtain the values of the access token + endpoint and the authentication endpoint. This URL + should look like https://idp.example.org/.well-known + /openid-configuration (Env: OS_DISCOVERY_ENDPOINT) + --os-client-id + With v3oidcauthcode: OAuth 2.0 Client ID With + v3oidcpassword: OAuth 2.0 Client ID With + v3oidcclientcredentials: OAuth 2.0 Client ID (Env: + OS_CLIENT_ID) + --os-project-domain-name + With v3oidcauthcode: Domain name containing project + With v3password: Domain name containing project With + v3oidcaccesstoken: Domain name containing project With + v3oidcpassword: Domain name containing project With + token: Domain name containing project With + v3oidcclientcredentials: Domain name containing + project With v3tokenlessauth: Domain name containing + project With v3token: Domain name containing project + With v3totp: Domain name containing project With + password: Domain name containing project (Env: + OS_PROJECT_DOMAIN_NAME) + --os-project-domain-id + With v3oidcauthcode: Domain ID containing project With + v3password: Domain ID containing project With + v3oidcaccesstoken: Domain ID containing project With + v3oidcpassword: Domain ID containing project With + token: Domain ID containing project With + v3oidcclientcredentials: Domain ID containing project + With v3tokenlessauth: Domain ID containing project + With v3token: Domain ID containing project With + v3totp: Domain ID containing project With password: + Domain ID containing project (Env: + OS_PROJECT_DOMAIN_ID) + --os-password + With v2password: Password to use With v3password: + User's password With v3oidcpassword: Password With + password: User's password (Env: OS_PASSWORD) + --os-redirect-uri + With v3oidcauthcode: OpenID Connect Redirect URL (Env: + OS_REDIRECT_URI) + --os-endpoint + With admin_token: The endpoint that will always be + used (Env: OS_ENDPOINT) + --os-token + With v2token: Token With admin_token: The token that + will always be used With token: Token to authenticate + with With v3token: Token to authenticate with (Env: + OS_TOKEN) + --os-passcode + With v3totp: User's TOTP passcode (Env: OS_PASSCODE) + --os-project-id + With v3oidcauthcode: Project ID to scope to With + v3password: Project ID to scope to With + v3oidcaccesstoken: Project ID to scope to With + v3oidcpassword: Project ID to scope to With token: + Project ID to scope to With v3oidcclientcredentials: + Project ID to scope to With v3tokenlessauth: Project + ID to scope to With v3token: Project ID to scope to + With v3totp: Project ID to scope to With password: + Project ID to scope to (Env: OS_PROJECT_ID) + --monasca-api-url MONASCA_API_URL + Defaults to env[MONASCA_API_URL]. + --monasca-api-version MONASCA_API_VERSION + Defaults to env[MONASCA_API_VERSION] or 2_0 + + Commands: + alarm-count Count alarms. + alarm-definition-create Create an alarm definition. + alarm-definition-delete Delete the alarm definition. + alarm-definition-list List alarm definitions for this tenant. + alarm-definition-patch Patch the alarm definition. + alarm-definition-show Describe the alarm definition. + alarm-definition-update Update the alarm definition. + alarm-delete Delete the alarm. + alarm-history Alarm state transition history. + alarm-history-list List alarms state history. + alarm-list List alarms for this tenant. + alarm-patch Patch the alarm state. + alarm-show Describe the alarm. + alarm-update Update the alarm state. + complete print bash completion command + dimension-name-list List names of metric dimensions. + dimension-value-list List names of metric dimensions. + help print detailed help for another command + measurement-list List measurements for the specified metric. + metric-create Create metric. + metric-create-raw Create metric from raw json body. + metric-list List metrics for this tenant. + metric-name-list List names of metrics. + metric-statistics List measurement statistics for the specified metric. + notification-create Create notification. + notification-delete Delete notification. + notification-list List notifications for this tenant. + notification-patch Patch notification. + notification-show Describe the notification. + notification-type-list List notification types supported by monasca. + notification-update Update notification. + +Bash Completion +--------------- + +Basic command tab completion can be enabled by sourcing the bash completion +script. + +:: + + monasca completion >> /usr/local/share/monasca.bash_completion diff -Nru python-monascaclient-1.10.0/doc/source/cli/monasca-debug.rst python-monascaclient-1.14.0/doc/source/cli/monasca-debug.rst --- python-monascaclient-1.10.0/doc/source/cli/monasca-debug.rst 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/doc/source/cli/monasca-debug.rst 2019-03-07 10:18:40.000000000 +0000 @@ -7,6 +7,6 @@ client takes in order to execute the CLI command. While ``--verbose`` does not dramatically increase the output by displaying -only basic information about the the execution, ``--debug`` can be used +only basic information about the execution, ``--debug`` can be used to additionally display low-level interactions **monascaclient** make with **keystone** server and/or **monasca** server. diff -Nru python-monascaclient-1.10.0/doc/source/cli/monasca.rst python-monascaclient-1.14.0/doc/source/cli/monasca.rst --- python-monascaclient-1.10.0/doc/source/cli/monasca.rst 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/doc/source/cli/monasca.rst 2019-03-07 10:18:40.000000000 +0000 @@ -90,3 +90,135 @@ export OS_URL=http://monasca.example.org:8070/ export OS_TOKEN=3bcc3d3a03f44e3d8377f9247b0ad155 + +Usage Examples +---------------- + +metric-create:: + + monasca metric-create cpu1 123.40 + monasca metric-create metric1 1234.56 --dimensions instance_id=123,service=ourservice + monasca metric-create metric1 2222.22 --dimensions instance_id=123,service=ourservice + monasca metric-create metric1 3333.33 --dimensions instance_id=222,service=ourservice + monasca metric-create metric1 4444.44 --dimensions instance_id=222 --value-meta rc=404 + +metric-list:: + + monasca metric-list + +---------+--------------------+ + | name | dimensions | + +---------+--------------------+ + | cpu1 | | + | metric1 | instance_id:123 | + | | service:ourservice | + +---------+--------------------+ + +measurement-list:: + + monasca measurement-list metric1 2014-01-01T00:00:00Z + +---------+--------------------+----------------+----------------------+--------------+-------------+ + | name | dimensions | measurement_id | timestamp | value | value_meta | + +---------+--------------------+----------------+----------------------+--------------+-------------+ + | metric1 | instance_id:123 | 723885 | 2014-05-08T21:46:32Z | 1234.56 | | + | | service:ourservice | 725951 | 2014-05-08T21:48:50Z | 2222.22 | | + | metric1 | instance_id:222 | 726837 | 2014-05-08T21:49:47Z | 3333.33 | | + | | service:ourservice | 726983 | 2014-05-08T21:50:27Z | 4444.44 | rc: 404 | + +---------+--------------------+----------------+----------------------+--------------+-------------+ + + monasca measurement-list metric1 2014-01-01T00:00:00Z --dimensions instance_id=123 + +---------+--------------------+----------------+----------------------+--------------+-------------+ + | name | dimensions | measurement_id | timestamp | value | value_meta | + +---------+--------------------+----------------+----------------------+--------------+-------------+ + | metric1 | instance_id:123 | 723885 | 2014-05-08T21:46:32Z | 1234.56 | | + | | service:ourservice | 725951 | 2014-05-08T21:48:50Z | 2222.22 | | + +---------+--------------------+----------------+----------------------+--------------+-------------+ + + +Notifications Examples +~~~~~~~~~~~~~~~~~~~~~~ +Note: To see complete usage: 'monasca help' and 'monasca help ' + +notification-create:: + + monasca notification-create cindyemail1 EMAIL cindy.employee@hp.com + monasca notification-create myapplication WEBHOOK http://localhost:5000 + monasca notification-create mypagerduty PAGERDUTY nzH2LVRdMzun11HNC2oD + +notification-list:: + + monasca notification-list + +---------------+--------------------------------------+-------+----------------------+ + | name | id | type | address | + +---------------+--------------------------------------+-------+----------------------+ + | cindyemail1 | 5651406c-447d-40bd-b868-b2b3e6b59e32 | EMAIL |cindy.employee@hp.com | + | myapplication | 55905ce2-91e3-41ce-b45a-de7032f8d718 | WEBHOOK |http://localhost:5000 + | mypagerduty | 5720ccb5-6a3d-22ba-545g-ce467a5b41a2 | PAGERDUTY |nzH2LVRdMzun11HNC2oD + +---------------+--------------------------------------+-------+----------------------+ + + +Alarms Examples +~~~~~~~~~~~~~~~ +Note: To see complete usage: 'monasca help' and 'monasca help ' + +alarm-definition-create:: + + monasca alarm-definition-create alarmPerHost "max(cpu.load_avg_1_min) > 0" --match-by hostname + +alarm-definition-list:: + + +--------------+--------------------------------------+-----------------------------+----------+-----------------+ + | name | id | expression | match_by | actions_enabled | + +--------------+--------------------------------------+-----------------------------+----------+-----------------+ + | alarmPerHost | 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 | max(cpu.load_avg_1_min) > 0 | hostname | True | + +--------------+--------------------------------------+-----------------------------+----------+-----------------+ + +alarm-definition-show:: + + monasca alarm-definition-show 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 + +----------------------+----------------------------------------------------------------------------------------------------+ + | Property | Value | + +----------------------+----------------------------------------------------------------------------------------------------+ + | actions_enabled | true | + | alarm_actions | [] | + | description | "" | + | expression | "max(cpu.load_avg_1_min) > 0" | + | id | "4bf6bfc2-c5ac-4d57-b7db-cf5313b05412" | + | links | href:http://192.168.10.4:8070/v2.0/alarm-definitions/4bf6bfc2-c5ac-4d57-b7db-cf5313b05412,rel:self | + | match_by | [ | + | | "hostname" | + | | ] | + | name | "alarmPerHost" | + | ok_actions | [] | + | severity | "LOW" | + | undetermined_actions | [] | + +----------------------+----------------------------------------------------------------------------------------------------+ + +alarm-definition-delete:: + + monasca alarm-definition-delete 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 + +alarm-list:: + + monasca alarm-list + +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ + | id | alarm_definition_id | alarm_name | metric_name | metric_dimensions | severity | state | state_updated_timestamp | created_timestamp | + +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ + | 11e8c15d-0263-4b71-a8b8-4ecdaeb2902c | af1f347b-cddb-46da-b7cc-924261eeecdf | High CPU usage | cpu.idle_perc | hostname: devstack | LOW | OK | 2015-03-26T21:45:15.000Z | 2015-03-26T21:41:50.000Z | + | e5797cfe-b66e-4d44-98cd-3c7fc62d4c33 | af1f347b-cddb-46da-b7cc-924261eeecdf | High CPU usage | cpu.idle_perc | hostname: mini-mon | LOW | OK | 2015-03-26T21:43:15.000Z | 2015-03-26T21:41:47.000Z | + | | | | | service: monitoring | | | | | + +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ + +alarm-history:: + + monasca alarm-history 9d748b72-939b-45e7-a807-c0c5ad88d3e4 + +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ + | alarm_id | new_state | old_state | reason | reason_data | metric_name | metric_dimensions | timestamp | + +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ + | 9d748b72-939b-45e7-a807-c0c5ad88d3e4 | ALARM | UNDETERMINED | Thresholds were exceeded for the sub-alarms: [max(cpu.load_avg_1_min) > 0.0] | {} | cpu.load_avg_1_min | hostname: mini-mon | 2014-10-14T21:14:11.000Z | + | | | | | | | service: monitoring | | + +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ + + +alarm-patch:: + + monasca alarm-patch fda5537b-1550-435f-9d6c-262b7e05065b --state OK diff -Nru python-monascaclient-1.10.0/doc/source/index.rst python-monascaclient-1.14.0/doc/source/index.rst --- python-monascaclient-1.10.0/doc/source/index.rst 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/doc/source/index.rst 2019-03-07 10:18:40.000000000 +0000 @@ -25,6 +25,7 @@ .. toctree:: :maxdepth: 2 + installation cli/index reference/index diff -Nru python-monascaclient-1.10.0/doc/source/installation.rst python-monascaclient-1.14.0/doc/source/installation.rst --- python-monascaclient-1.10.0/doc/source/installation.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-monascaclient-1.14.0/doc/source/installation.rst 2019-03-07 10:18:40.000000000 +0000 @@ -0,0 +1,20 @@ +============ +Installation +============ + +At the command line, from PyPI:: + + $ pip install python-monascaclient + +Or, if you have virtualenvwrapper installed:: + + $ mkvirtualenv python-monascaclient + $ pip install python-monascaclient + +Or, you can build it manually:: + + $ mkvirtualenv python-monascaclient + $ git clone git://git.openstack.org/openstack/python-monascaclient + $ cd python-monascaclient + $ pip install -r ./requirements.txt + $ python setup.py install diff -Nru python-monascaclient-1.10.0/HACKING.rst python-monascaclient-1.14.0/HACKING.rst --- python-monascaclient-1.10.0/HACKING.rst 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/HACKING.rst 2019-03-07 10:18:40.000000000 +0000 @@ -1,4 +1,4 @@ python-monascaclient Style Commandments -=============================================== +======================================= Read the OpenStack Style Commandments http://docs.openstack.org/hacking/latest diff -Nru python-monascaclient-1.10.0/lower-constraints.txt python-monascaclient-1.14.0/lower-constraints.txt --- python-monascaclient-1.10.0/lower-constraints.txt 1970-01-01 00:00:00.000000000 +0000 +++ python-monascaclient-1.14.0/lower-constraints.txt 2019-03-07 10:18:40.000000000 +0000 @@ -0,0 +1,77 @@ +alabaster==0.7.10 +appdirs==1.3.0 +Babel==2.3.4 +bandit==1.4.0 +chardet==3.0.4 +cliff==2.8.0 +cmd2==0.8.0 +coverage==4.0 +debtcollector==1.2.0 +decorator==3.4.0 +deprecation==1.0 +doc8==0.6.0 +docutils==0.11 +dogpile.cache==0.6.2 +dulwich==0.15.0 +extras==1.0.0 +fixtures==3.0.0 +flake8==2.5.5 +future==0.16.0 +gitdb==0.6.4 +GitPython==1.0.1 +hacking==1.1.0 +imagesize==0.7.1 +iso8601==0.1.11 +Jinja2==2.10 +jmespath==0.9.0 +jsonpatch==1.16 +jsonpointer==1.13 +keystoneauth1==3.4.0 +linecache2==1.0.0 +MarkupSafe==1.0 +mccabe==0.2.1 +mock==2.0.0 +monotonic==0.6 +mox3==0.20.0 +msgpack-python==0.4.0 +munch==2.1.0 +netaddr==0.7.18 +netifaces==0.10.4 +openstackdocstheme==1.18.1 +openstacksdk==0.11.2 +os-client-config==1.28.0 +os-service-types==1.2.0 +os-testr==1.0.0 +osc-lib==1.8.0 +oslo.i18n==3.15.3 +oslo.serialization==2.18.0 +oslo.utils==3.33.0 +oslotest==3.2.0 +pbr==2.0.0 +pep8==1.5.7 +prettytable==0.7.2 +pyflakes==0.8.1 +Pygments==2.2.0 +pyparsing==2.1.0 +pyperclip==1.5.27 +python-mimeparse==1.6.0 +python-subunit==1.0.0 +pytz==2013.6 +PyYAML==3.12 +reno==2.5.0 +requests==2.14.2 +requestsexceptions==1.2.0 +restructuredtext-lint==1.1.1 +simplejson==3.5.1 +six==1.10.0 +smmap==0.9.0 +snowballstemmer==1.2.1 +Sphinx==1.6.5 +sphinxcontrib-websupport==1.0.1 +stestr==1.0.0 +stevedore==1.20.0 +testscenarios==0.4 +testtools==2.2.0 +traceback2==1.4.0 +unittest2==1.1.0 +wrapt==1.7.0 diff -Nru python-monascaclient-1.10.0/monascaclient/client.py python-monascaclient-1.14.0/monascaclient/client.py --- python-monascaclient-1.10.0/monascaclient/client.py 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/monascaclient/client.py 2019-03-07 10:18:40.000000000 +0000 @@ -19,7 +19,6 @@ from keystoneauth1 import identity from keystoneauth1 import session as k_session -from osc_lib import session as o_session from monascaclient.osc import migration from monascaclient import version @@ -53,15 +52,14 @@ :type kwargs: dict :returns: session object - :rtype union(keystoneauth1.session.Session, osc_lib.session.TimingSession) + :rtype keystoneauth1.session.Session """ if 'session' in kwargs: LOG.debug('Reusing session') sess = kwargs.get('session') - expected_cls = (k_session.Session, o_session.TimingSession) - if not isinstance(sess, expected_cls): - msg = ('session should be an instance of [%s, %s]' % expected_cls) + if not isinstance(sess, k_session.Session): + msg = ('session should be an instance of %s' % k_session.Session) LOG.error(msg) raise RuntimeError(msg) else: diff -Nru python-monascaclient-1.10.0/monascaclient/common/utils.py python-monascaclient-1.14.0/monascaclient/common/utils.py --- python-monascaclient-1.10.0/monascaclient/common/utils.py 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/monascaclient/common/utils.py 2019-03-07 10:18:40.000000000 +0000 @@ -18,6 +18,7 @@ import numbers import prettytable +import six import yaml from osc_lib import exceptions as exc @@ -77,7 +78,7 @@ caching=False, print_empty=False) pt.align = 'l' - for field in d.keys(): + for field in d: if field in formatters: pt.add_row([field, formatters[field](d[field])]) else: @@ -192,9 +193,9 @@ def format_list(in_list): string_list = list() for k in in_list: - if isinstance(k, unicode): + if isinstance(k, six.text_type): key = k.encode('utf-8') else: key = k string_list.append(key) - return '\n'.join(string_list) + return b'\n'.join(string_list) diff -Nru python-monascaclient-1.10.0/monascaclient/shell.py python-monascaclient-1.14.0/monascaclient/shell.py --- python-monascaclient-1.10.0/monascaclient/shell.py 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/monascaclient/shell.py 2019-03-07 10:18:40.000000000 +0000 @@ -106,7 +106,7 @@ encoding = locale.getpreferredencoding() if encoding: args = map(lambda arg: arg.decode(encoding), args) - MonascaShell().run(args) + return MonascaShell().run(args) except Exception as e: if '--debug' in args or '-d' in args: raise diff -Nru python-monascaclient-1.10.0/monascaclient/tests/v2_0/shell/test_alarm_definitions.py python-monascaclient-1.14.0/monascaclient/tests/v2_0/shell/test_alarm_definitions.py --- python-monascaclient-1.10.0/monascaclient/tests/v2_0/shell/test_alarm_definitions.py 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/monascaclient/tests/v2_0/shell/test_alarm_definitions.py 2019-03-07 10:18:40.000000000 +0000 @@ -72,6 +72,37 @@ ) @mock.patch('monascaclient.osc.migration.make_client') + def test_alarm_definitions_list(self, mc): + mc.return_value = c = FakeV2Client() + + c.alarm_definitions.list.return_value = [{ + "name": "ntp_sync_check", + "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "expression": "(max(ntp.offset{}, deterministic)>=1)", + "match_by": ['hostname'], + "description": "NTP time sync check", + "actions_enabled": True, + "deterministic": True, + "alarm_actions": ['aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'], + "ok_actions": [], + "undetermined_actions": [], + "severity": "HIGH", + }] + + name, cmd_class = migr.create_command_class( + 'do_alarm_definition_list', + shell + ) + cmd = cmd_class(mock.Mock(), mock.Mock()) + + parser = cmd.get_parser(name) + raw_args = [] + parsed_args = parser.parse_args(raw_args) + cmd.run(parsed_args) + + c.alarm_definitions.list.assert_called_once() + + @mock.patch('monascaclient.osc.migration.make_client') def test_should_patch_name(self, mc): ad_id = '0495340b-58fd-4e1c-932b-5e6f9cc96490' ad_name = 'patch_name' diff -Nru python-monascaclient-1.10.0/monascaclient/v2_0/__init__.py python-monascaclient-1.14.0/monascaclient/v2_0/__init__.py --- python-monascaclient-1.10.0/monascaclient/v2_0/__init__.py 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/monascaclient/v2_0/__init__.py 2019-03-07 10:18:40.000000000 +0000 @@ -13,6 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -__all__ = ['Client'] - from monascaclient.v2_0.client import Client + +__all__ = ['Client'] diff -Nru python-monascaclient-1.10.0/monascaclient/v2_0/shell.py python-monascaclient-1.14.0/monascaclient/v2_0/shell.py --- python-monascaclient-1.10.0/monascaclient/v2_0/shell.py 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/monascaclient/v2_0/shell.py 2019-03-07 10:18:40.000000000 +0000 @@ -15,7 +15,6 @@ # limitations under the License. import datetime -import json import numbers import time @@ -91,7 +90,7 @@ @utils.arg('jsonbody', metavar='', - type=json.loads, + type=jsonutils.loads, help='The raw JSON body in single quotes. See api doc.') def do_metric_create_raw(mc, args): '''Create metric from raw json body.''' @@ -151,7 +150,8 @@ 'that confuse the CLI parser.', action='append') @utils.arg('--starttime', metavar='', - help='measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR Format: -120 (previous 120 minutes).') + help='measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR' + ' Format: -120 (previous 120 minutes).') @utils.arg('--endtime', metavar='', help='measurements <= UTC time. format: 2014-01-01T00:00:00Z.') @utils.arg('--offset', metavar='', @@ -376,7 +376,8 @@ 'that confuse the CLI parser.', action='append') @utils.arg('starttime', metavar='', - help='measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR Format: -120 (previous 120 minutes).') + help='measurements >= UTC time. format: 2014-01-01T00:00:00Z.' + ' OR Format: -120 (previous 120 minutes).') @utils.arg('--endtime', metavar='', help='measurements <= UTC time. format: 2014-01-01T00:00:00Z.') @utils.arg('--offset', metavar='', @@ -455,7 +456,8 @@ 'that confuse the CLI parser.', action='append') @utils.arg('starttime', metavar='', - help='measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR Format: -120 (previous 120 minutes).') + help='measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR' + ' Format: -120 (previous 120 minutes).') @utils.arg('--endtime', metavar='', help='measurements <= UTC time. format: 2014-01-01T00:00:00Z.') @utils.arg('--period', metavar='', @@ -880,7 +882,8 @@ if len(field_values) > 2: print("Invalid sort_by value {}".format(field)) if field_values[0] not in allowed_definition_sort_by: - print("Sort-by field name {} is not in [{}]".format(field_values[0], allowed_definition_sort_by)) + print("Sort-by field name {} is not in [{}]".format(field_values[0], + allowed_definition_sort_by)) return if len(field_values) > 1 and field_values[1] not in ['asc', 'desc']: print("Invalid value {}, must be asc or desc".format(field_values[1])) @@ -1023,7 +1026,8 @@ if args.ok_actions: fields['ok_actions'] = _arg_split_patch_update(args.ok_actions, patch=True) if args.undetermined_actions: - fields['undetermined_actions'] = _arg_split_patch_update(args.undetermined_actions, patch=True) + fields['undetermined_actions'] = _arg_split_patch_update(args.undetermined_actions, + patch=True) if args.actions_enabled: if args.actions_enabled not in enabled_types: errmsg = ('Invalid value, not one of [' + @@ -1112,7 +1116,8 @@ if len(field_values) > 2: print("Invalid sort_by value {}".format(field)) if field_values[0] not in allowed_alarm_sort_by: - print("Sort-by field name {} is not in [{}]".format(field_values[0], allowed_alarm_sort_by)) + print("Sort-by field name {} is not in [{}]".format(field_values[0], + allowed_alarm_sort_by)) return if len(field_values) > 1 and field_values[1] not in ['asc', 'desc']: print("Invalid value {}, must be asc or desc".format(field_values[1])) @@ -1125,9 +1130,9 @@ if args.json: print(utils.json_formatter(alarm)) return - cols = ['id', 'alarm_definition_id', 'alarm_definition_name', 'metric_name', 'metric_dimensions', - 'severity', 'state', 'lifecycle_state', 'link', 'state_updated_timestamp', - 'updated_timestamp', "created_timestamp"] + cols = ['id', 'alarm_definition_id', 'alarm_definition_name', 'metric_name', + 'metric_dimensions', 'severity', 'state', 'lifecycle_state', 'link', + 'state_updated_timestamp', 'updated_timestamp', "created_timestamp"] formatters = { 'id': lambda x: x['id'], 'alarm_definition_id': lambda x: x['alarm_definition']['id'], @@ -1389,7 +1394,8 @@ 'that confuse the CLI parser.', action='append') @utils.arg('--starttime', metavar='', - help='measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR format: -120 (previous 120 minutes).') + help='measurements >= UTC time. format: 2014-01-01T00:00:00Z. OR' + ' format: -120 (previous 120 minutes).') @utils.arg('--endtime', metavar='', help='measurements <= UTC time. format: 2014-01-01T00:00:00Z.') @utils.arg('--offset', metavar='', diff -Nru python-monascaclient-1.10.0/PKG-INFO python-monascaclient-1.14.0/PKG-INFO --- python-monascaclient-1.10.0/PKG-INFO 2018-01-22 17:26:21.000000000 +0000 +++ python-monascaclient-1.14.0/PKG-INFO 2019-03-07 10:21:51.000000000 +0000 @@ -1,698 +1,41 @@ Metadata-Version: 1.1 Name: python-monascaclient -Version: 1.10.0 +Version: 1.14.0 Summary: Monasca API Client Library Home-page: https://docs.openstack.org/python-monascaclient/latest/ Author: OpenStack -Author-email: openstack-dev@lists.openstack.org +Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN -Description-Content-Type: UNKNOWN Description: ======================== Team and repository tags ======================== - .. image:: https://governance.openstack.org/badges/python-monascaclient.svg - :target: https://governance.openstack.org/reference/tags/index.html + .. image:: https://governance.openstack.org/tc/badges/python-monascaclient.svg + :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on Python bindings to the Monasca API - ======================================= + ================================== - This is a client library for Monasca built to interface with the Monasca API. It - provides a Python API (the ``monascaclient`` module) and a command-line tool - (``monasca``). - - The Monasca Client was written using the OpenStack Heat Python client as a framework. - - .. contents:: Contents: - :local: - - Ubuntu Install - -------------- - Requires: - - pip - version >= 1.4. python get-pip.py - - See versions on PYPI: - https://pypi.python.org/pypi/python-monascaclient/ - - Install It: - - sudo pip install python-monascaclient - - Alternative Manual Install Steps: - - cd to your python-monascaclient repo - - sudo pip install -r requirements.txt - - python setup.py install - - Building and Packaging - ---------------------- - Install the tool dependencies - sudo apt-get install python-pip python-virtualenv - - In the python-monascaclient source directory - virtualenv --no-site-packages .venv - - source ./.venv/bin/activate - - pip install wheel - - python setup.py bdist_wheel - - pip install $(ls -1rt dist/*.whl | tail -1) --upgrade - - Command-line API - ---------------- - Installing this distribution gets you a shell command, ``monasca``, that you - can use to interact with the Monitoring API server. - - Usage: - monasca - - monasca help - - monasca help - - This outputs the results in json format. Normally output is in table format. - - - The monascaclient CLI needs the Monasca API endpoint url and the OS_AUTH_TOKEN to pass to the - Monasca API RESTful interface. This is provided through environment or CLI - parameters. - - Environmental Variables - ======================= - - Environmental variables can be sourced, or optionally passed in as CLI arguments. - It is easiest to source them first and then use the CLI. - - When token and endpoint are known:: - - export OS_AUTH_TOKEN=XXX - export MONASCA_API_URL=http://192.168.10.4:8070/v2.0/ - - When using Keystone to obtain the token and endpoint:: - - export OS_USERNAME= - export OS_PASSWORD= - export OS_USER_DOMAIN_NAME= - export OS_PROJECT_NAME= - export OS_AUTH_URL= - export OS_REGION_NAME= - # Optional(specific version added to OS_AUTH_URL if (v2.0 or v3) not present already) - export OS_AUTH_VERSION= - - When OS_USER_DOMAIN_NAME is not set, then 'Default' is assumed. Alternatively IDs can be used instead of names. - Although *deprecated*, but OS_TENANT_NAME and OS_TENANT_ID can be used for - OS_PROEJCT_NAME and OS_PROJECT_ID respectively. - - When using Vagrant Environment with middleware disabled:: - - export OS_AUTH_TOKEN=82510970543135 - export OS_NO_CLIENT_AUTH=1 - export MONASCA_API_URL=http://192.168.10.4:8070/v2.0/ - - The Monasca API will treat the auth token as the tenant ID when Keystone is not enabled. - - Usage - ===== - - You'll find complete documentation on the shell by running - - ``monasca help``:: - - usage: monasca [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug] - [--os-cloud ] - [--os-region-name ] - [--os-cacert ] [--os-cert ] - [--os-key ] [--verify | --insecure] - [--os-default-domain ] - [--os-interface ] [--timing] [--os-beta-command] - [--os-auth-type ] [--os-code ] - [--os-protocol ] - [--os-project-name ] - [--os-trust-id ] - [--os-domain-name ] - [--os-user-domain-id ] - [--os-access-token-type ] - [--os-default-domain-name ] - [--os-access-token-endpoint ] - [--os-access-token ] - [--os-domain-id ] - [--os-user-domain-name ] - [--os-openid-scope ] - [--os-user-id ] - [--os-identity-provider ] - [--os-username ] [--os-auth-url ] - [--os-client-secret ] - [--os-default-domain-id ] - [--os-discovery-endpoint ] - [--os-client-id ] - [--os-project-domain-name ] - [--os-project-domain-id ] - [--os-password ] - [--os-redirect-uri ] - [--os-endpoint ] [--os-token ] - [--os-passcode ] - [--os-project-id ] - [--monasca-api-url MONASCA_API_URL] - [--monasca-api-version MONASCA_API_VERSION] - - Command-line interface to the OpenStack APIs - - 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. - --os-cloud - Cloud name in clouds.yaml (Env: OS_CLOUD) - --os-region-name - Authentication region name (Env: OS_REGION_NAME) - --os-cacert - CA certificate bundle file (Env: OS_CACERT) - --os-cert - Client certificate bundle file (Env: OS_CERT) - --os-key Client certificate key file (Env: OS_KEY) - --verify Verify server certificate (default) - --insecure Disable server certificate verification - --os-default-domain - Default domain ID, default=default. (Env: - OS_DEFAULT_DOMAIN) - --os-interface - Select an interface type. Valid interface types: - [admin, public, internal]. (Env: OS_INTERFACE) - --timing Print API call timing info - --os-beta-command Enable beta commands which are subject to change - --os-auth-type - Select an authentication type. Available types: - v2token, admin_token, v3oidcauthcode, v2password, - v3password, v3oidcaccesstoken, v3oidcpassword, token, - v3oidcclientcredentials, v3tokenlessauth, v3token, - v3totp, password. Default: selected based on --os- - username/--os-token (Env: OS_AUTH_TYPE) - --os-code - With v3oidcauthcode: OAuth 2.0 Authorization Code - (Env: OS_CODE) - --os-protocol - With v3oidcauthcode: Protocol for federated plugin - With v3oidcaccesstoken: Protocol for federated plugin - With v3oidcpassword: Protocol for federated plugin - With v3oidcclientcredentials: Protocol for federated - plugin (Env: OS_PROTOCOL) - --os-project-name - With v3oidcauthcode: Project name to scope to With - v3password: Project name to scope to With - v3oidcaccesstoken: Project name to scope to With - v3oidcpassword: Project name to scope to With token: - Project name to scope to With v3oidcclientcredentials: - Project name to scope to With v3tokenlessauth: Project - name to scope to With v3token: Project name to scope - to With v3totp: Project name to scope to With - password: Project name to scope to (Env: - OS_PROJECT_NAME) - --os-trust-id - With v2token: Trust ID With v3oidcauthcode: Trust ID - With v2password: Trust ID With v3password: Trust ID - With v3oidcaccesstoken: Trust ID With v3oidcpassword: - Trust ID With token: Trust ID With - v3oidcclientcredentials: Trust ID With v3token: Trust - ID With v3totp: Trust ID With password: Trust ID (Env: - OS_TRUST_ID) - --os-domain-name - With v3oidcauthcode: Domain name to scope to With - v3password: Domain name to scope to With - v3oidcaccesstoken: Domain name to scope to With - v3oidcpassword: Domain name to scope to With token: - Domain name to scope to With v3oidcclientcredentials: - Domain name to scope to With v3tokenlessauth: Domain - name to scope to With v3token: Domain name to scope to - With v3totp: Domain name to scope to With password: - Domain name to scope to (Env: OS_DOMAIN_NAME) - --os-user-domain-id - With v3password: User's domain id With v3totp: User's - domain id With password: User's domain id (Env: - OS_USER_DOMAIN_ID) - --os-access-token-type - With v3oidcauthcode: OAuth 2.0 Authorization Server - Introspection token type, it is used to decide which - type of token will be used when processing token - introspection. Valid values are: "access_token" or - "id_token" With v3oidcpassword: OAuth 2.0 - Authorization Server Introspection token type, it is - used to decide which type of token will be used when - processing token introspection. Valid values are: - "access_token" or "id_token" With - v3oidcclientcredentials: OAuth 2.0 Authorization - Server Introspection token type, it is used to decide - which type of token will be used when processing token - introspection. Valid values are: "access_token" or - "id_token" (Env: OS_ACCESS_TOKEN_TYPE) - --os-default-domain-name - With token: Optional domain name to use with v3 API - and v2 parameters. It will be used for both the user - and project domain in v3 and ignored in v2 - authentication. With password: Optional domain name to - use with v3 API and v2 parameters. It will be used for - both the user and project domain in v3 and ignored in - v2 authentication. (Env: OS_DEFAULT_DOMAIN_NAME) - --os-access-token-endpoint - With v3oidcauthcode: OpenID Connect Provider Token - Endpoint. Note that if a discovery document is being - passed this option will override the endpoint provided - by the server in the discovery document. With - v3oidcpassword: OpenID Connect Provider Token - Endpoint. Note that if a discovery document is being - passed this option will override the endpoint provided - by the server in the discovery document. With - v3oidcclientcredentials: OpenID Connect Provider Token - Endpoint. Note that if a discovery document is being - passed this option will override the endpoint provided - by the server in the discovery document. (Env: - OS_ACCESS_TOKEN_ENDPOINT) - --os-access-token - With v3oidcaccesstoken: OAuth 2.0 Access Token (Env: - OS_ACCESS_TOKEN) - --os-domain-id - With v3oidcauthcode: Domain ID to scope to With - v3password: Domain ID to scope to With - v3oidcaccesstoken: Domain ID to scope to With - v3oidcpassword: Domain ID to scope to With token: - Domain ID to scope to With v3oidcclientcredentials: - Domain ID to scope to With v3tokenlessauth: Domain ID - to scope to With v3token: Domain ID to scope to With - v3totp: Domain ID to scope to With password: Domain ID - to scope to (Env: OS_DOMAIN_ID) - --os-user-domain-name - With v3password: User's domain name With v3totp: - User's domain name With password: User's domain name - (Env: OS_USER_DOMAIN_NAME) - --os-openid-scope - With v3oidcauthcode: OpenID Connect scope that is - requested from authorization server. Note that the - OpenID Connect specification states that "openid" must - be always specified. With v3oidcpassword: OpenID - Connect scope that is requested from authorization - server. Note that the OpenID Connect specification - states that "openid" must be always specified. With - v3oidcclientcredentials: OpenID Connect scope that is - requested from authorization server. Note that the - OpenID Connect specification states that "openid" must - be always specified. (Env: OS_OPENID_SCOPE) - --os-user-id - With v2password: User ID to login with With - v3password: User ID With v3totp: User ID With - password: User id (Env: OS_USER_ID) - --os-identity-provider - With v3oidcauthcode: Identity Provider's name With - v3oidcaccesstoken: Identity Provider's name With - v3oidcpassword: Identity Provider's name With - v3oidcclientcredentials: Identity Provider's name - (Env: OS_IDENTITY_PROVIDER) - --os-username - With v2password: Username to login with With - v3password: Username With v3oidcpassword: Username - With v3totp: Username With password: Username (Env: - OS_USERNAME) - --os-auth-url - With v2token: Authentication URL With v3oidcauthcode: - Authentication URL With v2password: Authentication URL - With v3password: Authentication URL With - v3oidcaccesstoken: Authentication URL With - v3oidcpassword: Authentication URL With token: - Authentication URL With v3oidcclientcredentials: - Authentication URL With v3tokenlessauth: - Authentication URL With v3token: Authentication URL - With v3totp: Authentication URL With password: - Authentication URL (Env: OS_AUTH_URL) - --os-client-secret - With v3oidcauthcode: OAuth 2.0 Client Secret With - v3oidcpassword: OAuth 2.0 Client Secret With - v3oidcclientcredentials: OAuth 2.0 Client Secret (Env: - OS_CLIENT_SECRET) - --os-default-domain-id - With token: Optional domain ID to use with v3 and v2 - parameters. It will be used for both the user and - project domain in v3 and ignored in v2 authentication. - With password: Optional domain ID to use with v3 and - v2 parameters. It will be used for both the user and - project domain in v3 and ignored in v2 authentication. - (Env: OS_DEFAULT_DOMAIN_ID) - --os-discovery-endpoint - With v3oidcauthcode: OpenID Connect Discovery Document - URL. The discovery document will be used to obtain the - values of the access token endpoint and the - authentication endpoint. This URL should look like - https://idp.example.org/.well-known/openid- - configuration With v3oidcpassword: OpenID Connect - Discovery Document URL. The discovery document will be - used to obtain the values of the access token endpoint - and the authentication endpoint. This URL should look - like https://idp.example.org/.well-known/openid- - configuration With v3oidcclientcredentials: OpenID - Connect Discovery Document URL. The discovery document - will be used to obtain the values of the access token - endpoint and the authentication endpoint. This URL - should look like https://idp.example.org/.well-known - /openid-configuration (Env: OS_DISCOVERY_ENDPOINT) - --os-client-id - With v3oidcauthcode: OAuth 2.0 Client ID With - v3oidcpassword: OAuth 2.0 Client ID With - v3oidcclientcredentials: OAuth 2.0 Client ID (Env: - OS_CLIENT_ID) - --os-project-domain-name - With v3oidcauthcode: Domain name containing project - With v3password: Domain name containing project With - v3oidcaccesstoken: Domain name containing project With - v3oidcpassword: Domain name containing project With - token: Domain name containing project With - v3oidcclientcredentials: Domain name containing - project With v3tokenlessauth: Domain name containing - project With v3token: Domain name containing project - With v3totp: Domain name containing project With - password: Domain name containing project (Env: - OS_PROJECT_DOMAIN_NAME) - --os-project-domain-id - With v3oidcauthcode: Domain ID containing project With - v3password: Domain ID containing project With - v3oidcaccesstoken: Domain ID containing project With - v3oidcpassword: Domain ID containing project With - token: Domain ID containing project With - v3oidcclientcredentials: Domain ID containing project - With v3tokenlessauth: Domain ID containing project - With v3token: Domain ID containing project With - v3totp: Domain ID containing project With password: - Domain ID containing project (Env: - OS_PROJECT_DOMAIN_ID) - --os-password - With v2password: Password to use With v3password: - User's password With v3oidcpassword: Password With - password: User's password (Env: OS_PASSWORD) - --os-redirect-uri - With v3oidcauthcode: OpenID Connect Redirect URL (Env: - OS_REDIRECT_URI) - --os-endpoint - With admin_token: The endpoint that will always be - used (Env: OS_ENDPOINT) - --os-token - With v2token: Token With admin_token: The token that - will always be used With token: Token to authenticate - with With v3token: Token to authenticate with (Env: - OS_TOKEN) - --os-passcode - With v3totp: User's TOTP passcode (Env: OS_PASSCODE) - --os-project-id - With v3oidcauthcode: Project ID to scope to With - v3password: Project ID to scope to With - v3oidcaccesstoken: Project ID to scope to With - v3oidcpassword: Project ID to scope to With token: - Project ID to scope to With v3oidcclientcredentials: - Project ID to scope to With v3tokenlessauth: Project - ID to scope to With v3token: Project ID to scope to - With v3totp: Project ID to scope to With password: - Project ID to scope to (Env: OS_PROJECT_ID) - --monasca-api-url MONASCA_API_URL - Defaults to env[MONASCA_API_URL]. - --monasca-api-version MONASCA_API_VERSION - Defaults to env[MONASCA_API_VERSION] or 2_0 - - Commands: - alarm-count Count alarms. - alarm-definition-create Create an alarm definition. - alarm-definition-delete Delete the alarm definition. - alarm-definition-list List alarm definitions for this tenant. - alarm-definition-patch Patch the alarm definition. - alarm-definition-show Describe the alarm definition. - alarm-definition-update Update the alarm definition. - alarm-delete Delete the alarm. - alarm-history Alarm state transition history. - alarm-history-list List alarms state history. - alarm-list List alarms for this tenant. - alarm-patch Patch the alarm state. - alarm-show Describe the alarm. - alarm-update Update the alarm state. - complete print bash completion command - dimension-name-list List names of metric dimensions. - dimension-value-list List names of metric dimensions. - help print detailed help for another command - measurement-list List measurements for the specified metric. - metric-create Create metric. - metric-create-raw Create metric from raw json body. - metric-list List metrics for this tenant. - metric-name-list List names of metrics. - metric-statistics List measurement statistics for the specified metric. - notification-create Create notification. - notification-delete Delete notification. - notification-list List notifications for this tenant. - notification-patch Patch notification. - notification-show Describe the notification. - notification-type-list List notification types supported by monasca. - notification-update Update notification. - - - Bash Completion - --------------- - - Basic command tab completion can be enabled by sourcing the bash completion script. - :: - - monasca completion >> /usr/local/share/monasca.bash_completion - - - Metrics Examples - ---------------- - - Note: To see complete usage: 'monasca help' and 'monasca help ' - - metric-create:: - - monasca metric-create cpu1 123.40 - monasca metric-create metric1 1234.56 --dimensions instance_id=123,service=ourservice - monasca metric-create metric1 2222.22 --dimensions instance_id=123,service=ourservice - monasca metric-create metric1 3333.33 --dimensions instance_id=222,service=ourservice - monasca metric-create metric1 4444.44 --dimensions instance_id=222 --value-meta rc=404 - - metric-list:: - - monasca metric-list - +---------+--------------------+ - | name | dimensions | - +---------+--------------------+ - | cpu1 | | - | metric1 | instance_id:123 | - | | service:ourservice | - +---------+--------------------+ - - measurement-list:: - - monasca measurement-list metric1 2014-01-01T00:00:00Z - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | name | dimensions | measurement_id | timestamp | value | value_meta | - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | metric1 | instance_id:123 | 723885 | 2014-05-08T21:46:32Z | 1234.56 | | - | | service:ourservice | 725951 | 2014-05-08T21:48:50Z | 2222.22 | | - | metric1 | instance_id:222 | 726837 | 2014-05-08T21:49:47Z | 3333.33 | | - | | service:ourservice | 726983 | 2014-05-08T21:50:27Z | 4444.44 | rc: 404 | - +---------+--------------------+----------------+----------------------+--------------+-------------+ + .. image:: https://img.shields.io/pypi/v/python-monascaclient.svg + :target: https://pypi.python.org/pypi/python-monascaclient/ + :alt: Latest Version - monasca measurement-list metric1 2014-01-01T00:00:00Z --dimensions instance_id=123 - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | name | dimensions | measurement_id | timestamp | value | value_meta | - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | metric1 | instance_id:123 | 723885 | 2014-05-08T21:46:32Z | 1234.56 | | - | | service:ourservice | 725951 | 2014-05-08T21:48:50Z | 2222.22 | | - +---------+--------------------+----------------+----------------------+--------------+-------------+ - - - Notifications Examples - ~~~~~~~~~~~~~~~~~~~~~~ - Note: To see complete usage: 'monasca help' and 'monasca help ' - - notification-create:: - - monasca notification-create cindyemail1 EMAIL cindy.employee@hp.com - monasca notification-create myapplication WEBHOOK http://localhost:5000 - monasca notification-create mypagerduty PAGERDUTY nzH2LVRdMzun11HNC2oD - - notification-list:: - - monasca notification-list - +---------------+--------------------------------------+-------+----------------------+ - | name | id | type | address | - +---------------+--------------------------------------+-------+----------------------+ - | cindyemail1 | 5651406c-447d-40bd-b868-b2b3e6b59e32 | EMAIL |cindy.employee@hp.com | - | myapplication | 55905ce2-91e3-41ce-b45a-de7032f8d718 | WEBHOOK |http://localhost:5000 - | mypagerduty | 5720ccb5-6a3d-22ba-545g-ce467a5b41a2 | PAGERDUTY |nzH2LVRdMzun11HNC2oD - +---------------+--------------------------------------+-------+----------------------+ - - - Alarms Examples - ~~~~~~~~~~~~~~~ - Note: To see complete usage: 'monasca help' and 'monasca help ' - - alarm-definition-create:: - - monasca alarm-definition-create alarmPerHost "max(cpu.load_avg_1_min) > 0" --match-by hostname - - alarm-definition-list:: - - +--------------+--------------------------------------+-----------------------------+----------+-----------------+ - | name | id | expression | match_by | actions_enabled | - +--------------+--------------------------------------+-----------------------------+----------+-----------------+ - | alarmPerHost | 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 | max(cpu.load_avg_1_min) > 0 | hostname | True | - +--------------+--------------------------------------+-----------------------------+----------+-----------------+ - - alarm-definition-show:: - - monasca alarm-definition-show 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 - +----------------------+----------------------------------------------------------------------------------------------------+ - | Property | Value | - +----------------------+----------------------------------------------------------------------------------------------------+ - | actions_enabled | true | - | alarm_actions | [] | - | description | "" | - | expression | "max(cpu.load_avg_1_min) > 0" | - | id | "4bf6bfc2-c5ac-4d57-b7db-cf5313b05412" | - | links | href:http://192.168.10.4:8070/v2.0/alarm-definitions/4bf6bfc2-c5ac-4d57-b7db-cf5313b05412,rel:self | - | match_by | [ | - | | "hostname" | - | | ] | - | name | "alarmPerHost" | - | ok_actions | [] | - | severity | "LOW" | - | undetermined_actions | [] | - +----------------------+----------------------------------------------------------------------------------------------------+ - - alarm-definition-delete:: - - monasca alarm-definition-delete 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 - - alarm-list:: - - monasca alarm-list - +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ - | id | alarm_definition_id | alarm_name | metric_name | metric_dimensions | severity | state | state_updated_timestamp | created_timestamp | - +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ - | 11e8c15d-0263-4b71-a8b8-4ecdaeb2902c | af1f347b-cddb-46da-b7cc-924261eeecdf | High CPU usage | cpu.idle_perc | hostname: devstack | LOW | OK | 2015-03-26T21:45:15.000Z | 2015-03-26T21:41:50.000Z | - | e5797cfe-b66e-4d44-98cd-3c7fc62d4c33 | af1f347b-cddb-46da-b7cc-924261eeecdf | High CPU usage | cpu.idle_perc | hostname: mini-mon | LOW | OK | 2015-03-26T21:43:15.000Z | 2015-03-26T21:41:47.000Z | - | | | | | service: monitoring | | | | | - +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ - - alarm-history:: - - monasca alarm-history 9d748b72-939b-45e7-a807-c0c5ad88d3e4 - +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ - | alarm_id | new_state | old_state | reason | reason_data | metric_name | metric_dimensions | timestamp | - +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ - | 9d748b72-939b-45e7-a807-c0c5ad88d3e4 | ALARM | UNDETERMINED | Thresholds were exceeded for the sub-alarms: [max(cpu.load_avg_1_min) > 0.0] | {} | cpu.load_avg_1_min | hostname: mini-mon | 2014-10-14T21:14:11.000Z | - | | | | | | | service: monitoring | | - +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ - - - alarm-patch:: - - monasca alarm-patch fda5537b-1550-435f-9d6c-262b7e05065b --state OK - - - Python API - ========== - - There's also a complete Python API. - - There are three possible approaches, at the moment, you can take to use the client - directly. On high level, these approaches can be described as: - - * using **username** and **password** - * using **token** - * using existing _` - - Username & password - ------------------- - - Following approach allows to initialize the monascaclient in a traditional way. - It requires **username** and **password**. Initialization of the client - can be threfore executed with:: - - c = mon_client.Client(api_version='2_0', - username=os.environ.get('OS_USERNAME', 'mini-mon'), - password=os.environ.get('OS_PASSWORD', 'password'), - auth_url=os.environ.get('OS_AUTH_URL', 'http://127.0.0.1/identity'), - project_name=os.environ.get('OS_PROJECT_NAME', 'mini-mon'), - endpoint='http://127.0.0.1:8070/v2.0') - - Token - ----- - - In order to use the monasclient directly, you must pass in a valid auth token and - monasca api endpoint, or you can pass in the credentials required by the keystone - client and let the Python API do the authentication. The user can obtain the token - and endpoint using the keystone client api: - http://docs.openstack.org/developer/python-keystoneclient/. Once **token** - is available, a monascaclient can be initialized with following code:: - - c = mon_client.Client(api_version='2_0', - endpoint='http://127.0.0.1:8070/v2.0' - token=token_id, - auth_url=os.environ.get('OS_AUTH_URL', 'http://127.0.0.1/identity'), - project_name=os.environ.get('OS_PROJECT_NAME', 'mini-mon')) - - Session - ------- - - Usage of the monasclient with existing session can be expressed - with following code:: - - from keystoneauth1 import session - from keystoneauth1 import identity - - auth = identity.Token(auth_url=os.environ.get('OS_AUTH_URL', 'http://127.0.0.1/identity'), - token=token_id, - project_name=os.environ.get('OS_PROJECT_NAME', 'mini-mon')) - sess = session.Session(auth=auth) - - c = client.Client(api_version='2_0', - endpoint='http://127.0.0.1:8070/v2.0' - session=sess) - - The session object construction is much broader topic. It involves picking - one of the following authorization methods: - - * Password - * Token - - Alternatively, if Keystone version is known, you may choose: - - * V2Password or V3Password - * V2Token of V3Token - * V3OidcClientCredentials - * V3OidcPassword - * V3OidcAuthorizationCode - * V3OidcAccessToken - * V3TOTP - * V3TokenlessAuth - - For more details about each one of those methods, please visit - `official documentation `_. - - License - ======= - - (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP - Copyright 2017 Fujitsu LIMITED - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 + This is a client library for Monasca built to interface with the Monasca API. + It provides a Python API (the ``monascaclient`` module) and a command-line tool + (``monasca``). - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied. - See the License for the specific language governing permissions and - limitations under the License. + * License: Apache License, Version 2.0 + * `PyPi`_ - package installation + * `Online Documentation`_ + * `Bugs`_ - issue tracking (we use *bug* tag to differentiate from new features) + * `Source`_ + + .. _PyPi: https://pypi.python.org/pypi/python-monascaclient + .. _Online Documentation: https://docs.openstack.org/python-monascaclient/latest/ + .. _Bugs: https://storyboard.openstack.org/#!/project/880 + .. _Source: https://git.openstack.org/cgit/openstack/python-monascaclient Platform: UNKNOWN @@ -706,3 +49,4 @@ Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 diff -Nru python-monascaclient-1.10.0/python_monascaclient.egg-info/pbr.json python-monascaclient-1.14.0/python_monascaclient.egg-info/pbr.json --- python-monascaclient-1.10.0/python_monascaclient.egg-info/pbr.json 2018-01-22 17:26:20.000000000 +0000 +++ python-monascaclient-1.14.0/python_monascaclient.egg-info/pbr.json 2019-03-07 10:21:51.000000000 +0000 @@ -1 +1 @@ -{"git_version": "5ea9035", "is_release": true} \ No newline at end of file +{"git_version": "a1d50c6", "is_release": true} \ No newline at end of file diff -Nru python-monascaclient-1.10.0/python_monascaclient.egg-info/PKG-INFO python-monascaclient-1.14.0/python_monascaclient.egg-info/PKG-INFO --- python-monascaclient-1.10.0/python_monascaclient.egg-info/PKG-INFO 2018-01-22 17:26:19.000000000 +0000 +++ python-monascaclient-1.14.0/python_monascaclient.egg-info/PKG-INFO 2019-03-07 10:21:51.000000000 +0000 @@ -1,698 +1,41 @@ Metadata-Version: 1.1 Name: python-monascaclient -Version: 1.10.0 +Version: 1.14.0 Summary: Monasca API Client Library Home-page: https://docs.openstack.org/python-monascaclient/latest/ Author: OpenStack -Author-email: openstack-dev@lists.openstack.org +Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN -Description-Content-Type: UNKNOWN Description: ======================== Team and repository tags ======================== - .. image:: https://governance.openstack.org/badges/python-monascaclient.svg - :target: https://governance.openstack.org/reference/tags/index.html + .. image:: https://governance.openstack.org/tc/badges/python-monascaclient.svg + :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on Python bindings to the Monasca API - ======================================= + ================================== - This is a client library for Monasca built to interface with the Monasca API. It - provides a Python API (the ``monascaclient`` module) and a command-line tool - (``monasca``). - - The Monasca Client was written using the OpenStack Heat Python client as a framework. - - .. contents:: Contents: - :local: - - Ubuntu Install - -------------- - Requires: - - pip - version >= 1.4. python get-pip.py - - See versions on PYPI: - https://pypi.python.org/pypi/python-monascaclient/ - - Install It: - - sudo pip install python-monascaclient - - Alternative Manual Install Steps: - - cd to your python-monascaclient repo - - sudo pip install -r requirements.txt - - python setup.py install - - Building and Packaging - ---------------------- - Install the tool dependencies - sudo apt-get install python-pip python-virtualenv - - In the python-monascaclient source directory - virtualenv --no-site-packages .venv - - source ./.venv/bin/activate - - pip install wheel - - python setup.py bdist_wheel - - pip install $(ls -1rt dist/*.whl | tail -1) --upgrade - - Command-line API - ---------------- - Installing this distribution gets you a shell command, ``monasca``, that you - can use to interact with the Monitoring API server. - - Usage: - monasca - - monasca help - - monasca help - - This outputs the results in json format. Normally output is in table format. - - - The monascaclient CLI needs the Monasca API endpoint url and the OS_AUTH_TOKEN to pass to the - Monasca API RESTful interface. This is provided through environment or CLI - parameters. - - Environmental Variables - ======================= - - Environmental variables can be sourced, or optionally passed in as CLI arguments. - It is easiest to source them first and then use the CLI. - - When token and endpoint are known:: - - export OS_AUTH_TOKEN=XXX - export MONASCA_API_URL=http://192.168.10.4:8070/v2.0/ - - When using Keystone to obtain the token and endpoint:: - - export OS_USERNAME= - export OS_PASSWORD= - export OS_USER_DOMAIN_NAME= - export OS_PROJECT_NAME= - export OS_AUTH_URL= - export OS_REGION_NAME= - # Optional(specific version added to OS_AUTH_URL if (v2.0 or v3) not present already) - export OS_AUTH_VERSION= - - When OS_USER_DOMAIN_NAME is not set, then 'Default' is assumed. Alternatively IDs can be used instead of names. - Although *deprecated*, but OS_TENANT_NAME and OS_TENANT_ID can be used for - OS_PROEJCT_NAME and OS_PROJECT_ID respectively. - - When using Vagrant Environment with middleware disabled:: - - export OS_AUTH_TOKEN=82510970543135 - export OS_NO_CLIENT_AUTH=1 - export MONASCA_API_URL=http://192.168.10.4:8070/v2.0/ - - The Monasca API will treat the auth token as the tenant ID when Keystone is not enabled. - - Usage - ===== - - You'll find complete documentation on the shell by running - - ``monasca help``:: - - usage: monasca [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug] - [--os-cloud ] - [--os-region-name ] - [--os-cacert ] [--os-cert ] - [--os-key ] [--verify | --insecure] - [--os-default-domain ] - [--os-interface ] [--timing] [--os-beta-command] - [--os-auth-type ] [--os-code ] - [--os-protocol ] - [--os-project-name ] - [--os-trust-id ] - [--os-domain-name ] - [--os-user-domain-id ] - [--os-access-token-type ] - [--os-default-domain-name ] - [--os-access-token-endpoint ] - [--os-access-token ] - [--os-domain-id ] - [--os-user-domain-name ] - [--os-openid-scope ] - [--os-user-id ] - [--os-identity-provider ] - [--os-username ] [--os-auth-url ] - [--os-client-secret ] - [--os-default-domain-id ] - [--os-discovery-endpoint ] - [--os-client-id ] - [--os-project-domain-name ] - [--os-project-domain-id ] - [--os-password ] - [--os-redirect-uri ] - [--os-endpoint ] [--os-token ] - [--os-passcode ] - [--os-project-id ] - [--monasca-api-url MONASCA_API_URL] - [--monasca-api-version MONASCA_API_VERSION] - - Command-line interface to the OpenStack APIs - - 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. - --os-cloud - Cloud name in clouds.yaml (Env: OS_CLOUD) - --os-region-name - Authentication region name (Env: OS_REGION_NAME) - --os-cacert - CA certificate bundle file (Env: OS_CACERT) - --os-cert - Client certificate bundle file (Env: OS_CERT) - --os-key Client certificate key file (Env: OS_KEY) - --verify Verify server certificate (default) - --insecure Disable server certificate verification - --os-default-domain - Default domain ID, default=default. (Env: - OS_DEFAULT_DOMAIN) - --os-interface - Select an interface type. Valid interface types: - [admin, public, internal]. (Env: OS_INTERFACE) - --timing Print API call timing info - --os-beta-command Enable beta commands which are subject to change - --os-auth-type - Select an authentication type. Available types: - v2token, admin_token, v3oidcauthcode, v2password, - v3password, v3oidcaccesstoken, v3oidcpassword, token, - v3oidcclientcredentials, v3tokenlessauth, v3token, - v3totp, password. Default: selected based on --os- - username/--os-token (Env: OS_AUTH_TYPE) - --os-code - With v3oidcauthcode: OAuth 2.0 Authorization Code - (Env: OS_CODE) - --os-protocol - With v3oidcauthcode: Protocol for federated plugin - With v3oidcaccesstoken: Protocol for federated plugin - With v3oidcpassword: Protocol for federated plugin - With v3oidcclientcredentials: Protocol for federated - plugin (Env: OS_PROTOCOL) - --os-project-name - With v3oidcauthcode: Project name to scope to With - v3password: Project name to scope to With - v3oidcaccesstoken: Project name to scope to With - v3oidcpassword: Project name to scope to With token: - Project name to scope to With v3oidcclientcredentials: - Project name to scope to With v3tokenlessauth: Project - name to scope to With v3token: Project name to scope - to With v3totp: Project name to scope to With - password: Project name to scope to (Env: - OS_PROJECT_NAME) - --os-trust-id - With v2token: Trust ID With v3oidcauthcode: Trust ID - With v2password: Trust ID With v3password: Trust ID - With v3oidcaccesstoken: Trust ID With v3oidcpassword: - Trust ID With token: Trust ID With - v3oidcclientcredentials: Trust ID With v3token: Trust - ID With v3totp: Trust ID With password: Trust ID (Env: - OS_TRUST_ID) - --os-domain-name - With v3oidcauthcode: Domain name to scope to With - v3password: Domain name to scope to With - v3oidcaccesstoken: Domain name to scope to With - v3oidcpassword: Domain name to scope to With token: - Domain name to scope to With v3oidcclientcredentials: - Domain name to scope to With v3tokenlessauth: Domain - name to scope to With v3token: Domain name to scope to - With v3totp: Domain name to scope to With password: - Domain name to scope to (Env: OS_DOMAIN_NAME) - --os-user-domain-id - With v3password: User's domain id With v3totp: User's - domain id With password: User's domain id (Env: - OS_USER_DOMAIN_ID) - --os-access-token-type - With v3oidcauthcode: OAuth 2.0 Authorization Server - Introspection token type, it is used to decide which - type of token will be used when processing token - introspection. Valid values are: "access_token" or - "id_token" With v3oidcpassword: OAuth 2.0 - Authorization Server Introspection token type, it is - used to decide which type of token will be used when - processing token introspection. Valid values are: - "access_token" or "id_token" With - v3oidcclientcredentials: OAuth 2.0 Authorization - Server Introspection token type, it is used to decide - which type of token will be used when processing token - introspection. Valid values are: "access_token" or - "id_token" (Env: OS_ACCESS_TOKEN_TYPE) - --os-default-domain-name - With token: Optional domain name to use with v3 API - and v2 parameters. It will be used for both the user - and project domain in v3 and ignored in v2 - authentication. With password: Optional domain name to - use with v3 API and v2 parameters. It will be used for - both the user and project domain in v3 and ignored in - v2 authentication. (Env: OS_DEFAULT_DOMAIN_NAME) - --os-access-token-endpoint - With v3oidcauthcode: OpenID Connect Provider Token - Endpoint. Note that if a discovery document is being - passed this option will override the endpoint provided - by the server in the discovery document. With - v3oidcpassword: OpenID Connect Provider Token - Endpoint. Note that if a discovery document is being - passed this option will override the endpoint provided - by the server in the discovery document. With - v3oidcclientcredentials: OpenID Connect Provider Token - Endpoint. Note that if a discovery document is being - passed this option will override the endpoint provided - by the server in the discovery document. (Env: - OS_ACCESS_TOKEN_ENDPOINT) - --os-access-token - With v3oidcaccesstoken: OAuth 2.0 Access Token (Env: - OS_ACCESS_TOKEN) - --os-domain-id - With v3oidcauthcode: Domain ID to scope to With - v3password: Domain ID to scope to With - v3oidcaccesstoken: Domain ID to scope to With - v3oidcpassword: Domain ID to scope to With token: - Domain ID to scope to With v3oidcclientcredentials: - Domain ID to scope to With v3tokenlessauth: Domain ID - to scope to With v3token: Domain ID to scope to With - v3totp: Domain ID to scope to With password: Domain ID - to scope to (Env: OS_DOMAIN_ID) - --os-user-domain-name - With v3password: User's domain name With v3totp: - User's domain name With password: User's domain name - (Env: OS_USER_DOMAIN_NAME) - --os-openid-scope - With v3oidcauthcode: OpenID Connect scope that is - requested from authorization server. Note that the - OpenID Connect specification states that "openid" must - be always specified. With v3oidcpassword: OpenID - Connect scope that is requested from authorization - server. Note that the OpenID Connect specification - states that "openid" must be always specified. With - v3oidcclientcredentials: OpenID Connect scope that is - requested from authorization server. Note that the - OpenID Connect specification states that "openid" must - be always specified. (Env: OS_OPENID_SCOPE) - --os-user-id - With v2password: User ID to login with With - v3password: User ID With v3totp: User ID With - password: User id (Env: OS_USER_ID) - --os-identity-provider - With v3oidcauthcode: Identity Provider's name With - v3oidcaccesstoken: Identity Provider's name With - v3oidcpassword: Identity Provider's name With - v3oidcclientcredentials: Identity Provider's name - (Env: OS_IDENTITY_PROVIDER) - --os-username - With v2password: Username to login with With - v3password: Username With v3oidcpassword: Username - With v3totp: Username With password: Username (Env: - OS_USERNAME) - --os-auth-url - With v2token: Authentication URL With v3oidcauthcode: - Authentication URL With v2password: Authentication URL - With v3password: Authentication URL With - v3oidcaccesstoken: Authentication URL With - v3oidcpassword: Authentication URL With token: - Authentication URL With v3oidcclientcredentials: - Authentication URL With v3tokenlessauth: - Authentication URL With v3token: Authentication URL - With v3totp: Authentication URL With password: - Authentication URL (Env: OS_AUTH_URL) - --os-client-secret - With v3oidcauthcode: OAuth 2.0 Client Secret With - v3oidcpassword: OAuth 2.0 Client Secret With - v3oidcclientcredentials: OAuth 2.0 Client Secret (Env: - OS_CLIENT_SECRET) - --os-default-domain-id - With token: Optional domain ID to use with v3 and v2 - parameters. It will be used for both the user and - project domain in v3 and ignored in v2 authentication. - With password: Optional domain ID to use with v3 and - v2 parameters. It will be used for both the user and - project domain in v3 and ignored in v2 authentication. - (Env: OS_DEFAULT_DOMAIN_ID) - --os-discovery-endpoint - With v3oidcauthcode: OpenID Connect Discovery Document - URL. The discovery document will be used to obtain the - values of the access token endpoint and the - authentication endpoint. This URL should look like - https://idp.example.org/.well-known/openid- - configuration With v3oidcpassword: OpenID Connect - Discovery Document URL. The discovery document will be - used to obtain the values of the access token endpoint - and the authentication endpoint. This URL should look - like https://idp.example.org/.well-known/openid- - configuration With v3oidcclientcredentials: OpenID - Connect Discovery Document URL. The discovery document - will be used to obtain the values of the access token - endpoint and the authentication endpoint. This URL - should look like https://idp.example.org/.well-known - /openid-configuration (Env: OS_DISCOVERY_ENDPOINT) - --os-client-id - With v3oidcauthcode: OAuth 2.0 Client ID With - v3oidcpassword: OAuth 2.0 Client ID With - v3oidcclientcredentials: OAuth 2.0 Client ID (Env: - OS_CLIENT_ID) - --os-project-domain-name - With v3oidcauthcode: Domain name containing project - With v3password: Domain name containing project With - v3oidcaccesstoken: Domain name containing project With - v3oidcpassword: Domain name containing project With - token: Domain name containing project With - v3oidcclientcredentials: Domain name containing - project With v3tokenlessauth: Domain name containing - project With v3token: Domain name containing project - With v3totp: Domain name containing project With - password: Domain name containing project (Env: - OS_PROJECT_DOMAIN_NAME) - --os-project-domain-id - With v3oidcauthcode: Domain ID containing project With - v3password: Domain ID containing project With - v3oidcaccesstoken: Domain ID containing project With - v3oidcpassword: Domain ID containing project With - token: Domain ID containing project With - v3oidcclientcredentials: Domain ID containing project - With v3tokenlessauth: Domain ID containing project - With v3token: Domain ID containing project With - v3totp: Domain ID containing project With password: - Domain ID containing project (Env: - OS_PROJECT_DOMAIN_ID) - --os-password - With v2password: Password to use With v3password: - User's password With v3oidcpassword: Password With - password: User's password (Env: OS_PASSWORD) - --os-redirect-uri - With v3oidcauthcode: OpenID Connect Redirect URL (Env: - OS_REDIRECT_URI) - --os-endpoint - With admin_token: The endpoint that will always be - used (Env: OS_ENDPOINT) - --os-token - With v2token: Token With admin_token: The token that - will always be used With token: Token to authenticate - with With v3token: Token to authenticate with (Env: - OS_TOKEN) - --os-passcode - With v3totp: User's TOTP passcode (Env: OS_PASSCODE) - --os-project-id - With v3oidcauthcode: Project ID to scope to With - v3password: Project ID to scope to With - v3oidcaccesstoken: Project ID to scope to With - v3oidcpassword: Project ID to scope to With token: - Project ID to scope to With v3oidcclientcredentials: - Project ID to scope to With v3tokenlessauth: Project - ID to scope to With v3token: Project ID to scope to - With v3totp: Project ID to scope to With password: - Project ID to scope to (Env: OS_PROJECT_ID) - --monasca-api-url MONASCA_API_URL - Defaults to env[MONASCA_API_URL]. - --monasca-api-version MONASCA_API_VERSION - Defaults to env[MONASCA_API_VERSION] or 2_0 - - Commands: - alarm-count Count alarms. - alarm-definition-create Create an alarm definition. - alarm-definition-delete Delete the alarm definition. - alarm-definition-list List alarm definitions for this tenant. - alarm-definition-patch Patch the alarm definition. - alarm-definition-show Describe the alarm definition. - alarm-definition-update Update the alarm definition. - alarm-delete Delete the alarm. - alarm-history Alarm state transition history. - alarm-history-list List alarms state history. - alarm-list List alarms for this tenant. - alarm-patch Patch the alarm state. - alarm-show Describe the alarm. - alarm-update Update the alarm state. - complete print bash completion command - dimension-name-list List names of metric dimensions. - dimension-value-list List names of metric dimensions. - help print detailed help for another command - measurement-list List measurements for the specified metric. - metric-create Create metric. - metric-create-raw Create metric from raw json body. - metric-list List metrics for this tenant. - metric-name-list List names of metrics. - metric-statistics List measurement statistics for the specified metric. - notification-create Create notification. - notification-delete Delete notification. - notification-list List notifications for this tenant. - notification-patch Patch notification. - notification-show Describe the notification. - notification-type-list List notification types supported by monasca. - notification-update Update notification. - - - Bash Completion - --------------- - - Basic command tab completion can be enabled by sourcing the bash completion script. - :: - - monasca completion >> /usr/local/share/monasca.bash_completion - - - Metrics Examples - ---------------- - - Note: To see complete usage: 'monasca help' and 'monasca help ' - - metric-create:: - - monasca metric-create cpu1 123.40 - monasca metric-create metric1 1234.56 --dimensions instance_id=123,service=ourservice - monasca metric-create metric1 2222.22 --dimensions instance_id=123,service=ourservice - monasca metric-create metric1 3333.33 --dimensions instance_id=222,service=ourservice - monasca metric-create metric1 4444.44 --dimensions instance_id=222 --value-meta rc=404 - - metric-list:: - - monasca metric-list - +---------+--------------------+ - | name | dimensions | - +---------+--------------------+ - | cpu1 | | - | metric1 | instance_id:123 | - | | service:ourservice | - +---------+--------------------+ - - measurement-list:: - - monasca measurement-list metric1 2014-01-01T00:00:00Z - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | name | dimensions | measurement_id | timestamp | value | value_meta | - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | metric1 | instance_id:123 | 723885 | 2014-05-08T21:46:32Z | 1234.56 | | - | | service:ourservice | 725951 | 2014-05-08T21:48:50Z | 2222.22 | | - | metric1 | instance_id:222 | 726837 | 2014-05-08T21:49:47Z | 3333.33 | | - | | service:ourservice | 726983 | 2014-05-08T21:50:27Z | 4444.44 | rc: 404 | - +---------+--------------------+----------------+----------------------+--------------+-------------+ + .. image:: https://img.shields.io/pypi/v/python-monascaclient.svg + :target: https://pypi.python.org/pypi/python-monascaclient/ + :alt: Latest Version - monasca measurement-list metric1 2014-01-01T00:00:00Z --dimensions instance_id=123 - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | name | dimensions | measurement_id | timestamp | value | value_meta | - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | metric1 | instance_id:123 | 723885 | 2014-05-08T21:46:32Z | 1234.56 | | - | | service:ourservice | 725951 | 2014-05-08T21:48:50Z | 2222.22 | | - +---------+--------------------+----------------+----------------------+--------------+-------------+ - - - Notifications Examples - ~~~~~~~~~~~~~~~~~~~~~~ - Note: To see complete usage: 'monasca help' and 'monasca help ' - - notification-create:: - - monasca notification-create cindyemail1 EMAIL cindy.employee@hp.com - monasca notification-create myapplication WEBHOOK http://localhost:5000 - monasca notification-create mypagerduty PAGERDUTY nzH2LVRdMzun11HNC2oD - - notification-list:: - - monasca notification-list - +---------------+--------------------------------------+-------+----------------------+ - | name | id | type | address | - +---------------+--------------------------------------+-------+----------------------+ - | cindyemail1 | 5651406c-447d-40bd-b868-b2b3e6b59e32 | EMAIL |cindy.employee@hp.com | - | myapplication | 55905ce2-91e3-41ce-b45a-de7032f8d718 | WEBHOOK |http://localhost:5000 - | mypagerduty | 5720ccb5-6a3d-22ba-545g-ce467a5b41a2 | PAGERDUTY |nzH2LVRdMzun11HNC2oD - +---------------+--------------------------------------+-------+----------------------+ - - - Alarms Examples - ~~~~~~~~~~~~~~~ - Note: To see complete usage: 'monasca help' and 'monasca help ' - - alarm-definition-create:: - - monasca alarm-definition-create alarmPerHost "max(cpu.load_avg_1_min) > 0" --match-by hostname - - alarm-definition-list:: - - +--------------+--------------------------------------+-----------------------------+----------+-----------------+ - | name | id | expression | match_by | actions_enabled | - +--------------+--------------------------------------+-----------------------------+----------+-----------------+ - | alarmPerHost | 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 | max(cpu.load_avg_1_min) > 0 | hostname | True | - +--------------+--------------------------------------+-----------------------------+----------+-----------------+ - - alarm-definition-show:: - - monasca alarm-definition-show 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 - +----------------------+----------------------------------------------------------------------------------------------------+ - | Property | Value | - +----------------------+----------------------------------------------------------------------------------------------------+ - | actions_enabled | true | - | alarm_actions | [] | - | description | "" | - | expression | "max(cpu.load_avg_1_min) > 0" | - | id | "4bf6bfc2-c5ac-4d57-b7db-cf5313b05412" | - | links | href:http://192.168.10.4:8070/v2.0/alarm-definitions/4bf6bfc2-c5ac-4d57-b7db-cf5313b05412,rel:self | - | match_by | [ | - | | "hostname" | - | | ] | - | name | "alarmPerHost" | - | ok_actions | [] | - | severity | "LOW" | - | undetermined_actions | [] | - +----------------------+----------------------------------------------------------------------------------------------------+ - - alarm-definition-delete:: - - monasca alarm-definition-delete 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 - - alarm-list:: - - monasca alarm-list - +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ - | id | alarm_definition_id | alarm_name | metric_name | metric_dimensions | severity | state | state_updated_timestamp | created_timestamp | - +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ - | 11e8c15d-0263-4b71-a8b8-4ecdaeb2902c | af1f347b-cddb-46da-b7cc-924261eeecdf | High CPU usage | cpu.idle_perc | hostname: devstack | LOW | OK | 2015-03-26T21:45:15.000Z | 2015-03-26T21:41:50.000Z | - | e5797cfe-b66e-4d44-98cd-3c7fc62d4c33 | af1f347b-cddb-46da-b7cc-924261eeecdf | High CPU usage | cpu.idle_perc | hostname: mini-mon | LOW | OK | 2015-03-26T21:43:15.000Z | 2015-03-26T21:41:47.000Z | - | | | | | service: monitoring | | | | | - +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ - - alarm-history:: - - monasca alarm-history 9d748b72-939b-45e7-a807-c0c5ad88d3e4 - +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ - | alarm_id | new_state | old_state | reason | reason_data | metric_name | metric_dimensions | timestamp | - +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ - | 9d748b72-939b-45e7-a807-c0c5ad88d3e4 | ALARM | UNDETERMINED | Thresholds were exceeded for the sub-alarms: [max(cpu.load_avg_1_min) > 0.0] | {} | cpu.load_avg_1_min | hostname: mini-mon | 2014-10-14T21:14:11.000Z | - | | | | | | | service: monitoring | | - +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ - - - alarm-patch:: - - monasca alarm-patch fda5537b-1550-435f-9d6c-262b7e05065b --state OK - - - Python API - ========== - - There's also a complete Python API. - - There are three possible approaches, at the moment, you can take to use the client - directly. On high level, these approaches can be described as: - - * using **username** and **password** - * using **token** - * using existing _` - - Username & password - ------------------- - - Following approach allows to initialize the monascaclient in a traditional way. - It requires **username** and **password**. Initialization of the client - can be threfore executed with:: - - c = mon_client.Client(api_version='2_0', - username=os.environ.get('OS_USERNAME', 'mini-mon'), - password=os.environ.get('OS_PASSWORD', 'password'), - auth_url=os.environ.get('OS_AUTH_URL', 'http://127.0.0.1/identity'), - project_name=os.environ.get('OS_PROJECT_NAME', 'mini-mon'), - endpoint='http://127.0.0.1:8070/v2.0') - - Token - ----- - - In order to use the monasclient directly, you must pass in a valid auth token and - monasca api endpoint, or you can pass in the credentials required by the keystone - client and let the Python API do the authentication. The user can obtain the token - and endpoint using the keystone client api: - http://docs.openstack.org/developer/python-keystoneclient/. Once **token** - is available, a monascaclient can be initialized with following code:: - - c = mon_client.Client(api_version='2_0', - endpoint='http://127.0.0.1:8070/v2.0' - token=token_id, - auth_url=os.environ.get('OS_AUTH_URL', 'http://127.0.0.1/identity'), - project_name=os.environ.get('OS_PROJECT_NAME', 'mini-mon')) - - Session - ------- - - Usage of the monasclient with existing session can be expressed - with following code:: - - from keystoneauth1 import session - from keystoneauth1 import identity - - auth = identity.Token(auth_url=os.environ.get('OS_AUTH_URL', 'http://127.0.0.1/identity'), - token=token_id, - project_name=os.environ.get('OS_PROJECT_NAME', 'mini-mon')) - sess = session.Session(auth=auth) - - c = client.Client(api_version='2_0', - endpoint='http://127.0.0.1:8070/v2.0' - session=sess) - - The session object construction is much broader topic. It involves picking - one of the following authorization methods: - - * Password - * Token - - Alternatively, if Keystone version is known, you may choose: - - * V2Password or V3Password - * V2Token of V3Token - * V3OidcClientCredentials - * V3OidcPassword - * V3OidcAuthorizationCode - * V3OidcAccessToken - * V3TOTP - * V3TokenlessAuth - - For more details about each one of those methods, please visit - `official documentation `_. - - License - ======= - - (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP - Copyright 2017 Fujitsu LIMITED - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 + This is a client library for Monasca built to interface with the Monasca API. + It provides a Python API (the ``monascaclient`` module) and a command-line tool + (``monasca``). - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied. - See the License for the specific language governing permissions and - limitations under the License. + * License: Apache License, Version 2.0 + * `PyPi`_ - package installation + * `Online Documentation`_ + * `Bugs`_ - issue tracking (we use *bug* tag to differentiate from new features) + * `Source`_ + + .. _PyPi: https://pypi.python.org/pypi/python-monascaclient + .. _Online Documentation: https://docs.openstack.org/python-monascaclient/latest/ + .. _Bugs: https://storyboard.openstack.org/#!/project/880 + .. _Source: https://git.openstack.org/cgit/openstack/python-monascaclient Platform: UNKNOWN @@ -706,3 +49,4 @@ Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 diff -Nru python-monascaclient-1.10.0/python_monascaclient.egg-info/requires.txt python-monascaclient-1.14.0/python_monascaclient.egg-info/requires.txt --- python-monascaclient-1.10.0/python_monascaclient.egg-info/requires.txt 2018-01-22 17:26:19.000000000 +0000 +++ python-monascaclient-1.14.0/python_monascaclient.egg-info/requires.txt 2019-03-07 10:21:51.000000000 +0000 @@ -4,6 +4,6 @@ Babel!=2.4.0,>=2.3.4 iso8601>=0.1.11 pbr!=2.1.0,>=2.0.0 -PrettyTable<0.8,>=0.7.1 -PyYAML>=3.10 +PrettyTable<0.8,>=0.7.2 +PyYAML>=3.12 six>=1.10.0 diff -Nru python-monascaclient-1.10.0/python_monascaclient.egg-info/SOURCES.txt python-monascaclient-1.14.0/python_monascaclient.egg-info/SOURCES.txt --- python-monascaclient-1.10.0/python_monascaclient.egg-info/SOURCES.txt 2018-01-22 17:26:21.000000000 +0000 +++ python-monascaclient-1.14.0/python_monascaclient.egg-info/SOURCES.txt 2019-03-07 10:21:51.000000000 +0000 @@ -1,10 +1,12 @@ -.testr.conf +.stestr.conf +.zuul.yaml AUTHORS CONTRIBUTING.rst ChangeLog HACKING.rst LICENSE README.rst +lower-constraints.txt requirements.txt setup.cfg setup.py @@ -12,6 +14,7 @@ tox.ini doc/source/conf.py doc/source/index.rst +doc/source/installation.rst doc/source/cli/index.rst doc/source/cli/monasca-debug.rst doc/source/cli/monasca-formatting.rst @@ -56,4 +59,6 @@ releasenotes/notes/openstack_docs-5cfec48411370070.yaml releasenotes/source/conf.py releasenotes/source/index.rst +releasenotes/source/queens.rst +releasenotes/source/rocky.rst releasenotes/source/unreleased.rst \ No newline at end of file diff -Nru python-monascaclient-1.10.0/README.rst python-monascaclient-1.14.0/README.rst --- python-monascaclient-1.10.0/README.rst 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/README.rst 2019-03-07 10:18:40.000000000 +0000 @@ -2,685 +2,29 @@ Team and repository tags ======================== -.. image:: https://governance.openstack.org/badges/python-monascaclient.svg - :target: https://governance.openstack.org/reference/tags/index.html +.. image:: https://governance.openstack.org/tc/badges/python-monascaclient.svg + :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on Python bindings to the Monasca API -======================================= +================================== -This is a client library for Monasca built to interface with the Monasca API. It -provides a Python API (the ``monascaclient`` module) and a command-line tool -(``monasca``). - -The Monasca Client was written using the OpenStack Heat Python client as a framework. - -.. contents:: Contents: - :local: - -Ubuntu Install --------------- -Requires: - - pip - version >= 1.4. python get-pip.py - -See versions on PYPI: - https://pypi.python.org/pypi/python-monascaclient/ - -Install It: - - sudo pip install python-monascaclient - -Alternative Manual Install Steps: - - cd to your python-monascaclient repo - - sudo pip install -r requirements.txt - - python setup.py install - -Building and Packaging ----------------------- -Install the tool dependencies - sudo apt-get install python-pip python-virtualenv - -In the python-monascaclient source directory - virtualenv --no-site-packages .venv - - source ./.venv/bin/activate - - pip install wheel - - python setup.py bdist_wheel - - pip install $(ls -1rt dist/*.whl | tail -1) --upgrade - -Command-line API ----------------- -Installing this distribution gets you a shell command, ``monasca``, that you -can use to interact with the Monitoring API server. - -Usage: - monasca - - monasca help - - monasca help - - This outputs the results in json format. Normally output is in table format. - - -The monascaclient CLI needs the Monasca API endpoint url and the OS_AUTH_TOKEN to pass to the -Monasca API RESTful interface. This is provided through environment or CLI -parameters. - -Environmental Variables -======================= - -Environmental variables can be sourced, or optionally passed in as CLI arguments. -It is easiest to source them first and then use the CLI. - -When token and endpoint are known:: - - export OS_AUTH_TOKEN=XXX - export MONASCA_API_URL=http://192.168.10.4:8070/v2.0/ - -When using Keystone to obtain the token and endpoint:: - - export OS_USERNAME= - export OS_PASSWORD= - export OS_USER_DOMAIN_NAME= - export OS_PROJECT_NAME= - export OS_AUTH_URL= - export OS_REGION_NAME= - # Optional(specific version added to OS_AUTH_URL if (v2.0 or v3) not present already) - export OS_AUTH_VERSION= - -When OS_USER_DOMAIN_NAME is not set, then 'Default' is assumed. Alternatively IDs can be used instead of names. -Although *deprecated*, but OS_TENANT_NAME and OS_TENANT_ID can be used for -OS_PROEJCT_NAME and OS_PROJECT_ID respectively. - -When using Vagrant Environment with middleware disabled:: - - export OS_AUTH_TOKEN=82510970543135 - export OS_NO_CLIENT_AUTH=1 - export MONASCA_API_URL=http://192.168.10.4:8070/v2.0/ - -The Monasca API will treat the auth token as the tenant ID when Keystone is not enabled. - -Usage -===== - -You'll find complete documentation on the shell by running - -``monasca help``:: - - usage: monasca [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug] - [--os-cloud ] - [--os-region-name ] - [--os-cacert ] [--os-cert ] - [--os-key ] [--verify | --insecure] - [--os-default-domain ] - [--os-interface ] [--timing] [--os-beta-command] - [--os-auth-type ] [--os-code ] - [--os-protocol ] - [--os-project-name ] - [--os-trust-id ] - [--os-domain-name ] - [--os-user-domain-id ] - [--os-access-token-type ] - [--os-default-domain-name ] - [--os-access-token-endpoint ] - [--os-access-token ] - [--os-domain-id ] - [--os-user-domain-name ] - [--os-openid-scope ] - [--os-user-id ] - [--os-identity-provider ] - [--os-username ] [--os-auth-url ] - [--os-client-secret ] - [--os-default-domain-id ] - [--os-discovery-endpoint ] - [--os-client-id ] - [--os-project-domain-name ] - [--os-project-domain-id ] - [--os-password ] - [--os-redirect-uri ] - [--os-endpoint ] [--os-token ] - [--os-passcode ] - [--os-project-id ] - [--monasca-api-url MONASCA_API_URL] - [--monasca-api-version MONASCA_API_VERSION] - - Command-line interface to the OpenStack APIs - - 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. - --os-cloud - Cloud name in clouds.yaml (Env: OS_CLOUD) - --os-region-name - Authentication region name (Env: OS_REGION_NAME) - --os-cacert - CA certificate bundle file (Env: OS_CACERT) - --os-cert - Client certificate bundle file (Env: OS_CERT) - --os-key Client certificate key file (Env: OS_KEY) - --verify Verify server certificate (default) - --insecure Disable server certificate verification - --os-default-domain - Default domain ID, default=default. (Env: - OS_DEFAULT_DOMAIN) - --os-interface - Select an interface type. Valid interface types: - [admin, public, internal]. (Env: OS_INTERFACE) - --timing Print API call timing info - --os-beta-command Enable beta commands which are subject to change - --os-auth-type - Select an authentication type. Available types: - v2token, admin_token, v3oidcauthcode, v2password, - v3password, v3oidcaccesstoken, v3oidcpassword, token, - v3oidcclientcredentials, v3tokenlessauth, v3token, - v3totp, password. Default: selected based on --os- - username/--os-token (Env: OS_AUTH_TYPE) - --os-code - With v3oidcauthcode: OAuth 2.0 Authorization Code - (Env: OS_CODE) - --os-protocol - With v3oidcauthcode: Protocol for federated plugin - With v3oidcaccesstoken: Protocol for federated plugin - With v3oidcpassword: Protocol for federated plugin - With v3oidcclientcredentials: Protocol for federated - plugin (Env: OS_PROTOCOL) - --os-project-name - With v3oidcauthcode: Project name to scope to With - v3password: Project name to scope to With - v3oidcaccesstoken: Project name to scope to With - v3oidcpassword: Project name to scope to With token: - Project name to scope to With v3oidcclientcredentials: - Project name to scope to With v3tokenlessauth: Project - name to scope to With v3token: Project name to scope - to With v3totp: Project name to scope to With - password: Project name to scope to (Env: - OS_PROJECT_NAME) - --os-trust-id - With v2token: Trust ID With v3oidcauthcode: Trust ID - With v2password: Trust ID With v3password: Trust ID - With v3oidcaccesstoken: Trust ID With v3oidcpassword: - Trust ID With token: Trust ID With - v3oidcclientcredentials: Trust ID With v3token: Trust - ID With v3totp: Trust ID With password: Trust ID (Env: - OS_TRUST_ID) - --os-domain-name - With v3oidcauthcode: Domain name to scope to With - v3password: Domain name to scope to With - v3oidcaccesstoken: Domain name to scope to With - v3oidcpassword: Domain name to scope to With token: - Domain name to scope to With v3oidcclientcredentials: - Domain name to scope to With v3tokenlessauth: Domain - name to scope to With v3token: Domain name to scope to - With v3totp: Domain name to scope to With password: - Domain name to scope to (Env: OS_DOMAIN_NAME) - --os-user-domain-id - With v3password: User's domain id With v3totp: User's - domain id With password: User's domain id (Env: - OS_USER_DOMAIN_ID) - --os-access-token-type - With v3oidcauthcode: OAuth 2.0 Authorization Server - Introspection token type, it is used to decide which - type of token will be used when processing token - introspection. Valid values are: "access_token" or - "id_token" With v3oidcpassword: OAuth 2.0 - Authorization Server Introspection token type, it is - used to decide which type of token will be used when - processing token introspection. Valid values are: - "access_token" or "id_token" With - v3oidcclientcredentials: OAuth 2.0 Authorization - Server Introspection token type, it is used to decide - which type of token will be used when processing token - introspection. Valid values are: "access_token" or - "id_token" (Env: OS_ACCESS_TOKEN_TYPE) - --os-default-domain-name - With token: Optional domain name to use with v3 API - and v2 parameters. It will be used for both the user - and project domain in v3 and ignored in v2 - authentication. With password: Optional domain name to - use with v3 API and v2 parameters. It will be used for - both the user and project domain in v3 and ignored in - v2 authentication. (Env: OS_DEFAULT_DOMAIN_NAME) - --os-access-token-endpoint - With v3oidcauthcode: OpenID Connect Provider Token - Endpoint. Note that if a discovery document is being - passed this option will override the endpoint provided - by the server in the discovery document. With - v3oidcpassword: OpenID Connect Provider Token - Endpoint. Note that if a discovery document is being - passed this option will override the endpoint provided - by the server in the discovery document. With - v3oidcclientcredentials: OpenID Connect Provider Token - Endpoint. Note that if a discovery document is being - passed this option will override the endpoint provided - by the server in the discovery document. (Env: - OS_ACCESS_TOKEN_ENDPOINT) - --os-access-token - With v3oidcaccesstoken: OAuth 2.0 Access Token (Env: - OS_ACCESS_TOKEN) - --os-domain-id - With v3oidcauthcode: Domain ID to scope to With - v3password: Domain ID to scope to With - v3oidcaccesstoken: Domain ID to scope to With - v3oidcpassword: Domain ID to scope to With token: - Domain ID to scope to With v3oidcclientcredentials: - Domain ID to scope to With v3tokenlessauth: Domain ID - to scope to With v3token: Domain ID to scope to With - v3totp: Domain ID to scope to With password: Domain ID - to scope to (Env: OS_DOMAIN_ID) - --os-user-domain-name - With v3password: User's domain name With v3totp: - User's domain name With password: User's domain name - (Env: OS_USER_DOMAIN_NAME) - --os-openid-scope - With v3oidcauthcode: OpenID Connect scope that is - requested from authorization server. Note that the - OpenID Connect specification states that "openid" must - be always specified. With v3oidcpassword: OpenID - Connect scope that is requested from authorization - server. Note that the OpenID Connect specification - states that "openid" must be always specified. With - v3oidcclientcredentials: OpenID Connect scope that is - requested from authorization server. Note that the - OpenID Connect specification states that "openid" must - be always specified. (Env: OS_OPENID_SCOPE) - --os-user-id - With v2password: User ID to login with With - v3password: User ID With v3totp: User ID With - password: User id (Env: OS_USER_ID) - --os-identity-provider - With v3oidcauthcode: Identity Provider's name With - v3oidcaccesstoken: Identity Provider's name With - v3oidcpassword: Identity Provider's name With - v3oidcclientcredentials: Identity Provider's name - (Env: OS_IDENTITY_PROVIDER) - --os-username - With v2password: Username to login with With - v3password: Username With v3oidcpassword: Username - With v3totp: Username With password: Username (Env: - OS_USERNAME) - --os-auth-url - With v2token: Authentication URL With v3oidcauthcode: - Authentication URL With v2password: Authentication URL - With v3password: Authentication URL With - v3oidcaccesstoken: Authentication URL With - v3oidcpassword: Authentication URL With token: - Authentication URL With v3oidcclientcredentials: - Authentication URL With v3tokenlessauth: - Authentication URL With v3token: Authentication URL - With v3totp: Authentication URL With password: - Authentication URL (Env: OS_AUTH_URL) - --os-client-secret - With v3oidcauthcode: OAuth 2.0 Client Secret With - v3oidcpassword: OAuth 2.0 Client Secret With - v3oidcclientcredentials: OAuth 2.0 Client Secret (Env: - OS_CLIENT_SECRET) - --os-default-domain-id - With token: Optional domain ID to use with v3 and v2 - parameters. It will be used for both the user and - project domain in v3 and ignored in v2 authentication. - With password: Optional domain ID to use with v3 and - v2 parameters. It will be used for both the user and - project domain in v3 and ignored in v2 authentication. - (Env: OS_DEFAULT_DOMAIN_ID) - --os-discovery-endpoint - With v3oidcauthcode: OpenID Connect Discovery Document - URL. The discovery document will be used to obtain the - values of the access token endpoint and the - authentication endpoint. This URL should look like - https://idp.example.org/.well-known/openid- - configuration With v3oidcpassword: OpenID Connect - Discovery Document URL. The discovery document will be - used to obtain the values of the access token endpoint - and the authentication endpoint. This URL should look - like https://idp.example.org/.well-known/openid- - configuration With v3oidcclientcredentials: OpenID - Connect Discovery Document URL. The discovery document - will be used to obtain the values of the access token - endpoint and the authentication endpoint. This URL - should look like https://idp.example.org/.well-known - /openid-configuration (Env: OS_DISCOVERY_ENDPOINT) - --os-client-id - With v3oidcauthcode: OAuth 2.0 Client ID With - v3oidcpassword: OAuth 2.0 Client ID With - v3oidcclientcredentials: OAuth 2.0 Client ID (Env: - OS_CLIENT_ID) - --os-project-domain-name - With v3oidcauthcode: Domain name containing project - With v3password: Domain name containing project With - v3oidcaccesstoken: Domain name containing project With - v3oidcpassword: Domain name containing project With - token: Domain name containing project With - v3oidcclientcredentials: Domain name containing - project With v3tokenlessauth: Domain name containing - project With v3token: Domain name containing project - With v3totp: Domain name containing project With - password: Domain name containing project (Env: - OS_PROJECT_DOMAIN_NAME) - --os-project-domain-id - With v3oidcauthcode: Domain ID containing project With - v3password: Domain ID containing project With - v3oidcaccesstoken: Domain ID containing project With - v3oidcpassword: Domain ID containing project With - token: Domain ID containing project With - v3oidcclientcredentials: Domain ID containing project - With v3tokenlessauth: Domain ID containing project - With v3token: Domain ID containing project With - v3totp: Domain ID containing project With password: - Domain ID containing project (Env: - OS_PROJECT_DOMAIN_ID) - --os-password - With v2password: Password to use With v3password: - User's password With v3oidcpassword: Password With - password: User's password (Env: OS_PASSWORD) - --os-redirect-uri - With v3oidcauthcode: OpenID Connect Redirect URL (Env: - OS_REDIRECT_URI) - --os-endpoint - With admin_token: The endpoint that will always be - used (Env: OS_ENDPOINT) - --os-token - With v2token: Token With admin_token: The token that - will always be used With token: Token to authenticate - with With v3token: Token to authenticate with (Env: - OS_TOKEN) - --os-passcode - With v3totp: User's TOTP passcode (Env: OS_PASSCODE) - --os-project-id - With v3oidcauthcode: Project ID to scope to With - v3password: Project ID to scope to With - v3oidcaccesstoken: Project ID to scope to With - v3oidcpassword: Project ID to scope to With token: - Project ID to scope to With v3oidcclientcredentials: - Project ID to scope to With v3tokenlessauth: Project - ID to scope to With v3token: Project ID to scope to - With v3totp: Project ID to scope to With password: - Project ID to scope to (Env: OS_PROJECT_ID) - --monasca-api-url MONASCA_API_URL - Defaults to env[MONASCA_API_URL]. - --monasca-api-version MONASCA_API_VERSION - Defaults to env[MONASCA_API_VERSION] or 2_0 - - Commands: - alarm-count Count alarms. - alarm-definition-create Create an alarm definition. - alarm-definition-delete Delete the alarm definition. - alarm-definition-list List alarm definitions for this tenant. - alarm-definition-patch Patch the alarm definition. - alarm-definition-show Describe the alarm definition. - alarm-definition-update Update the alarm definition. - alarm-delete Delete the alarm. - alarm-history Alarm state transition history. - alarm-history-list List alarms state history. - alarm-list List alarms for this tenant. - alarm-patch Patch the alarm state. - alarm-show Describe the alarm. - alarm-update Update the alarm state. - complete print bash completion command - dimension-name-list List names of metric dimensions. - dimension-value-list List names of metric dimensions. - help print detailed help for another command - measurement-list List measurements for the specified metric. - metric-create Create metric. - metric-create-raw Create metric from raw json body. - metric-list List metrics for this tenant. - metric-name-list List names of metrics. - metric-statistics List measurement statistics for the specified metric. - notification-create Create notification. - notification-delete Delete notification. - notification-list List notifications for this tenant. - notification-patch Patch notification. - notification-show Describe the notification. - notification-type-list List notification types supported by monasca. - notification-update Update notification. - - -Bash Completion ---------------- - -Basic command tab completion can be enabled by sourcing the bash completion script. -:: - - monasca completion >> /usr/local/share/monasca.bash_completion - - -Metrics Examples ----------------- - -Note: To see complete usage: 'monasca help' and 'monasca help ' - -metric-create:: - - monasca metric-create cpu1 123.40 - monasca metric-create metric1 1234.56 --dimensions instance_id=123,service=ourservice - monasca metric-create metric1 2222.22 --dimensions instance_id=123,service=ourservice - monasca metric-create metric1 3333.33 --dimensions instance_id=222,service=ourservice - monasca metric-create metric1 4444.44 --dimensions instance_id=222 --value-meta rc=404 - -metric-list:: - - monasca metric-list - +---------+--------------------+ - | name | dimensions | - +---------+--------------------+ - | cpu1 | | - | metric1 | instance_id:123 | - | | service:ourservice | - +---------+--------------------+ - -measurement-list:: - - monasca measurement-list metric1 2014-01-01T00:00:00Z - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | name | dimensions | measurement_id | timestamp | value | value_meta | - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | metric1 | instance_id:123 | 723885 | 2014-05-08T21:46:32Z | 1234.56 | | - | | service:ourservice | 725951 | 2014-05-08T21:48:50Z | 2222.22 | | - | metric1 | instance_id:222 | 726837 | 2014-05-08T21:49:47Z | 3333.33 | | - | | service:ourservice | 726983 | 2014-05-08T21:50:27Z | 4444.44 | rc: 404 | - +---------+--------------------+----------------+----------------------+--------------+-------------+ +.. image:: https://img.shields.io/pypi/v/python-monascaclient.svg + :target: https://pypi.python.org/pypi/python-monascaclient/ + :alt: Latest Version - monasca measurement-list metric1 2014-01-01T00:00:00Z --dimensions instance_id=123 - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | name | dimensions | measurement_id | timestamp | value | value_meta | - +---------+--------------------+----------------+----------------------+--------------+-------------+ - | metric1 | instance_id:123 | 723885 | 2014-05-08T21:46:32Z | 1234.56 | | - | | service:ourservice | 725951 | 2014-05-08T21:48:50Z | 2222.22 | | - +---------+--------------------+----------------+----------------------+--------------+-------------+ - - -Notifications Examples -~~~~~~~~~~~~~~~~~~~~~~ -Note: To see complete usage: 'monasca help' and 'monasca help ' - -notification-create:: - - monasca notification-create cindyemail1 EMAIL cindy.employee@hp.com - monasca notification-create myapplication WEBHOOK http://localhost:5000 - monasca notification-create mypagerduty PAGERDUTY nzH2LVRdMzun11HNC2oD - -notification-list:: - - monasca notification-list - +---------------+--------------------------------------+-------+----------------------+ - | name | id | type | address | - +---------------+--------------------------------------+-------+----------------------+ - | cindyemail1 | 5651406c-447d-40bd-b868-b2b3e6b59e32 | EMAIL |cindy.employee@hp.com | - | myapplication | 55905ce2-91e3-41ce-b45a-de7032f8d718 | WEBHOOK |http://localhost:5000 - | mypagerduty | 5720ccb5-6a3d-22ba-545g-ce467a5b41a2 | PAGERDUTY |nzH2LVRdMzun11HNC2oD - +---------------+--------------------------------------+-------+----------------------+ - - -Alarms Examples -~~~~~~~~~~~~~~~ -Note: To see complete usage: 'monasca help' and 'monasca help ' - -alarm-definition-create:: - - monasca alarm-definition-create alarmPerHost "max(cpu.load_avg_1_min) > 0" --match-by hostname - -alarm-definition-list:: - - +--------------+--------------------------------------+-----------------------------+----------+-----------------+ - | name | id | expression | match_by | actions_enabled | - +--------------+--------------------------------------+-----------------------------+----------+-----------------+ - | alarmPerHost | 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 | max(cpu.load_avg_1_min) > 0 | hostname | True | - +--------------+--------------------------------------+-----------------------------+----------+-----------------+ - -alarm-definition-show:: - - monasca alarm-definition-show 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 - +----------------------+----------------------------------------------------------------------------------------------------+ - | Property | Value | - +----------------------+----------------------------------------------------------------------------------------------------+ - | actions_enabled | true | - | alarm_actions | [] | - | description | "" | - | expression | "max(cpu.load_avg_1_min) > 0" | - | id | "4bf6bfc2-c5ac-4d57-b7db-cf5313b05412" | - | links | href:http://192.168.10.4:8070/v2.0/alarm-definitions/4bf6bfc2-c5ac-4d57-b7db-cf5313b05412,rel:self | - | match_by | [ | - | | "hostname" | - | | ] | - | name | "alarmPerHost" | - | ok_actions | [] | - | severity | "LOW" | - | undetermined_actions | [] | - +----------------------+----------------------------------------------------------------------------------------------------+ - -alarm-definition-delete:: - - monasca alarm-definition-delete 4bf6bfc2-c5ac-4d57-b7db-cf5313b05412 - -alarm-list:: - - monasca alarm-list - +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ - | id | alarm_definition_id | alarm_name | metric_name | metric_dimensions | severity | state | state_updated_timestamp | created_timestamp | - +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ - | 11e8c15d-0263-4b71-a8b8-4ecdaeb2902c | af1f347b-cddb-46da-b7cc-924261eeecdf | High CPU usage | cpu.idle_perc | hostname: devstack | LOW | OK | 2015-03-26T21:45:15.000Z | 2015-03-26T21:41:50.000Z | - | e5797cfe-b66e-4d44-98cd-3c7fc62d4c33 | af1f347b-cddb-46da-b7cc-924261eeecdf | High CPU usage | cpu.idle_perc | hostname: mini-mon | LOW | OK | 2015-03-26T21:43:15.000Z | 2015-03-26T21:41:47.000Z | - | | | | | service: monitoring | | | | | - +--------------------------------------+--------------------------------------+----------------+---------------+---------------------+----------+-------+--------------------------+--------------------------+ - -alarm-history:: - - monasca alarm-history 9d748b72-939b-45e7-a807-c0c5ad88d3e4 - +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ - | alarm_id | new_state | old_state | reason | reason_data | metric_name | metric_dimensions | timestamp | - +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ - | 9d748b72-939b-45e7-a807-c0c5ad88d3e4 | ALARM | UNDETERMINED | Thresholds were exceeded for the sub-alarms: [max(cpu.load_avg_1_min) > 0.0] | {} | cpu.load_avg_1_min | hostname: mini-mon | 2014-10-14T21:14:11.000Z | - | | | | | | | service: monitoring | | - +--------------------------------------+-----------+--------------+------------------------------------------------------------------------------+-------------+--------------------+---------------------+--------------------------+ - - -alarm-patch:: - - monasca alarm-patch fda5537b-1550-435f-9d6c-262b7e05065b --state OK - - -Python API -========== - -There's also a complete Python API. - -There are three possible approaches, at the moment, you can take to use the client -directly. On high level, these approaches can be described as: - -* using **username** and **password** -* using **token** -* using existing _` - -Username & password -------------------- - -Following approach allows to initialize the monascaclient in a traditional way. -It requires **username** and **password**. Initialization of the client -can be threfore executed with:: - - c = mon_client.Client(api_version='2_0', - username=os.environ.get('OS_USERNAME', 'mini-mon'), - password=os.environ.get('OS_PASSWORD', 'password'), - auth_url=os.environ.get('OS_AUTH_URL', 'http://127.0.0.1/identity'), - project_name=os.environ.get('OS_PROJECT_NAME', 'mini-mon'), - endpoint='http://127.0.0.1:8070/v2.0') - -Token ------ - -In order to use the monasclient directly, you must pass in a valid auth token and -monasca api endpoint, or you can pass in the credentials required by the keystone -client and let the Python API do the authentication. The user can obtain the token -and endpoint using the keystone client api: -http://docs.openstack.org/developer/python-keystoneclient/. Once **token** -is available, a monascaclient can be initialized with following code:: - - c = mon_client.Client(api_version='2_0', - endpoint='http://127.0.0.1:8070/v2.0' - token=token_id, - auth_url=os.environ.get('OS_AUTH_URL', 'http://127.0.0.1/identity'), - project_name=os.environ.get('OS_PROJECT_NAME', 'mini-mon')) - -Session -------- - -Usage of the monasclient with existing session can be expressed -with following code:: - - from keystoneauth1 import session - from keystoneauth1 import identity - - auth = identity.Token(auth_url=os.environ.get('OS_AUTH_URL', 'http://127.0.0.1/identity'), - token=token_id, - project_name=os.environ.get('OS_PROJECT_NAME', 'mini-mon')) - sess = session.Session(auth=auth) - - c = client.Client(api_version='2_0', - endpoint='http://127.0.0.1:8070/v2.0' - session=sess) - -The session object construction is much broader topic. It involves picking -one of the following authorization methods: - -* Password -* Token - -Alternatively, if Keystone version is known, you may choose: - -* V2Password or V3Password -* V2Token of V3Token -* V3OidcClientCredentials -* V3OidcPassword -* V3OidcAuthorizationCode -* V3OidcAccessToken -* V3TOTP -* V3TokenlessAuth - -For more details about each one of those methods, please visit -`official documentation `_. - -License -======= - -(C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP -Copyright 2017 Fujitsu LIMITED - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +This is a client library for Monasca built to interface with the Monasca API. +It provides a Python API (the ``monascaclient`` module) and a command-line tool +(``monasca``). -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. -See the License for the specific language governing permissions and -limitations under the License. +* License: Apache License, Version 2.0 +* `PyPi`_ - package installation +* `Online Documentation`_ +* `Bugs`_ - issue tracking (we use *bug* tag to differentiate from new features) +* `Source`_ + +.. _PyPi: https://pypi.python.org/pypi/python-monascaclient +.. _Online Documentation: https://docs.openstack.org/python-monascaclient/latest/ +.. _Bugs: https://storyboard.openstack.org/#!/project/880 +.. _Source: https://git.openstack.org/cgit/openstack/python-monascaclient diff -Nru python-monascaclient-1.10.0/releasenotes/source/index.rst python-monascaclient-1.14.0/releasenotes/source/index.rst --- python-monascaclient-1.10.0/releasenotes/source/index.rst 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/releasenotes/source/index.rst 2019-03-07 10:18:40.000000000 +0000 @@ -8,3 +8,5 @@ :maxdepth: 1 unreleased + rocky + queens diff -Nru python-monascaclient-1.10.0/releasenotes/source/queens.rst python-monascaclient-1.14.0/releasenotes/source/queens.rst --- python-monascaclient-1.10.0/releasenotes/source/queens.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-monascaclient-1.14.0/releasenotes/source/queens.rst 2019-03-07 10:18:40.000000000 +0000 @@ -0,0 +1,6 @@ +=================================== + Queens Series Release Notes +=================================== + +.. release-notes:: + :branch: stable/queens diff -Nru python-monascaclient-1.10.0/releasenotes/source/rocky.rst python-monascaclient-1.14.0/releasenotes/source/rocky.rst --- python-monascaclient-1.10.0/releasenotes/source/rocky.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-monascaclient-1.14.0/releasenotes/source/rocky.rst 2019-03-07 10:18:40.000000000 +0000 @@ -0,0 +1,6 @@ +=================================== + Rocky Series Release Notes +=================================== + +.. release-notes:: + :branch: stable/rocky diff -Nru python-monascaclient-1.10.0/requirements.txt python-monascaclient-1.14.0/requirements.txt --- python-monascaclient-1.10.0/requirements.txt 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/requirements.txt 2019-03-07 10:18:40.000000000 +0000 @@ -10,7 +10,7 @@ Babel!=2.4.0,>=2.3.4 # BSD iso8601>=0.1.11 # MIT pbr!=2.1.0,>=2.0.0 # Apache-2.0 -PrettyTable<0.8,>=0.7.1 # BSD -PyYAML>=3.10 # MIT +PrettyTable<0.8,>=0.7.2 # BSD +PyYAML>=3.12 # MIT six>=1.10.0 # MIT diff -Nru python-monascaclient-1.10.0/setup.cfg python-monascaclient-1.14.0/setup.cfg --- python-monascaclient-1.10.0/setup.cfg 2018-01-22 17:26:21.000000000 +0000 +++ python-monascaclient-1.14.0/setup.cfg 2019-03-07 10:21:51.000000000 +0000 @@ -3,7 +3,7 @@ summary = Monasca API Client Library description-file = README.rst author = OpenStack -author-email = openstack-dev@lists.openstack.org +author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/python-monascaclient/latest/ classifier = Environment :: Console @@ -16,6 +16,7 @@ Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 [files] packages = monascaclient diff -Nru python-monascaclient-1.10.0/.stestr.conf python-monascaclient-1.14.0/.stestr.conf --- python-monascaclient-1.10.0/.stestr.conf 1970-01-01 00:00:00.000000000 +0000 +++ python-monascaclient-1.14.0/.stestr.conf 2019-03-07 10:18:40.000000000 +0000 @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./monascaclient/tests} +top_dir=./ diff -Nru python-monascaclient-1.10.0/.testr.conf python-monascaclient-1.14.0/.testr.conf --- python-monascaclient-1.10.0/.testr.conf 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/.testr.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \ - ${PYTHON:-python} -m subunit.run discover -t ./ $OS_TEST_PATH $LISTOPT $IDOPTION - -test_id_option=--load-list $IDFILE -test_list_option=--list -group_regex=monascaclient\.tests(?:\.|_)([^_]+) diff -Nru python-monascaclient-1.10.0/test-requirements.txt python-monascaclient-1.14.0/test-requirements.txt --- python-monascaclient-1.10.0/test-requirements.txt 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/test-requirements.txt 2019-03-07 10:18:40.000000000 +0000 @@ -2,18 +2,17 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +hacking>=1.1.0,<1.2.0 # Apache-2.0 bandit>=1.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 -os-testr>=1.0.0 # Apache-2.0 -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=1.0.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT # documentation doc8>=0.6.0 # Apache-2.0 -sphinx!=1.6.6,>=1.6.2 # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD reno>=2.5.0 # Apache-2.0 -openstackdocstheme>=1.17.0 # Apache-2.0 +openstackdocstheme>=1.18.1 # Apache-2.0 diff -Nru python-monascaclient-1.10.0/tox.ini python-monascaclient-1.14.0/tox.ini --- python-monascaclient-1.10.0/tox.ini 2018-01-22 17:23:38.000000000 +0000 +++ python-monascaclient-1.14.0/tox.ini 2019-03-07 10:18:40.000000000 +0000 @@ -1,5 +1,5 @@ [tox] -envlist = py{27,35},pypy,cover,pep8 +envlist = py{27,35,36},pypy,cover,pep8 minversion = 2.5 skipsdist = True @@ -15,45 +15,32 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/test-requirements.txt + -r{toxinidir}/requirements.txt whitelist_externals = bash find rm commands = find {toxinidir} -type f -name "*.pyc" -delete - rm -Rf {toxinidir}/.testrepository/times.dbm - -[testenv:py27] -basepython = python2.7 -commands = - {[testenv]commands} - ostestr {posargs} - -[testenv:py35] -basepython = python3.5 -commands = - {[testenv]commands} - ostestr {posargs} - -[testenv:pypy] -basepython = pypy -commands = - {[testenv]commands} - ostestr {posargs} + stestr run {posargs} [testenv:cover] -basepython = python2.7 +basepython = python3 +setenv = + PYTHON=coverage run --source monascaclient --parallel-mode commands = - {[testenv]commands} - coverage erase - python setup.py test --coverage --testr-args='{posargs}' --coverage-package-name=monascaclient --omit=monascaclient/tests/* - coverage report + coverage erase + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report [testenv:debug] -commands = - {[testenv]commands} - oslo_debug_helper -t {env:OS_TEST_PATH} {posargs} +basepython = python3 +commands = oslo_debug_helper -t {env:OS_TEST_PATH} {posargs} [testenv:pep8] +basepython = python3 skip_install = True usedevelop = False commands = @@ -62,46 +49,48 @@ {[testenv:checkniceness]commands} [testenv:flake8] +basepython = python3 skip_install = True usedevelop = False -commands = - {[testenv]commands} - flake8 monascaclient +commands = flake8 monascaclient [testenv:bandit] +basepython = python3 skip_install = True usedevelop = False -commands = - {[testenv]commands} - bandit -r monascaclient -n5 -x {env:OS_TEST_PATH} +commands = bandit -r monascaclient -n5 -x {env:OS_TEST_PATH} [testenv:docs] +basepython = python3 description = Builds full monascaclient documentation commands = - {[testenv]commands} {[testenv:devdocs]commands} {[testenv:releasenotes]commands} [testenv:devdocs] +basepython = python3 description = Builds developer documentation commands = rm -rf {toxinidir}/doc/build {toxinidir}/doc/source/contributor/api python setup.py build_sphinx [testenv:releasenotes] +basepython = python3 description = Called from CI script to test and publish the Release Notes commands = rm -rf releasenotes/build - sphinx-build -a -E -d {toxinidir}/releasenotes/build/doctrees -b html {toxinidir}/releasenotes/source {toxinidir}/releasenotes/build/html + sphinx-build -a -E -d {toxinidir}/releasenotes/build/doctrees -b html \ + {toxinidir}/releasenotes/source {toxinidir}/releasenotes/build/html [testenv:checkniceness] +basepython = python3 description = Validates (pep-like) documenation commands = - {[testenv]commands} doc8 --file-encoding utf-8 {toxinidir}/doc doc8 --file-encoding utf-8 {toxinidir}/releasenotes [testenv:venv] +basepython = python3 commands = {posargs} [hacking] @@ -110,6 +99,13 @@ [flake8] show-source = True -max-line-length = 120 +max-line-length = 100 builtins = _ exclude=.venv,.git,.tox,dist,client_api_example.py,*lib/python*,*egg,build + +[testenv:lower-constraints] +basepython = python3 +deps = + -c{toxinidir}/lower-constraints.txt + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/requirements.txt diff -Nru python-monascaclient-1.10.0/.zuul.yaml python-monascaclient-1.14.0/.zuul.yaml --- python-monascaclient-1.10.0/.zuul.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-monascaclient-1.14.0/.zuul.yaml 2019-03-07 10:18:40.000000000 +0000 @@ -0,0 +1,11 @@ +- project: + templates: + - openstack-cover-jobs + - openstack-lower-constraints-jobs + - openstack-python-jobs + - openstack-python35-jobs + - openstack-python36-jobs + - openstack-python37-jobs + - publish-openstack-docs-pti + - check-requirements + - release-notes-jobs-python3