"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
'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
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
In some test cases, try/except is used to check if an exception
has been raised. We should use assertRaises() instead.
Change-Id: I15c8e757dcab77fd6f895feb018184e1eb7e617b
"network delete" command is not implemented in nova network.
This patch implements it.
Change-Id: I5dac1eed6eb8e67298bb446418835a6ab85c859c
Depends-On: I1b59264cd40aaf1062f4e8db233ccb7fd0e95f0e
partial-Bug: 1543672
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>
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
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
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
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
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
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
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
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
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
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
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
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