2189 Commits

Author SHA1 Message Date
Jenkins
cf0f229cad Merge "[Subnet pool] Add 'subnet pool set' command support" 2016-03-10 00:38:09 +00:00
Jenkins
f8ac17ac52 Merge "Trivial: Use 'SSH' rather than 'Ssh'" 2016-03-09 17:18:33 +00:00
Jenkins
1cef18427f Merge "Remove FakeFlavorResource class" 2016-03-09 17:18:26 +00:00
Jenkins
46f58dc173 Merge "remove py26 workaround in osc" 2016-03-09 16:40:46 +00:00
Jenkins
0713c03d47 Merge "Add port functional tests" 2016-03-09 16:39:55 +00:00
Stephen Finucane
13e2bb9b96 Trivial: Use 'SSH' rather than 'Ssh'
This is reflected in the '--help' screen.

Change-Id: Ic22a65ff6a56b069b37a0ea8365cce2b3f93621c
2016-03-09 14:55:55 +00:00
Jenkins
040d0c2e82 Merge "[Identity] Check return value is None in identity v3 unit tests" 2016-03-09 08:32:55 +00:00
Jenkins
c8e4a1407f Merge "Add --reason for disable service" 2016-03-09 07:12:51 +00:00
Tang Chen
237d7feca8 [Identity] Check return value is None in identity v3 unit tests
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
2016-03-09 14:17:05 +08:00
jichenjc
b711c3a0ca Add --reason for disable service
disbale service allow a reason to be input as disable reason.
This patch add support for it.

Change-Id: I59622c3970e055ebd46bf03c33c864b6d064db28
2016-03-09 05:19:41 +00:00
Tang Chen
81930abdcb Remove FakeFlavorResource class
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
2016-03-09 10:26:15 +08:00
Richard Theis
9fcbd0ad4b Add port functional tests
Add functional tests for "os port" commands.

Change-Id: I162eff6abacd9ffdde369647491ae472b604c692
Depends-On: I2bea508e11290284aa64b1ab548a0bb61e7290d3
Partial-Bug: #1519909
Partially-Implements: blueprint neutron-client
2016-03-08 10:02:17 -06:00
Jas
e0d58641bb Add 'port set' command
Add CLI support for the 'port set' command

Change-Id: I2bea508e11290284aa64b1ab548a0bb61e7290d3
Partial-bug: #1519909
Partially-implements: blueprint neutron-client
2016-03-08 09:48:50 -06:00
Jenkins
9ab7740dfd Merge "Trivial: Fix incorrect comments in compute fakes.py" 2016-03-08 15:15:41 +00:00
Tang Chen
f2fb007e82 [Subnet pool] Add 'subnet pool set' command support
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
2016-03-08 21:22:13 +08:00
Tang Chen
11c253ca19 Trivial: Fix incorrect comments in compute fakes.py
Change-Id: I18b1720af13b444527dda1ecab52e3cc8d8d9376
2016-03-08 20:48:58 +08:00
Steve Martinelli
3ed5d232bb remove py26 workaround in osc
we don't support py2.6, so let's remove the workarounds we have.

Change-Id: Id9c8fda065d4aceba3192b044b5c5f2124ee204f
2016-03-08 12:41:17 +00:00
Tang Chen
762c4c9bdf [Identity] Check return value is None in identity v3 unit tests
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
2016-03-08 15:58:25 +08:00
Jenkins
752705ae30 Merge "Add port list command" 2016-03-08 03:04:28 +00:00
Jas
d548942645 Add port list command
This patch adds the ability to list all created ports

Change-Id: Ie1a48c203cabc96346a4950f21b83493d58a66a5
Partial-bug: #1519909
Partially-implements: blueprint neutron-client
2016-03-07 11:17:31 -06:00
Jenkins
13a6857142 Merge "Use _get_columns() to obtain columns in network.py" 2016-03-07 16:05:01 +00:00
Jenkins
dcc27fd5d3 Merge "Test take_action() instead of run() in unit tests" 2016-03-07 16:01:17 +00:00
Tang Chen
fc24f37ae2 Trivial: Remove useless return
If a function returns nothing, do not add return in the end.

