1985 Commits

Author SHA1 Message Date
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
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
OpenStack Proposal Bot
dda45e3c39 Updated from global requirements
Change-Id: Icdee08fa079eb3646388567050643c29eac1eca8
2016-02-10 21:59:14 +00: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
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
Jenkins
8a250f369c Merge "Remove identity_client.projects definition in TestSecurityGroup" 2016-02-08 07:11:04 +00:00
Jenkins
f0f9b5096c Merge "Define security_group_rules mock in FakeComputev2Client" 2016-02-08 07:10:58 +00:00
Jenkins
3a93c35f34 Merge "Move security_groups mock definition to FakeComputev2Client" 2016-02-08 07:10:52 +00:00
OpenStack Proposal Bot
e3e925d2f1 Updated from global requirements
Change-Id: I14a68f0ed63f1a3e3cac7379324d58b613afdfa9
2016-02-08 02:44:02 +00:00
Jenkins
02ab0cb3c3 Merge "Add release note for recursive delete" 2016-02-07 03:16:15 +00:00
Terry Howe
828f63f903 Add release note for recursive delete
Change-Id: I9c7a32d4e18f32ae1225e250d11b8e0a2d274dd7
2016-02-07 01:22:32 +00:00
Tang Chen
fc708c4991 Add unit tests for "hypervisor show" command
Change-Id: Ib75e5eb5b197e9d58fb87a595a43b8774b7b1987
2016-02-07 02:38:09 +08:00
Jenkins
4cc61e5eb9 Merge "Fix formatting in release 2.0.0 notes" 2016-02-06 17:52:40 +00:00
Jenkins
713ed598a4 Merge "Fix some release note formatting" 2016-02-06 05:41:06 +00:00
Tang Chen
23faa33b1b Compute: 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 compute tests.

Change-Id: I4df224ec82b5d82a3d6d3f366c0f68a7ea0d87cd
Partial-bug: #1477199
2016-02-06 10:47:56 +08:00
Tang Chen
3c67e8dd6e Compute: 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 compute tests.

Change-Id: Idc54ad21eaa1371ebd601327b8d962c7039f2de0
Partial-bug: #1477199
2016-02-06 10:30:34 +08:00
Tang Chen
b9de23d906 Compute: 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 compute tests.

Change-Id: I99ab42a7de69af0e5de802a1bb5aac647245a200
Partial-bug: #1477199
2016-02-06 09:34:51 +08:00
Tang Chen
90a4cf23aa Remove identity_client.projects definition in TestSecurityGroup
projects mock has been defined in FakeIdentityv2Client as
tenants, and in FakeIdentityv3Client as projects. No need
to define them again.

Change-Id: Ieb97b32d7be6bd95c8621092b218ebfd8bc5b78d
2016-02-06 08:44:05 +08:00
Tang Chen
1740218728 Define security_group_rules mock in FakeComputev2Client
security_group_rules mock should be defined in
FakeComputev2Client, and used in each test class.

Change-Id: I44bb6379b2c1b6cb277296e08e25dd4d7255c276
2016-02-06 08:43:55 +08:00
Tang Chen
553631a5d4 Move security_groups mock definition to FakeComputev2Client
All compute client related mocks should be defined in
FakeComputev2Client.

Change-Id: Ie75385af772ca23286c4cf131d3d54cc14f20a30
2016-02-06 08:43:01 +08:00
Jenkins
794c2a1738 Merge "Add functional tests for snapshots" 2016-02-05 22:50:01 +00:00
Jenkins
fb4240a4b5 Merge "Add support for triggering an crash dump" 2016-02-05 22:49:36 +00:00
Jenkins
546398c14b Merge "Add recursive object delete for containers" 2016-02-05 22:49:33 +00:00
Dean Troyer
552eded9ad Fix formatting in release 2.0.0 notes
This is a test to see if we can update release notes from previous releases.
This may not work and will be abandoned if so.

Change-Id: Id85a25c793aa403025c7e32038ea7072139700db
2016-02-05 16:25:01 -06:00
Dean Troyer
99f6795189 Fix some release note formatting
Fix the current notes that used single-backticks where
double-backticks should have been used.

Change-Id: I454e14dd084c9b706fab3255170a79765091a497
2016-02-05 15:38:59 -06:00
TerryHowe
514a168656 Add recursive object delete for containers
Change-Id: Ib291e79864c218464e842a08efd3742193ba5ff0
2016-02-05 11:18:46 -07:00
TerryHowe
e108719f77 Add functional tests for snapshots
Change-Id: I863583d6c8263d144d45a0443fc6af04301d23e7
2016-02-05 07:02:29 -07:00
xiexs
6b3583ab06 Add support for triggering an crash dump
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>
2016-02-05 21:48:41 +08:00
Tang Chen
05b18749ef Add unit tests for "hypervisor list" command
There is no unit tests for "hypervisor" command. This patch
introudces a new class FakeHypervisor to fake one or more
hypervisors, and a base class TestHypervisor. Also adds
hypervisors mock to fake compute client.

And also, this patch adds unit tests for "hypervisor list"
command.

Change-Id: I18733eae1a8f4fff72e830d9a060fb8f0f58fbf5
2016-02-05 21:40:28 +08:00
Jenkins
42b607edf1 Merge "Use assert_not_called() in common tests" 2016-02-04 22:56:57 +00:00
Jenkins
f4ad41761a Merge "Doc: Add optional command specs process" 2016-02-04 20:27:18 +00:00
Jenkins
b861d21d14 Merge "Refactor TestVolumeCreate to use FakeVolume" 2016-02-04 05:30:03 +00:00
Jenkins
95263a0b8c Merge "Minor typo in help text" 2016-02-04 00:43:09 +00:00
Jenkins
48697de28f Merge "Support listing network availability zones" 2016-02-04 00:40:09 +00:00
Jenkins
e4c0d8583d Merge "Allow wait_for_delete to work for all clients" 2016-02-04 00:39:47 +00:00
Jenkins
78d51125ac Merge "Fix wrong type of volume attachments in FakeVolume" 2016-02-03 22:45:49 +00:00
Dean Troyer
38ff51baef Use assert_not_called() in common tests
In https://review.openstack.org/#/c/273653/ Bryan Jones made
a point about using mock_sleep.assert_not_called() rather than
self.assertFalse(mock_sleep.called), so let's make that change
throughout these tests.

Change-Id: I826d608836955383891b303355edcca7b62faa16
2016-02-03 15:47:07 -06:00
Jenkins
7903e53971 Merge "Refactor security group delete to use SDK" 2016-02-03 21:01:31 +00:00
Jenkins
3763d75dba Merge "Network: Abstract get_body() out to be a private helper." 2016-02-03 21:01:23 +00:00
Jenkins
65f8845ea8 Merge "Add "os port show" command" 2016-02-03 21:01:17 +00:00
Jenkins
66df8d1413 Merge "Add availability zone support for router commands" 2016-02-03 21:00:48 +00:00
Jas
962389f404 Minor typo in help text
fix misspelled 'project' in router-create help text

Change-Id: I4874563c0dd7ca35ef153cf24b99e357c0c076b9
2016-02-03 14:38:04 -06:00