Refactored the 'os security group rule create' command to use the
SDK when neutron is enabled, but continue to use the nova client
when nova network is enabled.
Added a release note for the change in security group rules output
due to Network v2.
Change-Id: I8c6c99d5272ff5d410a449f73d198d834c5cd96e
Partial-Bug: #1519512
Implements: blueprint neutron-client
Fix "--property" option describe issue in "server unset"
document, and update the help message to keep consistent.
Change-Id: I68022a187e83fad6320365400ad2a1b0c8cf9a61
Commit Id702ccaad239b916340bb17014d1ede0a28aaec9 changed the keypair
create --public-key to use io.open but incorrectly reads the file
in binary mode, which causes JSON serialization to fail.
The unit tests mock out io.ioen (the reason for adding it in the first
place actually) so any testing for this specific problem would have to
be done in functional tests...yet to come.
Closes-bug: 1559125
Change-Id: I7a299a542d9df543bff43d3ea1e7907fc8c5f640
Add "--long" option in ListService so that compute service
disabled reason can be showed.
Change-Id: I1ace8f1c4e4efe0a1a8f6710425d73eb5db9e5e1
Closes-Bug: #1556815
Refactored the 'os security group create' command to use the SDK
when neutron is enabled, but continue to use the nova client
when nova network is enabled.
Added a release note for the change in security group rules output
due to Network v2. The tenant_id column name was fixed to align
with the 'os security group show' command.
Change-Id: Ib29df42edcddcc73a123fff6a64743a6bfcb7fbf
Partial-Bug: #1519511
Implements: blueprint neutron-client
Refactored the 'os security group show' command to use the SDK
when neutron is enabled, but continue to use the nova client
when nova network is enabled.
Added a release note for the change in security group rules output
due to Network v2. The column names remain unchanged to maintain
backwards compatibility.
Change-Id: I25233ddb8115d18b8b88affb3de13346084a339d
Partial-Bug: #1519511
Implements: blueprint neutron-client
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
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
"server image create"
"server rebuild"
"server resize"
Above 3 commands are not covered by unit test.
So add some unit tests.
Meanwhile, fix bug. Now that image name is an optional argument,
we'd better record error messages with positional arguments
instead of optional argument. So, record server name.
Change-Id: I41bc025d4824dc46f63a3213d82e1528bacbbe12
Refactored the 'os security group list' command to use the SDK
when neutron is enabled, but continue to use the nova client
when nova network is enabled.
This refactor also removes the logic for displaying project names
instead of project IDs when the --all-projects option is specified.
This logic was removed because it is inconsistent with the other
network commands.
Since neutron will always display security groups across all
projects for an admin, the --all-projects option is now hidden
when neutron is enabled and the Project column is always
displayed.
Change-Id: I934a1f5084ef3c5f929d0ffd38ebf5064d799941
Partial-Bug: #1519511
Related-to: blueprint neutron-client
set/unset comamnd classes should inherit from cliff.Command class.
Also, this patch adds functional tests for aggregate.
And also, use utils.format_dict() to format the output of the
properties dict.
Change-Id: Idb50bef8990da95666960e2414dfd7c9be234bba
Partial-bug: #1519503
Closes-Bug: 1546065
If “ignore” is not set under flake8 in the tox.ini
file there there are defaults set to be ignored.
The depended patch fixes many of the problems.
Change-Id: Ieed2fe1c4654e201d3fe6d40ef93e247ee736f8b
Doc: http://flake8.readthedocs.org/en/latest/config.html#default
Depends-On: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
Closes-Bug: #1548910
There are files containing string format arguments inside logging messages.
Using logging function parameters should be preferred.
Change-Id: I15b405bf4d4715263fe1e1262982467b3d4bc1f4
Closes-Bug: #1321274
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>
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
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>
Refactored the 'os security group 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 introduces a new NetworkAndComputeCommand class
to be used for commands that must support neutron and nova network.
The new class allows both the parser and actions to be unique.
The current DeleteSecurityGroup class is now a subclass of this
new class and has moved under the network v2 commands.
This patch set also introduces a new FakeSecurityGroup class for
testing security groups.
And finally, this patch set updates the command documentation
for security group and security group rule to indicate that
Network v2 is also used.
Change-Id: Ic21376b86b40cc6d97f360f3760ba5beed154537
Partial-Bug: #1519511
Related-to: blueprint neutron-client
Previously each command logs take_action parameters explicitly
by using @utils.log_method decorator or log.debug().
Some commands have no logging.
This commit calls a logger in the base class and
drops all logging definition from individual commands.
Closes-Bug: #1532294
Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
This commit makes 'log' optional.
'log' attribute of each command class does not exist
when the class is defined because 'log' is now setup
dynamically when a class is instantiated. Instead log_method
looks for a logger from a decorating method.
compute.v2.server is changed in this commit as an example.
Change-Id: Ic4d128f8e027d3b8e6f884f31369e9085c0f0871
Partial-Bug: #1532294
Refactor the "os availability zone list" command to make it a common
command instead of a compute-only command. Since availability zones
are common to compute, volume and network (new), this refactoring
allows availability zone support to be added for volume and network.
In addition to the refactor, unit and functional tests were added.
Change-Id: I63e9d41d229b21cd38e5a083493042c096d65e05
Partial-Bug: #1532945
Improve the security group rules output when running the
"os security group show" command. Empty and duplicate
information for each security group rule is now removed.
This will ensure that the rules remain readable when
direction and ethertype information is returned as part
of the transition to neutron networking.
Change-Id: Ib49c27a9d7f4d5d38ceb2b0d785ddf94d88b2d89
Partial-Bug: #1519511
Related-To: blueprint neutron-client
Move the network endpoint enablement checking from the 'server create'
command to the common client manager. This allows future network
commands to use either nova or neutron networking based on the cloud
environment.
This patch set also includes related unit test enhancements to the
common client manager to trigger authentication on the tests.
Change-Id: Ia37e81d4fb05a1e2fceb3e5d367bda769ab8e64b
Related-Bug: #1519511
Related-to: blueprint neutron-client