405 Commits

Author SHA1 Message Date
Stephen Finucane
6dc94e1fb8 volume: Add 'volume attachment *' commands
These mirror the 'cinder attachment-*' commands, with arguments copied
across essentially verbatim. The only significant departure is the
replacement of "tenant" terminology with "project".

  volume attachment create
  volume attachment delete
  volume attachment list
  volume attachment complete
  volume attachment set
  volume attachment show

Full support for filtering is deferred for now since that's a more
complicated change that requires additional commands be added first.
TODOs are included to this effect.

Change-Id: If47c2b56fe65ee2cee07c000d6ae3688d5ef3b42
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-06-03 15:52:18 +01:00
YuehuiLei
fe6a4fa8fc setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I7e43e43bc5a24f49aa7b225502e5d0176fef3783
2021-05-31 00:37:06 +00:00
Zuul
86bca18b74 Merge "project cleanup" 2021-03-18 08:39:11 +00: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
Stephen Finucane
a52beacaa6 compute: Rename 'server migrate (confirm|revert)'
We're confirming or reverting a server migration, not a server migrate.
We've a number of 'server migration *' commands now so it makes sense to
move them under here.

Change-Id: Ib95bb36511dad1aafe75f0c88d10ded382e4fa5c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-21 11:01:15 +00:00
Stephen Finucane
f80fe2d8cf compute: Add 'server migration show' command
This replaces the 'server-migration-show' command provided by
novaclient.

Change-Id: I413310b481cc13b70853eb579417f6e6fad10d98
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-21 11:01:15 +00:00
Zuul
3864ceea26 Merge "compute: Add 'server volume update' command" 2021-01-15 04:09:58 +00:00
Stephen Finucane
ca7f23d0d1 compute: Add 'server volume update' command
We're not going to expose the ability to swap volumes since that's a
things humans should not generally use. From the API docs [1]:

  When updating volumeId, this API is typically meant to only be used
  as part of a larger orchestrated volume migration operation initiated
  in the block storage service via the os-retype or os-migrate_volume
  volume actions. Direct usage of this API to update volumeId is not
  recommended and may result in needing to hard reboot the server to
  update details within the guest such as block storage serial IDs.
  Furthermore, updating volumeId via this API is only implemented by
  certain compute drivers.

We *do* want users to have the ability to change the delete on
termination behavior though, so that's what we expose.

[1] https://docs.openstack.org/api-ref/compute/?expanded=update-a-volume-attachment-detail#update-a-volume-attachment

Change-Id: I50938e1237b4d298521b26a5f9cb90c018dfebaf
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-12 16:29:07 +00:00
Zuul
d828b04c9f Merge "Support Neutron Address Group CRUD" 2021-01-11 17:38:26 +00:00
Stephen Finucane
d5026278ed compute: Add 'server volume list' command
This replaces the old 'nova volume-attachments' command.

Change-Id: Icb98766f98bd1f2469bdb6df62b4624711f98422
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-08 12:14:43 +00:00
Hang Yang
f57e10b903 Support Neutron Address Group CRUD
Add support for Neutron address group CRUD operations. Subsequent patches
will be added to use address groups in security group rules.

Change-Id: I3c313fc9329837dde67815901528a34dca98ebcc
Implements: blueprint address-groups-in-sg-rules
Depends-On: https://review.opendev.org/738274
Depends-On: https://review.opendev.org/745594
2020-12-24 11:27:23 -06:00
Artem Goncharov
f36a34b675 Switch compute aggregate functions to SDK
Continue journey towards having OSC consuming SDK for nova part.

Depends-On: https://review.opendev.org/#/c/762131/
Change-Id: Id16e6c47aa93f02f15f49e1f59f73fecaa3e3b80
2020-12-02 11:24:51 +00:00
Sean Mooney
01eb4e8393 Add 'openstack server evacuate' command
This change adds a new 'openstack server evacuate' command to provide
parity with the 'nova evacuate' command. The term "evacuate" is
notoriously poor, in that it implies the instance is moved rather than
recreated, but it is retained since people are familiar with it now.

Change-Id: I1e32ca51036c501862d8e89b3144a9695d98a06f
2020-11-02 17:08:17 +00:00
jay
08b0e5855b Add 'server migration force complete' command
This is equivalent to novaclient's 'live-migration-force-complete'
command.

Change-Id: Ic4dc639afa16cdf8c5a46774895e850d92985292
Story: 2007513
Task: 39293
2020-10-13 14:17:28 +01:00
hackertron
1c3cf11331 Add 'server migration abort' command
This is equivalent to nova client's 'live-migration-abort' command.

