5578 Commits

Author SHA1 Message Date
Stephen Finucane
329296cedd Blacken openstackclient.object
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: I6658e76d7d1f93149f24fcab28d593195b37779f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:30 +01:00
Stephen Finucane
aed521d426 Blacken openstackclient.identity
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: I2eeade1ce6653be8e9179ecc40105182c5ff5f16
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:30 +01:00
Stephen Finucane
6475dc58e8 Blacken openstackclient.network
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: I8048746dbc2ef0cb582f68934734db4c1153d779
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:30 +01:00
Stephen Finucane
35ba1d8f13 Blacken openstackclient.volume
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: Ic318617c67ab7ce6527f9016b759a1d4b0b80802
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:30 +01:00
Stephen Finucane
28ffa2bf9f Blacken openstackclient.compute
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: I9af45c062d179ab3dc2a5e969e1c467932753a2b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:30 +01:00
Stephen Finucane
5cb16aebcc Use pre-commit for 'pep8' tox target, bump versions
We want to bump the versions of hacking, but doing so requires changes
in two places: '.pre-commit-config.yaml' and 'tox.ini'. This is silly:
we can simply use tox to handle pre-commit and leave all other
dependencies to pre-commit. Do this, migrating bandit to pre-commit and
bumping the other dependencies in the process.

We remove the 'fast8' target and tool, since pre-commit is plenty fast
here.

Change-Id: Ifdc582ecc3b4479ea9ed9abcb16577c6e8b2f5c1
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:00 +01:00
Stephen Finucane
379db31ea2 Address pre-commit issues
We'd like to use pre-commit as our 'pep8' target. Before we do that, we
need to address some issues that have crept in over the time since
pre-commit was first added.

Change-Id: I3bb383a00a44007eaa241e037e38aea16bd517b2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:48:53 +01:00
Zuul
43f0e1090a Merge "compute: Generate SSH keypairs ourselves" 2023-05-04 15:06:03 +00:00
Zuul
83016780c7 Merge "Silence warnings from openstacksdk" 2023-05-03 16:51:35 +00:00
Stephen Finucane
2454636386 compute: Generate SSH keypairs ourselves
Starting with the 2.92 microversion, nova will no longer generate SSH
keys. Avoid breaking users by generating keypairs ourselves using the
cryptography library, which was already an indirect dependency through
openstacksdk.

Change-Id: I3ad2732f70854ab72da0947f00847351dda23944
Implements: blueprint keypair-generation-removal
2023-05-02 12:18:52 +01:00
Zuul
a2f877f70c Merge "Migrate 'server event *' commands to SDK" 2023-04-21 17:30:11 +00:00
Huda Irshad
737540cca0 Migrate 'server event *' commands to SDK
This one is tricky since the ServerAction resources includes a nested
ServerActionEvent resource which requires a custom formatter in order
for things to render as expected.

Change-Id: I3d24851303222af9efcee8d7e1565278b1018efd
Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
2023-04-20 12:09:59 +01:00
Artem Goncharov
a675c61e46 Fix pep issue in the network service provider
pep gods started complaining (correctfully) about spacing in the old
command. Apply `black -l 79` on the file to make it looking nice and
passing checks.

Change-Id: I716f6a1496fc552b32809c7eb744283f3a3cd5a4
2023-04-20 11:15:37 +02:00
Mridula Joshi
16c78fef15 Adding `image import` command
Change-Id: I7254d30431894879c8bd20e2263d83b12c99d5c8
2023-04-12 09:42:43 +00:00
Stephen Finucane
23da7b73a2 Silence warnings from openstacksdk
OSC has historically relied on project-specific clients like novaclient
for library bindings. These did not support auto-negotiation of
versions. Instead, users were advised to set the requested microversion
to e.g. '2.latest' to opt into the latest API version supported by the
client.

We're slowly migrating everything to SDK which *does* support
auto-negotiation (well, of sorts). This makes versions like '2.latest'
unecessary and SDK correctly warns the user about this.

  You have a configured API_VERSION with 'latest' in it. In the context
  of openstacksdk this doesn't make any sense.

Unfortunately, we have not yet migrated all commands to SDK, meaning we
have a mix of SDK and legacy client-based commands. So long as there are
any command using the legacy client, we can't insist on users removing
this configuration. This makes the warning both annoying and something
the user can't do anything about. We also don't want to remove the
warning from SDK so instead we opt to filter it out, along with all
other warnings from openstacksdk (which similarly a user can't do
anything about).

