Commit Graph

359 Commits (master)

Author SHA1 Message Date
Takashi Kajinami 23e647539c Remove six
This library no longer supports Python 2, thus usage of six can be
removed.

Change-Id: I8d0c1cfd6dff375b3b7756a5b36c95a2df3f04c6
1 year ago
Ghanshyam Mann 17958681f6 [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8
support in their later version.

- noqa for pep8 C901 check.

Closes-Bug: #1886298

Story: #2007865
Task: #40186

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal

Change-Id: I67b4957cea1ccbd5cdc0314d2eaddef0c24f7dfc
3 years ago
Andreas Jaeger 9dede4eb2b Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: I82c745f5b1236844deec4538be84037a64eebeee
3 years ago
Zuul 207968f353 Merge "Cleanup of .keys() from dict_object.keys() *in* operator" 3 years ago
Zane Bitter 163d4aa0e9 Remove mox usage from test_shell
Change-Id: I4e1dbb55dbc01ebf18ca80aa63ae492a1a8f47ae
3 years ago
jacky06 fcc7befd0f Cleanup of .keys() from dict_object.keys() *in* operator
Change-Id: I49bb58e5dc2618ee02424315e4e3bf1057a77068
4 years ago
ricolin 82c842f3d9 Update stack_id clearify for heat client functions
most of our client major function require stack_id. We should
provide more specific information (at lest in function description)
to clearify that it's allowed to feed in stack name to `stack_id`
too. For example, both `heat.stacks.get($Stack_UUID)` and
`heat.stacks.get($Stack_Name)` works.

Change-Id: I4428097140e0391a77679f5c69e00966f249efd7
4 years ago
Zuul dd5f64c4c4 Merge "Load files from adopt file when adopt stack" 5 years ago
ricolin 597e98fec0 Load files from adopt file when adopt stack
Add files from adopt file into create fields. This allow us to
adopt nested stack which the template defined in files.
Story: #1700744
Task: #17263

Change-Id: I2b473791186949d49be59ee790185b3e394c7000
5 years ago
Thomas Herve 0b46b2089c Mark stacks returned by get loaded
When calling stacks.get, mark the returning stacks as loaded, so that
attribute retrieval works right away. If not, any getattr on the Stack
will call get() which will request the stack again (and ignore things
like resolve_outputs).

Change-Id: I3a3f25aa0c6f88e7e4274107c0578fd30dc9f155
Related-Bug: #1774958
5 years ago
Zuul 1f2c1a2a8a Merge "[policy in code] Change policy description" 5 years ago
rabi 187fc54249 Add --no-rollback option for stack cancel
This adds a new --no-rollback option for stack cancel.

Usage: openstack stack cancel --no-rollback <stack_name>

Change-Id: I46252823701779e3a3c6867bc470d5532cf9d7a7
Related-Bug: #1709041
6 years ago
ricolin e74181b490 [policy in code] Change policy description
Now we also support get policy from policies in code.
Depends-On: I610115dc1974b2182ce673bb086a1da15b022de3

Change-Id: I46d03c3303b3116e749effeecefe48949473daeb
6 years ago
Joe Borg b45c792f95 Fixing read before prompt bug
Due to Python buffering sys.stdin and sys.stdout, the read can be shown
before text prompt.

Change-Id: I86d9ec62f7791da276585ce74a48162315effa7b
Signed-off-by: Joe Borg <joe@josephb.org>
6 years ago
Jenkins 4722facf06 Merge "Add optional arguments '-y' in CLI:snapshot-delete" 6 years ago
Jenkins 81fb46dc4f Merge "Replace six.iteritems() with .items()" 6 years ago
ricolin 7998d7bb3f Add optional arguments '-y' in CLI:snapshot-delete
There is no judgement before use the cli: heat snapshot-delete.
So I add it.
Partial-Bug: #1642490

Depends-On: If7b515dff64a18f56046b890279c2c59b0ab9dc7
Change-Id: I6e82630816e54aa2d98c3653ab43b865f445e881
6 years ago
rabi a625d3bb93 Don't encode path separators
Encoding the path separators results in urls refused by by apache
with 404 unless AllowEncodedSlashes is turned on, which is not
the default.

The existing encoding of path separators seems unnecessary.

Change-Id: I3b77aafc6104119503363e5db36b0379964daba5
6 years ago
M V P Nitesh 61aa092ce5 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: I3913e8876b34e112140788d7a405da6eedfb5f29
6 years ago
liyi fb5e390891 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: I601eee9f1fca65d5fb53e6b75482b74283908a29
6 years ago
huangtianhua dedc3ac0af Support openstack stack export
Heat supports exporting data of stack preparing
for abandon stack. This change supports
'openstack stack export' in client.

Change-Id: I5d3778f307d10174dbb738548282f7495bd9c825
6 years ago
huangtianhua 3ee70cf4e8 Show 'project' info if heat server returns
Show 'project'/'Project' info in heatclient
if heat server returns 'project' info of stacks.

Change-Id: I7d95ae96a678ef41bcd3d5379f204db83e4b585c
Closes-Bug: #1652412
6 years ago
Zane Bitter 505ad5ce38 Update docs for mark-unhealthy command
Starting with the Ocata release of Heat, users can now select a resource
using its physical resource ID.

Change-Id: I82711c50e9719a80eec68592ee36198ea47b9f1d
Depends-On: Ie28ed102665b2c6379d1f55b7a02b76d05e38ddd
Related-Bug: #1635295
7 years ago
rabi b25baa9108 Move required modules from oslo-incubator
Move the required module to heatclient/common.

- heatclient/openstack/common/apiclient/base.py

It also moves some required functions and exceptions from
heatclient/openstack/common/cliutils.py and
heatclient/openstack/common/exceptions.py.

Change-Id: I68704c7fab9417492d8390ad05a9797f78d46907
7 years ago
Jenkins 61794b7822 Merge "Graduate to oslo.i18n and cleanup incubator usage" 7 years ago
Chuck Short 29d6c613f6 Graduate to oslo.i18n and cleanup incubator usage
Graduate from Oslo Incubator to oslo.i18n library.
Cleanup of unused Oslo Incubator utils.
Added optional enable_lazy() usage.

Change-Id: I5ec02477f3f52f4d7097669120581e82cced3748
Signed-off-by: Chuck Short <chuck.short@canonical.com>
7 years ago
huangtianhua 0ac4a80dad Return condition functions based on the filter param
Add 'with_condition_func' filter param for API
template-function-list, if the param set to true,
the response will include the condition functions.

Change-Id: Ia7b4da71ed5c3da105dd23917e4921a96e445026
Closes-Bug: #1625505
7 years ago
Jason Dunsmore 272c32f7ec Fix "heat output-show -F json" output format
So that it matches the equivalent OSC command's output.  Also change
the default output-show format to 'raw' to maintain current behavior.

Closes-Bug: #1560087
Change-Id: Ia03b1633565881b4b4a7f95e7b0c5df472487f62
7 years ago
Sharat Sharma 81284f3e82 Improved the help message of the stack-list tags
The stack-list help message for tags was not very helpful and was
confusing. So, changed the help message so that it is more
understandable for the user.

Change-Id: Ia49a40652a0c96ba257edb35bae4455be3373d0f
Closes-Bug: #1625011
7 years ago
Jenkins ed287fb913 Merge "Trivial:Standardize the output format of 'help' in shell.py" 7 years ago
shizhihui 4f3e7cd99e Trivial:Standardize the output format of 'help' in shell.py
Change-Id: Ie6c03d56ab2f0aa14bc96028fd548e80987beeb1
7 years ago
shizhihui 5dbbc102eb Standardize import format
According to the rule in http://docs.openstack.org/developer/hacking/#imports
I modify some irregular import format in heatclinet.

Change-Id: I0200ddad88ee833d7de9d6df2c1519e4f4560db7
7 years ago
Steven Hardy 3ae1c3e715 Add support for stack file list
This shows the files map for a given stack

Depends-On: I3198b6a7dc06648af24c198d39470f3b0d5d6f11
Change-Id: Ib7d033a660fe294bf3f7b42e4aa7020149ce24c1
blueprint: files-show
7 years ago
rabi 4482223bcc Fix deprecation message for stack-preview
Change-Id: Ifeb3a2751e6a59092a639463806d45c683219bfa
Closes-Bug: #1602301
7 years ago
Jenkins 914921d26a Merge "Implement client side of event list --nested-depth" 7 years ago
huangtianhua 09600a101c Show 'deletion_time' of stacks
Add 'deletion_time' column in following cases:
1. if specify --show-deleted when list stack
2. show stack

Change-Id: I4348d03b3433c4962f51aa124ea27dc0c55c71c1
DependsOn: I8c55fe7f6a899ca66aa3fef15c93195c03c5aa11
7 years ago
Steve Baker 31278ff5f7 Implement client side of event list --nested-depth
This change does the following:
- cleans up the usage of get_events so that marker and limit are only
  specified in their dedicated arguments, not also in event_args
  (also, specifying only in event_args still works)
- first attempts server-side nested_depth support
- falls back to the old recursive approach if the response data lacks a
  link with the ref root_stack

Since there is a fallback for old heat APIs, the client change can
land before or after the heat change
I27e1ffb770e00a7f929c081b2a505e2007f5d584

Change-Id: I43d12ec61ec359222184f07c170de3c97481f1ba
Closes-Bug: #1588561
7 years ago
Jenkins e95df61c64 Merge "osc resource-type-show description option" 7 years ago
Jenkins b8407bd941 Merge "osc resource-type-list description option" 7 years ago
Thomas Herve bcbbbc9e2c Fix typo
Fix typo WRT physical_resource_id in help messages.

Change-Id: Ica89b13cc9cd2b355cf65c7ccb329518e5c745bd
7 years ago
Peter Razumovsky 52cb12d86e osc resource-type-show description option
Add new option to osc resource-type-show, which
allows to print description of specified resource type.

Change-Id: I99347a1aa01cea3fe7e9686e06c7d8180e6551b1
Depends-on: #I148bb7764af4db45b75ce63d7fa58daa210b3ed4
Closes-bug: #1558049
7 years ago
Peter Razumovsky 992bef89ce osc resource-type-list description option
Add new option to osc resource-type-list, which
allows to print description of each resource type.

Change-Id: I34ca4531fb0c9f4896f55011ae234771e9ef965f
Depends-on: Ia92699e5ca60a891e9704c468e447e1053be7609
Closes-bug: #1558049
7 years ago
rabi 01b7781f68 Allow redirects to use location from response
This allows redirects to use fully qualified location
from response header and removes the check to prohibit
redirects to different project(required for super admin
actions).

Change-Id: I46876189e96375922c4f0bf30452b7c4980fe39c
7 years ago
Jay Dobies 3f340cd818 Add client library support for retrieving a stack's environment
Change-Id: I84aa5ed9dc2b8aee089de3b1e1810552b8f2dd96
Depends-On: I7e3577dfc854018245d79afdfee45a9d250d73a7
Implements: blueprint environment-show
7 years ago
huangtianhua 726415e43c Support "--pre-delete" argument for hook-clear
This changes:
1. Add "--pre-delete" argument for cmd "heat hook-clear" to
clear pre-delete hooks.
2. Add "--pre-delete" argument for osc cmd
"openstack stack hook clear" to clear pre-delete hooks.
3. Support to poll pre-delete hooks for "heat hook-poll" and
"openstack stack hook poll".

Change-Id: Ic5a6e1b7588e3f9ad49eaaf8085f18ec74fc629e
Closes-Bug: #1567814
7 years ago
Jenkins 349a2c85b1 Merge "OSC plugin for orchestration template validate" 7 years ago
Mark Vanderwiel 1d4c407fc5 OSC plugin for orchestration template validate
This change implements "openstack orchestration template validate" command
Based from the existing heat commands:
   heat template-validate

This is different from the stack create/update --dry-run
which used the preview api, this uses the validate api.

Change-Id: Icf5794ad6bb35574a060f095d7ef10e6a46ca2fe
Blueprint: heat-support-python-openstackclient
7 years ago
PanFengyun 4bf7e55aa3 stack-delete command should not call do_stack_list.
the stack-delete operation is asynchronous, and should not return
anything.

Change-Id: I75287b612358c5e76e47a9e53200c23946f01d8f
Closes-Bug: #1556407
7 years ago
Dmitriy Uvarenkov 1b889140d9 Added deprecation warnings for heat commands
Users need to use openstack commands
instead of heat commands.

Change-Id: Ifc79dd3f81c7735ab61d8d072ff0fea1976eed98
7 years ago
Dmitriy Uvarenkov 7c1e7b05f4 Fixed exceptions handling in stacks deleting
When you delete multiple stacks like
'stackA stackB stackC' and you dont have enough
rights for deleting stackB, it throws 403.
In result stackA is deleted, but stackC is still
there.

Change-Id: If2795a4a7a6987da15b5f3f23ee066000e1f2a65
7 years ago