2177 Commits

Author SHA1 Message Date
Jenkins
272ac55776 Merge "Return names in list role assignments" 2016-02-17 22:23:51 +00:00
Jenkins
f1ae75aa01 Merge "Add release note for "network delete" command for nova network" 2016-02-17 20:42:33 +00:00
Jenkins
713a9d7de9 Merge "Add release note for "ip floating delete/list" commands for neutron network" 2016-02-17 20:36:22 +00:00
Jenkins
f15a75428d Merge "Add "token revoke" for identity v3" 2016-02-17 20:31:07 +00:00
Jenkins
a517b1e9a6 Merge "Fix 'openstack --help' fails if clouds.yaml cannot be read" 2016-02-17 20:30:49 +00:00
Tang Chen
d9d1809907 Support "network show" command in nova network
"network show" command is not implemented in nova network.
This patch implements it.

Change-Id: I1fadd890fe36c4e3ac5c9ed389b20c5b2fff8aca
partial-Bug: 1543672
2016-02-17 17:09:51 +08:00
Tang Chen
ddc97c6dc5 Support "network list" command in nova network
"network list" command is not implemented in nova network.
This patch implements it.

The Network object in novaclient is quite different from
the one in sdk. And the output of "network list" using
Nova network is also quite different from using Neutron.

It is like this:

# openstack network list
+--------------------------------------+---------+-------------+
| ID                                   | Name    | Subnet      |
+--------------------------------------+---------+-------------+
| 96a98ec4-31f6-45f6-99e6-9384569b3bb5 | private | 10.0.0.0/24 |
+--------------------------------------+---------+-------------+

--long and --external options have not been implemented because
the attrs in Network object in novaclient is too much different.

This patch also introduces a new FakeNetwork class in compute/v2/fake.py
to fake nova network.

Change-Id: Id1fdf81fb2fa8b39f2c76b7bae37ac4fecafd0f7
Depends-On: I1b59264cd40aaf1062f4e8db233ccb7fd0e95f0e
partial-Bug: 1543672
2016-02-17 17:04:43 +08:00
Tang Chen
0a3ba91d53 Add release note for "network delete" command for nova network
Change-Id: Idb8a24465e447e90315c0f614ad91bd7eabd6878
partial-Bug: 1543672
2016-02-17 17:04:32 +08:00
Tang Chen
da3d65299b Define FakeFloatingIP class in tests/compute for nova network commands
"ip floating list" command is not available for Neutron now because
the implementation is incorrect.

The FloatingIP objects returned from Nova and Neutron network are
quite different. So they need different FakeFloatingIP class to
do the tests.

This patch copies class FakeFloatingIP in tests/network to tests/compute
for Nova network tests.

Will fix the problem in "ip floating list" command and change FakeFloatingIP
in tests/network to fit Neutron network tests.

Change-Id: Ia29d257868e0f1dc6cd7cfe3819875e5913f76ec
Partial-Bug: 1519502
Partially implements: blueprint neutron-client
2016-02-16 15:14:34 +08:00
Tang Chen
5f40e1ea45 Add release note for "ip floating delete/list" commands for neutron network
Change-Id: Ic90abf106a06edf9af4fe4c8938ab92bfdd8bb42
partial-Bug: 1519502
Related-to: blueprint neutron-client
2016-02-16 13:38:20 +08:00
Jenkins
c8753808a2 Merge "Refactor security group functional tests" 2016-02-15 20:46:51 +00:00
Jenkins
67bec569f8 Merge "Rename parameter "identifier" to "network" in network commands" 2016-02-15 17:16:30 +00:00
Jenkins
5543857381 Merge "Use assertRaises() to check if an exception is raised" 2016-02-15 17:14:42 +00:00
Hideki Saito
e5b8e08eb1 Fix 'openstack --help' fails if clouds.yaml cannot be read
'openstack --help' can display the basic information, even if
 openstack command does not have permission to read clouds.yaml.

Change-Id: I7d5255c5ce3bd60af77fc70f433ca78dc011a79f
Closes-Bug: #1541047
2016-02-14 22:08:01 +09:00
Tang Chen
324e026f57 Rename parameter "identifier" to "network" in network commands
In other commands, the name or ID of an object is just the name
of the object. For example, name or ID of a server is "server",
router is "router". So, do not use "identifier" in network commands.