Change-Id: I0ff520ccfdf2de52c427affad7bef4554c86a06f
Story: 2007489
Task: 39210
2020-10-13 14:17:25 +01:00
zhangbailin
b77c28d295 Add server migration list CLI
Add ``openstack server migration list`` to fetch server migrations.

Part of blueprint add-user-id-field-to-the-migrations-table

Change-Id: I15b4a5aca8d0dee59dd293e7b1c7272cdfbeea20
2020-09-24 18:45:13 +08:00
Zuul
4b5053ac89 Merge "Make volume backup record commands available in v3" 2020-07-07 10:58:15 +00:00
Radosław Piliszek
b1fc587a6d Make volume backup record commands available in v3
They work just fine in Volume API v3 but they were limited in OSC
to v2.

Change-Id: I510383f8e0cbf05ec24caa1cad330f12f82a913d
Story: 2007896
Task: 40279
2020-07-05 09:55:49 +02:00
melissaml
ff2a70c418 Remove translation sections from setup.cfg
These translation sections are not needed anymore, Babel can
generate translation files without them.

Change-Id: Ic5d57186766257e9d37b3588e71f973cddad9be4
2020-06-23 12:22:58 +08:00
Eric Fried
26878e7d53 identity: autogenerate docs
$namespace = openstack.identity.v{2|3}

The subcommand documents for $namespace were hardcoded and thus prone to
drift over time. This commit removes the hardcoded content and uses the
autoprogram-cliff directive to generate them automatically from the
subcommand configuration classes.

Special things:

- Some reorganization happened here. Certain subcommand names, such as
  `endpoint` and `project`, are shared by identify v2 and v3. Previously
  the hardcoded documents had them combined and interleaved. Attempting
  to preserve this with autoprogram-cliff would have required
  significant additional infrastructure. However, since most readers
  care completely about one and not at all about the other, we instead
  split the v2 and v3 versions of these commands into separate pages. In
  case links to the old pages exist in the wild, they are preserved, but
  moved (with redirects) to a hidden directory, and populated simply
  with links to the new version-specific generated documents.

- The `federation domain` and `federation project` subcommands were
  previously absent from the docs. They are added. These are such small
  commands and they seem related, so they're put into a single document.

- Some pages were already being generated but were listing operations
  individually instead of using wildcards (possibly because they were
  created before wildcarding was supported by cliff). These are changed
  to use wildcarding. (We want to do this wherever possible as it is
  more future-proof in the event that more operations are added to a
  subcommand later.)

- The `service provider` document was incorrectly titled `identity
  provider`. Fixed.

Change-Id: I2030f9fe370038c5908b6eb6bed9692a73fe5067
2020-06-08 16:34:27 -05:00
zhangboye
7049fd85fc Add py38 package metadata
Change-Id: I75ecaed730a2ef870f41812cfbf55c74fdc36b7b
2020-05-27 15:34:14 +00:00
Zuul
70f1ff375a Merge "Add command: router add/remove route --route" 2020-04-01 11:03:51 +00:00
Andreas Jaeger
f01a0f336c Cleanup Python 2.7 support
OpenStack is dropping the py2.7 support in ussuri cycle.

Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add python-requires to setup.cfg so that pypi and pip know
  about support Python version
- Remove ancient sections from setup.cfg
- Remove version_info setting from conf.py, openstackdocstheme does this
  automatically nowadays.

Change-Id: I5b9c159752c932f874015f20822862c70562c2bd
2020-03-30 20:00:41 +02:00
Bence Romsics
dba57c85d5 Add command: router add/remove route --route
Add commands to osc to call the two new API methods introduced by
new Neutron extension: extraroute-atomic.

Bump our openstacksdk requirement to >=0.38.0 which contains
the corresponding sdk change.

The lower-constraints of dogpile.cache and keystoneauth1 are bumped
because of requirements bumps in openstacksdk.

The lower-constraint of decorator is bumped because of problem already
fixed by amotoki here: https://review.opendev.org/701706

Change-Id: Ia9b9c216f1d1161ebedac31594a2c464d77f4ae2
Depends-On: https://review.opendev.org/674324
Partial-Bug: #1826396 (rfe)
Related-Change: https://review.opendev.org/655680 (spec)
2020-03-30 16:19:05 +02:00
Monty Taylor
e6e4b73efa Complete "Drop python2 support" goal
We stopped testing python2, but there are more things to be cleanup.

- Remove python2 entries from setup.cfg
- Add releasenotes
- remove universal wheel since this is only python 3 now

