After creating a snapshot of a running instance, a print out similar
to server create is expected, but it prints out something like "_info"
which is nothing related to created image. _prep_image_detail method
is added to /compute/v2/server.py to enable the priting, while running
the test properly.
Change-Id: I4b06be959768bcdaafd9aa8df497490958bee649
Closes-Bug:1551586
"server image create"
"server rebuild"
"server resize"
Above 3 commands are not covered by unit test.
So add some unit tests.
Meanwhile, fix bug. Now that image name is an optional argument,
we'd better record error messages with positional arguments
instead of optional argument. So, record server name.
Change-Id: I41bc025d4824dc46f63a3213d82e1528bacbbe12
If “ignore” is not set under flake8 in the tox.ini
file there there are defaults set to be ignored.
The depended patch fixes many of the problems.
Change-Id: Ieed2fe1c4654e201d3fe6d40ef93e247ee736f8b
Doc: http://flake8.readthedocs.org/en/latest/config.html#default
Depends-On: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
Closes-Bug: #1548910
The triggering crash dump feature is supported by nova [1] and
novaclient [2] now, it's time to introduce this feature into
OSC correspondingly.
[1]The change id is: I6ed777ff637254b4b79417008f9055dd19fc7405
[2]The change id is: If03b1864bbe7074c720b946fc2700bd5d07debc3
Change-Id: I5a411f283fdf0fc3c00380d069848a332c799cdd
Closes-Bug: #1538372
Co-Authored-By: Tang Chen <chen.tang@easystack.cn>
Previously each command logs take_action parameters explicitly
by using @utils.log_method decorator or log.debug().
Some commands have no logging.
This commit calls a logger in the base class and
drops all logging definition from individual commands.
Closes-Bug: #1532294
Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
This commit makes 'log' optional.
'log' attribute of each command class does not exist
when the class is defined because 'log' is now setup
dynamically when a class is instantiated. Instead log_method
looks for a logger from a decorating method.
compute.v2.server is changed in this commit as an example.
Change-Id: Ic4d128f8e027d3b8e6f884f31369e9085c0f0871
Partial-Bug: #1532294
Move the network endpoint enablement checking from the 'server create'
command to the common client manager. This allows future network
commands to use either nova or neutron networking based on the cloud
environment.
This patch set also includes related unit test enhancements to the
common client manager to trigger authentication on the tests.
Change-Id: Ia37e81d4fb05a1e2fceb3e5d367bda769ab8e64b
Related-Bug: #1519511
Related-to: blueprint neutron-client
The command will now default to the image currently in-use by
the server, effectively making the --image parameter optional.
This commit also adds basic tests for ServerRebuild since there
wasn't any. Will add more full tests for it.
Change-Id: I733fd3ad5a825f06563c72aa430122e1a0e3b3b0
Closes-bug: #1524406
Co-Authored-By: David Moreau Simard <dms@redhat.com>
Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
In server.py, identity.common is imported as identity_common.
But network.common is imported as common, which is confuseing.
This patch imports network.common as network_common.
Change-Id: I74295bc88b22de398ab64fe556aedaca2453d17d
The following options of "server create" command support searching
by both name and ID. So add this info into doc.
--image, --volume, --flavor, --security.
Change-Id: I93b167da58144e5de6c9996009b7ea2449fb4cd8
Nova API only supports list servers searching by image ID.
In OSC, we can support both image name and ID by mapping
the name to ID.
This patch also fix the inconsistent doc in .py and .rst files.
Closes-Bug: 1521492
Change-Id: I70613843f82d74732bd32a457cd4a31aba57825f
Nova API only supports list servers searching by flavor ID.
In OSC, we can support both flavor name and ID by mapping
the name to ID.
This patch also fix the inconsistent doc in .py and .rst files.
Partial-Bug: 1521492
Change-Id: I1d1a6aa91aef4e2846745babe8382481185fa96e
The unshelve operation is not supported by OSC,
and this patch tries to add it.
Change-Id: Ic60a4616cb63ad21c1a3c8e02611da8bad3a8bd0
Implements: blueprint introduce-shelve-into-osc
Current "openstack server resume" command could only resume one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.
Change-Id: I726eb86bfa3df3a9911f45770e6641264dbc1e0b
Implements: blueprint cmd-with-multi-servers
Current "openstack server suspend" command could only suspend one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.
Change-Id: Ic0417ee28f46c9198a35744c0180342e61966b26
Implements: blueprint cmd-with-multi-servers
Currently, the shelve operation is not supported by OSC.
So, this patch attempts to add it into OSC.
Change-Id: I92545300bef006a069338168d2de800e8a58af69
Implements: blueprint introduce-shelve-into-osc
"nova list" will also output "Task State" and "Power State" by default.
This patch improves "server list" command to have the same columns, but
not by default. These two columns will be output if --long is added.
The power state is an int, so also adds a formatter helper function
to translate it to human readable string, just as "Networks" does.
Change-Id: I0530a910bec03835839a5ba7687c66d5643338f3
Current "openstack server unlock" command could only unlock one server.
Improve it to be able to handle more than one servers. Also improve the
doc to reflect the new feature.
Change-Id: Ibf57b2021a504da950a491d63139a438087aed0b
Implements: blueprint cmd-with-multi-servers
Current "openstack server lock" command could only lock one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.
Change-Id: Ifcf103b1c32e6c547ac09f688b887b1c03f92b09
Implements: blueprint cmd-with-multi-servers
Current "openstack server unpause" command could only unpause one server.
Improve it to be able to handle more than one servers. Also improve the
doc to reflect the new feature.
Change-Id: I069ebdd6dcd121f6e55c2bf40d42197f93830e0c
Implements: blueprint cmd-with-multi-servers
Current "openstack server pause" command could only pause one server.
Improve it to be able to handle more than one servers. Also improve
the doc to reflect the new feature.
Change-Id: I809f77f0720457c9cdc1028a70b391c75885984c
Implements: blueprint cmd-with-multi-servers
It is a general rule that we don't use plural form for the name of
command arguments. But class DeleteServer() is still using "servers".
So use "server instead".
Change-Id: I2d76de14ec34b88547b9f728b41e9bd93b2a22c5
Add a new option to search by user when listing servers,
include support for domain scoped users, also update
docs
Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>
Closes-Bug: #1483974
Change-Id: Ifdade6dc9ca8400fbd85f6b55793ab15ed17b97d