Also, the parameter in doc file network.rst is not "identifier",
but "network".

Change-Id: I1ec3beefbb878a207bca280b994ca176ef04ee2d
2016-02-14 18:57:34 +08:00
Tang Chen
cfcb750a97 Use assertRaises() to check if an exception is raised
In some test cases, try/except is used to check if an exception
has been raised. We should use assertRaises() instead.

Change-Id: I15c8e757dcab77fd6f895feb018184e1eb7e617b
2016-02-14 18:43:19 +08:00
Tang Chen
27a0da65e3 Support "network delete" command in nova network
"network delete" command is not implemented in nova network.
This patch implements it.

Change-Id: I5dac1eed6eb8e67298bb446418835a6ab85c859c
Depends-On: I1b59264cd40aaf1062f4e8db233ccb7fd0e95f0e
partial-Bug: 1543672
2016-02-14 17:07:17 +08:00
Tang Chen
d8abec33ad Floating IP: Neutron support for "ip floating list" command
Change-Id: I253f66f6bc64470e1a18ffea506048eb53f67d5c
partial-Bug: 1519502
Related-to: blueprint neutron-client
2016-02-14 04:21:08 +00:00
Jude Job
6109dfcf63 Floating IP: Neutron support for "ip floating delete" command
This patch implements "ip floating delete" command for
both compute and network. Also includes unit tests.

Change-Id: Ie61f0faad65ec90f9d9956ae463412be8d963d05
partial-Bug: 1519502
Related-to: blueprint neutron-client
Co-Authored-By: Tang Chen <chen.tang@easystack.cn>
2016-02-14 04:21:00 +00:00
Jenkins
c7c672d4b3 Merge "Add quota functional tests" 2016-02-13 06:49:39 +00:00
Jenkins
6117e1c715 Merge "Identity: Fix DisplayCommandBase comments for cliff ShowOne subclass tests" 2016-02-13 06:11:39 +00:00
Jenkins
f1b11e2cf0 Merge "Identity: Fix DisplayCommandBase comments for cliff Lister subclass tests" 2016-02-13 06:11:22 +00:00
Jenkins
2dae6567c6 Merge "Identity: Fix DisplayCommandBase comments for cliff Command subclass tests" 2016-02-13 06:11:16 +00:00
Jenkins
6a61cb2540 Merge "Add NetworkAndCompute Lister and ShowOne classes" 2016-02-13 04:36:37 +00:00
Jenkins
43065bee9a Merge "Trivial: Fix a typo in test_network.py" 2016-02-13 04:36:30 +00:00
Jenkins
2650439052 Merge "Updated from global requirements" 2016-02-13 04:09:13 +00:00
Jenkins
73cabcc871 Merge "Add release note for custom logging feature" 2016-02-12 21:00:24 +00:00
Jenkins
088cb82631 Merge "Allow custom log levels for other loggers" 2016-02-12 21:00:00 +00:00
OpenStack Proposal Bot
08e045282c Updated from global requirements
Change-Id: I1583731e73699b71aa7a03ae4541e481abd6f1ea
2016-02-12 20:06:35 +00:00
Richard Theis
ea0b8f9162 Add quota functional tests
Add functional tests for "os quota" commands.

Change-Id: I0f5939bf4ce553174c9b7ce55bdb3dce0506c409
Related-Bug: #1528249
Partially-Implements: blueprint neutron-client
2016-02-12 12:52:40 -06:00
Richard Theis
04e45bbacd Add NetworkAndCompute Lister and ShowOne classes
This patch set introduces the NetworkAndComputeLister and
NetworkAndComputeShowOne classes which are related to the
NetworkAndComputeCommand class.  These classes are for commands
that must support neutron and nova network.  The new classes
allows both the parser and actions to be unique.

Change-Id: I1b59264cd40aaf1062f4e8db233ccb7fd0e95f0e
Partial-Bug: #1519511
Partial-Bug: #1519512
Related-to: blueprint neutron-client
2016-02-12 07:14:32 -06:00
Jenkins
91177828d8 Merge "Trivial: Fix "abstractmethod" to "abstract method"" 2016-02-12 03:45:32 +00:00
Jenkins
0cf8b29cfe Merge "Fix identity test_role functional tests" 2016-02-12 00:54:56 +00:00
Richard Theis
7d6d23d378 Fix identity test_role functional tests
A recent keystone change [1] resulted in the domain_id field
being included when showing a role.