Change-Id: Ie2bbb4d34b8411939ad5cfd750fc76c933779542
2020-02-05 05:58:51 +00:00
Colleen Murphy
70ab3f9dd5 Add support for app cred access rules
This commit introduces the --access-rules option for 'application
credential create' as well as new 'access rule' commands for listing,
showing, and deleting access rules.

bp whitelist-extension-for-app-creds

Change-Id: I04834b2874ec2a70da456a380b5bef03a392effa
2020-01-17 11:14:51 -08:00
Eric Fried
c6266b5ab2 compute: autogenerate docs
$namespace = openstack.compute.v2

The subcommand documents for $namespace were hardcoded and thus prone to
drift over time. This commit removes the hardcoded content and uses the
autoprogram-cliff directive to generate them automatically from the
subcommand configuration classes.

Many of these were already being generated. Some were missing a few
sub-subcommands, so those are added.

Change-Id: I1aa4b2655bafd2f6a5d83b658742f65d180eb128
2019-11-05 07:09:05 -06:00
Zuul
371f5f5522 Merge "Add 'openstack server migrate (confirm|revert)' commands" 2019-10-03 11:19:48 +00:00
Stephen Finucane
609988ebac Add 'openstack server migrate (confirm|revert)' commands
While cold migration and resize are essentially the same operation under
the hood, meaning one could use the 'openstack server resize confirm'
and 'openstack server resize revert' commands instead, there is no
reason the operator needs to know this. Add these flags as syntactic
sugar to help simplify operators lives.

The help texts for both the 'openstack server resize' and 'openstack
server migrate' commands are updated to clarify the relationship between
the two operations.

Change-Id: I0cb6304c794bffaec785add9f7b8cf53ab28cacd
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-09-10 13:45:41 +00:00
Zuul
d1385971bb Merge "Add floating IP Port Forwarding commands" 2019-09-09 16:12:23 +00:00
LIU Yulong
f044016e29 Add floating IP Port Forwarding commands
Add following commands:
  floating ip port forwarding create
  floating ip port forwarding delete
  floating ip port forwarding list
  floating ip port forwarding set
  floating ip port forwarding show

Closes-Bug: #1811352
Change-Id: I6a5642e8acce28fc830410d4fa3180597b862761
2019-08-29 07:39:42 +08:00
Dean Troyer
6fcc2608b1 Remove token_endpoint auth type
The token_endpoint was a compatibility auth type to maintain support
for the --url global option that dated back to the beginning of
OpenStack CLI auth.  The common keystoneauth library implements
'admin_token' which provides the same functionality using
--endpoint rather than --url.

Change-Id: I1b9fbb96e447889a41b705324725a2ffc8ecfd9f
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-08-27 11:08:50 -05:00
Zuul
a15e4741fa Merge "Add 'openstack server resize (confirm|revert)' commands" 2019-08-20 18:12:20 +00:00
Stephen Finucane
7561e062eb Add 'openstack server resize (confirm|revert)' commands
These are currently exposed as flags on the 'openstack server resize'
command but they are in fact operation and should be exposed as commands
in their own right.

The old flag-based variants are deprecated for removal in 4.0.

Change-Id: I733796d3bda6c3755a3d3548bbe695abb474a6a0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-08-09 15:48:15 +00:00
Akihiro Motoki
1bad2cb3c3 Fix module paths for volumev3 volume backup commands
https://review.opendev.org/#/c/612751/ renamed volume.v2.backup
to volume.v2.volume_backup. volume.v3 backup commands refer
volume.v2.backup but they were not updated.
This causes "volume backup xxx" commands
when OS_VOLUME_API_VERSION=3 is specified.

Change-Id: Ib897dd483a7963763016ee3f1e8e1c3cc81d0bb0
Story:o 2006284
Task: 35990
2019-07-26 17:38:28 +09:00
pengyuesheng
5986f47306 Add Python 3 Train unit tests
See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I897645a4cb9f03ca464daa14f0895572212b81d9
2019-07-01 15:08:23 +08:00
Sean McGinnis
e76e10c0ba Remove deprecated volume commands and args
The following were deprecated over two years ago and can now be removed:

* Remove ``backup`` commands in favor of ``volume backup``
* Remove ``snapshot`` commands in favor of ``volume snapshot``
* Remove ``volume create`` options ``--project``, ``--user`` and ``--multi-attach``
* Use of an auth-key positional argument in volume transfers
* ``volume transfer request`` no longer accepts 'auth_key' as a positional arg,
  ``--auth-key`` is now required

Internal (non-user-visible)
* Rename backup.py to volume_backup.py for Volume v1 and v2, update tests

These are backwards incompatible changes and will require a major
version bump after they are merged.

