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
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
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
projects mock has been defined in FakeIdentityv2Client as
tenants, and in FakeIdentityv3Client as projects. No need
to define them again.
Change-Id: Ieb97b32d7be6bd95c8621092b218ebfd8bc5b78d
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
Moved the functional tests for "os security group" and
"os security group rule" from the compute to the network
directory to align with the refactoring to the commands.
Change-Id: Ief6ab17775c6d7e3bef58d9fa025d9dd520b7370
Partial-Bug: #1519511
Partial-Bug: #1519512
Related-to: blueprint neutron-client
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>
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
It would be convenient to be able to enable special logging for
various components that openstack uses. The biggest thing is
the --debug prints a lot of information when often all I want to
see is the outgoing requests/responses. To get just that logged
you would put this in your clouds.yaml:
logging:
keystoneclient.session: debug
Closes-Bug: #1484660
Change-Id: I15c2607e8262f10903dd831ee8622fb5d6315310
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
Users could specify the last image (name or ID) of the previous page with
--marker option to control the start image of the output.
Change-Id: Idca0235ee83b1226b00c89cf3d38500fa898b7d0
Closes-Bug: #1540988
This option is quite useful if there are too many images.
Change-Id: If6a901c27c5da2d1f4412e8fa9ba3bed3b72fdd9
Co-Authored-By: Tang Chen <chen.tang@easystack.cn>
Partial-Bug: #1540988
Since --page-size has never worked, there is no paginate logic needs
to be implemented in "image list" command. So remove the unnecessary
loop.
And also, the marker is not necessary because --marker option has not
been implemented. Will add it back when implementing --marker option.
Change-Id: I71fea1502f92f447a49697edb52e8e82f336772f
Partial-Bug: #1540988