Change-Id: If8a7cf9bc876f84864d66f5aed5f2f61c5d0696a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-04-11 16:45:56 +02:00
Stephen Finucane
864f51f427 compute: Migrate 'reboot server' to SDK
Change-Id: Ibad4078f680d3b2615b9ca6f6c72c4fd28030b55
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-04-04 13:40:38 +01:00
Zuul
5282bd2622 Merge ""hypervisor list --matching" showed the wrong result" 2023-04-04 08:10:09 +00:00
Zuul
72034196ca Merge "Add an updated tips job running on py310" 2023-04-04 08:10:07 +00:00
Zuul
ad992486fb Merge "Remove unused helpers for legacy novaclient" 2023-04-03 20:36:15 +00:00
Zuul
5d2687bfc4 Merge "Switch server shelve, unshelve to SDK" 2023-04-03 20:36:13 +00:00
Zuul
eafe579534 Merge "compute: Switch server restore to SDK" 2023-04-03 20:36:11 +00:00
Dr. Jens Harbott
00af88cf74 Add an updated tips job running on py310
Change-Id: Iadc32b4e8ea10561784208cdc8bf05ff3b3ca59d
2023-03-31 19:19:20 +02:00
Zuul
0a9a1753b5 Merge "Remove unnecessary 'self.methods'" 2023-03-30 19:05:04 +00:00
Zuul
17d03f49aa Merge "Switch server start, server stop to SDK" 2023-03-30 19:05:02 +00:00
Zuul
4e9181aa1e Merge "Switch server lock, unlock to sdk" 2023-03-30 19:05:00 +00:00
Zuul
55f2819cef Merge "Show Network QoS rules one per line" 2023-03-29 14:31:25 +00:00
Rodolfo Alonso Hernandez
f1cf3a10b5 Show Network QoS rules one per line
The command "network show qos policy <qos>" now shows the QoS rules
printed one per line.

Example: https://paste.opendev.org/show/bgam6amfLUVheAMhDxB3/
Change-Id: I65a99da16056902a822804e29b2dd9376a72e091
2023-03-28 18:18:49 +02:00
devMuscle
e74f2d94fe "hypervisor list --matching" showed the wrong result
Previously, using the "--matching" option shows empty results.
Previously, the "--matching" option called the "find_hypervisor method",
so we used to call the "hypervisor method"
like any other "--limit, --marker" options.

Depending on the nova api version, the api that is basically
called is as follows
2.53 >= : /os-hypervisors/detail?hypervisor_hostname_pattern=$HOSTNAME
2.53 < : /os-hypervisors/{pattern}/search

Hypervisor Type and Host IP are not returned
when using microversion 2.52 or lower

Co-authored-by: Jipyo Hong <hongsbien@naver.com>
Co-authored-by: Jieon Lee <dlwldjs7544@naver.com>
Co-authored-by: YoonSoo LIM <msdbtjd123@naver.com>

story: 2010670
task: 47726
Change-Id: I7b47acf48def7d4c5f4b74e4dba1c23d8ac7abf2
2023-03-26 14:06:36 +09:00
yaeeee
4e5e3cff5d Docs: Update glance command mapping
Update missing command in glance Mapping Guide.

List of updated command
[Glance CLI / OSC]
md-namespace-create / image metadef namespace create
md-namespace-delete / image metadef namespace delete
md-namespace-list / image metadef namespace list
md-namespace-show / image metadef namespace show

Co-authored-by: sujin01 <a5870771@gmail.com>
Co-authored-by: heesom <heesom.hs@gmail.com>
Co-authored-by: mpicea <jjh77745997@gmail.com>

Change-Id: I4d50b0ae820ea0c8feb1719bbbd9eb06d22cbe20
2023-03-25 10:53:23 +00:00
Zuul
65b667af20 Merge "Add auto-approve option to project cleanup" 2023-03-20 12:07:44 +00:00
5eb89e4ca1 Update master for stable/2023.1
Add file to the reno documentation build to show release notes for
stable/2023.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.