Change-Id: I94aa7a9824e44f9585ffb45e5e7637b9588539b4
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-05-20 14:05:18 -05:00
Sean McGinnis
f9fdc296bc Remove deprecated identity commands and args
The following were deprecated over two years ago and can now be
removed/changed:

* Remove ``service create`` option ``--type``
* Remove ``role list`` options ``--project`` and ``--user``
* Remove ``user role list`` command

These are backwards incompatible changes and will require a major
version bump after they are merged.

Change-Id: I29e2fc9516dffbfd83eef0bc91e834dde99b4105
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-05-19 12:54:33 -05:00
Sean McGinnis
b7742b5937 Remove deprecated compute commands
The following were deprecated over two years ago and can now be removed:

* ``ip fixed add|remove`` in favor of ``server add|remove fixed ip``
* ``ip floating add|remove`` in favor of ``server add|remove floating ip``

These are backwards incompatible changes and will require a major
version bump after they are merged.

Change-Id: I10c4d32a3c0b55ad41a02afd3b14249bafcb55a9
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-05-19 12:54:24 -05:00
Ghanshyam Mann
a8309a2a85 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: Ie7bcc327fd588a1ff6b2556d49017df56bc55bf8
2019-04-22 23:45:27 +00:00
Kailun Qin
d52920b387 Add network segment range command object
Add network segment range command object in support of network segment
range management.

This patch set includes documentation, unit tests and functional tests
(currently skipped unit network segment range enabled in Neutron by
default) for the following new commands:
  - "os network segment range create"
  - "os network segment range delete"
  - "os network segment range list"
  - "os network segment range set"
  - "os network segment range show"

Co-authored-by: Allain Legacy <Allain.legacy@windriver.com>

[depends on removed by dtroyer as those are all +W and 
trying to pass the gate, OSC has it's freeze dealine looming]
 Depends: https://review.openstack.org/624708
 Depends: https://review.openstack.org/624709
 Depends: https://review.openstack.org/638386

Partially-implements: blueprint network-segment-range-management
Change-Id: I335692f2db5be07c1c164f09b13f1abb80b7ba33
2019-03-07 19:39:17 +00:00
sunjia
8be53a50e5 Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I7c7fdfb71348f77aa6063ec99b3c4a90bde21d06
2018-12-03 22:12:42 -05:00
qingszhao
029c148b29 Add Python 3.6 classifier to setup.cfg
Change-Id: Id723040f895f06527d46755dd408dec16200c001
2018-11-30 07:13:52 +00:00
Sean McGinnis
b90c780d2b
Add volume backup import/export commands
This adds commands to import and export volume backup records so they
can be imported and restored on other Cinder instances or to the
original instance if the service or database has been lost and had to be
rebuilt.

I know this is a commonly used process by some users, so it would be
good to have this functionality in osc so they do not have to switch
clients.

More details about the export and import process can be found here:

https://docs.openstack.org/cinder/latest/admin/blockstorage-volume-backups-export-import.html

Change-Id: Ic95f87b36a416a2b50cb2193fd5759ab59336975
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-11-10 02:11:04 -06:00
Sean McGinnis
9647d43bd5
Add volume backend pool list command
Adds an equivalent for "cinder get-pools" with "volume backend pool list"
and "cinder get-pools --detail" with "volume backend pool list --long".

Story: 1655624
Task: 136949

Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Change-Id: I826c9946ffe11340d44ad57914f72fc2a72b6938
2018-10-09 15:56:58 -05:00
Sean McGinnis
4039d0d94f
Add volume backend capability show command
Adds and equivalend for "cinder get-capabilities" command to show the
capabilities supported by a Cinder backend.

Story: 1655624
Task: 26947

Change-Id: I38686a26cd503e45ce0102705a6632994ef10274
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-10-09 15:31:35 -05:00
Zuul
7ae49c5b02 Merge "Add command to show all service versions" 2018-07-25 17:57:44 +00:00
Zuul
6469d86522 Merge "Implement support for project limits" 2018-07-25 00:52:42 +00:00
Zuul
d177727a6e Merge "Implement support for registered limits" 2018-07-25 00:52:41 +00:00
Monty Taylor
9ece632f96
Add command to show all service versions
Knowing what services and what versions of those services exist on a
cloud isn't always a spectacular experience. Add a command that will use
get_all_version_data from keystoneauth to produce a report of the
available services and the version info for each service.

Depends-On: https://review.openstack.org/584944
Change-Id: I84751c175d0c5f6d857a5473d2db6d5f1b41f946
2018-07-23 16:58:30 -05:00