Per comment in [1], refactor the security group class names to
be in alphabetical order.
[1] https://review.openstack.org/#/c/249223
Change-Id: If28a153cdab57c0659ff5c78b276766d4043467f
Fix the 'ip floating' command documentation file name.
Add missing command list documentation for the 'ip fixed'
and 'ip floating pool' commands. In addition, update the
command description and argument help to fix minor issues
and use consistent terminology. And finally, cleanup the
Network command object formatting.
Change-Id: I0168891bc674c9f0d4df4062f7e93f497dc8fe6f
Add missing command list documentation for the 'security group'
and 'security group rule' commands. In addition, update the
command description and argument help to fix minor issues and
use consistent terminology.
Change-Id: I9f4a3fbac5637289f19511874e16391d3fe27132
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
The old fake server framework has be replaced with the new
class FakeServer, which is stronger in:
1. faking multiple servers with random names and ids
2. faking methods in a server
3. easier to use
So remove the old fake server data, and use class FakeServer
from now on.
Change-Id: Ife8ee37a7ce14d9a3201104bce8075a918a97613
Implements: blueprint osc-unit-test-framework-improvement
There are the same problems with TestServerCreate in TestServerResize.
Use the new class FakeServer to fix them.
Change-Id: Ibde3e68a7bc55bbbf8357ba98be2559a6d0d41b6
Implements: blueprint osc-unit-test-framework-improvement
There are the same problems with TestServerCreate in TestServerImageCreate.
Use the new class FakeServer to fix them.
Change-Id: Ie723fa95620549f09a81ef72953f46877ef9252a
Implements: blueprint osc-unit-test-framework-improvement
There are the same problems with TestServerCreate in TestServerDelete.
Use the new class FakeServer to fix them.
Change-Id: Icdcc90cc93ed1080187fb0edca885b0db56ab35d
Implements: blueprint osc-unit-test-framework-improvement
In the current TestServerCreate, there are several problems:
1. The fake create() returns a server with no 'networks' field.
The new_server is used to fake the created server which is
supposed to be returned by create(), but it has a 'networks'
field.
They have the same name and id, but they are actually not
the same server.
As a result, when checking the return value from create(),
'networks' is not checked.
2. The fake server is not accessable in the test functions.
So each time a test function wants to get the server name
or id, it has to use the constants defined in compute_fakes.
This is not good. We should make the fake server accessable
in all test functions to ensure they actually get the same
server.
This patch fix them both by using the new class FakeServer to
fake a server.
Change-Id: I8ffc8e233f8710034329ed33fccb2c734898ec2d
Implements: blueprint osc-unit-test-framework-improvement
The OpenStackClient mapping of 'openstack quota set' arguments isn't
correct for compute quota items that have to different names. For
example, the --injected-file-size argument is mapped to
injected_file_size, but the compute quotas item is actually
injected_file_content_bytes. This incorrect mapping prevented the
impacted compute quota items from being set.
The problem impacts the following 'openstack quota set' arguments:
--injected-file-size
--injected-path-size
--properties
--secgroup-rules
--secgroups
This patch set also expands the compute quota unit tests to verify
all compute quota items that can be set.
Change-Id: I0a2f241e425f4811e4ae55be183ac0c8b0805c2a
Closes-Bug: #1475831
This patch adds unit tests for "server pause" command,
including one and multiple servers.
Change-Id: If5551e77d7dd4f7f48c6ee4a7f80f8313817f492
Implements: blueprint osc-unit-test-framework-improvement
This patch introduces a new server faking mechanism to support
multiple servers faking.
Server names and ids can be generated randomly, and use APIs in
class FakeServer to get one or more servers.
Change-Id: Ic54f3bf7c77294dc7dfb9acdbf4a721eb5eef6af
Implements: blueprint osc-unit-test-framework-improvement
Use MagicMock to fake a method in FakeResource. A new function:
add_method(name, return_value)
is added to FakeResource. The caller specifies method @name and @return_value,
the function will add an attribute with @name, which is a callable MagicMock
object whose return value is @return_value.
When user access the attribute with a (), @return_value will be returned by
MagicMock, which looks like a function call.
Change-Id: I12eb876cbebab064773df7b5dd612de69bbf3f01
Implements: blueprint osc-unit-test-framework-improvement
For some apis, heat, the error status is "failed". This patch
changes the wait_for_status method to allow for the error
status to be passed in the same way as the success status.
Change-Id: I20db4051d3f5611a4b13fe23ea8798b82a40da81
Remove the 'project usage list' command that was deprecated in version
1.0.2 in review Ie08d4f88d71a660fca1862405351109cd0aa86b6.
Note that the removed command class is a good example of how to wrap a
command and show a deprecation message.
Change-Id: I6c750730963615895f5d9953487d2d5a905885a8
"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