Change-Id: I298b8717462f68d3076a1619d674775be2a94c42
2016-03-07 17:54:06 +08:00
Jenkins
8787ad2b49 Merge "Add release note for security group set refactor" 2016-03-06 09:26:14 +00:00
Jenkins
67969e438c Merge "" openstack server image create " doesn't print proper info" 2016-03-06 08:33:44 +00:00
Tang Chen
7ba73845c1 Use _get_columns() to obtain columns in network.py
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
2016-03-06 09:01:42 +08:00
Richard Theis
46e86e5a4a Add release note for security group set refactor
Add a release note for [1].

[1] https://review.openstack.org/#/c/287763/

Change-Id: I30812c3ead477267dc7e3dc774c09b3435152eb9
Partial-Bug: #1519511
Implements: blueprint neutron-client
2016-03-05 10:18:35 -06:00
Jenkins
0b2c4b1f32 Merge "Refactor security group set to use SDK" 2016-03-05 16:08:20 +00:00
Tang Chen
eb1574281b Test take_action() instead of run() in unit tests
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
2016-03-05 17:12:42 +08:00
Jenkins
fa3a34322c Merge "[compute] Support restore server" 2016-03-04 23:41:42 +00:00
Jenkins
a61c5cc8a4 Merge "Add 'port create' command" 2016-03-04 23:39:22 +00:00
Jenkins
5c1633f505 Merge "[compute] Add unit test for keypair" 2016-03-04 23:39:16 +00:00
OpenStack Proposal Bot
3ede46d4d0 Updated from global requirements
Change-Id: Ife3956a1109ffa2faf367953cc13b8cb5f64e5c2
2016-03-04 19:42:17 +00:00
Jenkins
0bf65361f5 Merge "[Volume] Check return value is None in volume unit tests" 2016-03-04 17:55:26 +00:00
Jas
d1d4a40808 Add 'port create' command
This patch adds usage of 'port create' in CLI

Change-Id: I888af50784c3b6c7ec30552ade79f05a5e974711
Partial-bug: #1519909
Partially-implements: blueprint neutron-client
2016-03-04 10:41:26 -06:00
OpenStack Proposal Bot
6a96ffc221 Updated from global requirements
Change-Id: I8bfe67141572a0bf406959dea83eaf1f2c30b890
2016-03-04 10:21:02 +00:00
Jenkins
d763acdf1c Merge "Add test cases to test some commands with '--wait' and fix bug" 2016-03-04 01:29:56 +00:00
OpenStack Proposal Bot
2d3ded5e9d Updated from global requirements
Change-Id: I49cfc47d791d890941dc199bd0d5fa0205b1f1ca
2016-03-03 23:16:04 +00:00
Jenkins
5e11d24df8 Merge "Fix incorrect unit test for router" 2016-03-03 22:34:47 +00:00
Mohan Muppidi
e354d17d2c " openstack server image create " doesn't print proper info
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
2016-03-03 21:03:14 +00:00
Richard Theis
8cf28a34ab Fix test_aggregate functional test
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
2.2.0
2016-03-03 12:32:09 -06:00
Tang Chen
b58dd4f17f [Volume] Check return value is None in volume unit tests
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
2016-03-03 21:07:08 +08:00
Tang Chen
50443127c5 Fix incorrect unit test for router
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
2016-03-03 20:50:17 +08:00
Richard Theis
bac9fb18c1 Refactor security group set to use SDK
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
2016-03-03 06:33:15 -06:00
Jenkins
977eb4f1a6 Merge "Trivial: Reorder unit tests in alphabetical order in volume tests" 2016-03-03 05:00:36 +00:00
OpenStack Proposal Bot
4ab66631d0 Updated from global requirements
Change-Id: Icc45c24eebbdd524254dc3200b016fe75b621b15
2016-03-02 19:23:53 +00:00
Jenkins
fc8b4cfcae Merge "[Image] Check return value is None in image unit tests." 2016-03-02 17:25:19 +00:00
Tang Chen
f2ef9f2044 Trivial: Reorder unit tests in alphabetical order in volume tests
Change-Id: I622123f68e2bb53f8767069e4a717fcc34e37b5c
2016-03-02 16:48:16 +08:00
Tang Chen
fd53a4980f [Image] Check return value is None in image unit tests.
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
2016-03-02 16:16:37 +08:00
Tang Chen
359dfa1a06 Support "network create" command in nova network
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
2016-03-02 14:39:00 +08:00