python-openstackclient 6.3.0__py3-none-any.whl → 6.5.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/common/availability_zone.py +4 -4
- openstackclient/common/pagination.py +82 -0
- openstackclient/compute/v2/flavor.py +2 -16
- openstackclient/compute/v2/hypervisor.py +2 -21
- openstackclient/compute/v2/keypair.py +2 -9
- openstackclient/compute/v2/server.py +220 -131
- openstackclient/compute/v2/server_event.py +30 -19
- openstackclient/compute/v2/server_group.py +2 -23
- openstackclient/compute/v2/server_migration.py +2 -22
- openstackclient/compute/v2/usage.py +4 -6
- openstackclient/identity/v3/mapping.py +25 -3
- openstackclient/identity/v3/policy.py +3 -1
- openstackclient/image/v2/cache.py +218 -0
- openstackclient/image/v2/image.py +40 -17
- openstackclient/image/v2/metadef_namespaces.py +25 -21
- openstackclient/image/v2/metadef_objects.py +189 -0
- openstackclient/image/v2/metadef_properties.py +284 -0
- openstackclient/network/utils.py +100 -0
- openstackclient/network/v2/default_security_group_rule.py +418 -0
- openstackclient/network/v2/local_ip_association.py +1 -1
- openstackclient/network/v2/ndp_proxy.py +7 -3
- openstackclient/network/v2/network.py +2 -2
- openstackclient/network/v2/port.py +65 -19
- openstackclient/network/v2/security_group_rule.py +18 -111
- openstackclient/network/v2/subnet.py +1 -0
- openstackclient/object/v1/container.py +2 -12
- openstackclient/object/v1/object.py +2 -11
- openstackclient/tests/functional/base.py +13 -6
- openstackclient/tests/functional/identity/v3/test_role.py +11 -3
- openstackclient/tests/functional/network/v2/common.py +7 -1
- openstackclient/tests/functional/network/v2/test_address_group.py +2 -4
- openstackclient/tests/functional/network/v2/test_address_scope.py +0 -6
- openstackclient/tests/functional/network/v2/test_default_security_group_rule.py +67 -0
- openstackclient/tests/functional/network/v2/test_floating_ip.py +3 -6
- openstackclient/tests/functional/network/v2/test_ip_availability.py +3 -8
- openstackclient/tests/functional/network/v2/test_l3_conntrack_helper.py +3 -4
- openstackclient/tests/functional/network/v2/test_local_ip.py +2 -4
- openstackclient/tests/functional/network/v2/test_network.py +18 -17
- openstackclient/tests/functional/network/v2/test_network_agent.py +24 -21
- openstackclient/tests/functional/network/v2/test_network_flavor.py +0 -6
- openstackclient/tests/functional/network/v2/test_network_flavor_profile.py +0 -6
- openstackclient/tests/functional/network/v2/test_network_meter.py +6 -6
- openstackclient/tests/functional/network/v2/test_network_meter_rule.py +7 -8
- openstackclient/tests/functional/network/v2/test_network_ndp_proxy.py +1 -3
- openstackclient/tests/functional/network/v2/test_network_qos_policy.py +4 -4
- openstackclient/tests/functional/network/v2/test_network_qos_rule.py +16 -20
- openstackclient/tests/functional/network/v2/test_network_qos_rule_type.py +4 -4
- openstackclient/tests/functional/network/v2/test_network_rbac.py +1 -4
- openstackclient/tests/functional/network/v2/test_network_segment.py +7 -12
- openstackclient/tests/functional/network/v2/test_network_segment_range.py +3 -4
- openstackclient/tests/functional/network/v2/test_network_service_provider.py +2 -4
- openstackclient/tests/functional/network/v2/test_network_trunk.py +3 -3
- openstackclient/tests/functional/network/v2/test_port.py +2 -8
- openstackclient/tests/functional/network/v2/test_router.py +0 -6
- openstackclient/tests/functional/network/v2/test_security_group.py +1 -4
- openstackclient/tests/functional/network/v2/test_security_group_rule.py +1 -4
- openstackclient/tests/functional/network/v2/test_subnet.py +4 -22
- openstackclient/tests/functional/network/v2/test_subnet_pool.py +0 -6
- openstackclient/tests/unit/common/test_availability_zone.py +28 -30
- openstackclient/tests/unit/common/test_extension.py +1 -4
- openstackclient/tests/unit/common/test_limits.py +2 -4
- openstackclient/tests/unit/common/test_project_cleanup.py +3 -10
- openstackclient/tests/unit/common/test_quota.py +18 -24
- openstackclient/tests/unit/compute/v2/fakes.py +24 -11
- openstackclient/tests/unit/compute/v2/test_agent.py +1 -1
- openstackclient/tests/unit/compute/v2/test_aggregate.py +62 -72
- openstackclient/tests/unit/compute/v2/test_console.py +18 -30
- openstackclient/tests/unit/compute/v2/test_flavor.py +85 -89
- openstackclient/tests/unit/compute/v2/test_host.py +12 -19
- openstackclient/tests/unit/compute/v2/test_hypervisor.py +23 -25
- openstackclient/tests/unit/compute/v2/test_hypervisor_stats.py +2 -6
- openstackclient/tests/unit/compute/v2/test_keypair.py +25 -39
- openstackclient/tests/unit/compute/v2/test_server.py +316 -365
- openstackclient/tests/unit/compute/v2/test_server_backup.py +5 -17
- openstackclient/tests/unit/compute/v2/test_server_event.py +23 -25
- openstackclient/tests/unit/compute/v2/test_server_group.py +41 -33
- openstackclient/tests/unit/compute/v2/test_server_image.py +6 -18
- openstackclient/tests/unit/compute/v2/test_server_migration.py +45 -45
- openstackclient/tests/unit/compute/v2/test_server_volume.py +15 -31
- openstackclient/tests/unit/compute/v2/test_service.py +51 -56
- openstackclient/tests/unit/compute/v2/test_usage.py +10 -13
- openstackclient/tests/unit/fakes.py +4 -0
- openstackclient/tests/unit/identity/v3/test_mappings.py +9 -4
- openstackclient/tests/unit/identity/v3/test_trust.py +0 -2
- openstackclient/tests/unit/image/v1/fakes.py +2 -1
- openstackclient/tests/unit/image/v1/test_image.py +1 -1
- openstackclient/tests/unit/image/v2/fakes.py +82 -0
- openstackclient/tests/unit/image/v2/test_cache.py +214 -0
- openstackclient/tests/unit/image/v2/test_image.py +62 -4
- openstackclient/tests/unit/image/v2/test_metadef_namespaces.py +5 -19
- openstackclient/tests/unit/image/v2/test_metadef_objects.py +162 -0
- openstackclient/tests/unit/image/v2/test_metadef_properties.py +227 -0
- openstackclient/tests/unit/integ/cli/test_shell.py +0 -2
- openstackclient/tests/unit/network/test_common.py +3 -3
- openstackclient/tests/unit/network/v2/fakes.py +1 -0
- openstackclient/tests/unit/network/v2/test_default_security_group_rule.py +1133 -0
- openstackclient/tests/unit/network/v2/test_floating_ip_compute.py +5 -13
- openstackclient/tests/unit/network/v2/test_floating_ip_pool_compute.py +1 -9
- openstackclient/tests/unit/network/v2/test_network.py +33 -0
- openstackclient/tests/unit/network/v2/test_network_compute.py +5 -11
- openstackclient/tests/unit/network/v2/test_network_trunk.py +6 -8
- openstackclient/tests/unit/network/v2/test_port.py +83 -38
- openstackclient/tests/unit/network/v2/test_security_group_compute.py +7 -15
- openstackclient/tests/unit/network/v2/test_security_group_rule_compute.py +19 -27
- openstackclient/tests/unit/network/v2/test_security_group_rule_network.py +3 -6
- openstackclient/tests/unit/network/v2/test_subnet.py +92 -0
- openstackclient/tests/unit/network/v2/test_subnet_pool.py +11 -13
- openstackclient/tests/unit/test_shell.py +1 -7
- openstackclient/tests/unit/utils.py +10 -4
- openstackclient/tests/unit/volume/v1/fakes.py +7 -1
- openstackclient/tests/unit/volume/v1/test_qos_specs.py +2 -2
- openstackclient/tests/unit/volume/v1/test_service.py +1 -1
- openstackclient/tests/unit/volume/v1/test_transfer_request.py +2 -2
- openstackclient/tests/unit/volume/v1/test_type.py +2 -4
- openstackclient/tests/unit/volume/v1/test_volume.py +5 -7
- openstackclient/tests/unit/volume/v1/test_volume_backup.py +4 -4
- openstackclient/tests/unit/volume/v2/fakes.py +32 -12
- openstackclient/tests/unit/volume/v2/test_backup_record.py +1 -1
- openstackclient/tests/unit/volume/v2/test_consistency_group.py +4 -6
- openstackclient/tests/unit/volume/v2/test_consistency_group_snapshot.py +2 -4
- openstackclient/tests/unit/volume/v2/test_qos_specs.py +2 -2
- openstackclient/tests/unit/volume/v2/test_service.py +1 -1
- openstackclient/tests/unit/volume/v2/test_volume.py +78 -16
- openstackclient/tests/unit/volume/v2/test_volume_backend.py +10 -22
- openstackclient/tests/unit/volume/v2/test_volume_backup.py +76 -89
- openstackclient/tests/unit/volume/v2/test_volume_host.py +1 -1
- openstackclient/tests/unit/volume/v2/test_volume_snapshot.py +5 -7
- openstackclient/tests/unit/volume/v2/test_volume_transfer_request.py +4 -8
- openstackclient/tests/unit/volume/v2/test_volume_type.py +164 -24
- openstackclient/tests/unit/volume/v3/fakes.py +91 -15
- openstackclient/tests/unit/volume/v3/test_block_storage_cleanup.py +3 -7
- openstackclient/tests/unit/volume/v3/test_block_storage_cluster.py +11 -31
- openstackclient/tests/unit/volume/v3/test_block_storage_log_level.py +6 -16
- openstackclient/tests/unit/volume/v3/test_block_storage_manage.py +219 -157
- openstackclient/tests/unit/volume/v3/test_block_storage_resource_filter.py +32 -23
- openstackclient/tests/unit/volume/v3/test_volume.py +50 -48
- openstackclient/tests/unit/volume/v3/test_volume_attachment.py +17 -47
- openstackclient/tests/unit/volume/v3/test_volume_group.py +23 -65
- openstackclient/tests/unit/volume/v3/test_volume_group_snapshot.py +88 -77
- openstackclient/tests/unit/volume/v3/test_volume_group_type.py +14 -42
- openstackclient/tests/unit/volume/v3/test_volume_message.py +10 -28
- openstackclient/volume/v1/volume.py +2 -14
- openstackclient/volume/v2/volume.py +30 -15
- openstackclient/volume/v2/volume_backend.py +10 -18
- openstackclient/volume/v2/volume_backup.py +18 -15
- openstackclient/volume/v2/volume_snapshot.py +2 -12
- openstackclient/volume/v2/volume_type.py +211 -14
- openstackclient/volume/v3/block_storage_manage.py +72 -11
- openstackclient/volume/v3/block_storage_resource_filter.py +33 -11
- openstackclient/volume/v3/volume_attachment.py +2 -14
- openstackclient/volume/v3/volume_group_snapshot.py +27 -27
- openstackclient/volume/v3/volume_message.py +2 -13
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/AUTHORS +11 -0
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/METADATA +6 -5
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/RECORD +160 -151
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/entry_points.txt +23 -5
- python_openstackclient-6.5.0.dist-info/pbr.json +1 -0
- openstackclient/tests/unit/common/test_parseractions.py +0 -233
- python_openstackclient-6.3.0.dist-info/pbr.json +0 -1
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/WHEEL +0 -0
- {python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "c29e0576", "is_release": true}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
# Copyright 2012-2013 OpenStack Foundation
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
4
|
-
# not use this file except in compliance with the License. You may obtain
|
|
5
|
-
# a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
11
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
12
|
-
# License for the specific language governing permissions and limitations
|
|
13
|
-
# under the License.
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
# NOTE(dtroyer): This file is deprecated in Jun 2016, remove after 4.x release
|
|
17
|
-
# or Jun 2017.
|
|
18
|
-
|
|
19
|
-
import argparse
|
|
20
|
-
|
|
21
|
-
from osc_lib.cli import parseractions
|
|
22
|
-
|
|
23
|
-
from openstackclient.tests.unit import utils
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class TestKeyValueAction(utils.TestCase):
|
|
27
|
-
def setUp(self):
|
|
28
|
-
super(TestKeyValueAction, self).setUp()
|
|
29
|
-
|
|
30
|
-
self.parser = argparse.ArgumentParser()
|
|
31
|
-
|
|
32
|
-
# Set up our typical usage
|
|
33
|
-
self.parser.add_argument(
|
|
34
|
-
'--property',
|
|
35
|
-
metavar='<key=value>',
|
|
36
|
-
action=parseractions.KeyValueAction,
|
|
37
|
-
default={'green': '20%', 'format': '#rgb'},
|
|
38
|
-
help='Property to store for this volume '
|
|
39
|
-
'(repeat option to set multiple properties)',
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
def test_good_values(self):
|
|
43
|
-
results = self.parser.parse_args(
|
|
44
|
-
[
|
|
45
|
-
'--property',
|
|
46
|
-
'red=',
|
|
47
|
-
'--property',
|
|
48
|
-
'green=100%',
|
|
49
|
-
'--property',
|
|
50
|
-
'blue=50%',
|
|
51
|
-
]
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
actual = getattr(results, 'property', {})
|
|
55
|
-
# All should pass through unmolested
|
|
56
|
-
expect = {'red': '', 'green': '100%', 'blue': '50%', 'format': '#rgb'}
|
|
57
|
-
self.assertEqual(expect, actual)
|
|
58
|
-
|
|
59
|
-
def test_error_values(self):
|
|
60
|
-
self.assertRaises(
|
|
61
|
-
argparse.ArgumentTypeError,
|
|
62
|
-
self.parser.parse_args,
|
|
63
|
-
[
|
|
64
|
-
'--property',
|
|
65
|
-
'red',
|
|
66
|
-
],
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
class TestMultiKeyValueAction(utils.TestCase):
|
|
71
|
-
def setUp(self):
|
|
72
|
-
super(TestMultiKeyValueAction, self).setUp()
|
|
73
|
-
|
|
74
|
-
self.parser = argparse.ArgumentParser()
|
|
75
|
-
|
|
76
|
-
# Set up our typical usage
|
|
77
|
-
self.parser.add_argument(
|
|
78
|
-
'--test',
|
|
79
|
-
metavar='req1=xxx,req2=yyy',
|
|
80
|
-
action=parseractions.MultiKeyValueAction,
|
|
81
|
-
dest='test',
|
|
82
|
-
default=None,
|
|
83
|
-
required_keys=['req1', 'req2'],
|
|
84
|
-
optional_keys=['opt1', 'opt2'],
|
|
85
|
-
help='Test',
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
def test_good_values(self):
|
|
89
|
-
results = self.parser.parse_args(
|
|
90
|
-
[
|
|
91
|
-
'--test',
|
|
92
|
-
'req1=aaa,req2=bbb',
|
|
93
|
-
'--test',
|
|
94
|
-
'req1=,req2=',
|
|
95
|
-
]
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
actual = getattr(results, 'test', [])
|
|
99
|
-
expect = [
|
|
100
|
-
{'req1': 'aaa', 'req2': 'bbb'},
|
|
101
|
-
{'req1': '', 'req2': ''},
|
|
102
|
-
]
|
|
103
|
-
self.assertCountEqual(expect, actual)
|
|
104
|
-
|
|
105
|
-
def test_empty_required_optional(self):
|
|
106
|
-
self.parser.add_argument(
|
|
107
|
-
'--test-empty',
|
|
108
|
-
metavar='req1=xxx,req2=yyy',
|
|
109
|
-
action=parseractions.MultiKeyValueAction,
|
|
110
|
-
dest='test_empty',
|
|
111
|
-
default=None,
|
|
112
|
-
required_keys=[],
|
|
113
|
-
optional_keys=[],
|
|
114
|
-
help='Test',
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
results = self.parser.parse_args(
|
|
118
|
-
[
|
|
119
|
-
'--test-empty',
|
|
120
|
-
'req1=aaa,req2=bbb',
|
|
121
|
-
'--test-empty',
|
|
122
|
-
'req1=,req2=',
|
|
123
|
-
]
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
actual = getattr(results, 'test_empty', [])
|
|
127
|
-
expect = [
|
|
128
|
-
{'req1': 'aaa', 'req2': 'bbb'},
|
|
129
|
-
{'req1': '', 'req2': ''},
|
|
130
|
-
]
|
|
131
|
-
self.assertCountEqual(expect, actual)
|
|
132
|
-
|
|
133
|
-
def test_error_values_with_comma(self):
|
|
134
|
-
self.assertRaises(
|
|
135
|
-
argparse.ArgumentTypeError,
|
|
136
|
-
self.parser.parse_args,
|
|
137
|
-
[
|
|
138
|
-
'--test',
|
|
139
|
-
'mmm,nnn=zzz',
|
|
140
|
-
],
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
def test_error_values_without_comma(self):
|
|
144
|
-
self.assertRaises(
|
|
145
|
-
argparse.ArgumentTypeError,
|
|
146
|
-
self.parser.parse_args,
|
|
147
|
-
[
|
|
148
|
-
'--test',
|
|
149
|
-
'mmmnnn',
|
|
150
|
-
],
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
def test_missing_key(self):
|
|
154
|
-
self.assertRaises(
|
|
155
|
-
argparse.ArgumentTypeError,
|
|
156
|
-
self.parser.parse_args,
|
|
157
|
-
[
|
|
158
|
-
'--test',
|
|
159
|
-
'req2=ddd',
|
|
160
|
-
],
|
|
161
|
-
)
|
|
162
|
-
|
|
163
|
-
def test_invalid_key(self):
|
|
164
|
-
self.assertRaises(
|
|
165
|
-
argparse.ArgumentTypeError,
|
|
166
|
-
self.parser.parse_args,
|
|
167
|
-
[
|
|
168
|
-
'--test',
|
|
169
|
-
'req1=aaa,req2=bbb,aaa=req1',
|
|
170
|
-
],
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
def test_required_keys_not_list(self):
|
|
174
|
-
self.assertRaises(
|
|
175
|
-
TypeError,
|
|
176
|
-
self.parser.add_argument,
|
|
177
|
-
'--test-required-dict',
|
|
178
|
-
metavar='req1=xxx,req2=yyy',
|
|
179
|
-
action=parseractions.MultiKeyValueAction,
|
|
180
|
-
dest='test_required_dict',
|
|
181
|
-
default=None,
|
|
182
|
-
required_keys={'aaa': 'bbb'},
|
|
183
|
-
optional_keys=['opt1', 'opt2'],
|
|
184
|
-
help='Test',
|
|
185
|
-
)
|
|
186
|
-
|
|
187
|
-
def test_optional_keys_not_list(self):
|
|
188
|
-
self.assertRaises(
|
|
189
|
-
TypeError,
|
|
190
|
-
self.parser.add_argument,
|
|
191
|
-
'--test-optional-dict',
|
|
192
|
-
metavar='req1=xxx,req2=yyy',
|
|
193
|
-
action=parseractions.MultiKeyValueAction,
|
|
194
|
-
dest='test_optional_dict',
|
|
195
|
-
default=None,
|
|
196
|
-
required_keys=['req1', 'req2'],
|
|
197
|
-
optional_keys={'aaa': 'bbb'},
|
|
198
|
-
help='Test',
|
|
199
|
-
)
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
class TestNonNegativeAction(utils.TestCase):
|
|
203
|
-
def setUp(self):
|
|
204
|
-
super(TestNonNegativeAction, self).setUp()
|
|
205
|
-
|
|
206
|
-
self.parser = argparse.ArgumentParser()
|
|
207
|
-
|
|
208
|
-
# Set up our typical usage
|
|
209
|
-
self.parser.add_argument(
|
|
210
|
-
'--foo',
|
|
211
|
-
metavar='<foo>',
|
|
212
|
-
type=int,
|
|
213
|
-
action=parseractions.NonNegativeAction,
|
|
214
|
-
)
|
|
215
|
-
|
|
216
|
-
def test_negative_values(self):
|
|
217
|
-
self.assertRaises(
|
|
218
|
-
argparse.ArgumentTypeError,
|
|
219
|
-
self.parser.parse_args,
|
|
220
|
-
"--foo -1".split(),
|
|
221
|
-
)
|
|
222
|
-
|
|
223
|
-
def test_zero_values(self):
|
|
224
|
-
results = self.parser.parse_args('--foo 0'.split())
|
|
225
|
-
|
|
226
|
-
actual = getattr(results, 'foo', None)
|
|
227
|
-
self.assertEqual(actual, 0)
|
|
228
|
-
|
|
229
|
-
def test_positive_values(self):
|
|
230
|
-
results = self.parser.parse_args('--foo 1'.split())
|
|
231
|
-
|
|
232
|
-
actual = getattr(results, 'foo', None)
|
|
233
|
-
self.assertEqual(actual, 1)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "08faf81d", "is_release": true}
|
|
File without changes
|
|
File without changes
|
{python_openstackclient-6.3.0.dist-info → python_openstackclient-6.5.0.dist-info}/top_level.txt
RENAMED
|
File without changes
|