[1] 407eabde41

Change-Id: I344f4d727f2a16217c075ad8b8393c1e0a233c2e
Closes-Bug: #1544547
2016-02-11 07:30:56 -06:00
Tang Chen
9d57709ccc Trivial: Fix a typo in test_network.py
Change-Id: I5fe4865473ea885b54d02b5d174a632221f815c8
2016-02-11 20:02:12 +08:00
OpenStack Proposal Bot
dda45e3c39 Updated from global requirements
Change-Id: Icdee08fa079eb3646388567050643c29eac1eca8
2016-02-10 21:59:14 +00:00
Richard Theis
b3a4b8852a Refactor network AZ exception handling
Exceptions that occur while getting network availability zones
should not be masked as if the extension does not exist.

Change-Id: I07213ec6c4d83e97261b58bf8d42417c1cdfae6a
Related-Bug: #1534202
2016-02-10 13:49:30 -06:00
Richard Theis
a29c9732d7 Refactor security group rule delete to use SDK
Refactored the 'os security group rule delete' 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 introduces new FakeSecurityGroupRule classes
for testing network and compute security group rules. And fixes
were made to the network FakeSecurityGroup class.

Change-Id: I8d0917925aa464e8255defae95a2a2adfb6cfb75
Partial-Bug: #1519512
Related-to: blueprint neutron-client
2016-02-10 10:38:35 -06:00
Tang Chen
9f71b777ac Identity: Fix DisplayCommandBase comments for cliff ShowOne subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.

    # DisplayCommandBase.take_action() returns two tuples

There is no such class named DisplayCommandBase in OSC. It is in cliff.

All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:

Object
|--> Command
     |--> DisplayCommandBase
          |--> Lister
          |--> ShowOne

take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.take_action() returns nothing.
* Lister.take_action() returns a tuple which contains a tuple of columns
  and a generator used to generate the data.
* ShowOne.take_action() returns an iterator which contains a tuple of
  columns and a tuple of data.

So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
   from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class Lister in cliff. Lister.take_action() returns a tuple and
   a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class ShowOne in cliff. ShowOne.take_action() returns two tuples.

This patch finishes step 3 in all identity tests.

Change-Id: I1f05e833cdacd30915954e4220b6e1f16ac1ed40
Closes-bug: #1477199
2016-02-10 23:11:58 +08:00
Tang Chen
d0c0cefb84 Identity: Fix DisplayCommandBase comments for cliff Lister subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.

    # DisplayCommandBase.take_action() returns two tuples

There is no such class named DisplayCommandBase in OSC. It is in cliff.

All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:

Object
|--> Command
     |--> DisplayCommandBase
          |--> Lister
          |--> ShowOne

take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.take_action() returns nothing.
* Lister.take_action() returns a tuple which contains a tuple of columns
  and a generator used to generate the data.
* ShowOne.take_action() returns an iterator which contains a tuple of
  columns and a tuple of data.

So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
   from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class Lister in cliff. Lister.take_action() returns a tuple and
   a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class ShowOne in cliff. ShowOne.take_action() returns two tuples.

This patch finishes step 2 in all identity tests.

Change-Id: I2929ee688b1d7afc52c6ab325982bdc24c60a995
Partial-bug: #1477199
2016-02-10 22:44:29 +08:00
Tang Chen
1225ad5f7e Identity: Fix DisplayCommandBase comments for cliff Command subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.

    # DisplayCommandBase.take_action() returns two tuples

There is no such class named DisplayCommandBase in OSC. It is in cliff.

All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:

Object
|--> Command
     |--> DisplayCommandBase
          |--> Lister
          |--> ShowOne

take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.take_action() returns nothing.
* Lister.take_action() returns a tuple which contains a tuple of columns
  and a generator used to generate the data.
* ShowOne.take_action() returns an iterator which contains a tuple of
  columns and a tuple of data.

So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
   from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class Lister in cliff. Lister.take_action() returns a tuple and
   a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class ShowOne in cliff. ShowOne.take_action() returns two tuples.

This patch finishes step 1 in all identity tests.

