Commit Graph

501 Commits

Author SHA1 Message Date
Zuul 8a6848e402 Merge "Replace assertItemsEqual with assertCountEqual" 2020-09-16 14:57:54 +00:00
Luigi Toscano d3ab74e495 Native Zuul v3 version of the functional legacy job
Pretty straightforward conversion, and remove the old scripts
which are not needed anymore.

Also, even though OS_TENANT_NAME is still exported,
read OS_PROJECT_NAME as first choice.

Depends-On: https://review.opendev.org/746235
Change-Id: Ie8402e2d9c3297e3bbee6065c9977890c4d46589
2020-08-18 18:13:43 +02:00
gugug 6c40175848 Replace assertItemsEqual with assertCountEqual
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.

[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277

Change-Id: I6d5e373917bd4aea7da8f158755bea53e96d6678
2020-07-12 11:13:16 +08:00
Andreas Jaeger 8054a326d1 Small cleanups
- Remove Babel from requirements, it's not needed for running.
- remove unused file setup.sh
- Update to hacking 3.1.0; fix problems found.
- Remove hacking and friends from lower-constraints, they are not
  needed there at all.

Depends-On: https://review.opendev.org/736382
Change-Id: I8b2a8c06de0282f797fab51d90aeac1ca2eef9c4
2020-06-18 09:43:43 +02:00
Hervé Beraud 2f543950de Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Ic9b94ceb733989b4676655cbc94eb20025908408
2020-06-02 20:50:11 +02:00
zhurong ccccd46b41 Remove Python 2.4 compat code
Change-Id: Iebc99b020c8e8b65a4121e8044a51aaba1737b2b
2020-04-20 19:56:22 -07:00
Sean McGinnis 8c1ca89062
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I96f66e103313c5ba4eb9cc04ed1e813ab3fb0532
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:58:55 -05:00
Zuul da7d3cfe3a Merge "Remove six usage muranoclient/v1" 2020-04-17 10:15:01 +00:00
Zuul 1971be3402 Merge "Remove six usage tests/functional" 2020-04-17 10:08:30 +00:00
Zuul 9a2bc53763 Merge "Remove six usage muranoclient/glance" 2020-04-17 10:08:29 +00:00
Zuul 0e90e48b04 Merge "Remove six usage muranoclient/osc" 2020-04-17 10:08:28 +00:00
Zuul 1c99ef99dc Merge "Remove six usage muranoclient/apiclient" 2020-04-17 10:08:27 +00:00
zhurong d6a9bd2370 Remove six usage tests/functional
Change-Id: Ie69ca8afd5058ac814f493161a778a6a3e36b53a
2020-04-17 08:13:18 +00:00
zhurong fe82041d9c Remove six usage muranoclient/v1
Depends-On: https://review.opendev.org/#/c/720636/
Depends-On: https://review.opendev.org/#/c/720631/
Depends-On: https://review.opendev.org/#/c/720632/
Depends-On: https://review.opendev.org/#/c/720638/
Depends-On: https://review.opendev.org/#/c/720639/
Change-Id: I2aa9e94279720b080d8235b510e42d202d7a0434
2020-04-17 00:08:29 -07:00
zhurong f541a29337 Remove six usage muranoclient/osc
Change-Id: Iea5eab31f38510f5e5fcfed34c46b854cbef3a8e
2020-04-16 22:54:41 -07:00
zhurong 75a0d1a393 Remove six usage muranoclient/glance
Change-Id: I8181996e52d1618a043c1875a809b9e8719e684b
2020-04-16 20:07:51 -07:00
zhurong ae37b0db70 Remove six usage muranoclient/apiclient
Change-Id: I992c890d3c679fde64bcffff170a1d3b8b1b124e
2020-04-16 19:52:18 -07:00
zhurong 8868671fd5 Remove six usage muranoclient/common
Change-Id: I7f27bc87c8ea098b70ab530d6857c927a571e930
2020-04-16 19:49:09 -07:00
Andreas Jaeger 787a6ac607 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 2.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Change-Id: I5cb9b15a3391bf32bb6e43958f8f6ffbcd6bcf07
2020-03-30 08:19:47 +02:00
zhurong af03963f4a Fix function tests failed in python3
Change-Id: I5a2c9b65a4138e6ce03d69feab1b5ec034b8ea61
2019-12-20 02:38:14 +00:00
zhurong de5d114d4a Fix muranoclient-functional-test-mysql-backend failed
Change-Id: Ia8e7a7106a9d217c142fd756f4a08d8c04205ac6
2019-12-16 10:03:55 +08:00
jacky06 f4c2251e26 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Iad6b06a96727b5aa05d2a2a0eeee1389fa3e0104
2019-04-26 10:36:04 +08:00
Ellen Batbouta 62e4565449 Ignore default values for deprecated security parameters
The command line parameters, ca-file, key-file, and cert-file,
are deprecated.  The problem is that the argument parser stores
the values for the deprecated parameters into the same attributes
used by Keystone.  As a result the murano dashboard is overriding
the default values of the Keystone attributes with its own default
values. This is wrong.

The change is to ignore these parameters if they are not specified
on the command line.  This will allow the Keystone client's method,
register_cli_options, to set them to the correct default values.
If the user specifies these parameters on the command line, then
we will honor them.

Change-Id: I08974f7fea0cd0cb2a906e26c9f197209c473b9b
Closes-bug: #1767144
2018-05-04 23:07:43 -04:00
OpenStack Proposal Bot e972b1b919 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I1f7f668d374e7a1b28f1388a6e34651fabc6407e
2018-03-06 12:03:15 +00:00
Zuul b5fb00e55a Merge "Imported Translations from Zanata" 2017-10-24 19:03:28 +00:00
OpenStack Proposal Bot 5b0779d173 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ie11ecde7b2910e82b4d0d8c419b3ebd9b2882939
2017-10-24 06:38:29 +00:00
Dai Dang Van 9d3d86e5e0 Use generic user for both zuul v2 and v3
Zuul v2 uses 'jenkins' as user, but Zuul v3 uses 'zuul'.
Using $USER solves it for both cases.

Change-Id: I872aae3c3b0a739687be199c5c1858957f9cd3b0
2017-10-17 14:12:19 +07:00
chenaidong1 3e71528e9c update env template output
When update with unexisting env template, the output contain '&lt;'
and '&gt;'.

murano env-template-update 849c781b2ef84a6a8961b520c11f7322 test
404 Not Found: EnvTemplate &lt;TempId 849c781b2ef84a6a8961b520c11f7322&gt;
is not found (HTTP 404)

Change-Id: Ifcbdc4cb5846de35e55fbeeaf21f9ce3d4748e36
2017-09-23 05:59:36 +00:00
zhurong e1d7761459 Add package download to openstack CLI
usage: openstack package download [-h] <ID> [file]

Download a package to a filename or stdout.

Partially implements: blueprint openstack-client-plugin-support

Change-Id: I5e782f35dbfc09fe460e30f48a853f8df53d1518
2017-08-22 21:59:47 +08:00
zhurong 54a1c60570 Add package update to openstack CLI
usage: openstack package update [-h] [-f {json,shell,table,value,yaml}]
                                [-c COLUMN] [--max-width <integer>]
                                [--print-empty] [--noindent] [--prefix PREFIX]
                                [--is-public {true|false}]
                                [--enabled {true|false}] [--name NAME]
                                [--description DESCRIPTION]
                                [--tags [<TAG> [<TAG> ...]]]
                                <ID>

Update an existing package.

Partially implements: blueprint openstack-client-plugin-support

Change-Id: Ia287c3202a3698790f8130cd87311b33aa92f5f2
2017-08-22 12:45:26 +08:00
zhurong 2fbfc68f8a Add package show to openstack CLI
usage: openstack package show [-h] [-f {json,shell,table,value,yaml}]
                              [-c COLUMN] [--max-width <integer>]
                              [--fit-width] [--print-empty] [--noindent]
                              [--prefix PREFIX]
                              <ID>

Display details for a package.

Partially implements: blueprint openstack-client-plugin-support

Change-Id: I4373469a98f11194eb9d3dfe78898eef0bd36c3d
2017-08-22 10:23:20 +08:00
zhurong 6103ec25d9 Add bundle import to openstack CLI
usage: openstack bundle import [-h] [-f {csv,json,table,value,yaml}]
                               [-c COLUMN] [--max-width <integer>]
                               [--print-empty] [--noindent]
                               [--quote {all,minimal,none,nonnumeric}]
                               [--is-public] [--exists-action {a,s,u}]
                               [--murano-repo-url MURANO_REPO_URL]
                               <FILE> [<FILE> ...]

Import a bundle.

Partially implements: blueprint openstack-client-plugin-support

Change-Id: I6a5f8c31c1b9671b4ff7f41f83c415261785b635
2017-08-18 09:37:59 +08:00
zhurong 8a83e58e97 Skip two test due to apps.openstack.org is retired
Change-Id: Ic272e875b918c476a023f2c28b930a0e1001b456
2017-08-15 15:34:00 +08:00
lingyongxu 16bc835bd0 Update the documentation link for doc migration
This patch is proposed according to the Direction 10 of doc
migration(https://etherpad.openstack.org/p/doc-migration-tracking).

Change-Id: I5773e208a35a52b946fb2edda47c4b03aebbbfd6
2017-08-02 16:55:04 +08:00
Felipe Monteiro 7e2a6445a6 Remove long-ago deprecated show_categories
The API catalog endpoint `show_categories` was deprecated back
in Liberty cycle. It was recently removed from murano in
If1bea7448c0d4aa5fdf37c8400323589d73fdb21

This commit removes the muranoclient usage of this now-removed
endpoint, which is currently used by muranodashboard, causing
bugs. There is a commit for muranodashboard to address this
problem: I715b1c9ccfdd044980596cc6d966062e0386884c

After muranodashboard stops referencing the deprecated
endpoint in favor of the current one, all references
to the deprecated endpoint will have been removed.

Related change: If1bea7448c0d4aa5fdf37c8400323589d73fdb21

Change-Id: I2024fc1e5705f581579ecabaec30f66687a272d7
Depends-On: I715b1c9ccfdd044980596cc6d966062e0386884c
Partial-Bug: #1701067
2017-06-28 20:39:56 +01:00
huangsm caaebdc257 Modify Default Domain
From 2016/10, there is no domain with id 'default' in keystone.
And the user would create a domain whith name 'default', like this:
https://docs.openstack.org/mitaka/install-guide-obs/keystone-users.html
If a user do not specify domain_id and domain_name, it is appropriate to set
the default domain with name 'default'.

Change-Id: I4a8ff3e06362e8034eb84b0a26d8400fc733292a
2017-05-15 11:29:30 +08:00
Artem Tiumentcev 93e34ffe88 Add package import to openstack CLI
usage: openstack package import [-h] [-f {csv,json,table,value,yaml}]
                                [-c COLUMN] [--max-width <integer>]
                                [--noindent]
                                [--quote {all,minimal,none,nonnumeric}]
                                [--categories [<CATEGORY> [<CATEGORY>
...]]]
                                [--is-public IS_PUBLIC]
                                [--package-version PACKAGE_VERSION]
                                [--exists-action {a,s,u}]
                                [--dep-exists-action {a,s,u}]
                                [--murano-repo-url MURANO_REPO_URL]
                                <FILE> [<FILE> ...]

Partially implements: blueprint openstack-client-plugin-support
Co-Authored-By: zhurong <aaronzhu1121@gmail.com>

Change-Id: Iddc3a6d07bfbb04ba601446078d36839adf640c4
2017-04-28 11:04:11 +08:00
ForestLee 0b63a8d6a7 delete bash_completion in subcommand
There are two "completion" in the subcommand table: bash-completion
and bash_completion. but "bash_completion" is not in help information
and it is repeated with "bash-completion", so delete it.

Change-Id: Ia00061376daabeacd524b1afb01e2e9a585ac56f
Closes-Bug: #1670123
2017-04-21 20:13:48 +00:00
zhurong 939b8e81be Correct the unit test name
Change-Id: I3c06b5c34aa1e56b27601e7c0d3074308617bb0e
2017-04-10 12:47:44 +08:00
M V P Nitesh 3e70d5be31 Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Ib3740617715c7097efeb5852338a669dc0bf8ff7
2017-04-04 17:29:58 +05:30
Jenkins c1c64f8511 Merge "Replaces uuid.uuid4 with uuidutils.generate_uuid()" 2017-04-01 19:47:45 +00:00
melissaml d90ef0950d Replaces uuid.uuid4 with uuidutils.generate_uuid()
OpenStack common has a wrapper for generating uuids. We should
use that function when generating uuids for consistency.

Change-Id: Ie6c8ac0d70e200f60415e720bc0f94980ec11147
2017-03-22 12:14:44 +08:00
luqitao bd20b2dbbf Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I2b70b72ac633c559e7ad366d6a1c1763aebf562a
2017-03-21 02:50:06 -04:00
LiuNanke 6776dd66ac Make method import_versioned_module work
Oslo.utils 3.17 provides similar function, just use it.
For more information:
[1] http://docs.openstack.org/developer/oslo.utils/history.html

Change-Id: I77b0517422569f9ef559b2cf7c7d954713c74de5
Closes-Bug: #1627313
2017-03-14 09:59:46 +00:00
Jenkins c9069b726e Merge "Allows fetching of deployments from all environments." 2017-03-06 01:46:44 +00:00
Felipe Monteiro 792ce5249e Allows fetching of deployments from all environments.
Murano Dashboard uses Murano Client to fetch data from Murano.
In order to improve log browsing for deployments in Murano
Dashboard, which requires showing all deployments for all
environments, the deployments API had to be changed to support
this.

Includes client support for OSC as well as old murano client.

Change-Id: I80c02a8cfd82260f097474bb512f693aa6734655
Partially-implements: blueprint improve-deployment-log-browsing
Depends-On: I1b6a313af1a0c4aa57bd4e6f51da92b396b35165
2017-01-31 10:41:59 -05:00
Cao Xuan Hoang 2cb00dbbd9 Remove white space between print ()
There is a white space in line [print (*,
then we remove it.

Change-Id: I0d4b2e11f690810e1fadd7d119083ad97d9943e0
2017-01-16 10:25:45 +07:00
Jenkins 3c29ff2ae5 Merge "Add package delete to openstack CLI" 2017-01-11 22:51:28 +00:00
Jenkins 40075056ef Merge "Fixes filtering applications by name with glare." 2017-01-04 20:08:54 +00:00
Felipe Monteiro 85b3a042dd Fixes filtering applications by name with glare.
This fix applies to Murano + Glare only.

The glare artifact_properties table does not contain a property
name 'name', but rather 'display_name'. Thus, filtering by 'name'
was not working. This change changes the kwargs filter dict to
use the key 'display_name' rather than 'name'.

Change-Id: I10d4d728fcd3e4bc0cc41cbddcad9ccd40b57f5e
Closes-Bug: #1653774
2017-01-04 01:52:04 +00:00