Sem-Ver: feature
Change-Id: I248bcb0342afb8276ba9605963287f620b62b6c5
2023-03-09 16:42:30 +00:00
Zuul
05d34ffce9 Merge "zuul: Merge osc-functional-devstack-base into only child" 6.2.0 2023-02-23 21:40:10 +00:00
Zuul
7c85f840f6 Merge "Add missing documentation for state options for "image set"" 2023-02-22 12:53:01 +00:00
Zuul
43f04c874f Merge "Drop default from ask_user_yesno question" 2023-02-22 12:32:22 +00:00
Zuul
cfd728108c Merge "Wait for volume being available to set bootable or readonly" 2023-02-22 12:32:20 +00:00
Zuul
a7e091c329 Merge "Update 'host list' and 'host show' command to use sdk" 2023-02-22 12:32:18 +00:00
Zuul
14dff075ff Merge "Fix really long help strings" 2023-02-22 12:32:16 +00:00
Zuul
02acd27c6a Merge "Add port ranges on floating ip portforwardings cli" 2023-02-22 12:32:14 +00:00
Zuul
3478873cff Merge "volume: Remove duplication from 'consistency group create' opts" 2023-02-22 12:32:11 +00:00
Zuul
365a7a24f5 Merge "Deprecate positional args for 'volume group create'" 2023-02-22 12:32:09 +00:00
lsmman
e53f706d0b Add missing documentation for state options for "image set"
The current "image set" with the state option behaves as follows: if you
use --project, it updates the membership status of the given project.

When this command was first added, it had the following description:

  If --project is passed, update the membership status for the given project

However, the description was missed when moving the documentation for
which command to the parser for each command method in commit f055fe67c.
Correct this oversight.

Co-authored-by: JAE YONG LEE <jaeljy135@gmail.com>
Change-Id: I18a29a19ce973971f68a52cbf4020cfa324c7a35
2023-02-22 10:14:21 +00:00
Stephen Finucane
5f19711720 zuul: Merge osc-functional-devstack-base into only child
Since we removed the osc-functional-devstack-n-net job in change
I76efeccec04937c3a68108e2654872e00fadcec4, there's no need to maintain
separate osc-functional-devstack-base and osc-functional-devstack jobs.
Merge them.

Change-Id: Id3dcd3c4f9f47a4020faf0787f44bd5509a2b5a2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-02-22 10:03:54 +00:00
Zuul
36ba614ba9 Merge "doc: Update nova command mapping" 2023-02-22 10:03:02 +00:00
matbu
5c9c1c77a0 Wait for volume being available to set bootable or readonly
This patch add a check to be sure that the volume created is in a
available state before trying to set bootable or readonly flag.

Story: 2002158
Change-Id: I8db71fd8cf5bd14eb67880f76d2e9135edeb3ed2
2023-02-22 09:52:43 +00:00
Zuul
861e1a8eee Merge "Finish switching server migration to sdk" 2023-02-21 13:28:47 +00:00
Zuul
8786767851 Merge "tests: Use fake SDK Migration object" 2023-02-21 13:28:44 +00:00
Zuul
dfe2bc9fbd Merge "compute: 'server volume update' -> 'server volume set'" 2023-02-21 13:28:40 +00:00
Zuul
2249d0026d Merge "Switch server volume update to sdk" 2023-02-21 13:28:37 +00:00
Zuul
fa90ad1392 Merge "Switch list server volume to sdk" 2023-02-21 13:28:35 +00:00
Stephen Finucane
674e4e620b doc: Update nova command mapping
There are a number of commands we're never going to implement:

  host-evacuate
  host-evacuate-live
  host-servers-migrate
    As noted in Dan Smith's blog [1], these are wrapper commands or meta
    operations that call a particular action - namely 'evacuate',
    'live-migration', and 'migrate' in old novaclient parlance - for
    each server on a particular host.

    These commands have historically been confusing. The underlying
    server commands have been implemented as 'server evacuate', 'server
    migrate --live', and 'server migrate', respectively. If a user wants
    to call these for each server on the host, they can do so with a
    little bit of shell scripting (hint: you want 'server list --host')
    or use something more suitable for this kind of task such as Puppet
    or Ansible.

  host-meta
    As above, this is equivalent to calling 'meta' for all servers on
    the host. Combine 'server set --property' with 'server list --host'
    instead (or use Ansible).

  instance-usage-audit-log
    This corresponds to the '/os-instance_usage_audit_log' API which is
    intended for use by OpenStack Telemetry. There's no user-facing
    application of this.

The remaining entries are updated to include their implementations. We
simply missed updating the mapping doc when implementing them.

With this, the OSC implementation of the nova API is *documented* as
being complete, as opposed to merely actually being complete 😉

[1] https://www.danplanet.com/blog/2016/03/03/evacuate-in-nova-one-command-to-confuse-us-all/

Change-Id: If08d501dd66c561956266d3b3f21dfd3559d8394
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-02-21 12:31:11 +00:00