python-openstackclient 9.0.0__py3-none-any.whl → 10.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openstackclient/__init__.py +2 -6
- openstackclient/api/api.py +41 -23
- openstackclient/api/compute_v2.py +44 -25
- openstackclient/api/object_store_v1.py +75 -97
- openstackclient/api/volume_v2.py +2 -1
- openstackclient/api/volume_v3.py +2 -1
- openstackclient/common/availability_zone.py +58 -42
- openstackclient/common/clientmanager.py +56 -29
- openstackclient/common/configuration.py +10 -3
- openstackclient/common/envvars.py +2 -2
- openstackclient/common/extension.py +14 -5
- openstackclient/common/limits.py +10 -5
- openstackclient/common/module.py +14 -6
- openstackclient/common/pagination.py +8 -2
- openstackclient/common/progressbar.py +7 -6
- openstackclient/common/project_cleanup.py +13 -7
- openstackclient/common/quota.py +97 -99
- openstackclient/common/versions.py +8 -2
- openstackclient/compute/client.py +7 -3
- openstackclient/compute/v2/agent.py +17 -10
- openstackclient/compute/v2/aggregate.py +36 -22
- openstackclient/compute/v2/console.py +14 -8
- openstackclient/compute/v2/console_connection.py +11 -3
- openstackclient/compute/v2/flavor.py +39 -21
- openstackclient/compute/v2/host.py +14 -6
- openstackclient/compute/v2/hypervisor.py +14 -5
- openstackclient/compute/v2/hypervisor_stats.py +10 -2
- openstackclient/compute/v2/keypair.py +29 -14
- openstackclient/compute/v2/server.py +249 -169
- openstackclient/compute/v2/server_backup.py +10 -4
- openstackclient/compute/v2/server_event.py +21 -12
- openstackclient/compute/v2/server_group.py +21 -11
- openstackclient/compute/v2/server_image.py +19 -10
- openstackclient/compute/v2/server_migration.py +24 -10
- openstackclient/compute/v2/server_share.py +274 -0
- openstackclient/compute/v2/server_volume.py +10 -4
- openstackclient/compute/v2/service.py +14 -7
- openstackclient/compute/v2/usage.py +26 -21
- openstackclient/identity/client.py +8 -3
- openstackclient/identity/common.py +78 -47
- openstackclient/identity/v2_0/catalog.py +14 -7
- openstackclient/identity/v2_0/ec2creds.py +21 -10
- openstackclient/identity/v2_0/endpoint.py +23 -11
- openstackclient/identity/v2_0/project.py +25 -14
- openstackclient/identity/v2_0/role.py +28 -14
- openstackclient/identity/v2_0/role_assignment.py +9 -3
- openstackclient/identity/v2_0/service.py +23 -11
- openstackclient/identity/v2_0/token.py +12 -5
- openstackclient/identity/v2_0/user.py +26 -15
- openstackclient/identity/v3/access_rule.py +26 -12
- openstackclient/identity/v3/application_credential.py +59 -24
- openstackclient/identity/v3/catalog.py +14 -7
- openstackclient/identity/v3/consumer.py +22 -11
- openstackclient/identity/v3/credential.py +36 -16
- openstackclient/identity/v3/domain.py +37 -18
- openstackclient/identity/v3/ec2creds.py +25 -12
- openstackclient/identity/v3/endpoint.py +42 -20
- openstackclient/identity/v3/endpoint_group.py +28 -17
- openstackclient/identity/v3/federation_protocol.py +38 -16
- openstackclient/identity/v3/group.py +55 -32
- openstackclient/identity/v3/identity_provider.py +92 -57
- openstackclient/identity/v3/implied_role.py +21 -9
- openstackclient/identity/v3/limit.py +38 -16
- openstackclient/identity/v3/mapping.py +26 -13
- openstackclient/identity/v3/policy.py +23 -12
- openstackclient/identity/v3/project.py +43 -23
- openstackclient/identity/v3/region.py +36 -16
- openstackclient/identity/v3/registered_limit.py +40 -16
- openstackclient/identity/v3/role.py +61 -31
- openstackclient/identity/v3/role_assignment.py +23 -6
- openstackclient/identity/v3/service.py +36 -16
- openstackclient/identity/v3/service_provider.py +37 -15
- openstackclient/identity/v3/tag.py +23 -6
- openstackclient/identity/v3/token.py +30 -14
- openstackclient/identity/v3/trust.py +32 -14
- openstackclient/identity/v3/unscoped_saml.py +10 -2
- openstackclient/identity/v3/user.py +49 -26
- openstackclient/image/client.py +7 -3
- openstackclient/image/v1/image.py +33 -26
- openstackclient/image/v2/cache.py +14 -9
- openstackclient/image/v2/image.py +74 -48
- openstackclient/image/v2/info.py +7 -1
- openstackclient/image/v2/metadef_namespaces.py +109 -13
- openstackclient/image/v2/metadef_objects.py +28 -15
- openstackclient/image/v2/metadef_properties.py +24 -13
- openstackclient/image/v2/metadef_resource_type_association.py +14 -7
- openstackclient/image/v2/metadef_resource_types.py +7 -1
- openstackclient/image/v2/task.py +15 -6
- openstackclient/locale/tr_TR/LC_MESSAGES/openstackclient.po +7 -192
- openstackclient/network/client.py +7 -2
- openstackclient/network/common.py +16 -241
- openstackclient/network/utils.py +36 -22
- openstackclient/network/v2/address_group.py +27 -16
- openstackclient/network/v2/address_scope.py +24 -13
- openstackclient/network/v2/bgpvpn/bgpvpn.py +463 -0
- openstackclient/network/v2/bgpvpn/constants.py +30 -0
- openstackclient/network/v2/bgpvpn/network_association.py +214 -0
- openstackclient/network/v2/bgpvpn/port_association.py +490 -0
- openstackclient/network/v2/bgpvpn/router_association.py +288 -0
- openstackclient/network/v2/default_security_group_rule.py +19 -10
- openstackclient/network/v2/floating_ip.py +110 -159
- openstackclient/network/v2/floating_ip_port_forwarding.py +30 -18
- openstackclient/network/v2/fwaas/__init__.py +0 -0
- openstackclient/network/v2/fwaas/group.py +466 -0
- openstackclient/network/v2/fwaas/policy.py +518 -0
- openstackclient/network/v2/fwaas/rule.py +574 -0
- openstackclient/network/v2/ip_availability.py +13 -5
- openstackclient/network/v2/l3_conntrack_helper.py +22 -13
- openstackclient/network/v2/local_ip.py +24 -13
- openstackclient/network/v2/local_ip_association.py +14 -7
- openstackclient/network/v2/ndp_proxy.py +20 -11
- openstackclient/network/v2/network.py +129 -196
- openstackclient/network/v2/network_agent.py +46 -25
- openstackclient/network/v2/network_auto_allocated_topology.py +22 -11
- openstackclient/network/v2/network_flavor.py +27 -16
- openstackclient/network/v2/network_flavor_profile.py +23 -12
- openstackclient/network/v2/network_meter.py +21 -10
- openstackclient/network/v2/network_meter_rule.py +21 -11
- openstackclient/network/v2/network_qos_policy.py +25 -15
- openstackclient/network/v2/network_qos_rule.py +32 -17
- openstackclient/network/v2/network_qos_rule_type.py +13 -5
- openstackclient/network/v2/network_rbac.py +23 -12
- openstackclient/network/v2/network_segment.py +20 -11
- openstackclient/network/v2/network_segment_range.py +56 -29
- openstackclient/network/v2/network_service_provider.py +7 -1
- openstackclient/network/v2/network_trunk.py +38 -22
- openstackclient/network/v2/port.py +54 -29
- openstackclient/network/v2/router.py +75 -52
- openstackclient/network/v2/security_group.py +87 -157
- openstackclient/network/v2/security_group_rule.py +100 -280
- openstackclient/network/v2/subnet.py +49 -28
- openstackclient/network/v2/subnet_pool.py +30 -17
- openstackclient/network/v2/taas/tap_flow.py +22 -11
- openstackclient/network/v2/taas/tap_mirror.py +22 -11
- openstackclient/network/v2/taas/tap_service.py +23 -12
- openstackclient/object/client.py +7 -2
- openstackclient/object/v1/account.py +13 -6
- openstackclient/object/v1/container.py +25 -15
- openstackclient/object/v1/object.py +25 -15
- openstackclient/py.typed +0 -0
- openstackclient/shell.py +46 -10
- openstackclient/tests/functional/base.py +55 -20
- openstackclient/tests/functional/common/test_extension.py +4 -0
- openstackclient/tests/functional/common/test_quota.py +3 -1
- openstackclient/tests/functional/compute/v2/common.py +14 -13
- openstackclient/tests/functional/compute/v2/test_flavor.py +3 -1
- openstackclient/tests/functional/compute/v2/test_server.py +3 -0
- openstackclient/tests/functional/identity/v2/common.py +10 -6
- openstackclient/tests/functional/identity/v2/test_role.py +4 -4
- openstackclient/tests/functional/identity/v3/common.py +25 -19
- openstackclient/tests/functional/identity/v3/test_group.py +20 -20
- openstackclient/tests/functional/identity/v3/test_idp.py +3 -1
- openstackclient/tests/functional/identity/v3/test_project.py +10 -10
- openstackclient/tests/functional/identity/v3/test_role.py +18 -18
- openstackclient/tests/functional/identity/v3/test_role_assignment.py +12 -12
- openstackclient/tests/functional/identity/v3/test_user.py +8 -8
- openstackclient/tests/functional/image/base.py +1 -6
- openstackclient/tests/functional/network/v2/common.py +5 -2
- openstackclient/tests/functional/network/v2/test_floating_ip.py +10 -4
- openstackclient/tests/functional/network/v2/test_ip_availability.py +4 -0
- openstackclient/tests/functional/network/v2/test_network_meter_rule.py +3 -2
- openstackclient/tests/functional/network/v2/test_network_segment.py +5 -0
- openstackclient/tests/functional/network/v2/test_subnet.py +13 -9
- openstackclient/tests/functional/object/v1/common.py +4 -0
- openstackclient/tests/functional/volume/v2/common.py +4 -0
- openstackclient/tests/functional/volume/v2/test_volume_snapshot.py +27 -11
- openstackclient/tests/functional/volume/v2/test_volume_type.py +2 -2
- openstackclient/tests/functional/volume/v3/common.py +4 -0
- openstackclient/tests/functional/volume/v3/test_volume_snapshot.py +11 -7
- openstackclient/tests/functional/volume/v3/test_volume_type.py +2 -2
- openstackclient/tests/unit/common/test_availability_zone.py +35 -49
- openstackclient/tests/unit/common/test_extension.py +2 -2
- openstackclient/tests/unit/common/test_module.py +12 -7
- openstackclient/tests/unit/common/test_project_cleanup.py +3 -1
- openstackclient/tests/unit/common/test_quota.py +6 -26
- openstackclient/tests/unit/compute/v2/fakes.py +25 -0
- openstackclient/tests/unit/compute/v2/test_flavor.py +28 -2
- openstackclient/tests/unit/compute/v2/test_keypair.py +6 -6
- openstackclient/tests/unit/compute/v2/test_server.py +11 -96
- openstackclient/tests/unit/compute/v2/test_server_share.py +287 -0
- openstackclient/tests/unit/identity/v3/fakes.py +3 -0
- openstackclient/tests/unit/identity/v3/test_group.py +4 -14
- openstackclient/tests/unit/identity/v3/test_identity_provider.py +303 -299
- openstackclient/tests/unit/identity/v3/test_user.py +4 -4
- openstackclient/tests/unit/image/v2/test_image.py +11 -11
- openstackclient/tests/unit/image/v2/test_metadef_namespaces.py +105 -6
- openstackclient/tests/unit/network/test_common.py +0 -155
- openstackclient/tests/unit/network/v2/bgpvpn/__init__.py +0 -0
- openstackclient/tests/unit/network/v2/bgpvpn/fakes.py +179 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_bgpvpn.py +584 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_network_association.py +285 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_port_association.py +384 -0
- openstackclient/tests/unit/network/v2/bgpvpn/test_router_association.py +297 -0
- openstackclient/tests/unit/network/v2/fwaas/__init__.py +0 -0
- openstackclient/tests/unit/network/v2/fwaas/test_group.py +897 -0
- openstackclient/tests/unit/network/v2/fwaas/test_policy.py +869 -0
- openstackclient/tests/unit/network/v2/fwaas/test_rule.py +980 -0
- openstackclient/tests/unit/network/v2/taas/{test_osc_tap_flow.py → test_tap_flow.py} +18 -25
- openstackclient/tests/unit/network/v2/taas/{test_osc_tap_mirror.py → test_tap_mirror.py} +19 -29
- openstackclient/tests/unit/network/v2/taas/{test_osc_tap_service.py → test_tap_service.py} +19 -29
- openstackclient/tests/unit/network/v2/test_address_group.py +2 -2
- openstackclient/tests/unit/network/v2/{test_floating_ip_network.py → test_floating_ip.py} +3 -2
- openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +13 -13
- openstackclient/tests/unit/network/v2/test_network_agent.py +8 -4
- openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +3 -3
- openstackclient/tests/unit/network/v2/test_network_flavor.py +2 -2
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +2 -2
- openstackclient/tests/unit/network/v2/test_network_rbac.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_segment.py +1 -1
- openstackclient/tests/unit/network/v2/test_network_segment_range.py +7 -10
- openstackclient/tests/unit/network/v2/test_network_trunk.py +1 -1
- openstackclient/tests/unit/network/v2/test_router.py +8 -9
- openstackclient/tests/unit/network/v2/{test_security_group_network.py → test_security_group.py} +1 -20
- openstackclient/tests/unit/network/v2/{test_security_group_rule_network.py → test_security_group_rule.py} +7 -41
- openstackclient/tests/unit/network/v2/test_subnet.py +2 -1
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +2 -1
- openstackclient/tests/unit/object/v1/fakes.py +8 -7
- openstackclient/tests/unit/object/v1/test_container.py +65 -101
- openstackclient/tests/unit/object/v1/test_container_all.py +8 -1
- openstackclient/tests/unit/object/v1/test_object.py +44 -84
- openstackclient/tests/unit/object/v1/test_object_all.py +8 -1
- openstackclient/tests/unit/test_hacking.py +108 -0
- openstackclient/tests/unit/volume/v2/fakes.py +1 -0
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +1 -5
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +2 -1
- openstackclient/tests/unit/volume/v2/test_volume_type.py +2 -4
- openstackclient/tests/unit/volume/v3/fakes.py +1 -0
- openstackclient/tests/unit/volume/v3/test_volume.py +60 -3
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +1 -1
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +1 -5
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +55 -1
- openstackclient/tests/unit/volume/v3/test_volume_type.py +2 -4
- openstackclient/volume/client.py +7 -3
- openstackclient/volume/v2/backup_record.py +15 -6
- openstackclient/volume/v2/consistency_group.py +29 -17
- openstackclient/volume/v2/consistency_group_snapshot.py +25 -10
- openstackclient/volume/v2/qos_specs.py +28 -17
- openstackclient/volume/v2/service.py +17 -6
- openstackclient/volume/v2/volume.py +57 -29
- openstackclient/volume/v2/volume_backend.py +19 -6
- openstackclient/volume/v2/volume_backup.py +46 -20
- openstackclient/volume/v2/volume_host.py +6 -4
- openstackclient/volume/v2/volume_snapshot.py +50 -24
- openstackclient/volume/v2/volume_transfer_request.py +31 -13
- openstackclient/volume/v2/volume_type.py +43 -24
- openstackclient/volume/v3/block_storage_cleanup.py +11 -3
- openstackclient/volume/v3/block_storage_cluster.py +19 -7
- openstackclient/volume/v3/block_storage_log_level.py +15 -6
- openstackclient/volume/v3/block_storage_manage.py +10 -4
- openstackclient/volume/v3/block_storage_resource_filter.py +17 -5
- openstackclient/volume/v3/service.py +16 -6
- openstackclient/volume/v3/volume.py +89 -39
- openstackclient/volume/v3/volume_attachment.py +43 -21
- openstackclient/volume/v3/volume_backup.py +53 -24
- openstackclient/volume/v3/volume_group.py +23 -13
- openstackclient/volume/v3/volume_group_snapshot.py +32 -13
- openstackclient/volume/v3/volume_group_type.py +26 -13
- openstackclient/volume/v3/volume_message.py +15 -7
- openstackclient/volume/v3/volume_snapshot.py +69 -32
- openstackclient/volume/v3/volume_transfer_request.py +31 -13
- openstackclient/volume/v3/volume_type.py +42 -24
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/METADATA +6 -6
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/RECORD +271 -260
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/WHEEL +1 -1
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/entry_points.txt +53 -1
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/licenses/AUTHORS +4 -0
- python_openstackclient-10.0.0.dist-info/pbr.json +1 -0
- openstackclient/api/image_v1.py +0 -69
- openstackclient/api/image_v2.py +0 -79
- openstackclient/network/v2/floating_ip_pool.py +0 -38
- openstackclient/tests/functional/image/v1/test_image.py +0 -97
- openstackclient/tests/unit/api/test_image_v1.py +0 -96
- openstackclient/tests/unit/api/test_image_v2.py +0 -96
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +0 -248
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +0 -49
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_network.py +0 -39
- openstackclient/tests/unit/network/v2/test_network_compute.py +0 -404
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +0 -392
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +0 -555
- python_openstackclient-9.0.0.dist-info/pbr.json +0 -1
- /openstackclient/{tests/functional/image/v1 → network/v2/bgpvpn}/__init__.py +0 -0
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/licenses/LICENSE +0 -0
- {python_openstackclient-9.0.0.dist-info → python_openstackclient-10.0.0.dist-info}/top_level.txt +0 -0
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
+
from typing import ClassVar
|
|
14
|
+
|
|
13
15
|
import fixtures
|
|
14
16
|
|
|
15
17
|
from openstackclient.tests.functional.volume import base
|
|
@@ -18,6 +20,8 @@ from openstackclient.tests.functional.volume import base
|
|
|
18
20
|
class BaseVolumeTests(base.BaseVolumeTests):
|
|
19
21
|
"""Base class for Volume functional tests."""
|
|
20
22
|
|
|
23
|
+
haz_volume_v3: ClassVar[bool]
|
|
24
|
+
|
|
21
25
|
@classmethod
|
|
22
26
|
def setUpClass(cls):
|
|
23
27
|
super().setUpClass()
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
+
from typing import ClassVar
|
|
13
14
|
import uuid
|
|
14
15
|
|
|
15
16
|
from openstackclient.tests.functional.volume.v3 import common
|
|
@@ -18,24 +19,27 @@ from openstackclient.tests.functional.volume.v3 import common
|
|
|
18
19
|
class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
19
20
|
"""Functional tests for volume snapshot."""
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
VOLUME_NAME = uuid.uuid4().hex
|
|
23
|
+
VOLUME_ID: ClassVar[str]
|
|
22
24
|
|
|
23
25
|
@classmethod
|
|
24
26
|
def setUpClass(cls):
|
|
25
27
|
super().setUpClass()
|
|
26
28
|
# create a test volume used by all snapshot tests
|
|
27
29
|
cmd_output = cls.openstack(
|
|
28
|
-
'volume create ' + '--size 1 ' + cls.
|
|
30
|
+
'volume create ' + '--size 1 ' + cls.VOLUME_NAME,
|
|
29
31
|
parse_output=True,
|
|
30
32
|
)
|
|
31
|
-
cls.wait_for_status('volume', cls.
|
|
33
|
+
cls.wait_for_status('volume', cls.VOLUME_NAME, 'available')
|
|
32
34
|
cls.VOLUME_ID = cmd_output['id']
|
|
33
35
|
|
|
34
36
|
@classmethod
|
|
35
37
|
def tearDownClass(cls):
|
|
36
38
|
try:
|
|
37
|
-
cls.wait_for_status('volume', cls.
|
|
38
|
-
raw_output = cls.openstack(
|
|
39
|
+
cls.wait_for_status('volume', cls.VOLUME_NAME, 'available')
|
|
40
|
+
raw_output = cls.openstack(
|
|
41
|
+
'volume delete --force ' + cls.VOLUME_NAME
|
|
42
|
+
)
|
|
39
43
|
cls.assertOutput('', raw_output)
|
|
40
44
|
finally:
|
|
41
45
|
super().tearDownClass()
|
|
@@ -47,7 +51,7 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
|
47
51
|
cmd_output = self.openstack(
|
|
48
52
|
'volume snapshot create '
|
|
49
53
|
+ '--volume '
|
|
50
|
-
+ self.
|
|
54
|
+
+ self.VOLUME_NAME
|
|
51
55
|
+ ' --description aaaa '
|
|
52
56
|
+ '--property Alpha=a '
|
|
53
57
|
+ name,
|
|
@@ -83,7 +87,7 @@ class VolumeSnapshotTests(common.BaseVolumeTests):
|
|
|
83
87
|
|
|
84
88
|
# list volume snapshot --volume
|
|
85
89
|
cmd_output = self.openstack(
|
|
86
|
-
'volume snapshot list ' + '--volume ' + self.
|
|
90
|
+
'volume snapshot list ' + '--volume ' + self.VOLUME_NAME,
|
|
87
91
|
parse_output=True,
|
|
88
92
|
)
|
|
89
93
|
names = [x["Name"] for x in cmd_output]
|
|
@@ -173,9 +173,9 @@ class VolumeTypeTests(common.BaseVolumeTests):
|
|
|
173
173
|
'volume type list --encryption-type',
|
|
174
174
|
parse_output=True,
|
|
175
175
|
)
|
|
176
|
-
encryption_output =
|
|
176
|
+
encryption_output = next(
|
|
177
177
|
t['Encryption'] for t in cmd_output if t['Name'] == encryption_type
|
|
178
|
-
|
|
178
|
+
)
|
|
179
179
|
expected = {
|
|
180
180
|
'provider': 'LuksEncryptor',
|
|
181
181
|
'cipher': 'aes-xts-plain64',
|
|
@@ -38,18 +38,15 @@ def _build_compute_az_datalist(compute_az, long_datalist=False):
|
|
|
38
38
|
return (datalist,)
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
def
|
|
41
|
+
def _build_network_az_datalist(network_az, long_datalist=False):
|
|
42
42
|
datalist = ()
|
|
43
43
|
if not long_datalist:
|
|
44
|
-
datalist = (
|
|
45
|
-
volume_az.name,
|
|
46
|
-
'available',
|
|
47
|
-
)
|
|
44
|
+
datalist = (network_az.name, network_az.state)
|
|
48
45
|
else:
|
|
49
46
|
datalist = (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
network_az.name,
|
|
48
|
+
network_az.state,
|
|
49
|
+
network_az.resource,
|
|
53
50
|
'',
|
|
54
51
|
'',
|
|
55
52
|
'',
|
|
@@ -57,22 +54,12 @@ def _build_volume_az_datalist(volume_az, long_datalist=False):
|
|
|
57
54
|
return (datalist,)
|
|
58
55
|
|
|
59
56
|
|
|
60
|
-
def
|
|
57
|
+
def _build_volume_az_datalist(volume_az, long_datalist=False):
|
|
61
58
|
datalist = ()
|
|
62
59
|
if not long_datalist:
|
|
63
|
-
datalist = (
|
|
64
|
-
network_az.name,
|
|
65
|
-
network_az.state,
|
|
66
|
-
)
|
|
60
|
+
datalist = (volume_az.name, 'available')
|
|
67
61
|
else:
|
|
68
|
-
datalist = (
|
|
69
|
-
network_az.name,
|
|
70
|
-
network_az.state,
|
|
71
|
-
network_az.resource,
|
|
72
|
-
'',
|
|
73
|
-
'',
|
|
74
|
-
'',
|
|
75
|
-
)
|
|
62
|
+
datalist = (volume_az.name, 'available', '', '', '', '')
|
|
76
63
|
return (datalist,)
|
|
77
64
|
|
|
78
65
|
|
|
@@ -82,10 +69,6 @@ class TestAvailabilityZoneList(
|
|
|
82
69
|
compute_fakes.FakeClientMixin,
|
|
83
70
|
utils.TestCommand,
|
|
84
71
|
):
|
|
85
|
-
compute_azs = compute_fakes.create_availability_zones()
|
|
86
|
-
volume_azs = volume_fakes.create_availability_zones(count=1)
|
|
87
|
-
network_azs = network_fakes.create_availability_zones()
|
|
88
|
-
|
|
89
72
|
short_columnslist = ('Zone Name', 'Zone Status')
|
|
90
73
|
long_columnslist = (
|
|
91
74
|
'Zone Name',
|
|
@@ -99,11 +82,14 @@ class TestAvailabilityZoneList(
|
|
|
99
82
|
def setUp(self):
|
|
100
83
|
super().setUp()
|
|
101
84
|
|
|
85
|
+
self.compute_azs = compute_fakes.create_availability_zones()
|
|
102
86
|
self.compute_client.availability_zones.return_value = self.compute_azs
|
|
87
|
+
self.network_azs = network_fakes.create_availability_zones()
|
|
88
|
+
self.network_client.availability_zones.return_value = self.network_azs
|
|
89
|
+
self.volume_azs = volume_fakes.create_availability_zones(count=1)
|
|
103
90
|
self.volume_sdk_client.availability_zones.return_value = (
|
|
104
91
|
self.volume_azs
|
|
105
92
|
)
|
|
106
|
-
self.network_client.availability_zones.return_value = self.network_azs
|
|
107
93
|
|
|
108
94
|
# Get the command object to test
|
|
109
95
|
self.cmd = availability_zone.ListAvailabilityZone(self.app, None)
|
|
@@ -119,17 +105,17 @@ class TestAvailabilityZoneList(
|
|
|
119
105
|
columns, data = self.cmd.take_action(parsed_args)
|
|
120
106
|
|
|
121
107
|
self.compute_client.availability_zones.assert_called_with(details=True)
|
|
122
|
-
self.volume_sdk_client.availability_zones.assert_called_with()
|
|
123
108
|
self.network_client.availability_zones.assert_called_with()
|
|
109
|
+
self.volume_sdk_client.availability_zones.assert_called_with()
|
|
124
110
|
|
|
125
111
|
self.assertEqual(self.short_columnslist, columns)
|
|
126
112
|
datalist = ()
|
|
127
113
|
for compute_az in self.compute_azs:
|
|
128
114
|
datalist += _build_compute_az_datalist(compute_az)
|
|
129
|
-
for volume_az in self.volume_azs:
|
|
130
|
-
datalist += _build_volume_az_datalist(volume_az)
|
|
131
115
|
for network_az in self.network_azs:
|
|
132
116
|
datalist += _build_network_az_datalist(network_az)
|
|
117
|
+
for volume_az in self.volume_azs:
|
|
118
|
+
datalist += _build_volume_az_datalist(volume_az)
|
|
133
119
|
self.assertEqual(datalist, tuple(data))
|
|
134
120
|
|
|
135
121
|
def test_availability_zone_list_long(self):
|
|
@@ -147,8 +133,8 @@ class TestAvailabilityZoneList(
|
|
|
147
133
|
columns, data = self.cmd.take_action(parsed_args)
|
|
148
134
|
|
|
149
135
|
self.compute_client.availability_zones.assert_called_with(details=True)
|
|
150
|
-
self.volume_sdk_client.availability_zones.assert_called_with()
|
|
151
136
|
self.network_client.availability_zones.assert_called_with()
|
|
137
|
+
self.volume_sdk_client.availability_zones.assert_called_with()
|
|
152
138
|
|
|
153
139
|
self.assertEqual(self.long_columnslist, columns)
|
|
154
140
|
datalist = ()
|
|
@@ -156,14 +142,14 @@ class TestAvailabilityZoneList(
|
|
|
156
142
|
datalist += _build_compute_az_datalist(
|
|
157
143
|
compute_az, long_datalist=True
|
|
158
144
|
)
|
|
159
|
-
for volume_az in self.volume_azs:
|
|
160
|
-
datalist += _build_volume_az_datalist(
|
|
161
|
-
volume_az, long_datalist=True
|
|
162
|
-
)
|
|
163
145
|
for network_az in self.network_azs:
|
|
164
146
|
datalist += _build_network_az_datalist(
|
|
165
147
|
network_az, long_datalist=True
|
|
166
148
|
)
|
|
149
|
+
for volume_az in self.volume_azs:
|
|
150
|
+
datalist += _build_volume_az_datalist(
|
|
151
|
+
volume_az, long_datalist=True
|
|
152
|
+
)
|
|
167
153
|
self.assertEqual(datalist, tuple(data))
|
|
168
154
|
|
|
169
155
|
def test_availability_zone_list_compute(self):
|
|
@@ -181,8 +167,8 @@ class TestAvailabilityZoneList(
|
|
|
181
167
|
columns, data = self.cmd.take_action(parsed_args)
|
|
182
168
|
|
|
183
169
|
self.compute_client.availability_zones.assert_called_with(details=True)
|
|
184
|
-
self.volume_sdk_client.availability_zones.assert_not_called()
|
|
185
170
|
self.network_client.availability_zones.assert_not_called()
|
|
171
|
+
self.volume_sdk_client.availability_zones.assert_not_called()
|
|
186
172
|
|
|
187
173
|
self.assertEqual(self.short_columnslist, columns)
|
|
188
174
|
datalist = ()
|
|
@@ -190,12 +176,12 @@ class TestAvailabilityZoneList(
|
|
|
190
176
|
datalist += _build_compute_az_datalist(compute_az)
|
|
191
177
|
self.assertEqual(datalist, tuple(data))
|
|
192
178
|
|
|
193
|
-
def
|
|
179
|
+
def test_availability_zone_list_network(self):
|
|
194
180
|
arglist = [
|
|
195
|
-
'--
|
|
181
|
+
'--network',
|
|
196
182
|
]
|
|
197
183
|
verifylist = [
|
|
198
|
-
('
|
|
184
|
+
('network', True),
|
|
199
185
|
]
|
|
200
186
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
201
187
|
|
|
@@ -205,21 +191,21 @@ class TestAvailabilityZoneList(
|
|
|
205
191
|
columns, data = self.cmd.take_action(parsed_args)
|
|
206
192
|
|
|
207
193
|
self.compute_client.availability_zones.assert_not_called()
|
|
208
|
-
self.
|
|
209
|
-
self.
|
|
194
|
+
self.network_client.availability_zones.assert_called_with()
|
|
195
|
+
self.volume_sdk_client.availability_zones.assert_not_called()
|
|
210
196
|
|
|
211
197
|
self.assertEqual(self.short_columnslist, columns)
|
|
212
198
|
datalist = ()
|
|
213
|
-
for
|
|
214
|
-
datalist +=
|
|
199
|
+
for network_az in self.network_azs:
|
|
200
|
+
datalist += _build_network_az_datalist(network_az)
|
|
215
201
|
self.assertEqual(datalist, tuple(data))
|
|
216
202
|
|
|
217
|
-
def
|
|
203
|
+
def test_availability_zone_list_volume(self):
|
|
218
204
|
arglist = [
|
|
219
|
-
'--
|
|
205
|
+
'--volume',
|
|
220
206
|
]
|
|
221
207
|
verifylist = [
|
|
222
|
-
('
|
|
208
|
+
('volume', True),
|
|
223
209
|
]
|
|
224
210
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
225
211
|
|
|
@@ -229,11 +215,11 @@ class TestAvailabilityZoneList(
|
|
|
229
215
|
columns, data = self.cmd.take_action(parsed_args)
|
|
230
216
|
|
|
231
217
|
self.compute_client.availability_zones.assert_not_called()
|
|
232
|
-
self.
|
|
233
|
-
self.
|
|
218
|
+
self.network_client.availability_zones.assert_not_called()
|
|
219
|
+
self.volume_sdk_client.availability_zones.assert_called_with()
|
|
234
220
|
|
|
235
221
|
self.assertEqual(self.short_columnslist, columns)
|
|
236
222
|
datalist = ()
|
|
237
|
-
for
|
|
238
|
-
datalist +=
|
|
223
|
+
for volume_az in self.volume_azs:
|
|
224
|
+
datalist += _build_volume_az_datalist(volume_az)
|
|
239
225
|
self.assertEqual(datalist, tuple(data))
|
|
@@ -294,7 +294,7 @@ class TestExtensionShow(TestExtension):
|
|
|
294
294
|
|
|
295
295
|
self.cmd = extension.ShowExtension(self.app, None)
|
|
296
296
|
|
|
297
|
-
self.
|
|
297
|
+
self.network_client.find_extension.return_value = (
|
|
298
298
|
self.extension_details
|
|
299
299
|
)
|
|
300
300
|
|
|
@@ -322,7 +322,7 @@ class TestExtensionShow(TestExtension):
|
|
|
322
322
|
|
|
323
323
|
columns, data = self.cmd.take_action(parsed_args)
|
|
324
324
|
|
|
325
|
-
self.
|
|
325
|
+
self.network_client.find_extension.assert_called_with(
|
|
326
326
|
self.extension_details.alias, ignore_missing=False
|
|
327
327
|
)
|
|
328
328
|
|
|
@@ -128,11 +128,6 @@ class TestCommandList(utils.TestCommand):
|
|
|
128
128
|
self.assertEqual(datalist, tuple(data))
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
@mock.patch.dict(
|
|
132
|
-
'openstackclient.common.module.sys.modules',
|
|
133
|
-
values=MODULES,
|
|
134
|
-
clear=True,
|
|
135
|
-
)
|
|
136
131
|
class TestModuleList(utils.TestCommand):
|
|
137
132
|
def setUp(self):
|
|
138
133
|
super().setUp()
|
|
@@ -150,7 +145,12 @@ class TestModuleList(utils.TestCommand):
|
|
|
150
145
|
# In base command class Lister in cliff, abstract method take_action()
|
|
151
146
|
# returns a tuple containing the column names and an iterable
|
|
152
147
|
# containing the data to be listed.
|
|
153
|
-
|
|
148
|
+
with mock.patch.dict(
|
|
149
|
+
'openstackclient.common.module.sys.modules',
|
|
150
|
+
values=MODULES,
|
|
151
|
+
clear=True,
|
|
152
|
+
):
|
|
153
|
+
columns, data = self.cmd.take_action(parsed_args)
|
|
154
154
|
|
|
155
155
|
# Output xxxclient and openstacksdk, but not regular module, like: zlib
|
|
156
156
|
self.assertIn(module_name_1, columns)
|
|
@@ -177,7 +177,12 @@ class TestModuleList(utils.TestCommand):
|
|
|
177
177
|
# In base command class Lister in cliff, abstract method take_action()
|
|
178
178
|
# returns a tuple containing the column names and an iterable
|
|
179
179
|
# containing the data to be listed.
|
|
180
|
-
|
|
180
|
+
with mock.patch.dict(
|
|
181
|
+
'openstackclient.common.module.sys.modules',
|
|
182
|
+
values=MODULES,
|
|
183
|
+
clear=True,
|
|
184
|
+
):
|
|
185
|
+
columns, data = self.cmd.take_action(parsed_args)
|
|
181
186
|
|
|
182
187
|
# Output xxxclient, openstacksdk and regular module, like: zlib
|
|
183
188
|
self.assertIn(module_name_1, columns)
|
|
@@ -17,7 +17,9 @@ from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes
|
|
|
17
17
|
from openstackclient.tests.unit import utils as test_utils
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
class TestProjectCleanup(
|
|
20
|
+
class TestProjectCleanup(
|
|
21
|
+
identity_fakes.FakeClientMixin, test_utils.TestCommand
|
|
22
|
+
):
|
|
21
23
|
project = identity_fakes.FakeProject.create_one_project()
|
|
22
24
|
|
|
23
25
|
def setUp(self):
|
|
@@ -382,8 +382,6 @@ class TestQuotaSet(TestQuota):
|
|
|
382
382
|
self.cmd = quota.SetQuota(self.app, None)
|
|
383
383
|
|
|
384
384
|
def test_quota_set(self):
|
|
385
|
-
floating_ip_num = 100
|
|
386
|
-
fix_ip_num = 100
|
|
387
385
|
injected_file_num = 100
|
|
388
386
|
injected_file_size_num = 10240
|
|
389
387
|
injected_path_size_num = 255
|
|
@@ -392,16 +390,10 @@ class TestQuotaSet(TestQuota):
|
|
|
392
390
|
ram_num = 51200
|
|
393
391
|
instance_num = 10
|
|
394
392
|
property_num = 128
|
|
395
|
-
secgroup_rule_num = 20
|
|
396
|
-
secgroup_num = 10
|
|
397
393
|
servgroup_num = 10
|
|
398
394
|
servgroup_members_num = 10
|
|
399
395
|
|
|
400
396
|
arglist = [
|
|
401
|
-
'--floating-ips',
|
|
402
|
-
str(floating_ip_num),
|
|
403
|
-
'--fixed-ips',
|
|
404
|
-
str(fix_ip_num),
|
|
405
397
|
'--injected-files',
|
|
406
398
|
str(injected_file_num),
|
|
407
399
|
'--injected-file-size',
|
|
@@ -418,10 +410,6 @@ class TestQuotaSet(TestQuota):
|
|
|
418
410
|
str(instance_num),
|
|
419
411
|
'--properties',
|
|
420
412
|
str(property_num),
|
|
421
|
-
'--secgroup-rules',
|
|
422
|
-
str(secgroup_rule_num),
|
|
423
|
-
'--secgroups',
|
|
424
|
-
str(secgroup_num),
|
|
425
413
|
'--server-groups',
|
|
426
414
|
str(servgroup_num),
|
|
427
415
|
'--server-group-members',
|
|
@@ -429,8 +417,6 @@ class TestQuotaSet(TestQuota):
|
|
|
429
417
|
self.projects[0].name,
|
|
430
418
|
]
|
|
431
419
|
verifylist = [
|
|
432
|
-
('floating_ips', floating_ip_num),
|
|
433
|
-
('fixed_ips', fix_ip_num),
|
|
434
420
|
('injected_files', injected_file_num),
|
|
435
421
|
(
|
|
436
422
|
'injected_file_content_bytes',
|
|
@@ -442,8 +428,6 @@ class TestQuotaSet(TestQuota):
|
|
|
442
428
|
('ram', ram_num),
|
|
443
429
|
('instances', instance_num),
|
|
444
430
|
('metadata_items', property_num),
|
|
445
|
-
('security_group_rules', secgroup_rule_num),
|
|
446
|
-
('security_groups', secgroup_num),
|
|
447
431
|
('server_groups', servgroup_num),
|
|
448
432
|
('server_group_members', servgroup_members_num),
|
|
449
433
|
('force', False),
|
|
@@ -455,18 +439,14 @@ class TestQuotaSet(TestQuota):
|
|
|
455
439
|
result = self.cmd.take_action(parsed_args)
|
|
456
440
|
|
|
457
441
|
kwargs = {
|
|
458
|
-
'floating_ips': floating_ip_num,
|
|
459
|
-
'fixed_ips': fix_ip_num,
|
|
460
442
|
'injected_files': injected_file_num,
|
|
461
|
-
'injected_file_content_bytes': injected_file_size_num,
|
|
443
|
+
'injected_file_content_bytes': injected_file_size_num,
|
|
462
444
|
'injected_file_path_bytes': injected_path_size_num,
|
|
463
445
|
'key_pairs': key_pair_num,
|
|
464
446
|
'cores': core_num,
|
|
465
447
|
'ram': ram_num,
|
|
466
448
|
'instances': instance_num,
|
|
467
449
|
'metadata_items': property_num,
|
|
468
|
-
'security_group_rules': secgroup_rule_num,
|
|
469
|
-
'security_groups': secgroup_num,
|
|
470
450
|
'server_groups': servgroup_num,
|
|
471
451
|
'server_group_members': servgroup_members_num,
|
|
472
452
|
}
|
|
@@ -729,7 +709,7 @@ class TestQuotaSet(TestQuota):
|
|
|
729
709
|
|
|
730
710
|
kwargs_compute = {
|
|
731
711
|
'injected_files': injected_file_num,
|
|
732
|
-
'injected_file_content_bytes': injected_file_size_num,
|
|
712
|
+
'injected_file_content_bytes': injected_file_size_num,
|
|
733
713
|
'injected_file_path_bytes': injected_path_size_num,
|
|
734
714
|
'key_pairs': key_pair_num,
|
|
735
715
|
'cores': core_num,
|
|
@@ -827,7 +807,7 @@ class TestQuotaSet(TestQuota):
|
|
|
827
807
|
|
|
828
808
|
kwargs_compute = {
|
|
829
809
|
'injected_files': injected_file_num,
|
|
830
|
-
'injected_file_content_bytes': injected_file_size_num,
|
|
810
|
+
'injected_file_content_bytes': injected_file_size_num,
|
|
831
811
|
'injected_file_path_bytes': injected_path_size_num,
|
|
832
812
|
'key_pairs': key_pair_num,
|
|
833
813
|
'cores': core_num,
|
|
@@ -1155,7 +1135,7 @@ class TestQuotaShow(TestQuota):
|
|
|
1155
1135
|
|
|
1156
1136
|
self.assertEqual(
|
|
1157
1137
|
[
|
|
1158
|
-
('
|
|
1138
|
+
('floating_ips', 30, 7, 20),
|
|
1159
1139
|
('health_monitors', 0, 0, 0),
|
|
1160
1140
|
('l7_policies', 0, 0, 0),
|
|
1161
1141
|
('listeners', 0, 0, 0),
|
|
@@ -1165,8 +1145,8 @@ class TestQuotaShow(TestQuota):
|
|
|
1165
1145
|
('ports', 0, 0, 0),
|
|
1166
1146
|
('rbac_policies', 0, 0, 0),
|
|
1167
1147
|
('routers', 0, 0, 0),
|
|
1168
|
-
('
|
|
1169
|
-
('
|
|
1148
|
+
('security_group_rules', 9, 5, 7),
|
|
1149
|
+
('security_groups', 0, 0, 0),
|
|
1170
1150
|
('subnet_pools', 0, 0, 0),
|
|
1171
1151
|
('subnets', 0, 0, 0),
|
|
1172
1152
|
],
|
|
@@ -29,7 +29,9 @@ from openstack.compute.v2 import server as _server
|
|
|
29
29
|
from openstack.compute.v2 import server_action as _server_action
|
|
30
30
|
from openstack.compute.v2 import server_interface as _server_interface
|
|
31
31
|
from openstack.compute.v2 import server_migration as _server_migration
|
|
32
|
+
from openstack.compute.v2 import server_share as _server_share
|
|
32
33
|
from openstack.compute.v2 import volume_attachment as _volume_attachment
|
|
34
|
+
from openstack.test import fakes as sdk_fakes
|
|
33
35
|
|
|
34
36
|
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes
|
|
35
37
|
from openstackclient.tests.unit.image.v2 import fakes as image_fakes
|
|
@@ -788,6 +790,29 @@ def create_volume_attachments(attrs=None, count=2):
|
|
|
788
790
|
return volume_attachments
|
|
789
791
|
|
|
790
792
|
|
|
793
|
+
def create_one_share(attrs=None):
|
|
794
|
+
"""Create a fake share attachment.
|
|
795
|
+
|
|
796
|
+
:param dict attrs: A dictionary with all attributes
|
|
797
|
+
:return: A fake openstack.compute.v2.server_share.ShareMapping
|
|
798
|
+
object
|
|
799
|
+
"""
|
|
800
|
+
return sdk_fakes.generate_fake_resource(
|
|
801
|
+
_server_share.ShareMapping, **(attrs or {})
|
|
802
|
+
)
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
def create_shares(attrs=None, count=2):
|
|
806
|
+
"""Create multiple fake share attachments.
|
|
807
|
+
|
|
808
|
+
:param dict attrs: A dictionary with all attributes
|
|
809
|
+
:param int count: The number of share attachments to fake
|
|
810
|
+
:return: A list of fake
|
|
811
|
+
openstack.compute.v2.server_share.ShareMapping objects
|
|
812
|
+
"""
|
|
813
|
+
return [create_one_share(attrs) for _ in range(count)]
|
|
814
|
+
|
|
815
|
+
|
|
791
816
|
def create_one_server_interface(attrs=None):
|
|
792
817
|
"""Create a fake ServerInterface.
|
|
793
818
|
|
|
@@ -106,7 +106,6 @@ class TestFlavorCreate(TestFlavor):
|
|
|
106
106
|
'id': None,
|
|
107
107
|
'ephemeral': 0,
|
|
108
108
|
'swap': 0,
|
|
109
|
-
'rxtx_factor': 1.0,
|
|
110
109
|
'is_public': True,
|
|
111
110
|
}
|
|
112
111
|
|
|
@@ -395,6 +394,32 @@ class TestFlavorCreate(TestFlavor):
|
|
|
395
394
|
exceptions.CommandError, self.cmd.take_action, parsed_args
|
|
396
395
|
)
|
|
397
396
|
|
|
397
|
+
def test_flavor_create_with_rxtx_factor_post_v2102(self):
|
|
398
|
+
self.set_compute_api_version('2.102')
|
|
399
|
+
|
|
400
|
+
arglist = [
|
|
401
|
+
'--id',
|
|
402
|
+
self.flavor.id,
|
|
403
|
+
'--ram',
|
|
404
|
+
str(self.flavor.ram),
|
|
405
|
+
'--vcpus',
|
|
406
|
+
str(self.flavor.vcpus),
|
|
407
|
+
'--rxtx-factor',
|
|
408
|
+
'1.0',
|
|
409
|
+
self.flavor.name,
|
|
410
|
+
]
|
|
411
|
+
verifylist = [
|
|
412
|
+
('ram', self.flavor.ram),
|
|
413
|
+
('vcpus', self.flavor.vcpus),
|
|
414
|
+
('rxtx_factor', 1.0),
|
|
415
|
+
('name', self.flavor.name),
|
|
416
|
+
]
|
|
417
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
418
|
+
|
|
419
|
+
self.assertRaises(
|
|
420
|
+
exceptions.CommandError, self.cmd.take_action, parsed_args
|
|
421
|
+
)
|
|
422
|
+
|
|
398
423
|
|
|
399
424
|
class TestFlavorDelete(TestFlavor):
|
|
400
425
|
def setUp(self):
|
|
@@ -494,7 +519,8 @@ class TestFlavorList(TestFlavor):
|
|
|
494
519
|
'VCPUs',
|
|
495
520
|
'Is Public',
|
|
496
521
|
)
|
|
497
|
-
self.columns_long =
|
|
522
|
+
self.columns_long = (
|
|
523
|
+
*self.columns,
|
|
498
524
|
'Swap',
|
|
499
525
|
'RXTX Factor',
|
|
500
526
|
'Properties',
|
|
@@ -90,8 +90,8 @@ class TestKeypairCreate(TestKeypair):
|
|
|
90
90
|
public_key=mock_generate.return_value.public_key,
|
|
91
91
|
)
|
|
92
92
|
|
|
93
|
-
self.assertEqual(
|
|
94
|
-
self.assertEqual(
|
|
93
|
+
self.assertEqual((), columns)
|
|
94
|
+
self.assertEqual((), data)
|
|
95
95
|
|
|
96
96
|
def test_keypair_create_public_key(self):
|
|
97
97
|
self.data = (
|
|
@@ -279,8 +279,8 @@ class TestKeypairCreate(TestKeypair):
|
|
|
279
279
|
public_key=mock_generate.return_value.public_key,
|
|
280
280
|
)
|
|
281
281
|
|
|
282
|
-
self.assertEqual(
|
|
283
|
-
self.assertEqual(
|
|
282
|
+
self.assertEqual((), columns)
|
|
283
|
+
self.assertEqual((), data)
|
|
284
284
|
|
|
285
285
|
def test_key_pair_create_with_user_pre_v210(self):
|
|
286
286
|
self.set_compute_api_version('2.9')
|
|
@@ -740,8 +740,8 @@ class TestKeypairShow(TestKeypair):
|
|
|
740
740
|
|
|
741
741
|
columns, data = self.cmd.take_action(parsed_args)
|
|
742
742
|
|
|
743
|
-
self.assertEqual(
|
|
744
|
-
self.assertEqual(
|
|
743
|
+
self.assertEqual((), columns)
|
|
744
|
+
self.assertEqual((), data)
|
|
745
745
|
|
|
746
746
|
def test_keypair_show_with_user(self):
|
|
747
747
|
self.set_compute_api_version('2.10')
|