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
|
@@ -89,10 +89,6 @@ class TestServerAddFixedIP(TestServer):
|
|
|
89
89
|
# Get the command object to test
|
|
90
90
|
self.cmd = server.AddFixedIP(self.app, None)
|
|
91
91
|
|
|
92
|
-
# Mock network methods
|
|
93
|
-
self.find_network = mock.Mock()
|
|
94
|
-
self.app.client_manager.network.find_network = self.find_network
|
|
95
|
-
|
|
96
92
|
def test_server_add_fixed_ip_pre_v249_with_tag(self):
|
|
97
93
|
self.set_compute_api_version('2.48')
|
|
98
94
|
|
|
@@ -408,7 +404,7 @@ class TestServerAddFloatingIPNetwork(
|
|
|
408
404
|
self.server = compute_fakes.create_one_server()
|
|
409
405
|
self.compute_client.find_server.return_value = self.server
|
|
410
406
|
|
|
411
|
-
self.network_client.update_ip =
|
|
407
|
+
self.network_client.update_ip.return_value = None
|
|
412
408
|
|
|
413
409
|
# Get the command object to test
|
|
414
410
|
self.cmd = server.AddFloatingIP(self.app, None)
|
|
@@ -416,8 +412,8 @@ class TestServerAddFloatingIPNetwork(
|
|
|
416
412
|
def test_server_add_floating_ip(self):
|
|
417
413
|
_port = network_fakes.create_one_port()
|
|
418
414
|
_floating_ip = network_fakes.FakeFloatingIP.create_one_floating_ip()
|
|
419
|
-
self.network_client.find_ip =
|
|
420
|
-
self.network_client.ports =
|
|
415
|
+
self.network_client.find_ip.return_value = _floating_ip
|
|
416
|
+
self.network_client.ports.return_value = [_port]
|
|
421
417
|
arglist = [
|
|
422
418
|
self.server.id,
|
|
423
419
|
_floating_ip['floating_ip_address'],
|
|
@@ -448,8 +444,8 @@ class TestServerAddFloatingIPNetwork(
|
|
|
448
444
|
def test_server_add_floating_ip_no_ports(self):
|
|
449
445
|
floating_ip = network_fakes.FakeFloatingIP.create_one_floating_ip()
|
|
450
446
|
|
|
451
|
-
self.network_client.find_ip =
|
|
452
|
-
self.network_client.ports =
|
|
447
|
+
self.network_client.find_ip.return_value = floating_ip
|
|
448
|
+
self.network_client.ports.return_value = []
|
|
453
449
|
|
|
454
450
|
arglist = [
|
|
455
451
|
self.server.id,
|
|
@@ -479,17 +475,17 @@ class TestServerAddFloatingIPNetwork(
|
|
|
479
475
|
def test_server_add_floating_ip_no_external_gateway(self, success=False):
|
|
480
476
|
_port = network_fakes.create_one_port()
|
|
481
477
|
_floating_ip = network_fakes.FakeFloatingIP.create_one_floating_ip()
|
|
482
|
-
self.network_client.find_ip =
|
|
478
|
+
self.network_client.find_ip.return_value = _floating_ip
|
|
483
479
|
return_value = [_port]
|
|
484
480
|
# In the success case, we'll have two ports, where the first port is
|
|
485
481
|
# not attached to an external gateway but the second port is.
|
|
486
482
|
if success:
|
|
487
483
|
return_value.append(_port)
|
|
488
|
-
self.network_client.ports =
|
|
484
|
+
self.network_client.ports.return_value = return_value
|
|
489
485
|
side_effect = [sdk_exceptions.NotFoundException()]
|
|
490
486
|
if success:
|
|
491
487
|
side_effect.append(None)
|
|
492
|
-
self.network_client.update_ip =
|
|
488
|
+
self.network_client.update_ip.side_effect = side_effect
|
|
493
489
|
arglist = [
|
|
494
490
|
self.server.id,
|
|
495
491
|
_floating_ip['floating_ip_address'],
|
|
@@ -535,8 +531,8 @@ class TestServerAddFloatingIPNetwork(
|
|
|
535
531
|
def test_server_add_floating_ip_with_fixed_ip(self):
|
|
536
532
|
_port = network_fakes.create_one_port()
|
|
537
533
|
_floating_ip = network_fakes.FakeFloatingIP.create_one_floating_ip()
|
|
538
|
-
self.network_client.find_ip =
|
|
539
|
-
self.network_client.ports =
|
|
534
|
+
self.network_client.find_ip.return_value = _floating_ip
|
|
535
|
+
self.network_client.ports.return_value = [_port]
|
|
540
536
|
# The user has specified a fixed ip that matches one of the ports
|
|
541
537
|
# already attached to the instance.
|
|
542
538
|
arglist = [
|
|
@@ -575,8 +571,8 @@ class TestServerAddFloatingIPNetwork(
|
|
|
575
571
|
def test_server_add_floating_ip_with_fixed_ip_no_port_found(self):
|
|
576
572
|
_port = network_fakes.create_one_port()
|
|
577
573
|
_floating_ip = network_fakes.FakeFloatingIP.create_one_floating_ip()
|
|
578
|
-
self.network_client.find_ip =
|
|
579
|
-
self.network_client.ports =
|
|
574
|
+
self.network_client.find_ip.return_value = _floating_ip
|
|
575
|
+
self.network_client.ports.return_value = [_port]
|
|
580
576
|
# The user has specified a fixed ip that does not match any of the
|
|
581
577
|
# ports already attached to the instance.
|
|
582
578
|
nonexistent_ip = '10.0.0.9'
|
|
@@ -614,9 +610,6 @@ class TestServerAddPort(TestServer):
|
|
|
614
610
|
# Get the command object to test
|
|
615
611
|
self.cmd = server.AddPort(self.app, None)
|
|
616
612
|
|
|
617
|
-
self.find_port = mock.Mock()
|
|
618
|
-
self.app.client_manager.network.find_port = self.find_port
|
|
619
|
-
|
|
620
613
|
def _test_server_add_port(self, port_id):
|
|
621
614
|
servers = self.setup_sdk_servers_mock(count=1)
|
|
622
615
|
port = 'fake-port'
|
|
@@ -636,21 +629,23 @@ class TestServerAddPort(TestServer):
|
|
|
636
629
|
self.assertIsNone(result)
|
|
637
630
|
|
|
638
631
|
def test_server_add_port(self):
|
|
639
|
-
self._test_server_add_port(
|
|
640
|
-
|
|
632
|
+
self._test_server_add_port(
|
|
633
|
+
self.network_client.find_port.return_value.id
|
|
634
|
+
)
|
|
635
|
+
self.network_client.find_port.assert_called_once_with(
|
|
641
636
|
'fake-port', ignore_missing=False
|
|
642
637
|
)
|
|
643
638
|
|
|
644
639
|
def test_server_add_port_no_neutron(self):
|
|
645
640
|
self.app.client_manager.network_endpoint_enabled = False
|
|
646
641
|
self._test_server_add_port('fake-port')
|
|
647
|
-
self.find_port.assert_not_called()
|
|
642
|
+
self.network_client.find_port.assert_not_called()
|
|
648
643
|
|
|
649
644
|
def test_server_add_port_with_tag(self):
|
|
650
645
|
self.set_compute_api_version('2.49')
|
|
651
646
|
|
|
652
647
|
servers = self.setup_sdk_servers_mock(count=1)
|
|
653
|
-
self.find_port.return_value.id = 'fake-port'
|
|
648
|
+
self.network_client.find_port.return_value.id = 'fake-port'
|
|
654
649
|
arglist = [
|
|
655
650
|
servers[0].id,
|
|
656
651
|
'fake-port',
|
|
@@ -675,7 +670,7 @@ class TestServerAddPort(TestServer):
|
|
|
675
670
|
self.set_compute_api_version('2.48')
|
|
676
671
|
|
|
677
672
|
servers = self.setup_sdk_servers_mock(count=1)
|
|
678
|
-
self.find_port.return_value.id = 'fake-port'
|
|
673
|
+
self.network_client.find_port.return_value.id = 'fake-port'
|
|
679
674
|
arglist = [
|
|
680
675
|
servers[0].id,
|
|
681
676
|
'fake-port',
|
|
@@ -1038,9 +1033,6 @@ class TestServerAddNetwork(TestServer):
|
|
|
1038
1033
|
# Get the command object to test
|
|
1039
1034
|
self.cmd = server.AddNetwork(self.app, None)
|
|
1040
1035
|
|
|
1041
|
-
self.find_network = mock.Mock()
|
|
1042
|
-
self.app.client_manager.network.find_network = self.find_network
|
|
1043
|
-
|
|
1044
1036
|
def _test_server_add_network(self, net_id):
|
|
1045
1037
|
servers = self.setup_sdk_servers_mock(count=1)
|
|
1046
1038
|
network = 'fake-network'
|
|
@@ -1060,21 +1052,23 @@ class TestServerAddNetwork(TestServer):
|
|
|
1060
1052
|
self.assertIsNone(result)
|
|
1061
1053
|
|
|
1062
1054
|
def test_server_add_network(self):
|
|
1063
|
-
self._test_server_add_network(
|
|
1064
|
-
|
|
1055
|
+
self._test_server_add_network(
|
|
1056
|
+
self.network_client.find_network.return_value.id
|
|
1057
|
+
)
|
|
1058
|
+
self.network_client.find_network.assert_called_once_with(
|
|
1065
1059
|
'fake-network', ignore_missing=False
|
|
1066
1060
|
)
|
|
1067
1061
|
|
|
1068
1062
|
def test_server_add_network_no_neutron(self):
|
|
1069
1063
|
self.app.client_manager.network_endpoint_enabled = False
|
|
1070
1064
|
self._test_server_add_network('fake-network')
|
|
1071
|
-
self.find_network.assert_not_called()
|
|
1065
|
+
self.network_client.find_network.assert_not_called()
|
|
1072
1066
|
|
|
1073
1067
|
def test_server_add_network_with_tag(self):
|
|
1074
1068
|
self.set_compute_api_version('2.49')
|
|
1075
1069
|
|
|
1076
1070
|
servers = self.setup_sdk_servers_mock(count=1)
|
|
1077
|
-
self.find_network.return_value.id = 'fake-network'
|
|
1071
|
+
self.network_client.find_network.return_value.id = 'fake-network'
|
|
1078
1072
|
|
|
1079
1073
|
arglist = [
|
|
1080
1074
|
servers[0].id,
|
|
@@ -1100,7 +1094,7 @@ class TestServerAddNetwork(TestServer):
|
|
|
1100
1094
|
self.set_compute_api_version('2.48')
|
|
1101
1095
|
|
|
1102
1096
|
servers = self.setup_sdk_servers_mock(count=1)
|
|
1103
|
-
self.find_network.return_value.id = 'fake-network'
|
|
1097
|
+
self.network_client.find_network.return_value.id = 'fake-network'
|
|
1104
1098
|
|
|
1105
1099
|
arglist = [
|
|
1106
1100
|
servers[0].id,
|
|
@@ -7351,14 +7345,14 @@ class TestServerRemoveFloatingIPNetwork(network_fakes.TestNetworkV2):
|
|
|
7351
7345
|
def setUp(self):
|
|
7352
7346
|
super().setUp()
|
|
7353
7347
|
|
|
7354
|
-
self.network_client.update_ip =
|
|
7348
|
+
self.network_client.update_ip.return_value = None
|
|
7355
7349
|
|
|
7356
7350
|
# Get the command object to test
|
|
7357
7351
|
self.cmd = server.RemoveFloatingIP(self.app, None)
|
|
7358
7352
|
|
|
7359
7353
|
def test_server_remove_floating_ip_default(self):
|
|
7360
7354
|
_floating_ip = network_fakes.FakeFloatingIP.create_one_floating_ip()
|
|
7361
|
-
self.network_client.find_ip =
|
|
7355
|
+
self.network_client.find_ip.return_value = _floating_ip
|
|
7362
7356
|
arglist = [
|
|
7363
7357
|
'fake_server',
|
|
7364
7358
|
_floating_ip['ip'],
|
|
@@ -7391,9 +7385,6 @@ class TestServerRemovePort(TestServer):
|
|
|
7391
7385
|
# Get the command object to test
|
|
7392
7386
|
self.cmd = server.RemovePort(self.app, None)
|
|
7393
7387
|
|
|
7394
|
-
self.find_port = mock.Mock()
|
|
7395
|
-
self.app.client_manager.network.find_port = self.find_port
|
|
7396
|
-
|
|
7397
7388
|
def _test_server_remove_port(self, port_id):
|
|
7398
7389
|
servers = self.setup_sdk_servers_mock(count=1)
|
|
7399
7390
|
port = 'fake-port'
|
|
@@ -7416,15 +7407,17 @@ class TestServerRemovePort(TestServer):
|
|
|
7416
7407
|
self.assertIsNone(result)
|
|
7417
7408
|
|
|
7418
7409
|
def test_server_remove_port(self):
|
|
7419
|
-
self._test_server_remove_port(
|
|
7420
|
-
|
|
7410
|
+
self._test_server_remove_port(
|
|
7411
|
+
self.network_client.find_port.return_value.id
|
|
7412
|
+
)
|
|
7413
|
+
self.network_client.find_port.assert_called_once_with(
|
|
7421
7414
|
'fake-port', ignore_missing=False
|
|
7422
7415
|
)
|
|
7423
7416
|
|
|
7424
7417
|
def test_server_remove_port_no_neutron(self):
|
|
7425
7418
|
self.app.client_manager.network_endpoint_enabled = False
|
|
7426
7419
|
self._test_server_remove_port('fake-port')
|
|
7427
|
-
self.find_port.assert_not_called()
|
|
7420
|
+
self.network_client.find_port.assert_not_called()
|
|
7428
7421
|
|
|
7429
7422
|
|
|
7430
7423
|
class TestServerRemoveNetwork(TestServer):
|
|
@@ -7434,16 +7427,12 @@ class TestServerRemoveNetwork(TestServer):
|
|
|
7434
7427
|
# Get the command object to test
|
|
7435
7428
|
self.cmd = server.RemoveNetwork(self.app, None)
|
|
7436
7429
|
|
|
7437
|
-
|
|
7438
|
-
self.
|
|
7439
|
-
|
|
7440
|
-
self.find_network = mock.Mock()
|
|
7441
|
-
self.app.client_manager.network.find_network = self.find_network
|
|
7442
|
-
self.compute_client.server_interfaces.return_value = [self.fake_inf]
|
|
7430
|
+
self.fake_if = mock.Mock()
|
|
7431
|
+
self.compute_client.server_interfaces.return_value = [self.fake_if]
|
|
7443
7432
|
|
|
7444
7433
|
def _test_server_remove_network(self, network_id):
|
|
7445
|
-
self.
|
|
7446
|
-
self.
|
|
7434
|
+
self.fake_if.net_id = network_id
|
|
7435
|
+
self.fake_if.port_id = 'fake-port'
|
|
7447
7436
|
servers = self.setup_sdk_servers_mock(count=1)
|
|
7448
7437
|
network = 'fake-network'
|
|
7449
7438
|
|
|
@@ -7468,15 +7457,17 @@ class TestServerRemoveNetwork(TestServer):
|
|
|
7468
7457
|
self.assertIsNone(result)
|
|
7469
7458
|
|
|
7470
7459
|
def test_server_remove_network(self):
|
|
7471
|
-
self._test_server_remove_network(
|
|
7472
|
-
|
|
7460
|
+
self._test_server_remove_network(
|
|
7461
|
+
self.network_client.find_network.return_value.id
|
|
7462
|
+
)
|
|
7463
|
+
self.network_client.find_network.assert_called_once_with(
|
|
7473
7464
|
'fake-network', ignore_missing=False
|
|
7474
7465
|
)
|
|
7475
7466
|
|
|
7476
7467
|
def test_server_remove_network_no_neutron(self):
|
|
7477
7468
|
self.app.client_manager.network_endpoint_enabled = False
|
|
7478
7469
|
self._test_server_remove_network('fake-network')
|
|
7479
|
-
self.find_network.assert_not_called()
|
|
7470
|
+
self.network_client.find_network.assert_not_called()
|
|
7480
7471
|
|
|
7481
7472
|
|
|
7482
7473
|
class TestServerRemoveSecurityGroup(TestServer):
|
|
@@ -31,18 +31,6 @@ from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class TestApplicationCredentialCreate(identity_fakes.TestIdentityv3):
|
|
34
|
-
columns = (
|
|
35
|
-
'id',
|
|
36
|
-
'name',
|
|
37
|
-
'description',
|
|
38
|
-
'project_id',
|
|
39
|
-
'roles',
|
|
40
|
-
'unrestricted',
|
|
41
|
-
'access_rules',
|
|
42
|
-
'expires_at',
|
|
43
|
-
'secret',
|
|
44
|
-
)
|
|
45
|
-
|
|
46
34
|
def setUp(self):
|
|
47
35
|
super().setUp()
|
|
48
36
|
|
|
@@ -52,12 +40,25 @@ class TestApplicationCredentialCreate(identity_fakes.TestIdentityv3):
|
|
|
52
40
|
roles=[],
|
|
53
41
|
)
|
|
54
42
|
|
|
55
|
-
self.
|
|
43
|
+
self.columns = (
|
|
44
|
+
'ID',
|
|
45
|
+
'Name',
|
|
46
|
+
'Description',
|
|
47
|
+
'Project ID',
|
|
48
|
+
'Roles',
|
|
49
|
+
'Unrestricted',
|
|
50
|
+
'Access Rules',
|
|
51
|
+
'Expires At',
|
|
52
|
+
'Secret',
|
|
53
|
+
)
|
|
54
|
+
self.data = (
|
|
56
55
|
self.application_credential.id,
|
|
57
56
|
self.application_credential.name,
|
|
58
57
|
self.application_credential.description,
|
|
59
58
|
self.application_credential.project_id,
|
|
60
|
-
|
|
59
|
+
application_credential.RolesColumn(
|
|
60
|
+
self.application_credential.roles
|
|
61
|
+
),
|
|
61
62
|
self.application_credential.unrestricted,
|
|
62
63
|
self.application_credential.access_rules,
|
|
63
64
|
self.application_credential.expires_at,
|
|
@@ -101,7 +102,7 @@ class TestApplicationCredentialCreate(identity_fakes.TestIdentityv3):
|
|
|
101
102
|
)
|
|
102
103
|
|
|
103
104
|
self.assertEqual(self.columns, columns)
|
|
104
|
-
self.assertEqual(self.
|
|
105
|
+
self.assertEqual(self.data, data)
|
|
105
106
|
|
|
106
107
|
def test_application_credential_create_with_options(self):
|
|
107
108
|
name = self.application_credential.name
|
|
@@ -147,7 +148,7 @@ class TestApplicationCredentialCreate(identity_fakes.TestIdentityv3):
|
|
|
147
148
|
)
|
|
148
149
|
|
|
149
150
|
self.assertEqual(self.columns, columns)
|
|
150
|
-
self.assertEqual(self.
|
|
151
|
+
self.assertEqual(self.data, data)
|
|
151
152
|
|
|
152
153
|
def test_application_credential_create_with_access_rules_string(self):
|
|
153
154
|
name = self.application_credential.name
|
|
@@ -191,7 +192,7 @@ class TestApplicationCredentialCreate(identity_fakes.TestIdentityv3):
|
|
|
191
192
|
)
|
|
192
193
|
|
|
193
194
|
self.assertEqual(self.columns, columns)
|
|
194
|
-
self.assertEqual(self.
|
|
195
|
+
self.assertEqual(self.data, data)
|
|
195
196
|
|
|
196
197
|
@mock.patch('openstackclient.identity.v3.application_credential.json.load')
|
|
197
198
|
@mock.patch('openstackclient.identity.v3.application_credential.open')
|
|
@@ -231,7 +232,7 @@ class TestApplicationCredentialCreate(identity_fakes.TestIdentityv3):
|
|
|
231
232
|
)
|
|
232
233
|
|
|
233
234
|
self.assertEqual(self.columns, columns)
|
|
234
|
-
self.assertEqual(self.
|
|
235
|
+
self.assertEqual(self.data, data)
|
|
235
236
|
|
|
236
237
|
|
|
237
238
|
class TestApplicationCredentialDelete(identity_fakes.TestIdentityv3):
|
|
@@ -345,7 +346,9 @@ class TestApplicationCredentialList(identity_fakes.TestIdentityv3):
|
|
|
345
346
|
self.application_credential.name,
|
|
346
347
|
self.application_credential.description,
|
|
347
348
|
self.application_credential.project_id,
|
|
348
|
-
|
|
349
|
+
application_credential.RolesColumn(
|
|
350
|
+
self.application_credential.roles
|
|
351
|
+
),
|
|
349
352
|
self.application_credential.unrestricted,
|
|
350
353
|
self.application_credential.access_rules,
|
|
351
354
|
self.application_credential.expires_at,
|
|
@@ -408,6 +411,29 @@ class TestApplicationCredentialShow(identity_fakes.TestIdentityv3):
|
|
|
408
411
|
self.application_credential
|
|
409
412
|
)
|
|
410
413
|
|
|
414
|
+
self.columns = (
|
|
415
|
+
'ID',
|
|
416
|
+
'Name',
|
|
417
|
+
'Description',
|
|
418
|
+
'Project ID',
|
|
419
|
+
'Roles',
|
|
420
|
+
'Unrestricted',
|
|
421
|
+
'Access Rules',
|
|
422
|
+
'Expires At',
|
|
423
|
+
)
|
|
424
|
+
self.data = (
|
|
425
|
+
self.application_credential.id,
|
|
426
|
+
self.application_credential.name,
|
|
427
|
+
self.application_credential.description,
|
|
428
|
+
self.application_credential.project_id,
|
|
429
|
+
application_credential.RolesColumn(
|
|
430
|
+
self.application_credential.roles
|
|
431
|
+
),
|
|
432
|
+
self.application_credential.unrestricted,
|
|
433
|
+
self.application_credential.access_rules,
|
|
434
|
+
self.application_credential.expires_at,
|
|
435
|
+
)
|
|
436
|
+
|
|
411
437
|
# Get the command object to test
|
|
412
438
|
self.cmd = application_credential.ShowApplicationCredential(
|
|
413
439
|
self.app, None
|
|
@@ -434,25 +460,5 @@ class TestApplicationCredentialShow(identity_fakes.TestIdentityv3):
|
|
|
434
460
|
user_id, self.application_credential.id
|
|
435
461
|
)
|
|
436
462
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
'name',
|
|
440
|
-
'description',
|
|
441
|
-
'project_id',
|
|
442
|
-
'roles',
|
|
443
|
-
'unrestricted',
|
|
444
|
-
'access_rules',
|
|
445
|
-
'expires_at',
|
|
446
|
-
)
|
|
447
|
-
self.assertEqual(collist, columns)
|
|
448
|
-
datalist = (
|
|
449
|
-
self.application_credential.id,
|
|
450
|
-
self.application_credential.name,
|
|
451
|
-
self.application_credential.description,
|
|
452
|
-
self.application_credential.project_id,
|
|
453
|
-
self.application_credential.roles,
|
|
454
|
-
self.application_credential.unrestricted,
|
|
455
|
-
self.application_credential.access_rules,
|
|
456
|
-
self.application_credential.expires_at,
|
|
457
|
-
)
|
|
458
|
-
self.assertEqual(datalist, data)
|
|
463
|
+
self.assertEqual(self.columns, columns)
|
|
464
|
+
self.assertEqual(self.data, data)
|
|
@@ -186,7 +186,7 @@ class TestDomainCreate(identity_fakes.TestIdentityv3):
|
|
|
186
186
|
self.domain.name,
|
|
187
187
|
]
|
|
188
188
|
verifylist = [
|
|
189
|
-
('
|
|
189
|
+
('immutable', False),
|
|
190
190
|
('name', self.domain.name),
|
|
191
191
|
]
|
|
192
192
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
|
@@ -461,7 +461,7 @@ class TestDomainSet(identity_fakes.TestIdentityv3):
|
|
|
461
461
|
self.domain.id,
|
|
462
462
|
]
|
|
463
463
|
verifylist = [
|
|
464
|
-
('
|
|
464
|
+
('immutable', False),
|
|
465
465
|
('domain', self.domain.id),
|
|
466
466
|
]
|
|
467
467
|
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|