Change-Id: Id7180d10c050c6286b2c05cd990e2e275fbc3d38
Partial-bug: #1477199
2016-02-10 19:15:37 +08:00
Tang Chen
e1feed5221 Trivial: Fix "abstractmethod" to "abstract method"
As Richard <rtheis@us.ibm.com> has pointed out, "abstractmethod"
should be "abstract method". This is a small typo I have made
when I fix DisplayCommandBase comment bug.

Change-Id: I84f1a3158896257686a0a7efa1123eef1b85139f
Partial-bug: #1477199
2016-02-10 19:01:52 +08:00
Tang Chen
35833f7bd8 Fix DisplayCommandBase comments for cliff ShowOne subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.

    # DisplayCommandBase.take_action() returns two tuples

There is no such class named DisplayCommandBase in OSC. It is in cliff.

All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:

Object
|--> Command
     |--> DisplayCommandBase
          |--> Lister
          |--> ShowOne

take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.take_action() returns nothing.
* Lister.take_action() returns a tuple which contains a tuple of columns
  and a generator used to generate the data.
* ShowOne.take_action() returns an iterator which contains a tuple of
  columns and a tuple of data.

So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
   from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class Lister in cliff. Lister.take_action() returns a tuple and
   a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class ShowOne in cliff. ShowOne.take_action() returns two tuples.

This patch finishes step 3 in all but identity tests. There are too many
such comments in identity tests. So fix them all in another patch.

Change-Id: I1afe4852069d25d562a9448ec2bf2cff58955052
Partial-bug: #1477199
2016-02-10 13:31:38 +08:00
lin-hua-cheng
686a269738 Add "token revoke" for identity v3
Change-Id: Ie631600d02942fe6ce035f31af46abe44e543631
Closes-bug: #1543226
2016-02-09 16:49:11 -08:00
Tang Chen
e69b88ef52 Fix DisplayCommandBase comments for cliff Lister subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.

    # DisplayCommandBase.take_action() returns two tuples

There is no such class named DisplayCommandBase in OSC. It is in cliff.

All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:

Object
|--> Command
     |--> DisplayCommandBase
          |--> Lister
          |--> ShowOne

take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.take_action() returns nothing.
* Lister.take_action() returns a tuple which contains a tuple of columns
  and a generator used to generate the data.
* ShowOne.take_action() returns an iterator which contains a tuple of
  columns and a tuple of data.

So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
   from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class Lister in cliff. Lister.take_action() returns a tuple and
   a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class ShowOne in cliff. ShowOne.take_action() returns two tuples.

This patch finishes step 2 in all but identity tests. There are too many
such comments in identity tests. So fix them all in another patch.

Change-Id: I00f38d12f55abe20fa708f6349073da658622f8d
Partial-bug: #1477199
2016-02-09 20:28:18 +08:00
Tang Chen
43f80505cb Fix DisplayCommandBase comments for cliff Command subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.

    # DisplayCommandBase.take_action() returns two tuples

There is no such class named DisplayCommandBase in OSC. It is in cliff.

All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:

Object
|--> Command
     |--> DisplayCommandBase
          |--> Lister
          |--> ShowOne

take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.take_action() returns nothing.
* Lister.take_action() returns a tuple which contains a tuple of columns
  and a generator used to generate the data.
* ShowOne.take_action() returns an iterator which contains a tuple of
  columns and a tuple of data.

So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
   from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class Lister in cliff. Lister.take_action() returns a tuple and
   a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
   from class ShowOne in cliff. ShowOne.take_action() returns two tuples.

This patch finishes step 1 in all but identity tests. There are too many
such comments in identity tests. So fix them all in another patch.

Change-Id: I9849baa8141ea8af2042a69afd540b77ce6ae6bd
Partial-bug: #1477199
2016-02-09 18:27:48 +08:00
Jenkins
624c39ab1b Merge "Compute: Fix DisplayCommandBase comments for cliff ShowOne subclass tests" 2016-02-08 16:21:01 +00:00
Jenkins
f781349974 Merge "Compute: Fix DisplayCommandBase comments for cliff Lister subclass tests" 2016-02-08 08:25:39 +00:00
Jenkins
124f21d0a3 Merge "Compute: Fix DisplayCommandBase comments for cliff Command subclass tests" 2016-02-08 08:25:32 +00:00
Jenkins
3d04c78cb9 Merge "Add unit tests for "hypervisor show" command" 2016-02-08 08:10:03 +00:00