python-openstackclient 8.1.0__py3-none-any.whl → 8.2.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/compute_v2.py +2 -2
- openstackclient/api/volume_v2.py +60 -0
- openstackclient/api/volume_v3.py +60 -0
- openstackclient/compute/v2/flavor.py +14 -1
- openstackclient/compute/v2/server.py +1 -3
- openstackclient/identity/common.py +8 -13
- openstackclient/identity/v3/application_credential.py +86 -85
- openstackclient/identity/v3/domain.py +5 -6
- openstackclient/identity/v3/project.py +25 -20
- openstackclient/identity/v3/role.py +7 -2
- openstackclient/image/v1/image.py +16 -1
- openstackclient/image/v2/cache.py +10 -6
- openstackclient/image/v2/image.py +48 -1
- openstackclient/image/v2/metadef_objects.py +8 -2
- openstackclient/image/v2/metadef_properties.py +9 -2
- openstackclient/network/v2/port.py +16 -0
- openstackclient/network/v2/security_group.py +44 -3
- openstackclient/network/v2/security_group_rule.py +17 -0
- openstackclient/tests/functional/identity/v3/test_access_rule.py +1 -1
- openstackclient/tests/functional/identity/v3/test_application_credential.py +7 -7
- openstackclient/tests/functional/image/v2/test_image.py +36 -14
- openstackclient/tests/functional/volume/v2/test_volume.py +1 -1
- openstackclient/tests/functional/volume/v3/test_volume.py +2 -2
- openstackclient/tests/unit/api/test_volume_v2.py +124 -0
- openstackclient/tests/unit/api/test_volume_v3.py +124 -0
- openstackclient/tests/unit/compute/v2/test_flavor.py +159 -174
- openstackclient/tests/unit/compute/v2/test_server.py +42 -51
- openstackclient/tests/unit/identity/v3/test_application_credential.py +47 -41
- openstackclient/tests/unit/identity/v3/test_domain.py +2 -2
- openstackclient/tests/unit/identity/v3/test_project.py +30 -53
- openstackclient/tests/unit/identity/v3/test_role.py +2 -8
- openstackclient/tests/unit/image/v1/test_image.py +47 -0
- openstackclient/tests/unit/image/v2/test_image.py +79 -9
- openstackclient/tests/unit/image/v2/test_metadef_objects.py +22 -0
- openstackclient/tests/unit/image/v2/test_metadef_properties.py +24 -10
- openstackclient/tests/unit/network/v2/fakes.py +1 -0
- openstackclient/tests/unit/network/v2/test_ndp_proxy.py +2 -2
- openstackclient/tests/unit/network/v2/test_port.py +40 -0
- openstackclient/tests/unit/network/v2/test_security_group_network.py +6 -0
- openstackclient/tests/unit/network/v2/test_security_group_rule_network.py +49 -0
- openstackclient/tests/unit/volume/v2/test_volume.py +358 -305
- openstackclient/tests/unit/volume/v3/test_volume.py +439 -415
- openstackclient/volume/v2/service.py +1 -1
- openstackclient/volume/v2/volume.py +78 -52
- openstackclient/volume/v3/service.py +1 -1
- openstackclient/volume/v3/volume.py +102 -75
- openstackclient/volume/v3/volume_group.py +1 -1
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.2.0.dist-info}/AUTHORS +5 -0
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.2.0.dist-info}/METADATA +7 -7
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.2.0.dist-info}/RECORD +55 -51
- python_openstackclient-8.2.0.dist-info/pbr.json +1 -0
- python_openstackclient-8.1.0.dist-info/pbr.json +0 -1
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.2.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.2.0.dist-info}/WHEEL +0 -0
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.2.0.dist-info}/entry_points.txt +0 -0
- {python_openstackclient-8.1.0.dist-info → python_openstackclient-8.2.0.dist-info}/top_level.txt +0 -0
|
@@ -3014,3 +3014,43 @@ class TestUnsetPort(TestPort):
|
|
|
3014
3014
|
**{'hints': None},
|
|
3015
3015
|
)
|
|
3016
3016
|
self.assertIsNone(result)
|
|
3017
|
+
|
|
3018
|
+
def test_unset_device(self):
|
|
3019
|
+
testport = network_fakes.create_one_port()
|
|
3020
|
+
self.network_client.find_port = mock.Mock(return_value=testport)
|
|
3021
|
+
arglist = [
|
|
3022
|
+
'--device',
|
|
3023
|
+
testport.name,
|
|
3024
|
+
]
|
|
3025
|
+
verifylist = [
|
|
3026
|
+
('device', True),
|
|
3027
|
+
('port', testport.name),
|
|
3028
|
+
]
|
|
3029
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
3030
|
+
result = self.cmd.take_action(parsed_args)
|
|
3031
|
+
|
|
3032
|
+
self.network_client.update_port.assert_called_once_with(
|
|
3033
|
+
testport,
|
|
3034
|
+
**{'device_id': ''},
|
|
3035
|
+
)
|
|
3036
|
+
self.assertIsNone(result)
|
|
3037
|
+
|
|
3038
|
+
def test_unset_device_owner(self):
|
|
3039
|
+
testport = network_fakes.create_one_port()
|
|
3040
|
+
self.network_client.find_port = mock.Mock(return_value=testport)
|
|
3041
|
+
arglist = [
|
|
3042
|
+
'--device-owner',
|
|
3043
|
+
testport.name,
|
|
3044
|
+
]
|
|
3045
|
+
verifylist = [
|
|
3046
|
+
('device_owner', True),
|
|
3047
|
+
('port', testport.name),
|
|
3048
|
+
]
|
|
3049
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
3050
|
+
result = self.cmd.take_action(parsed_args)
|
|
3051
|
+
|
|
3052
|
+
self.network_client.update_port.assert_called_once_with(
|
|
3053
|
+
testport,
|
|
3054
|
+
**{'device_owner': ''},
|
|
3055
|
+
)
|
|
3056
|
+
self.assertIsNone(result)
|
|
@@ -42,6 +42,7 @@ class TestCreateSecurityGroupNetwork(TestSecurityGroupNetwork):
|
|
|
42
42
|
'created_at',
|
|
43
43
|
'description',
|
|
44
44
|
'id',
|
|
45
|
+
'is_shared',
|
|
45
46
|
'name',
|
|
46
47
|
'project_id',
|
|
47
48
|
'revision_number',
|
|
@@ -55,6 +56,7 @@ class TestCreateSecurityGroupNetwork(TestSecurityGroupNetwork):
|
|
|
55
56
|
_security_group.created_at,
|
|
56
57
|
_security_group.description,
|
|
57
58
|
_security_group.id,
|
|
59
|
+
_security_group.is_shared,
|
|
58
60
|
_security_group.name,
|
|
59
61
|
_security_group.project_id,
|
|
60
62
|
_security_group.revision_number,
|
|
@@ -274,6 +276,7 @@ class TestListSecurityGroupNetwork(TestSecurityGroupNetwork):
|
|
|
274
276
|
'Description',
|
|
275
277
|
'Project',
|
|
276
278
|
'Tags',
|
|
279
|
+
'Shared',
|
|
277
280
|
)
|
|
278
281
|
|
|
279
282
|
data = []
|
|
@@ -285,6 +288,7 @@ class TestListSecurityGroupNetwork(TestSecurityGroupNetwork):
|
|
|
285
288
|
grp.description,
|
|
286
289
|
grp.project_id,
|
|
287
290
|
grp.tags,
|
|
291
|
+
grp.is_shared,
|
|
288
292
|
)
|
|
289
293
|
)
|
|
290
294
|
|
|
@@ -524,6 +528,7 @@ class TestShowSecurityGroupNetwork(TestSecurityGroupNetwork):
|
|
|
524
528
|
'created_at',
|
|
525
529
|
'description',
|
|
526
530
|
'id',
|
|
531
|
+
'is_shared',
|
|
527
532
|
'name',
|
|
528
533
|
'project_id',
|
|
529
534
|
'revision_number',
|
|
@@ -537,6 +542,7 @@ class TestShowSecurityGroupNetwork(TestSecurityGroupNetwork):
|
|
|
537
542
|
_security_group.created_at,
|
|
538
543
|
_security_group.description,
|
|
539
544
|
_security_group.id,
|
|
545
|
+
_security_group.is_shared,
|
|
540
546
|
_security_group.name,
|
|
541
547
|
_security_group.project_id,
|
|
542
548
|
_security_group.revision_number,
|
|
@@ -1251,6 +1251,55 @@ class TestListSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
|
1251
1251
|
self.assertEqual(self.expected_columns_no_group, columns)
|
|
1252
1252
|
self.assertEqual(self.expected_data_no_group, list(data))
|
|
1253
1253
|
|
|
1254
|
+
def test_list_with_project(self):
|
|
1255
|
+
project = identity_fakes.FakeProject.create_one_project()
|
|
1256
|
+
self._security_group_rule_tcp.port_range_min = 80
|
|
1257
|
+
self.projects_mock.get.return_value = project
|
|
1258
|
+
|
|
1259
|
+
arglist = [
|
|
1260
|
+
'--project',
|
|
1261
|
+
project.id,
|
|
1262
|
+
]
|
|
1263
|
+
verifylist = [
|
|
1264
|
+
('project', project.id),
|
|
1265
|
+
]
|
|
1266
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
1267
|
+
|
|
1268
|
+
columns, data = self.cmd.take_action(parsed_args)
|
|
1269
|
+
filters = {'tenant_id': project.id, 'project_id': project.id}
|
|
1270
|
+
|
|
1271
|
+
self.network_client.security_group_rules.assert_called_once_with(
|
|
1272
|
+
**filters
|
|
1273
|
+
)
|
|
1274
|
+
self.assertEqual(self.expected_columns_no_group, columns)
|
|
1275
|
+
self.assertEqual(self.expected_data_no_group, list(data))
|
|
1276
|
+
|
|
1277
|
+
def test_list_with_project_domain(self):
|
|
1278
|
+
project = identity_fakes.FakeProject.create_one_project()
|
|
1279
|
+
self._security_group_rule_tcp.port_range_min = 80
|
|
1280
|
+
self.projects_mock.get.return_value = project
|
|
1281
|
+
|
|
1282
|
+
arglist = [
|
|
1283
|
+
'--project',
|
|
1284
|
+
project.id,
|
|
1285
|
+
'--project-domain',
|
|
1286
|
+
project.domain_id,
|
|
1287
|
+
]
|
|
1288
|
+
verifylist = [
|
|
1289
|
+
('project', project.id),
|
|
1290
|
+
('project_domain', project.domain_id),
|
|
1291
|
+
]
|
|
1292
|
+
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
1293
|
+
|
|
1294
|
+
columns, data = self.cmd.take_action(parsed_args)
|
|
1295
|
+
filters = {'tenant_id': project.id, 'project_id': project.id}
|
|
1296
|
+
|
|
1297
|
+
self.network_client.security_group_rules.assert_called_once_with(
|
|
1298
|
+
**filters
|
|
1299
|
+
)
|
|
1300
|
+
self.assertEqual(self.expected_columns_no_group, columns)
|
|
1301
|
+
self.assertEqual(self.expected_data_no_group, list(data))
|
|
1302
|
+
|
|
1254
1303
|
|
|
1255
1304
|
class TestShowSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
|
|
1256
1305
|
# The security group rule to be shown.
|