Implements Neutron feature of floating ip associate/disassociate
into OpenStack Client.
Previously, network.find_ip() function only supported to
search floating ip by UUID. Hence, _find_floating_ip()
function is used in floating_ip.py, to search fip both by UUID
and ip_address. [1] adds the ability to find fip object using both UUID
and ip_address. This functionality however, won't be available until
the SDK is released. Hence, we continue to use _find_floating_ip()
method, which was cleaned up by [2] to remove the use of ip_cache.
Once, the SDK is released, we will remove all the usage of
_find_floating_ip() method and instead only use network.find_ip().
[1] https://review.openstack.org/#/c/449879/2
[2] https://review.openstack.org/#/c/447938/
Change-Id: I6c5222287c46ca42365917d2deae70bdb626347
Co-Authored-By: Reedip<reedip.banerjee@nectechnologies.in>
Co-Authored-By: RuiChen<chenrui.momo@gmail.com>
Closes-Bug: #1560297
Currently we have an ip_cache returned from _find_floating_ip() which
is generally ignored as it is not always required.
This patch removes the need of ip_cache in _find_floating_ip().
Co-Authored-By: Sindhu Devale<sindhu.devale@intel.com>
Change-Id: I8b92271185f82f275fa73adad03e9dad70be70e4
This change enables to add/remove a specific port to/from a server using
the new commands:
openstack server add port <vm> <port>
openstack server remove port <vm> <port>
Closes-Bug: #1678137
Change-Id: I6ee57df089235ccc1fb9d38316bd484956b1134d
This patch introduces network flavor associate and disassociate to
OSC. The following neutron equivalent commands are implemented in OSC:
- neutron flavor-associate
- neutron flavor-disassociate
Change-Id: Icba4dbf7300a36353142586359059cd6784049dc
A special scenairo is that users want to check the commands
help message, but don't set authentication info at all. Add
a related functional test case to cover it.
Change-Id: I7b09701df24d6f6dfcf369f89212f72e753be6e4
The Nova API responds with an validation error when a bdm is submitted
containing an empty volume_size. So instead omit that attribute when it
is empty.
Change-Id: Iba905fca8c440a03e828c20922f3b813bba3fa3a
Closes-Bug: 1677236
- Fix option-describe typos
- Correct option and envvar markup, for commands that are using the
reference form instead of the definition form or are marking up
option arguments as options
- Avoid duplicate commands
- Fix some invalid docstrings
- Fix some invalid indentation
- Disable the murano plugin, which has invalid docs
- Correct issues with- and track the network-topology spec
- Include API modules in docs
Change-Id: I3d5ed5e872540fe13f3e4bd5e9335829dc9a5226
Don't do it.
os-client-config's plugin loading has been causing this pain for a long
time, removing the KSC hack-around in o-c-c unmasked this again. So when
auth is not reuired, just don't let o-c-c do any plugin loading at all.
Ever.
Of course, this shouldn't be in OSC either, but we have to do this until
the equivalent fix lands in osc-lib, is released and makes it into the
global requirements minimum version.
Depends-on: Ie68c82f7b073012685f0513b615ab1bf00bc0c3a
Change-Id: Ifdf65f3bb90fb923947a2cbe80a881d71a3fee56
* Fix volume transfer request accept to actually not crash when
trying to call Volume API.
* Fix volume transfer request accept syntax to have only one
positional argument, which is the ID of the resource in the command
* Change the output column order in volume transfer request list to
have ID followed by Name then the remaining columns.
Closes-bug: 1633582
Change-Id: I5cc005f039d171cc70859f60e7fe649b09ead229
Implement Neutron feature of Extension Show into
OpenStack Client.
Change-Id: Ifecb794838cb3bf8c2466d178345349db3cd4003
Implements: blueprint extension-show
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.
Change-Id: I504de69b2e64250740ebcab432042a16f966fdbe
Closes-Bug: #1674584
[1] had some trivial changes in the main code, which
are being put forward in this patch, to consider future scenarios.
[1]: I77a933f4b3ce875c63cef5b6a32aee78fd844b03
TrivialFix
Change-Id: I8e8fbb194cd319e5605f09c94ae09e952d0961b1
Similar delete commands in OSC, we can also support add/remove
multi users for one specified group, this review implement it.
Change-Id: I8ccf99d4ee83a18778fa3ff5c0a42bc7c6ff21fb
Implements: bp support-multi-add-remove
Use a common pattern to handle option pairs --XYZ and --no-XYZ for managing
lists of attributes. This pattern looks at the presence of the option
in parsed_args first and branches as necessary.
Some specific steps are included for the SDK Network resources to reliably
set the 'dirty' flag for changed attributes via one or both of the following:
* iterate over lists of original resource attributes to force the creation
of a new list object
* use [].extend() rather than += to add to the existing list (substitute
{}.update() for dicts)
Change-Id: I0c3f9a52ffe1ae2b5b230cb13d6376dd9131aaf9
This change enables to specify which vm fixed-ip will be associated to a
floating ip using:
openstack server add floating ip <vm> <fip> --fixed-ip-address <ip>
Closes-Bug: #1624524
Change-Id: I2ddb68c5873bfed7293b0e661d1adbe111681136
Implement Neutron feature of Network Flavor Profile
into OpenstackClient
This patch implements the following commands:
network flavor profile create
network flavor profile delete
network flavor profile list
network flavor profile show
network flavor profile set
SDK Version needed: 0.9.9
Change-Id: Ie6fe5e53122cfb2eda8d326851d54562739a8386
Partially-Implements: blueprint neutron-client-flavors
openstackclient does not allow the update of a port's MAC address.
However this is possible in neutron API (though by default policy
it is an admin-only operation). Allow it in openstackclient too.
Change-Id: Ibd9e0a6fbd1d0d461b8a8daee24dbb7c3f929df6
Closes-Bug: #1670707
Due to a default Keystone policy until Newtown,
and the use of resource_find, non-admins are unable
to list their own projects.
This patch bypasses this problem while also introducing better
UX for non-admins wishing to get their project list.
'openstack project list' retains the default of 'list all projects'
but on a forbidden error will default instead to 'list my projects'.
This way for non-admins 'list my projects' feels like the default
without breaking the expected admin default.
Adding the '--my-projects' option allows admins to easily list their
own projects or allows non-admins to be explicit and bypass the
forbidden error fallback.
Change-Id: I1021276f69fbbf28e13e17c4e567d932fce7ed8b
Closes-Bug: #1627555
When checking whether a given user is in a given group, keystone will
return a 404 Not Found if all went well but the user was not in the
group. It may also return a 403 if the user and the group are in
different backends, which would also mean that the user was not in the
group[1]. Any other 400 response is a client error and any 500 response
is a server error to which the user should be alerted.
Without this patch, openstackclient treats any exception as a valid "not
found" and may end up hiding server errors. This patch reduces the
caught exceptions to 403 and 404 responses and treats everything else as
an error.
[1] https://developer.openstack.org/api-ref/identity/v3/?expanded=check-whether-user-belongs-to-group-detail#check-whether-user-belongs-to-group
Closes-bug: #1672634
Change-Id: Id3f3b2409b7cee480ee3c19b6d6c3070599ffe8f