take_action() in commands inheriting from Command returns nothing.
So we should assert the return is None in the unit tests of these
commands.
Change-Id: I53eeb88316b2c20882fed97149d55cb04bcb2b2e
Closes-Bug: #1550636
In unit tests, all real methods are faked. They should not
do any real operations in the tests. So, FakeFlavorResource
is not necessary. Just fake get_keys(), set_keys and unset_keys()
in FakeResource would be enough.
Change-Id: Icc3473ba9c77f4817d0edddb7ff3e1bd2946fac7
Add CLI support for the 'port set' command
Change-Id: I2bea508e11290284aa64b1ab548a0bb61e7290d3
Partial-bug: #1519909
Partially-implements: blueprint neutron-client
This patch supports setting a new name, pool prefix,
default prefix length, minimum prefix length,
and maximum prefix length for a subnet pool.
Change-Id: I65bd71e0f54f2f65acefbc542df67a1b1ec26397
Partial-Bug: #1544591
Related-to: blueprint neutron-client
take_action() in commands inheriting from Command returns nothing.
So we should assert the return is None in the unit tests of these
commands.
Change-Id: I02af06b3d476aac2d93a23ef2111cdc7fa0892ec
Partial-Bug: #1550636
This patch adds the ability to list all created ports
Change-Id: Ie1a48c203cabc96346a4950f21b83493d58a66a5
Partial-bug: #1519909
Partially-implements: blueprint neutron-client
Objects returned by Network v2 and Compute v2 are different.
When getting columns to display, Network v2 uses obj.keys(),
while Compute v2 uses obj._info.keys(). But both of them could
obtain the keys of the object by _get_columns().
Change-Id: I347815f2d28822a95bd6f57d429b84b7ca96e0ee
Some of the unit tests test run(), but not take_action().
For example, in openstackclient/tests/volume/v1/test_volume.py, there is:
def test_volume_set_size_smaller(self):
......
result = self.cmd.run(parsed_args)
self.assertEqual(0, result)
......
run() is defined in class Command in cliff. We don't need to test it in OSC
unit tests. On the contrary, we should test take_action(), which is
overwritten in each command classes in OSC.
Change-Id: If07e89953d40ac530f08cbb1ec05f5805171364b
Closes-bug: #1553468
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
Nova API validation changes [1] appear to have broken the
'os aggregate create' and 'nova aggregate-create' commands when
an availability zone name is not specified. This patch set updates
the test_aggregate functional test to set the availability zone
name in order to unblock the osc gate while nova investigates
the issue.
[1] https://review.openstack.org/#/c/281143/
Change-Id: I00b497be61c4bc4bc467c66c1e49b2e0636ab841
Related-Bug: #1541691
take_action() in commands inheriting from Command returns nothing.
So we should assert the return is None in the unit tests of these
commands.
Change-Id: Idd961a5fa3db825353700837a559621d17f782c5
Partial-Bug: #1550636
Command "router show" will display router's "tenant_id" as
"project_id". But in the unit test, it checks "tenant_id",
which is incorrect.
This patch fix this problem, and add a _get_columns() helper
function to simplify the code.
Change-Id: I0087ef7dfd0130b6c47222495848c4f2b9804b1b
Refactored the 'os security group set' command to use the SDK
when neutron is enabled, but continue to use the nova client
when nova network is enabled.
This patch set also fixes a compute bug which ignores name
and description when set to an empty value.
Change-Id: I4225179dca4aedf799e1656ec49236bdedc5e9bd
Partial-Bug: #1519511
Implements: blueprint neutron-client
take_action() in commands inheriting from Command returns nothing.
So we should assert the return is None in the unit tests of
these commands.
Change-Id: I237ea772f74fa52af2e9aacd35d4b9cfb225c94c
Partial-Bug: #1550636
This patch only provide network name and subnet setting for
"network create" command.
The other options, such as --project which depends on
identity v2 or v3, will make the unit tests too complicated.
So I prefer to implement them in other patches.
Change-Id: I9ec93f0af813c8fae4170c36e16bbe8f0f53cbb6
Partial-Bug: 1543672