7 Commits

Author SHA1 Message Date
Tim Bishop
1d4aabab2e
Respect --skip-resource when deleting.
When running project cleanup and using the --skip-resource flag, this
flag is only used during the --dry-run stage. This change ensures it is
also used when deleting the resources which fixes the bug mentioned below.

Closes-Bug: #2074109
Change-Id: I8e50fd14dcde069b932cc8ec4bb4fc809f7d2eb7
2024-07-25 20:20:56 +01:00
Stephen Finucane
c5b772db76 trivial: Prepare for pyupgrade pre-commit hook
This change is entirely automated save for the update of some mocks from
'io.open' to '__builtins__.open').

We are keeping this change separate from addition of the actual hook so
that we can ignore the commit later.

Change-Id: I0a9d8736632084473b57b57b693322447d7be519
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-23 12:24:23 +01:00
Stephen Finucane
02cc064258 tests: Use central SDK client fake
Avoid double mocking.

Change-Id: Ic8fadd41f3687eabd3a149681effae6883edb12e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-29 10:12:19 +01:00
Jan Hartkopf
f29e3ccc37 Add --skip-resource option to project cleanup
Story: 2010370
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/878646
Change-Id: I9eb10cfd8612fa9faf2a734a517078b12a9ca3c3
Signed-off-by: Jan Hartkopf <jhartkopf@inovex.de>
2023-08-21 11:47:24 +02:00
Stephen Finucane
7d80f9e962 Blacken openstack.common
Black used with the '-l 79 -S' flags.

A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.

Change-Id: Ifcb3c798666d74d596b8ecb3d6d507f782de7ba5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:30 +01:00
Dr. Jens Harbott
7506eb8e0c Add auto-approve option to project cleanup
Sometimes it is useful to be able to use the project cleanup function in
scripts and having to add "echo y | openstack" isn't really nice.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I3ded9982769b4568b6dcfc49bc31ba67a6227839
2023-02-15 09:42:45 +01:00
Artem Goncharov
119d2fae25 project cleanup
New implementation of the project cleanup based on the sdk.project_cleanup.
It is implemented as an additional OSC operation and will ideally obsolete the 
`openstack project purge` giving flexibility to extend services support, 
parallelization, filters, etc.

Change-Id: Ie08877f182379f73e5ec5ad4daaf84b3092c829c
2021-02-02 08:14:34 +00:00