python-openstackclient 6.6.1__py3-none-any.whl → 7.1.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/api/api.py +4 -4
- openstackclient/api/compute_v2.py +352 -638
- openstackclient/api/image_v1.py +1 -1
- openstackclient/api/object_store_v1.py +3 -4
- openstackclient/common/availability_zone.py +1 -1
- openstackclient/common/clientmanager.py +24 -20
- openstackclient/common/configuration.py +1 -1
- openstackclient/common/extension.py +1 -1
- openstackclient/common/limits.py +67 -34
- openstackclient/common/module.py +3 -3
- openstackclient/common/progressbar.py +2 -2
- openstackclient/common/project_cleanup.py +5 -2
- openstackclient/common/quota.py +299 -423
- openstackclient/common/versions.py +1 -1
- openstackclient/compute/client.py +7 -116
- openstackclient/compute/v2/agent.py +75 -49
- openstackclient/compute/v2/aggregate.py +38 -32
- openstackclient/compute/v2/console.py +2 -2
- openstackclient/compute/v2/flavor.py +6 -6
- openstackclient/compute/v2/host.py +38 -33
- openstackclient/compute/v2/hypervisor.py +9 -6
- openstackclient/compute/v2/keypair.py +7 -8
- openstackclient/compute/v2/server.py +479 -396
- openstackclient/compute/v2/server_backup.py +1 -1
- openstackclient/compute/v2/server_group.py +4 -4
- openstackclient/compute/v2/server_image.py +1 -1
- openstackclient/compute/v2/server_migration.py +3 -4
- openstackclient/compute/v2/service.py +4 -4
- openstackclient/compute/v2/usage.py +3 -3
- openstackclient/identity/common.py +34 -0
- openstackclient/identity/v2_0/catalog.py +2 -2
- openstackclient/identity/v2_0/ec2creds.py +4 -4
- openstackclient/identity/v2_0/endpoint.py +4 -4
- openstackclient/identity/v2_0/project.py +6 -6
- openstackclient/identity/v2_0/role.py +5 -5
- openstackclient/identity/v2_0/role_assignment.py +1 -1
- openstackclient/identity/v2_0/service.py +4 -4
- openstackclient/identity/v2_0/token.py +2 -2
- openstackclient/identity/v2_0/user.py +7 -7
- openstackclient/identity/v3/access_rule.py +3 -3
- openstackclient/identity/v3/application_credential.py +125 -43
- openstackclient/identity/v3/catalog.py +2 -2
- openstackclient/identity/v3/consumer.py +4 -4
- openstackclient/identity/v3/credential.py +5 -5
- openstackclient/identity/v3/domain.py +5 -5
- openstackclient/identity/v3/ec2creds.py +4 -4
- openstackclient/identity/v3/endpoint.py +7 -7
- openstackclient/identity/v3/endpoint_group.py +8 -10
- openstackclient/identity/v3/federation_protocol.py +5 -5
- openstackclient/identity/v3/group.py +8 -8
- openstackclient/identity/v3/identity_provider.py +5 -5
- openstackclient/identity/v3/implied_role.py +3 -3
- openstackclient/identity/v3/limit.py +5 -5
- openstackclient/identity/v3/mapping.py +5 -5
- openstackclient/identity/v3/policy.py +5 -5
- openstackclient/identity/v3/project.py +5 -5
- openstackclient/identity/v3/region.py +5 -5
- openstackclient/identity/v3/registered_limit.py +5 -5
- openstackclient/identity/v3/role.py +7 -7
- openstackclient/identity/v3/role_assignment.py +92 -140
- openstackclient/identity/v3/service.py +64 -34
- openstackclient/identity/v3/service_provider.py +4 -4
- openstackclient/identity/v3/tag.py +2 -2
- openstackclient/identity/v3/token.py +5 -5
- openstackclient/identity/v3/trust.py +3 -3
- openstackclient/identity/v3/user.py +144 -80
- openstackclient/image/client.py +4 -4
- openstackclient/image/v1/image.py +8 -9
- openstackclient/image/v2/cache.py +12 -10
- openstackclient/image/v2/metadef_objects.py +44 -0
- openstackclient/image/v2/metadef_resource_type_association.py +189 -0
- openstackclient/image/v2/task.py +1 -1
- openstackclient/network/common.py +6 -5
- openstackclient/network/utils.py +2 -2
- openstackclient/network/v2/address_group.py +6 -6
- openstackclient/network/v2/address_scope.py +5 -5
- openstackclient/network/v2/default_security_group_rule.py +1 -1
- openstackclient/network/v2/floating_ip.py +8 -10
- openstackclient/network/v2/floating_ip_pool.py +6 -15
- openstackclient/network/v2/floating_ip_port_forwarding.py +5 -13
- openstackclient/network/v2/ip_availability.py +2 -2
- openstackclient/network/v2/l3_conntrack_helper.py +5 -5
- openstackclient/network/v2/network.py +8 -8
- openstackclient/network/v2/network_agent.py +8 -8
- openstackclient/network/v2/network_auto_allocated_topology.py +2 -2
- openstackclient/network/v2/network_flavor.py +6 -8
- openstackclient/network/v2/network_flavor_profile.py +4 -4
- openstackclient/network/v2/network_meter.py +3 -3
- openstackclient/network/v2/network_meter_rule.py +3 -3
- openstackclient/network/v2/network_qos_policy.py +5 -5
- openstackclient/network/v2/network_qos_rule.py +9 -9
- openstackclient/network/v2/network_qos_rule_type.py +1 -1
- openstackclient/network/v2/network_rbac.py +5 -5
- openstackclient/network/v2/network_segment.py +5 -5
- openstackclient/network/v2/network_segment_range.py +7 -7
- openstackclient/network/v2/network_trunk.py +7 -7
- openstackclient/network/v2/port.py +26 -12
- openstackclient/network/v2/router.py +403 -54
- openstackclient/network/v2/security_group.py +18 -14
- openstackclient/network/v2/security_group_rule.py +18 -15
- openstackclient/network/v2/subnet.py +15 -8
- openstackclient/network/v2/subnet_pool.py +6 -6
- openstackclient/object/v1/account.py +2 -2
- openstackclient/object/v1/container.py +7 -7
- openstackclient/object/v1/object.py +7 -7
- openstackclient/releasenotes/notes/volume-backup-created-at-list-b49ec893ae1f6b0d.yaml +4 -0
- openstackclient/shell.py +4 -6
- openstackclient/tests/functional/base.py +1 -1
- openstackclient/tests/functional/common/test_extension.py +1 -1
- openstackclient/tests/functional/common/test_help.py +2 -2
- openstackclient/tests/functional/common/test_module.py +1 -1
- openstackclient/tests/functional/common/test_quota.py +43 -61
- openstackclient/tests/functional/compute/v2/common.py +2 -2
- openstackclient/tests/functional/compute/v2/test_flavor.py +2 -2
- openstackclient/tests/functional/compute/v2/test_keypair.py +1 -1
- openstackclient/tests/functional/compute/v2/test_server.py +5 -5
- openstackclient/tests/functional/compute/v2/test_server_event.py +1 -1
- openstackclient/tests/functional/identity/v2/common.py +3 -3
- openstackclient/tests/functional/identity/v3/common.py +12 -4
- openstackclient/tests/functional/identity/v3/test_application_credential.py +6 -12
- openstackclient/tests/functional/identity/v3/test_domain.py +1 -3
- openstackclient/tests/functional/identity/v3/test_endpoint.py +1 -1
- openstackclient/tests/functional/identity/v3/test_idp.py +1 -1
- openstackclient/tests/functional/identity/v3/test_region.py +1 -3
- openstackclient/tests/functional/identity/v3/test_role.py +2 -2
- openstackclient/tests/functional/identity/v3/test_role_assignment.py +210 -0
- openstackclient/tests/functional/identity/v3/test_service.py +1 -3
- openstackclient/tests/functional/identity/v3/test_service_provider.py +1 -3
- openstackclient/tests/functional/image/base.py +1 -1
- openstackclient/tests/functional/image/v2/test_image.py +1 -1
- openstackclient/tests/functional/image/v2/test_info.py +1 -1
- openstackclient/tests/functional/network/v2/common.py +4 -6
- openstackclient/tests/functional/network/v2/test_network.py +5 -3
- openstackclient/tests/functional/network/v2/test_network_agent.py +7 -5
- openstackclient/tests/functional/network/v2/test_network_qos_rule.py +4 -4
- openstackclient/tests/functional/network/v2/test_port.py +11 -7
- openstackclient/tests/functional/network/v2/test_router.py +2 -2
- openstackclient/tests/functional/object/v1/common.py +1 -1
- openstackclient/tests/functional/object/v1/test_container.py +3 -3
- openstackclient/tests/functional/object/v1/test_object.py +9 -13
- openstackclient/tests/functional/volume/base.py +1 -1
- openstackclient/tests/functional/volume/v1/test_service.py +1 -1
- openstackclient/tests/functional/volume/v1/test_snapshot.py +2 -2
- openstackclient/tests/functional/volume/v1/test_transfer_request.py +2 -2
- openstackclient/tests/functional/volume/v1/test_volume_type.py +1 -1
- openstackclient/tests/functional/volume/v2/test_service.py +2 -2
- openstackclient/tests/functional/volume/v2/test_volume_backup.py +2 -2
- openstackclient/tests/functional/volume/v2/test_volume_snapshot.py +2 -2
- openstackclient/tests/functional/volume/v2/test_volume_type.py +1 -1
- openstackclient/tests/functional/volume/v3/test_volume_snapshot.py +2 -2
- openstackclient/tests/functional/volume/v3/test_volume_type.py +1 -1
- openstackclient/tests/unit/api/fakes.py +1 -1
- openstackclient/tests/unit/api/test_api.py +2 -2
- openstackclient/tests/unit/api/test_compute_v2.py +522 -707
- openstackclient/tests/unit/api/test_image_v1.py +1 -1
- openstackclient/tests/unit/api/test_image_v2.py +1 -1
- openstackclient/tests/unit/api/test_object_store_v1.py +4 -4
- openstackclient/tests/unit/common/test_limits.py +73 -35
- openstackclient/tests/unit/common/test_logs.py +2 -2
- openstackclient/tests/unit/common/test_module.py +4 -2
- openstackclient/tests/unit/common/test_project_cleanup.py +31 -6
- openstackclient/tests/unit/common/test_quota.py +490 -630
- openstackclient/tests/unit/compute/v2/fakes.py +37 -286
- openstackclient/tests/unit/compute/v2/test_agent.py +189 -147
- openstackclient/tests/unit/compute/v2/test_aggregate.py +87 -57
- openstackclient/tests/unit/compute/v2/test_console.py +4 -5
- openstackclient/tests/unit/compute/v2/test_flavor.py +59 -68
- openstackclient/tests/unit/compute/v2/test_host.py +83 -54
- openstackclient/tests/unit/compute/v2/test_hypervisor.py +57 -34
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +2 -2
- openstackclient/tests/unit/compute/v2/test_keypair.py +65 -50
- openstackclient/tests/unit/compute/v2/test_server.py +2850 -2453
- openstackclient/tests/unit/compute/v2/test_server_backup.py +1 -1
- openstackclient/tests/unit/compute/v2/test_server_event.py +14 -39
- openstackclient/tests/unit/compute/v2/test_server_group.py +28 -29
- openstackclient/tests/unit/compute/v2/test_server_migration.py +43 -68
- openstackclient/tests/unit/compute/v2/test_server_volume.py +17 -34
- openstackclient/tests/unit/compute/v2/test_service.py +34 -52
- openstackclient/tests/unit/compute/v2/test_usage.py +4 -4
- openstackclient/tests/unit/fakes.py +12 -12
- openstackclient/tests/unit/identity/v2_0/fakes.py +27 -10
- openstackclient/tests/unit/identity/v2_0/test_catalog.py +3 -3
- openstackclient/tests/unit/identity/v2_0/test_endpoint.py +7 -7
- openstackclient/tests/unit/identity/v2_0/test_project.py +8 -8
- openstackclient/tests/unit/identity/v2_0/test_role.py +10 -10
- openstackclient/tests/unit/identity/v2_0/test_role_assignment.py +4 -4
- openstackclient/tests/unit/identity/v2_0/test_service.py +6 -6
- openstackclient/tests/unit/identity/v2_0/test_token.py +4 -4
- openstackclient/tests/unit/identity/v2_0/test_user.py +8 -8
- openstackclient/tests/unit/identity/v3/fakes.py +59 -20
- openstackclient/tests/unit/identity/v3/test_access_rule.py +5 -5
- openstackclient/tests/unit/identity/v3/test_application_credential.py +207 -230
- openstackclient/tests/unit/identity/v3/test_catalog.py +3 -3
- openstackclient/tests/unit/identity/v3/test_consumer.py +7 -8
- openstackclient/tests/unit/identity/v3/test_credential.py +9 -9
- openstackclient/tests/unit/identity/v3/test_domain.py +8 -8
- openstackclient/tests/unit/identity/v3/test_endpoint.py +13 -13
- openstackclient/tests/unit/identity/v3/test_endpoint_group.py +12 -14
- openstackclient/tests/unit/identity/v3/test_group.py +12 -12
- openstackclient/tests/unit/identity/v3/test_identity_provider.py +8 -8
- openstackclient/tests/unit/identity/v3/test_implied_role.py +5 -5
- openstackclient/tests/unit/identity/v3/test_limit.py +7 -7
- openstackclient/tests/unit/identity/v3/test_mappings.py +7 -7
- openstackclient/tests/unit/identity/v3/test_oauth.py +5 -5
- openstackclient/tests/unit/identity/v3/test_project.py +16 -16
- openstackclient/tests/unit/identity/v3/test_protocol.py +7 -7
- openstackclient/tests/unit/identity/v3/test_region.py +7 -7
- openstackclient/tests/unit/identity/v3/test_registered_limit.py +12 -13
- openstackclient/tests/unit/identity/v3/test_role.py +13 -13
- openstackclient/tests/unit/identity/v3/test_role_assignment.py +410 -331
- openstackclient/tests/unit/identity/v3/test_service.py +90 -94
- openstackclient/tests/unit/identity/v3/test_service_provider.py +7 -7
- openstackclient/tests/unit/identity/v3/test_token.py +4 -4
- openstackclient/tests/unit/identity/v3/test_trust.py +9 -9
- openstackclient/tests/unit/identity/v3/test_unscoped_saml.py +4 -4
- openstackclient/tests/unit/identity/v3/test_user.py +299 -327
- openstackclient/tests/unit/image/v1/test_image.py +6 -6
- openstackclient/tests/unit/image/v2/fakes.py +46 -9
- openstackclient/tests/unit/image/v2/test_cache.py +2 -2
- openstackclient/tests/unit/image/v2/test_image.py +3 -3
- openstackclient/tests/unit/image/v2/test_metadef_objects.py +62 -0
- openstackclient/tests/unit/image/v2/test_metadef_resource_type_association.py +131 -0
- openstackclient/tests/unit/integ/base.py +1 -1
- openstackclient/tests/unit/integ/cli/test_project.py +4 -4
- openstackclient/tests/unit/integ/cli/test_shell.py +7 -7
- openstackclient/tests/unit/network/test_common.py +12 -21
- openstackclient/tests/unit/network/v2/fakes.py +64 -130
- openstackclient/tests/unit/network/v2/test_address_group.py +15 -15
- openstackclient/tests/unit/network/v2/test_address_scope.py +13 -13
- openstackclient/tests/unit/network/v2/test_default_security_group_rule.py +49 -27
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +40 -38
- openstackclient/tests/unit/network/v2/test_floating_ip_network.py +15 -15
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +4 -7
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_network.py +3 -5
- openstackclient/tests/unit/network/v2/test_floating_ip_port_forwarding.py +11 -11
- openstackclient/tests/unit/network/v2/test_ip_availability.py +6 -6
- openstackclient/tests/unit/network/v2/test_l3_conntrack_helper.py +11 -21
- openstackclient/tests/unit/network/v2/test_local_ip.py +7 -7
- openstackclient/tests/unit/network/v2/test_local_ip_association.py +3 -5
- openstackclient/tests/unit/network/v2/test_ndp_proxy.py +13 -13
- openstackclient/tests/unit/network/v2/test_network.py +23 -28
- openstackclient/tests/unit/network/v2/test_network_agent.py +17 -21
- openstackclient/tests/unit/network/v2/test_network_auto_allocated_topology.py +8 -8
- openstackclient/tests/unit/network/v2/test_network_compute.py +66 -65
- openstackclient/tests/unit/network/v2/test_network_flavor.py +17 -19
- openstackclient/tests/unit/network/v2/test_network_flavor_profile.py +13 -13
- openstackclient/tests/unit/network/v2/test_network_meter.py +11 -11
- openstackclient/tests/unit/network/v2/test_network_meter_rule.py +11 -11
- openstackclient/tests/unit/network/v2/test_network_qos_policy.py +11 -21
- openstackclient/tests/unit/network/v2/test_network_qos_rule.py +51 -77
- openstackclient/tests/unit/network/v2/test_network_qos_rule_type.py +5 -9
- openstackclient/tests/unit/network/v2/test_network_rbac.py +12 -12
- openstackclient/tests/unit/network/v2/test_network_segment.py +11 -15
- openstackclient/tests/unit/network/v2/test_network_segment_range.py +11 -13
- openstackclient/tests/unit/network/v2/test_network_service_provider.py +3 -5
- openstackclient/tests/unit/network/v2/test_network_trunk.py +11 -11
- openstackclient/tests/unit/network/v2/test_port.py +22 -25
- openstackclient/tests/unit/network/v2/test_router.py +721 -51
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +65 -49
- openstackclient/tests/unit/network/v2/test_security_group_network.py +15 -15
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +57 -45
- openstackclient/tests/unit/network/v2/test_security_group_rule_network.py +11 -19
- openstackclient/tests/unit/network/v2/test_subnet.py +29 -25
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +15 -15
- openstackclient/tests/unit/object/v1/fakes.py +1 -1
- openstackclient/tests/unit/object/v1/test_container.py +5 -5
- openstackclient/tests/unit/object/v1/test_container_all.py +6 -6
- openstackclient/tests/unit/object/v1/test_object.py +3 -3
- openstackclient/tests/unit/object/v1/test_object_all.py +5 -5
- openstackclient/tests/unit/test_shell.py +5 -5
- openstackclient/tests/unit/utils.py +4 -1
- openstackclient/tests/unit/volume/test_find_resource.py +2 -2
- openstackclient/tests/unit/volume/v1/fakes.py +5 -6
- openstackclient/tests/unit/volume/v1/test_volume.py +5 -4
- openstackclient/tests/unit/volume/v2/fakes.py +39 -259
- openstackclient/tests/unit/volume/v2/test_consistency_group_snapshot.py +5 -5
- openstackclient/tests/unit/volume/v2/test_qos_specs.py +9 -9
- openstackclient/tests/unit/volume/v2/test_volume.py +21 -87
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +10 -368
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +1 -1
- openstackclient/tests/unit/volume/v2/test_volume_transfer_request.py +0 -44
- openstackclient/tests/unit/volume/v2/test_volume_type.py +6 -87
- openstackclient/tests/unit/volume/v3/fakes.py +505 -22
- openstackclient/tests/unit/volume/v3/test_block_storage_cleanup.py +2 -3
- openstackclient/tests/unit/volume/v3/test_block_storage_cluster.py +10 -11
- openstackclient/tests/unit/volume/v3/test_block_storage_log_level.py +10 -6
- openstackclient/tests/unit/volume/v3/test_block_storage_manage.py +25 -17
- openstackclient/tests/unit/volume/v3/test_block_storage_resource_filter.py +6 -32
- openstackclient/tests/unit/volume/v3/test_service.py +271 -0
- openstackclient/tests/unit/volume/v3/test_volume.py +2177 -33
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +48 -52
- openstackclient/tests/unit/volume/v3/test_volume_backup.py +892 -0
- openstackclient/tests/unit/volume/v3/test_volume_group.py +19 -20
- openstackclient/tests/unit/volume/v3/test_volume_group_snapshot.py +14 -34
- openstackclient/tests/unit/volume/v3/test_volume_group_type.py +13 -16
- openstackclient/tests/unit/volume/v3/test_volume_message.py +10 -11
- openstackclient/tests/unit/volume/v3/test_volume_snapshot.py +161 -0
- openstackclient/tests/unit/volume/v3/test_volume_transfer_request.py +425 -0
- openstackclient/tests/unit/volume/v3/test_volume_type.py +1109 -0
- openstackclient/volume/v1/qos_specs.py +7 -7
- openstackclient/volume/v1/service.py +2 -2
- openstackclient/volume/v1/volume.py +12 -12
- openstackclient/volume/v1/volume_backup.py +7 -7
- openstackclient/volume/v1/volume_snapshot.py +8 -8
- openstackclient/volume/v1/volume_transfer_request.py +5 -5
- openstackclient/volume/v1/volume_type.py +7 -7
- openstackclient/volume/v2/backup_record.py +2 -2
- openstackclient/volume/v2/consistency_group.py +7 -9
- openstackclient/volume/v2/consistency_group_snapshot.py +4 -12
- openstackclient/volume/v2/qos_specs.py +7 -7
- openstackclient/volume/v2/service.py +2 -2
- openstackclient/volume/v2/volume.py +80 -80
- openstackclient/volume/v2/volume_backend.py +2 -2
- openstackclient/volume/v2/volume_backup.py +9 -217
- openstackclient/volume/v2/volume_host.py +2 -2
- openstackclient/volume/v2/volume_snapshot.py +8 -8
- openstackclient/volume/v2/volume_transfer_request.py +5 -37
- openstackclient/volume/v2/volume_type.py +7 -89
- openstackclient/volume/v3/service.py +56 -0
- openstackclient/volume/v3/volume.py +971 -0
- openstackclient/volume/v3/volume_attachment.py +31 -29
- openstackclient/volume/v3/volume_backup.py +670 -0
- openstackclient/volume/v3/volume_message.py +1 -1
- openstackclient/volume/v3/volume_snapshot.py +97 -0
- openstackclient/volume/v3/volume_transfer_request.py +233 -0
- openstackclient/volume/v3/volume_type.py +967 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.1.0.dist-info}/AUTHORS +6 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.1.0.dist-info}/METADATA +4 -4
- python_openstackclient-7.1.0.dist-info/RECORD +503 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.1.0.dist-info}/entry_points.txt +33 -27
- python_openstackclient-7.1.0.dist-info/pbr.json +1 -0
- python_openstackclient-6.6.1.dist-info/RECORD +0 -489
- python_openstackclient-6.6.1.dist-info/pbr.json +0 -1
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.1.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.1.0.dist-info}/WHEEL +0 -0
- {python_openstackclient-6.6.1.dist-info → python_openstackclient-7.1.0.dist-info}/top_level.txt +0 -0
|
@@ -20,6 +20,7 @@ from osc_lib.command import command
|
|
|
20
20
|
from osc_lib import utils
|
|
21
21
|
from osc_lib.utils import tags as _tag
|
|
22
22
|
|
|
23
|
+
from openstackclient.api import compute_v2
|
|
23
24
|
from openstackclient.i18n import _
|
|
24
25
|
from openstackclient.identity import common as identity_common
|
|
25
26
|
from openstackclient.network import common
|
|
@@ -180,7 +181,8 @@ class CreateSecurityGroup(
|
|
|
180
181
|
|
|
181
182
|
def take_action_compute(self, client, parsed_args):
|
|
182
183
|
description = self._get_description(parsed_args)
|
|
183
|
-
obj =
|
|
184
|
+
obj = compute_v2.create_security_group(
|
|
185
|
+
client,
|
|
184
186
|
parsed_args.name,
|
|
185
187
|
description,
|
|
186
188
|
)
|
|
@@ -212,7 +214,8 @@ class DeleteSecurityGroup(common.NetworkAndComputeDelete):
|
|
|
212
214
|
client.delete_security_group(obj)
|
|
213
215
|
|
|
214
216
|
def take_action_compute(self, client, parsed_args):
|
|
215
|
-
|
|
217
|
+
security_group = compute_v2.find_security_group(client, self.r)
|
|
218
|
+
compute_v2.delete_security_group(client, security_group['id'])
|
|
216
219
|
|
|
217
220
|
|
|
218
221
|
# TODO(rauta): Use the SDK resource mapped attribute names once
|
|
@@ -291,10 +294,10 @@ class ListSecurityGroup(common.NetworkAndComputeLister):
|
|
|
291
294
|
)
|
|
292
295
|
|
|
293
296
|
def take_action_compute(self, client, parsed_args):
|
|
294
|
-
|
|
295
|
-
data = client.api.security_group_list(
|
|
297
|
+
data = compute_v2.list_security_groups(
|
|
296
298
|
# TODO(dtroyer): add limit, marker
|
|
297
|
-
|
|
299
|
+
client,
|
|
300
|
+
all_projects=parsed_args.all_projects,
|
|
298
301
|
)
|
|
299
302
|
|
|
300
303
|
columns = (
|
|
@@ -383,20 +386,21 @@ class SetSecurityGroup(
|
|
|
383
386
|
_tag.update_tags_for_set(client, obj, parsed_args)
|
|
384
387
|
|
|
385
388
|
def take_action_compute(self, client, parsed_args):
|
|
386
|
-
|
|
389
|
+
security_group = compute_v2.find_security_group(
|
|
390
|
+
client, parsed_args.group
|
|
391
|
+
)
|
|
387
392
|
|
|
393
|
+
params = {}
|
|
388
394
|
if parsed_args.name is not None:
|
|
389
|
-
|
|
395
|
+
params['name'] = parsed_args.name
|
|
390
396
|
if parsed_args.description is not None:
|
|
391
|
-
|
|
397
|
+
params['description'] = parsed_args.description
|
|
392
398
|
|
|
393
399
|
# NOTE(rtheis): Previous behavior did not raise a CommandError
|
|
394
400
|
# if there were no updates. Maintain this behavior and issue
|
|
395
401
|
# the update.
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
data['name'],
|
|
399
|
-
data['description'],
|
|
402
|
+
compute_v2.update_security_group(
|
|
403
|
+
client, security_group['id'], **params
|
|
400
404
|
)
|
|
401
405
|
|
|
402
406
|
|
|
@@ -422,7 +426,7 @@ class ShowSecurityGroup(common.NetworkAndComputeShowOne):
|
|
|
422
426
|
return (display_columns, data)
|
|
423
427
|
|
|
424
428
|
def take_action_compute(self, client, parsed_args):
|
|
425
|
-
obj =
|
|
429
|
+
obj = compute_v2.find_security_group(client, parsed_args.group)
|
|
426
430
|
display_columns, property_columns = _get_columns(obj)
|
|
427
431
|
data = utils.get_dict_properties(
|
|
428
432
|
obj, property_columns, formatters=_formatters_compute
|
|
@@ -434,7 +438,7 @@ class UnsetSecurityGroup(command.Command):
|
|
|
434
438
|
_description = _("Unset security group properties")
|
|
435
439
|
|
|
436
440
|
def get_parser(self, prog_name):
|
|
437
|
-
parser = super(
|
|
441
|
+
parser = super().get_parser(prog_name)
|
|
438
442
|
parser.add_argument(
|
|
439
443
|
'group',
|
|
440
444
|
metavar="<group>",
|
|
@@ -20,6 +20,7 @@ from osc_lib.cli import parseractions
|
|
|
20
20
|
from osc_lib import exceptions
|
|
21
21
|
from osc_lib import utils
|
|
22
22
|
|
|
23
|
+
from openstackclient.api import compute_v2
|
|
23
24
|
from openstackclient.i18n import _
|
|
24
25
|
from openstackclient.identity import common as identity_common
|
|
25
26
|
from openstackclient.network import common
|
|
@@ -91,7 +92,7 @@ class CreateSecurityGroupRule(
|
|
|
91
92
|
"ending port range: 137:139. Required for IP protocols TCP "
|
|
92
93
|
"and UDP. Ignored for ICMP IP protocols."
|
|
93
94
|
),
|
|
94
|
-
**dst_port_default
|
|
95
|
+
**dst_port_default,
|
|
95
96
|
)
|
|
96
97
|
|
|
97
98
|
# NOTE(rtheis): Support either protocol option name for now.
|
|
@@ -125,7 +126,7 @@ class CreateSecurityGroupRule(
|
|
|
125
126
|
metavar='<protocol>',
|
|
126
127
|
type=network_utils.convert_to_lowercase,
|
|
127
128
|
help=protocol_help,
|
|
128
|
-
**proto_choices
|
|
129
|
+
**proto_choices,
|
|
129
130
|
)
|
|
130
131
|
if not self.is_docs_build:
|
|
131
132
|
protocol_group.add_argument(
|
|
@@ -133,7 +134,7 @@ class CreateSecurityGroupRule(
|
|
|
133
134
|
metavar='<proto>',
|
|
134
135
|
type=network_utils.convert_to_lowercase,
|
|
135
136
|
help=argparse.SUPPRESS,
|
|
136
|
-
**proto_choices
|
|
137
|
+
**proto_choices,
|
|
137
138
|
)
|
|
138
139
|
|
|
139
140
|
return parser
|
|
@@ -292,7 +293,7 @@ class CreateSecurityGroupRule(
|
|
|
292
293
|
return (display_columns, data)
|
|
293
294
|
|
|
294
295
|
def take_action_compute(self, client, parsed_args):
|
|
295
|
-
group =
|
|
296
|
+
group = compute_v2.find_security_group(client, parsed_args.group)
|
|
296
297
|
protocol = network_utils.get_protocol(
|
|
297
298
|
parsed_args, default_protocol='tcp'
|
|
298
299
|
)
|
|
@@ -303,15 +304,16 @@ class CreateSecurityGroupRule(
|
|
|
303
304
|
|
|
304
305
|
remote_ip = None
|
|
305
306
|
if parsed_args.remote_group is not None:
|
|
306
|
-
parsed_args.remote_group =
|
|
307
|
-
parsed_args.remote_group
|
|
307
|
+
parsed_args.remote_group = compute_v2.find_security_group(
|
|
308
|
+
client, parsed_args.remote_group
|
|
308
309
|
)['id']
|
|
309
310
|
if parsed_args.remote_ip is not None:
|
|
310
311
|
remote_ip = parsed_args.remote_ip
|
|
311
312
|
else:
|
|
312
313
|
remote_ip = '0.0.0.0/0'
|
|
313
314
|
|
|
314
|
-
obj =
|
|
315
|
+
obj = compute_v2.create_security_group_rule(
|
|
316
|
+
client,
|
|
315
317
|
security_group_id=group['id'],
|
|
316
318
|
ip_protocol=protocol,
|
|
317
319
|
from_port=from_port,
|
|
@@ -343,7 +345,7 @@ class DeleteSecurityGroupRule(common.NetworkAndComputeDelete):
|
|
|
343
345
|
client.delete_security_group_rule(obj)
|
|
344
346
|
|
|
345
347
|
def take_action_compute(self, client, parsed_args):
|
|
346
|
-
|
|
348
|
+
compute_v2.delete_security_group_rule(client, self.r)
|
|
347
349
|
|
|
348
350
|
|
|
349
351
|
class ListSecurityGroupRule(common.NetworkAndComputeLister):
|
|
@@ -532,15 +534,16 @@ class ListSecurityGroupRule(common.NetworkAndComputeLister):
|
|
|
532
534
|
|
|
533
535
|
rules_to_list = []
|
|
534
536
|
if parsed_args.group is not None:
|
|
535
|
-
|
|
536
|
-
parsed_args.group
|
|
537
|
+
security_group = compute_v2.find_security_group(
|
|
538
|
+
client, parsed_args.group
|
|
537
539
|
)
|
|
538
|
-
rules_to_list =
|
|
540
|
+
rules_to_list = security_group['rules']
|
|
539
541
|
else:
|
|
540
542
|
columns = columns + ('parent_group_id',)
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
543
|
+
for security_group in compute_v2.list_security_groups(
|
|
544
|
+
client, all_projects=parsed_args.all_projects
|
|
545
|
+
):
|
|
546
|
+
rules_to_list.extend(security_group['rules'])
|
|
544
547
|
|
|
545
548
|
# NOTE(rtheis): Turn the raw rules into resources.
|
|
546
549
|
rules = []
|
|
@@ -596,7 +599,7 @@ class ShowSecurityGroupRule(common.NetworkAndComputeShowOne):
|
|
|
596
599
|
# the requested rule.
|
|
597
600
|
obj = None
|
|
598
601
|
security_group_rules = []
|
|
599
|
-
for security_group in
|
|
602
|
+
for security_group in compute_v2.list_security_groups(client):
|
|
600
603
|
security_group_rules.extend(security_group['rules'])
|
|
601
604
|
for security_group_rule in security_group_rules:
|
|
602
605
|
if parsed_args.rule == str(security_group_rule.get('id')):
|
|
@@ -46,7 +46,7 @@ def _update_arguments(obj_list, parsed_args_list, option):
|
|
|
46
46
|
class AllocationPoolsColumn(cliff_columns.FormattableColumn):
|
|
47
47
|
def human_readable(self):
|
|
48
48
|
pool_formatted = [
|
|
49
|
-
'
|
|
49
|
+
'{}-{}'.format(pool.get('start', ''), pool.get('end', ''))
|
|
50
50
|
for pool in self._value
|
|
51
51
|
]
|
|
52
52
|
return ','.join(pool_formatted)
|
|
@@ -60,9 +60,16 @@ class HostRoutesColumn(cliff_columns.FormattableColumn):
|
|
|
60
60
|
)
|
|
61
61
|
|
|
62
62
|
|
|
63
|
+
class UnsortedListColumn(cliff_columns.FormattableColumn):
|
|
64
|
+
# format_columns.ListColumn sorts the output, but for things like
|
|
65
|
+
# DNS server addresses the order matters
|
|
66
|
+
def human_readable(self):
|
|
67
|
+
return ', '.join(self._value)
|
|
68
|
+
|
|
69
|
+
|
|
63
70
|
_formatters = {
|
|
64
71
|
'allocation_pools': AllocationPoolsColumn,
|
|
65
|
-
'dns_nameservers':
|
|
72
|
+
'dns_nameservers': UnsortedListColumn,
|
|
66
73
|
'host_routes': HostRoutesColumn,
|
|
67
74
|
'service_types': format_columns.ListColumn,
|
|
68
75
|
'tags': format_columns.ListColumn,
|
|
@@ -285,7 +292,7 @@ class CreateSubnet(command.ShowOne, common.NeutronCommandWithExtraArgs):
|
|
|
285
292
|
_description = _("Create a subnet")
|
|
286
293
|
|
|
287
294
|
def get_parser(self, prog_name):
|
|
288
|
-
parser = super(
|
|
295
|
+
parser = super().get_parser(prog_name)
|
|
289
296
|
parser.add_argument(
|
|
290
297
|
'name', metavar='<name>', help=_("New subnet name")
|
|
291
298
|
)
|
|
@@ -429,7 +436,7 @@ class DeleteSubnet(command.Command):
|
|
|
429
436
|
_description = _("Delete subnet(s)")
|
|
430
437
|
|
|
431
438
|
def get_parser(self, prog_name):
|
|
432
|
-
parser = super(
|
|
439
|
+
parser = super().get_parser(prog_name)
|
|
433
440
|
parser.add_argument(
|
|
434
441
|
'subnet',
|
|
435
442
|
metavar="<subnet>",
|
|
@@ -471,7 +478,7 @@ class ListSubnet(command.Lister):
|
|
|
471
478
|
_description = _("List subnets")
|
|
472
479
|
|
|
473
480
|
def get_parser(self, prog_name):
|
|
474
|
-
parser = super(
|
|
481
|
+
parser = super().get_parser(prog_name)
|
|
475
482
|
parser.add_argument(
|
|
476
483
|
'--long',
|
|
477
484
|
action='store_true',
|
|
@@ -644,7 +651,7 @@ class SetSubnet(common.NeutronCommandWithExtraArgs):
|
|
|
644
651
|
_description = _("Set subnet properties")
|
|
645
652
|
|
|
646
653
|
def get_parser(self, prog_name):
|
|
647
|
-
parser = super(
|
|
654
|
+
parser = super().get_parser(prog_name)
|
|
648
655
|
parser.add_argument(
|
|
649
656
|
'subnet',
|
|
650
657
|
metavar="<subnet>",
|
|
@@ -737,7 +744,7 @@ class ShowSubnet(command.ShowOne):
|
|
|
737
744
|
_description = _("Display subnet details")
|
|
738
745
|
|
|
739
746
|
def get_parser(self, prog_name):
|
|
740
|
-
parser = super(
|
|
747
|
+
parser = super().get_parser(prog_name)
|
|
741
748
|
parser.add_argument(
|
|
742
749
|
'subnet',
|
|
743
750
|
metavar="<subnet>",
|
|
@@ -758,7 +765,7 @@ class UnsetSubnet(common.NeutronUnsetCommandWithExtraArgs):
|
|
|
758
765
|
_description = _("Unset subnet properties")
|
|
759
766
|
|
|
760
767
|
def get_parser(self, prog_name):
|
|
761
|
-
parser = super(
|
|
768
|
+
parser = super().get_parser(prog_name)
|
|
762
769
|
parser.add_argument(
|
|
763
770
|
'--allocation-pool',
|
|
764
771
|
metavar='start=<ip-address>,end=<ip-address>',
|
|
@@ -155,7 +155,7 @@ class CreateSubnetPool(command.ShowOne, common.NeutronCommandWithExtraArgs):
|
|
|
155
155
|
_description = _("Create subnet pool")
|
|
156
156
|
|
|
157
157
|
def get_parser(self, prog_name):
|
|
158
|
-
parser = super(
|
|
158
|
+
parser = super().get_parser(prog_name)
|
|
159
159
|
parser.add_argument(
|
|
160
160
|
'name', metavar='<name>', help=_("Name of the new subnet pool")
|
|
161
161
|
)
|
|
@@ -226,7 +226,7 @@ class DeleteSubnetPool(command.Command):
|
|
|
226
226
|
_description = _("Delete subnet pool(s)")
|
|
227
227
|
|
|
228
228
|
def get_parser(self, prog_name):
|
|
229
|
-
parser = super(
|
|
229
|
+
parser = super().get_parser(prog_name)
|
|
230
230
|
parser.add_argument(
|
|
231
231
|
'subnet_pool',
|
|
232
232
|
metavar='<subnet-pool>',
|
|
@@ -267,7 +267,7 @@ class ListSubnetPool(command.Lister):
|
|
|
267
267
|
_description = _("List subnet pools")
|
|
268
268
|
|
|
269
269
|
def get_parser(self, prog_name):
|
|
270
|
-
parser = super(
|
|
270
|
+
parser = super().get_parser(prog_name)
|
|
271
271
|
parser.add_argument(
|
|
272
272
|
'--long',
|
|
273
273
|
action='store_true',
|
|
@@ -393,7 +393,7 @@ class SetSubnetPool(common.NeutronCommandWithExtraArgs):
|
|
|
393
393
|
_description = _("Set subnet pool properties")
|
|
394
394
|
|
|
395
395
|
def get_parser(self, prog_name):
|
|
396
|
-
parser = super(
|
|
396
|
+
parser = super().get_parser(prog_name)
|
|
397
397
|
parser.add_argument(
|
|
398
398
|
'subnet_pool',
|
|
399
399
|
metavar='<subnet-pool>',
|
|
@@ -464,7 +464,7 @@ class ShowSubnetPool(command.ShowOne):
|
|
|
464
464
|
_description = _("Display subnet pool details")
|
|
465
465
|
|
|
466
466
|
def get_parser(self, prog_name):
|
|
467
|
-
parser = super(
|
|
467
|
+
parser = super().get_parser(prog_name)
|
|
468
468
|
parser.add_argument(
|
|
469
469
|
'subnet_pool',
|
|
470
470
|
metavar='<subnet-pool>',
|
|
@@ -486,7 +486,7 @@ class UnsetSubnetPool(command.Command):
|
|
|
486
486
|
_description = _("Unset subnet pool properties")
|
|
487
487
|
|
|
488
488
|
def get_parser(self, prog_name):
|
|
489
|
-
parser = super(
|
|
489
|
+
parser = super().get_parser(prog_name)
|
|
490
490
|
parser.add_argument(
|
|
491
491
|
'subnet_pool',
|
|
492
492
|
metavar="<subnet-pool>",
|
|
@@ -24,7 +24,7 @@ class SetAccount(command.Command):
|
|
|
24
24
|
_description = _("Set account properties")
|
|
25
25
|
|
|
26
26
|
def get_parser(self, prog_name):
|
|
27
|
-
parser = super(
|
|
27
|
+
parser = super().get_parser(prog_name)
|
|
28
28
|
parser.add_argument(
|
|
29
29
|
"--property",
|
|
30
30
|
metavar="<key=value>",
|
|
@@ -59,7 +59,7 @@ class UnsetAccount(command.Command):
|
|
|
59
59
|
_description = _("Unset account properties")
|
|
60
60
|
|
|
61
61
|
def get_parser(self, prog_name):
|
|
62
|
-
parser = super(
|
|
62
|
+
parser = super().get_parser(prog_name)
|
|
63
63
|
parser.add_argument(
|
|
64
64
|
'--property',
|
|
65
65
|
metavar='<key>',
|
|
@@ -32,7 +32,7 @@ class CreateContainer(command.Lister):
|
|
|
32
32
|
_description = _("Create new container")
|
|
33
33
|
|
|
34
34
|
def get_parser(self, prog_name):
|
|
35
|
-
parser = super(
|
|
35
|
+
parser = super().get_parser(prog_name)
|
|
36
36
|
parser.add_argument(
|
|
37
37
|
'--public',
|
|
38
38
|
action='store_true',
|
|
@@ -85,7 +85,7 @@ class DeleteContainer(command.Command):
|
|
|
85
85
|
_description = _("Delete container")
|
|
86
86
|
|
|
87
87
|
def get_parser(self, prog_name):
|
|
88
|
-
parser = super(
|
|
88
|
+
parser = super().get_parser(prog_name)
|
|
89
89
|
parser.add_argument(
|
|
90
90
|
'--recursive',
|
|
91
91
|
'-r',
|
|
@@ -121,7 +121,7 @@ class ListContainer(command.Lister):
|
|
|
121
121
|
_description = _("List containers")
|
|
122
122
|
|
|
123
123
|
def get_parser(self, prog_name):
|
|
124
|
-
parser = super(
|
|
124
|
+
parser = super().get_parser(prog_name)
|
|
125
125
|
parser.add_argument(
|
|
126
126
|
"--prefix",
|
|
127
127
|
metavar="<prefix>",
|
|
@@ -184,7 +184,7 @@ class SaveContainer(command.Command):
|
|
|
184
184
|
_description = _("Save container contents locally")
|
|
185
185
|
|
|
186
186
|
def get_parser(self, prog_name):
|
|
187
|
-
parser = super(
|
|
187
|
+
parser = super().get_parser(prog_name)
|
|
188
188
|
parser.add_argument(
|
|
189
189
|
'container',
|
|
190
190
|
metavar='<container>',
|
|
@@ -202,7 +202,7 @@ class SetContainer(command.Command):
|
|
|
202
202
|
_description = _("Set container properties")
|
|
203
203
|
|
|
204
204
|
def get_parser(self, prog_name):
|
|
205
|
-
parser = super(
|
|
205
|
+
parser = super().get_parser(prog_name)
|
|
206
206
|
parser.add_argument(
|
|
207
207
|
'container',
|
|
208
208
|
metavar='<container>',
|
|
@@ -231,7 +231,7 @@ class ShowContainer(command.ShowOne):
|
|
|
231
231
|
_description = _("Display container details")
|
|
232
232
|
|
|
233
233
|
def get_parser(self, prog_name):
|
|
234
|
-
parser = super(
|
|
234
|
+
parser = super().get_parser(prog_name)
|
|
235
235
|
parser.add_argument(
|
|
236
236
|
'container',
|
|
237
237
|
metavar='<container>',
|
|
@@ -253,7 +253,7 @@ class UnsetContainer(command.Command):
|
|
|
253
253
|
_description = _("Unset container properties")
|
|
254
254
|
|
|
255
255
|
def get_parser(self, prog_name):
|
|
256
|
-
parser = super(
|
|
256
|
+
parser = super().get_parser(prog_name)
|
|
257
257
|
parser.add_argument(
|
|
258
258
|
'container',
|
|
259
259
|
metavar='<container>',
|
|
@@ -34,7 +34,7 @@ class CreateObject(command.Lister):
|
|
|
34
34
|
_description = _("Upload object to container")
|
|
35
35
|
|
|
36
36
|
def get_parser(self, prog_name):
|
|
37
|
-
parser = super(
|
|
37
|
+
parser = super().get_parser(prog_name)
|
|
38
38
|
parser.add_argument(
|
|
39
39
|
'container',
|
|
40
40
|
metavar='<container>',
|
|
@@ -99,7 +99,7 @@ class DeleteObject(command.Command):
|
|
|
99
99
|
_description = _("Delete object from container")
|
|
100
100
|
|
|
101
101
|
def get_parser(self, prog_name):
|
|
102
|
-
parser = super(
|
|
102
|
+
parser = super().get_parser(prog_name)
|
|
103
103
|
parser.add_argument(
|
|
104
104
|
'container',
|
|
105
105
|
metavar='<container>',
|
|
@@ -125,7 +125,7 @@ class ListObject(command.Lister):
|
|
|
125
125
|
_description = _("List objects")
|
|
126
126
|
|
|
127
127
|
def get_parser(self, prog_name):
|
|
128
|
-
parser = super(
|
|
128
|
+
parser = super().get_parser(prog_name)
|
|
129
129
|
parser.add_argument(
|
|
130
130
|
"container",
|
|
131
131
|
metavar="<container>",
|
|
@@ -208,7 +208,7 @@ class SaveObject(command.Command):
|
|
|
208
208
|
_description = _("Save object locally")
|
|
209
209
|
|
|
210
210
|
def get_parser(self, prog_name):
|
|
211
|
-
parser = super(
|
|
211
|
+
parser = super().get_parser(prog_name)
|
|
212
212
|
parser.add_argument(
|
|
213
213
|
"--file",
|
|
214
214
|
metavar="<filename>",
|
|
@@ -241,7 +241,7 @@ class SetObject(command.Command):
|
|
|
241
241
|
_description = _("Set object properties")
|
|
242
242
|
|
|
243
243
|
def get_parser(self, prog_name):
|
|
244
|
-
parser = super(
|
|
244
|
+
parser = super().get_parser(prog_name)
|
|
245
245
|
parser.add_argument(
|
|
246
246
|
'container',
|
|
247
247
|
metavar='<container>',
|
|
@@ -276,7 +276,7 @@ class ShowObject(command.ShowOne):
|
|
|
276
276
|
_description = _("Display object details")
|
|
277
277
|
|
|
278
278
|
def get_parser(self, prog_name):
|
|
279
|
-
parser = super(
|
|
279
|
+
parser = super().get_parser(prog_name)
|
|
280
280
|
parser.add_argument(
|
|
281
281
|
'container',
|
|
282
282
|
metavar='<container>',
|
|
@@ -304,7 +304,7 @@ class UnsetObject(command.Command):
|
|
|
304
304
|
_description = _("Unset object properties")
|
|
305
305
|
|
|
306
306
|
def get_parser(self, prog_name):
|
|
307
|
-
parser = super(
|
|
307
|
+
parser = super().get_parser(prog_name)
|
|
308
308
|
parser.add_argument(
|
|
309
309
|
'container',
|
|
310
310
|
metavar='<container>',
|
openstackclient/shell.py
CHANGED
|
@@ -32,7 +32,7 @@ DEFAULT_DOMAIN = 'default'
|
|
|
32
32
|
|
|
33
33
|
class OpenStackShell(shell.OpenStackShell):
|
|
34
34
|
def __init__(self):
|
|
35
|
-
super(
|
|
35
|
+
super().__init__(
|
|
36
36
|
description=__doc__.strip(),
|
|
37
37
|
version=openstackclient.__version__,
|
|
38
38
|
command_manager=commandmanager.CommandManager('openstack.cli'),
|
|
@@ -49,15 +49,13 @@ class OpenStackShell(shell.OpenStackShell):
|
|
|
49
49
|
warnings.filterwarnings('ignore', module='openstack')
|
|
50
50
|
|
|
51
51
|
def build_option_parser(self, description, version):
|
|
52
|
-
parser = super(
|
|
53
|
-
description, version
|
|
54
|
-
)
|
|
52
|
+
parser = super().build_option_parser(description, version)
|
|
55
53
|
parser = clientmanager.build_plugin_option_parser(parser)
|
|
56
54
|
parser = auth.build_auth_plugins_option_parser(parser)
|
|
57
55
|
return parser
|
|
58
56
|
|
|
59
57
|
def _final_defaults(self):
|
|
60
|
-
super(
|
|
58
|
+
super()._final_defaults()
|
|
61
59
|
|
|
62
60
|
# Set the default plugin to admin_token if endpoint and token are given
|
|
63
61
|
if self.options.endpoint and self.options.token:
|
|
@@ -132,7 +130,7 @@ class OpenStackShell(shell.OpenStackShell):
|
|
|
132
130
|
self.command_manager.add_command_group('openstack.extension')
|
|
133
131
|
|
|
134
132
|
def initialize_app(self, argv):
|
|
135
|
-
super(
|
|
133
|
+
super().initialize_app(argv)
|
|
136
134
|
|
|
137
135
|
# Re-create the client_manager with our subclass
|
|
138
136
|
self.client_manager = clientmanager.ClientManager(
|
|
@@ -60,12 +60,12 @@ class HelpTests(base.TestCase):
|
|
|
60
60
|
"""Check server commands in main help message."""
|
|
61
61
|
raw_output = self.openstack('help')
|
|
62
62
|
for command, description in self.SERVER_COMMANDS:
|
|
63
|
-
msg = 'Command:
|
|
63
|
+
msg = 'Command: {} not found in help output:\n{}'.format(
|
|
64
64
|
command,
|
|
65
65
|
raw_output,
|
|
66
66
|
)
|
|
67
67
|
self.assertIn(command, raw_output, msg)
|
|
68
|
-
msg = 'Description:
|
|
68
|
+
msg = 'Description: {} not found in help output:\n{}'.format(
|
|
69
69
|
description,
|
|
70
70
|
raw_output,
|
|
71
71
|
)
|
|
@@ -18,7 +18,7 @@ from openstackclient.tests.functional import base
|
|
|
18
18
|
class ModuleTest(base.TestCase):
|
|
19
19
|
"""Functional tests for openstackclient module list output."""
|
|
20
20
|
|
|
21
|
-
CLIENTS = ['openstackclient', 'keystoneclient', '
|
|
21
|
+
CLIENTS = ['openstackclient', 'keystoneclient', 'openstack']
|
|
22
22
|
|
|
23
23
|
LIBS = ['osc_lib', 'keystoneauth1']
|
|
24
24
|
|