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
|
@@ -20,7 +20,8 @@ class IPAvailabilityTests(common.NetworkTests):
|
|
|
20
20
|
|
|
21
21
|
@classmethod
|
|
22
22
|
def setUpClass(cls):
|
|
23
|
-
|
|
23
|
+
super().setUpClass()
|
|
24
|
+
|
|
24
25
|
if cls.haz_network:
|
|
25
26
|
cls.NAME = uuid.uuid4().hex
|
|
26
27
|
cls.NETWORK_NAME = uuid.uuid4().hex
|
|
@@ -49,13 +50,7 @@ class IPAvailabilityTests(common.NetworkTests):
|
|
|
49
50
|
cls.assertOutput('', raw_subnet)
|
|
50
51
|
cls.assertOutput('', raw_network)
|
|
51
52
|
finally:
|
|
52
|
-
super(
|
|
53
|
-
|
|
54
|
-
def setUp(self):
|
|
55
|
-
super(IPAvailabilityTests, self).setUp()
|
|
56
|
-
# Nothing in this class works with Nova Network
|
|
57
|
-
if not self.haz_network:
|
|
58
|
-
self.skipTest("No Network service present")
|
|
53
|
+
super().tearDownClass()
|
|
59
54
|
|
|
60
55
|
def test_ip_availability_list(self):
|
|
61
56
|
"""Test ip availability list"""
|
|
@@ -18,12 +18,11 @@ from openstackclient.tests.functional.network.v2 import common
|
|
|
18
18
|
|
|
19
19
|
class L3ConntrackHelperTests(common.NetworkTests):
|
|
20
20
|
def setUp(self):
|
|
21
|
-
super(
|
|
22
|
-
|
|
23
|
-
if not self.haz_network:
|
|
24
|
-
self.skipTest("No Network service present")
|
|
21
|
+
super().setUp()
|
|
22
|
+
|
|
25
23
|
if not self.is_extension_enabled('l3-conntrack-helper'):
|
|
26
24
|
self.skipTest("No l3-conntrack-helper extension present")
|
|
25
|
+
|
|
27
26
|
if not self.is_extension_enabled('expose-l3-conntrack-helper'):
|
|
28
27
|
self.skipTest("No expose-l3-conntrack-helper extension present")
|
|
29
28
|
|
|
@@ -21,10 +21,8 @@ class LocalIPTests(common.NetworkTests):
|
|
|
21
21
|
"""Functional tests for local IP"""
|
|
22
22
|
|
|
23
23
|
def setUp(self):
|
|
24
|
-
super(
|
|
25
|
-
|
|
26
|
-
if not self.haz_network:
|
|
27
|
-
self.skipTest("No Network service present")
|
|
24
|
+
super().setUp()
|
|
25
|
+
|
|
28
26
|
if not self.is_extension_enabled('local-ip'):
|
|
29
27
|
self.skipTest("No local-ip extension present")
|
|
30
28
|
|
|
@@ -20,12 +20,6 @@ class NetworkTests(common.NetworkTagTests):
|
|
|
20
20
|
|
|
21
21
|
base_command = 'network'
|
|
22
22
|
|
|
23
|
-
def setUp(self):
|
|
24
|
-
super(NetworkTests, self).setUp()
|
|
25
|
-
# Nothing in this class works with Nova Network
|
|
26
|
-
if not self.haz_network:
|
|
27
|
-
self.skipTest("No Network service present")
|
|
28
|
-
|
|
29
23
|
def test_network_create_compute(self):
|
|
30
24
|
"""Test Nova-net create options, delete"""
|
|
31
25
|
if self.haz_network:
|
|
@@ -329,11 +323,25 @@ class NetworkTests(common.NetworkTagTests):
|
|
|
329
323
|
def test_network_dhcp_agent(self):
|
|
330
324
|
if not self.haz_network:
|
|
331
325
|
self.skipTest("No Network service present")
|
|
326
|
+
|
|
327
|
+
if not self.is_extension_enabled("agent"):
|
|
328
|
+
self.skipTest("No dhcp_agent_scheduler extension present")
|
|
329
|
+
|
|
332
330
|
if not self.is_extension_enabled("dhcp_agent_scheduler"):
|
|
333
331
|
self.skipTest("No dhcp_agent_scheduler extension present")
|
|
334
332
|
|
|
333
|
+
# Get DHCP Agent ID
|
|
334
|
+
cmd_output = self.openstack(
|
|
335
|
+
'network agent list --agent-type dhcp',
|
|
336
|
+
parse_output=True,
|
|
337
|
+
)
|
|
338
|
+
if not cmd_output:
|
|
339
|
+
self.skipTest("No agents with type=dhcp available")
|
|
340
|
+
|
|
341
|
+
agent_id = cmd_output[0]['ID']
|
|
342
|
+
|
|
335
343
|
name1 = uuid.uuid4().hex
|
|
336
|
-
|
|
344
|
+
cmd_output = self.openstack(
|
|
337
345
|
'network create --description aaaa %s' % name1,
|
|
338
346
|
parse_output=True,
|
|
339
347
|
)
|
|
@@ -341,14 +349,7 @@ class NetworkTests(common.NetworkTagTests):
|
|
|
341
349
|
self.addCleanup(self.openstack, 'network delete %s' % name1)
|
|
342
350
|
|
|
343
351
|
# Get network ID
|
|
344
|
-
network_id =
|
|
345
|
-
|
|
346
|
-
# Get DHCP Agent ID
|
|
347
|
-
cmd_output2 = self.openstack(
|
|
348
|
-
'network agent list --agent-type dhcp',
|
|
349
|
-
parse_output=True,
|
|
350
|
-
)
|
|
351
|
-
agent_id = cmd_output2[0]['ID']
|
|
352
|
+
network_id = cmd_output['id']
|
|
352
353
|
|
|
353
354
|
# Add Agent to Network
|
|
354
355
|
self.openstack(
|
|
@@ -356,7 +357,7 @@ class NetworkTests(common.NetworkTagTests):
|
|
|
356
357
|
)
|
|
357
358
|
|
|
358
359
|
# Test network list --agent
|
|
359
|
-
|
|
360
|
+
cmd_output = self.openstack(
|
|
360
361
|
'network list --agent %s' % agent_id,
|
|
361
362
|
parse_output=True,
|
|
362
363
|
)
|
|
@@ -369,7 +370,7 @@ class NetworkTests(common.NetworkTagTests):
|
|
|
369
370
|
)
|
|
370
371
|
|
|
371
372
|
# Assert
|
|
372
|
-
col_name = [x["ID"] for x in
|
|
373
|
+
col_name = [x["ID"] for x in cmd_output]
|
|
373
374
|
self.assertIn(network_id, col_name)
|
|
374
375
|
|
|
375
376
|
def test_network_set(self):
|
|
@@ -15,14 +15,14 @@ import uuid
|
|
|
15
15
|
from openstackclient.tests.functional.network.v2 import common
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class
|
|
18
|
+
class TestAgent(common.NetworkTests):
|
|
19
19
|
"""Functional tests for network agent"""
|
|
20
20
|
|
|
21
21
|
def setUp(self):
|
|
22
|
-
super(
|
|
23
|
-
|
|
24
|
-
if not self.
|
|
25
|
-
self.skipTest("No
|
|
22
|
+
super().setUp()
|
|
23
|
+
|
|
24
|
+
if not self.is_extension_enabled("agent"):
|
|
25
|
+
self.skipTest("No agent extension present")
|
|
26
26
|
|
|
27
27
|
def test_network_agent_list_show_set(self):
|
|
28
28
|
"""Test network agent list, set, show commands
|
|
@@ -85,14 +85,14 @@ class NetworkAgentTests(common.NetworkTests):
|
|
|
85
85
|
)
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
class
|
|
88
|
+
class TestAgentList(common.NetworkTests):
|
|
89
89
|
"""Functional test for network agent"""
|
|
90
90
|
|
|
91
91
|
def setUp(self):
|
|
92
|
-
super(
|
|
93
|
-
|
|
94
|
-
if not self.
|
|
95
|
-
self.skipTest("No
|
|
92
|
+
super().setUp()
|
|
93
|
+
|
|
94
|
+
if not self.is_extension_enabled("agent"):
|
|
95
|
+
self.skipTest("No agent extension present")
|
|
96
96
|
|
|
97
97
|
def test_network_dhcp_agent_list(self):
|
|
98
98
|
"""Test network agent list"""
|
|
@@ -100,8 +100,18 @@ class NetworkAgentListTests(common.NetworkTests):
|
|
|
100
100
|
if not self.is_extension_enabled("dhcp_agent_scheduler"):
|
|
101
101
|
self.skipTest("No dhcp_agent_scheduler extension present")
|
|
102
102
|
|
|
103
|
+
# Get DHCP Agent ID
|
|
104
|
+
cmd_output = self.openstack(
|
|
105
|
+
'network agent list --agent-type dhcp',
|
|
106
|
+
parse_output=True,
|
|
107
|
+
)
|
|
108
|
+
if not cmd_output:
|
|
109
|
+
self.skipTest("No agents with type=dhcp available")
|
|
110
|
+
|
|
111
|
+
agent_id = cmd_output[0]['ID']
|
|
112
|
+
|
|
103
113
|
name1 = uuid.uuid4().hex
|
|
104
|
-
|
|
114
|
+
cmd_output = self.openstack(
|
|
105
115
|
'network create --description aaaa %s' % name1,
|
|
106
116
|
parse_output=True,
|
|
107
117
|
)
|
|
@@ -109,14 +119,7 @@ class NetworkAgentListTests(common.NetworkTests):
|
|
|
109
119
|
self.addCleanup(self.openstack, 'network delete %s' % name1)
|
|
110
120
|
|
|
111
121
|
# Get network ID
|
|
112
|
-
network_id =
|
|
113
|
-
|
|
114
|
-
# Get DHCP Agent ID
|
|
115
|
-
cmd_output2 = self.openstack(
|
|
116
|
-
'network agent list --agent-type dhcp',
|
|
117
|
-
parse_output=True,
|
|
118
|
-
)
|
|
119
|
-
agent_id = cmd_output2[0]['ID']
|
|
122
|
+
network_id = cmd_output['id']
|
|
120
123
|
|
|
121
124
|
# Add Agent to Network
|
|
122
125
|
self.openstack(
|
|
@@ -124,7 +127,7 @@ class NetworkAgentListTests(common.NetworkTests):
|
|
|
124
127
|
)
|
|
125
128
|
|
|
126
129
|
# Test network agent list --network
|
|
127
|
-
|
|
130
|
+
cmd_output = self.openstack(
|
|
128
131
|
'network agent list --network %s' % network_id,
|
|
129
132
|
parse_output=True,
|
|
130
133
|
)
|
|
@@ -137,7 +140,7 @@ class NetworkAgentListTests(common.NetworkTests):
|
|
|
137
140
|
)
|
|
138
141
|
|
|
139
142
|
# Assert
|
|
140
|
-
col_name = [x["ID"] for x in
|
|
143
|
+
col_name = [x["ID"] for x in cmd_output]
|
|
141
144
|
self.assertIn(agent_id, col_name)
|
|
142
145
|
|
|
143
146
|
def test_network_agent_list_routers(self):
|
|
@@ -18,12 +18,6 @@ from openstackclient.tests.functional.network.v2 import common
|
|
|
18
18
|
class NetworkFlavorTests(common.NetworkTests):
|
|
19
19
|
"""Functional tests for network flavor"""
|
|
20
20
|
|
|
21
|
-
def setUp(self):
|
|
22
|
-
super(NetworkFlavorTests, self).setUp()
|
|
23
|
-
# Nothing in this class works with Nova Network
|
|
24
|
-
if not self.haz_network:
|
|
25
|
-
self.skipTest("No Network service present")
|
|
26
|
-
|
|
27
21
|
def test_network_flavor_add_remove_profile(self):
|
|
28
22
|
"""Test add and remove network flavor to/from profile"""
|
|
29
23
|
# Create Flavor
|
|
@@ -19,12 +19,6 @@ class NetworkFlavorProfileTests(common.NetworkTests):
|
|
|
19
19
|
DESCRIPTION = 'fakedescription'
|
|
20
20
|
METAINFO = 'Extrainfo'
|
|
21
21
|
|
|
22
|
-
def setUp(self):
|
|
23
|
-
super(NetworkFlavorProfileTests, self).setUp()
|
|
24
|
-
# Nothing in this class works with Nova Network
|
|
25
|
-
if not self.haz_network:
|
|
26
|
-
self.skipTest("No Network service present")
|
|
27
|
-
|
|
28
22
|
def test_network_flavor_profile_create(self):
|
|
29
23
|
json_output = self.openstack(
|
|
30
24
|
'network flavor profile create '
|
|
@@ -21,17 +21,17 @@ from openstackclient.tests.functional.network.v2 import common
|
|
|
21
21
|
class TestMeter(common.NetworkTests):
|
|
22
22
|
"""Functional tests for network meter"""
|
|
23
23
|
|
|
24
|
+
def setUp(self):
|
|
25
|
+
super().setUp()
|
|
26
|
+
|
|
27
|
+
if not self.is_extension_enabled("metering"):
|
|
28
|
+
self.skipTest("No metering extension present")
|
|
29
|
+
|
|
24
30
|
# NOTE(dtroyer): Do not normalize the setup and teardown of the resource
|
|
25
31
|
# creation and deletion. Little is gained when each test
|
|
26
32
|
# has its own needs and there are collisions when running
|
|
27
33
|
# tests in parallel.
|
|
28
34
|
|
|
29
|
-
def setUp(self):
|
|
30
|
-
super(TestMeter, self).setUp()
|
|
31
|
-
# Nothing in this class works with Nova Network
|
|
32
|
-
if not self.haz_network:
|
|
33
|
-
self.skipTest("No Network service present")
|
|
34
|
-
|
|
35
35
|
def test_meter_delete(self):
|
|
36
36
|
"""Test create, delete multiple"""
|
|
37
37
|
name1 = uuid.uuid4().hex
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# License for the specific language governing permissions and limitations
|
|
14
14
|
# under the License.
|
|
15
15
|
|
|
16
|
+
import unittest
|
|
16
17
|
import uuid
|
|
17
18
|
|
|
18
19
|
from openstackclient.tests.functional.network.v2 import common
|
|
@@ -26,7 +27,11 @@ class TestMeterRule(common.NetworkTests):
|
|
|
26
27
|
|
|
27
28
|
@classmethod
|
|
28
29
|
def setUpClass(cls):
|
|
29
|
-
|
|
30
|
+
super().setUpClass()
|
|
31
|
+
|
|
32
|
+
if not cls.is_extension_enabled("metering"):
|
|
33
|
+
raise unittest.SkipTest("No metering extension present")
|
|
34
|
+
|
|
30
35
|
if cls.haz_network:
|
|
31
36
|
cls.METER_NAME = uuid.uuid4().hex
|
|
32
37
|
|
|
@@ -45,13 +50,7 @@ class TestMeterRule(common.NetworkTests):
|
|
|
45
50
|
)
|
|
46
51
|
cls.assertOutput('', raw_output)
|
|
47
52
|
finally:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def setUp(self):
|
|
51
|
-
super(TestMeterRule, self).setUp()
|
|
52
|
-
# Nothing in this class works with Nova Network
|
|
53
|
-
if not self.haz_network:
|
|
54
|
-
self.skipTest("No Network service present")
|
|
53
|
+
super().tearDownClass()
|
|
55
54
|
|
|
56
55
|
def test_meter_rule_delete(self):
|
|
57
56
|
"""test create, delete"""
|
|
@@ -16,9 +16,7 @@ from openstackclient.tests.functional.network.v2 import common
|
|
|
16
16
|
class L3NDPProxyTests(common.NetworkTests):
|
|
17
17
|
def setUp(self):
|
|
18
18
|
super().setUp()
|
|
19
|
-
|
|
20
|
-
if not self.haz_network:
|
|
21
|
-
self.skipTest("No Network service present")
|
|
19
|
+
|
|
22
20
|
if not self.is_extension_enabled('l3-ndp-proxy'):
|
|
23
21
|
self.skipTest("No l3-ndp-proxy extension present")
|
|
24
22
|
|
|
@@ -22,10 +22,10 @@ class NetworkQosPolicyTests(common.NetworkTests):
|
|
|
22
22
|
"""Functional tests for QoS policy"""
|
|
23
23
|
|
|
24
24
|
def setUp(self):
|
|
25
|
-
super(
|
|
26
|
-
|
|
27
|
-
if not self.
|
|
28
|
-
self.skipTest("No
|
|
25
|
+
super().setUp()
|
|
26
|
+
|
|
27
|
+
if not self.is_extension_enabled("qos"):
|
|
28
|
+
self.skipTest("No qos extension present")
|
|
29
29
|
|
|
30
30
|
def test_qos_rule_create_delete(self):
|
|
31
31
|
# This is to check the output of qos policy delete
|
|
@@ -18,14 +18,19 @@ import uuid
|
|
|
18
18
|
from openstackclient.tests.functional.network.v2 import common
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
class
|
|
21
|
+
class NetworkQosTests(common.NetworkTests):
|
|
22
|
+
def setUp(self):
|
|
23
|
+
super().setUp()
|
|
24
|
+
|
|
25
|
+
if not self.is_extension_enabled("qos"):
|
|
26
|
+
self.skipTest("No qos extension present")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class NetworkQosRuleTestsMinimumBandwidth(NetworkQosTests):
|
|
22
30
|
"""Functional tests for QoS minimum bandwidth rule"""
|
|
23
31
|
|
|
24
32
|
def setUp(self):
|
|
25
|
-
super(
|
|
26
|
-
# Nothing in this class works with Nova Network
|
|
27
|
-
if not self.haz_network:
|
|
28
|
-
self.skipTest("No Network service present")
|
|
33
|
+
super().setUp()
|
|
29
34
|
|
|
30
35
|
self.QOS_POLICY_NAME = 'qos_policy_%s' % uuid.uuid4().hex
|
|
31
36
|
|
|
@@ -96,14 +101,11 @@ class NetworkQosRuleTestsMinimumBandwidth(common.NetworkTests):
|
|
|
96
101
|
self.assertEqual(7500, cmd_output['min_kbps'])
|
|
97
102
|
|
|
98
103
|
|
|
99
|
-
class NetworkQosRuleTestsMinimumPacketRate(
|
|
104
|
+
class NetworkQosRuleTestsMinimumPacketRate(NetworkQosTests):
|
|
100
105
|
"""Functional tests for QoS minimum packet rate rule"""
|
|
101
106
|
|
|
102
107
|
def setUp(self):
|
|
103
|
-
super(
|
|
104
|
-
# Nothing in this class works with Nova Network
|
|
105
|
-
if not self.haz_network:
|
|
106
|
-
self.skipTest("No Network service present")
|
|
108
|
+
super().setUp()
|
|
107
109
|
|
|
108
110
|
self.QOS_POLICY_NAME = 'qos_policy_%s' % uuid.uuid4().hex
|
|
109
111
|
|
|
@@ -175,14 +177,11 @@ class NetworkQosRuleTestsMinimumPacketRate(common.NetworkTests):
|
|
|
175
177
|
self.assertEqual('any', cmd_output['direction'])
|
|
176
178
|
|
|
177
179
|
|
|
178
|
-
class NetworkQosRuleTestsDSCPMarking(
|
|
180
|
+
class NetworkQosRuleTestsDSCPMarking(NetworkQosTests):
|
|
179
181
|
"""Functional tests for QoS DSCP marking rule"""
|
|
180
182
|
|
|
181
183
|
def setUp(self):
|
|
182
|
-
super(
|
|
183
|
-
# Nothing in this class works with Nova Network
|
|
184
|
-
if not self.haz_network:
|
|
185
|
-
self.skipTest("No Network service present")
|
|
184
|
+
super().setUp()
|
|
186
185
|
|
|
187
186
|
self.QOS_POLICY_NAME = 'qos_policy_%s' % uuid.uuid4().hex
|
|
188
187
|
self.openstack('network qos policy create %s' % self.QOS_POLICY_NAME)
|
|
@@ -250,14 +249,11 @@ class NetworkQosRuleTestsDSCPMarking(common.NetworkTests):
|
|
|
250
249
|
self.assertEqual(32, cmd_output['dscp_mark'])
|
|
251
250
|
|
|
252
251
|
|
|
253
|
-
class NetworkQosRuleTestsBandwidthLimit(
|
|
252
|
+
class NetworkQosRuleTestsBandwidthLimit(NetworkQosTests):
|
|
254
253
|
"""Functional tests for QoS bandwidth limit rule"""
|
|
255
254
|
|
|
256
255
|
def setUp(self):
|
|
257
|
-
super(
|
|
258
|
-
# Nothing in this class works with Nova Network
|
|
259
|
-
if not self.haz_network:
|
|
260
|
-
self.skipTest("No Network service present")
|
|
256
|
+
super().setUp()
|
|
261
257
|
|
|
262
258
|
self.QOS_POLICY_NAME = 'qos_policy_%s' % uuid.uuid4().hex
|
|
263
259
|
self.openstack('network qos policy create %s' % self.QOS_POLICY_NAME)
|
|
@@ -30,10 +30,10 @@ class NetworkQosRuleTypeTests(common.NetworkTests):
|
|
|
30
30
|
]
|
|
31
31
|
|
|
32
32
|
def setUp(self):
|
|
33
|
-
super(
|
|
34
|
-
|
|
35
|
-
if not self.
|
|
36
|
-
self.skipTest("No
|
|
33
|
+
super().setUp()
|
|
34
|
+
|
|
35
|
+
if not self.is_extension_enabled("qos"):
|
|
36
|
+
self.skipTest("No qos extension present")
|
|
37
37
|
|
|
38
38
|
def test_qos_rule_type_list(self):
|
|
39
39
|
cmd_output = self.openstack(
|
|
@@ -24,10 +24,7 @@ class NetworkRBACTests(common.NetworkTests):
|
|
|
24
24
|
FIELDS = ['id']
|
|
25
25
|
|
|
26
26
|
def setUp(self):
|
|
27
|
-
super(
|
|
28
|
-
# Nothing in this class works with Nova Network
|
|
29
|
-
if not self.haz_network:
|
|
30
|
-
self.skipTest("No Network service present")
|
|
27
|
+
super().setUp()
|
|
31
28
|
|
|
32
29
|
self.NET_NAME = uuid.uuid4().hex
|
|
33
30
|
self.PROJECT_NAME = uuid.uuid4().hex
|
|
@@ -20,7 +20,7 @@ class NetworkSegmentTests(common.NetworkTests):
|
|
|
20
20
|
|
|
21
21
|
@classmethod
|
|
22
22
|
def setUpClass(cls):
|
|
23
|
-
|
|
23
|
+
super().setUpClass()
|
|
24
24
|
if cls.haz_network:
|
|
25
25
|
cls.NETWORK_NAME = uuid.uuid4().hex
|
|
26
26
|
cls.PHYSICAL_NETWORK_NAME = uuid.uuid4().hex
|
|
@@ -42,13 +42,13 @@ class NetworkSegmentTests(common.NetworkTests):
|
|
|
42
42
|
)
|
|
43
43
|
cls.assertOutput('', raw_output)
|
|
44
44
|
finally:
|
|
45
|
-
super(
|
|
45
|
+
super().tearDownClass()
|
|
46
46
|
|
|
47
47
|
def setUp(self):
|
|
48
|
-
super(
|
|
49
|
-
|
|
50
|
-
if not self.
|
|
51
|
-
self.skipTest("No
|
|
48
|
+
super().setUp()
|
|
49
|
+
|
|
50
|
+
if not self.is_extension_enabled("segment"):
|
|
51
|
+
self.skipTest("No segment extension present")
|
|
52
52
|
|
|
53
53
|
def test_network_segment_create_delete(self):
|
|
54
54
|
name = uuid.uuid4().hex
|
|
@@ -116,12 +116,7 @@ class NetworkSegmentTests(common.NetworkTests):
|
|
|
116
116
|
)
|
|
117
117
|
self.addCleanup(self.openstack, 'network segment delete ' + name)
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
"extension list ",
|
|
121
|
-
parse_output=True,
|
|
122
|
-
)
|
|
123
|
-
ext_alias = [x["Alias"] for x in extension_output]
|
|
124
|
-
if "standard-attr-segment" in ext_alias:
|
|
119
|
+
if self.is_extension_enabled('standard-attr-segment'):
|
|
125
120
|
self.assertEqual(
|
|
126
121
|
'',
|
|
127
122
|
json_output["description"],
|
|
@@ -23,12 +23,11 @@ class NetworkSegmentRangeTests(common.NetworkTests):
|
|
|
23
23
|
"""Functional tests for network segment range"""
|
|
24
24
|
|
|
25
25
|
def setUp(self):
|
|
26
|
-
super(
|
|
27
|
-
|
|
28
|
-
if not self.haz_network:
|
|
29
|
-
self.skipTest("No Network service present")
|
|
26
|
+
super().setUp()
|
|
27
|
+
|
|
30
28
|
if not self.is_extension_enabled('network-segment-range'):
|
|
31
29
|
self.skipTest("No network-segment-range extension present")
|
|
30
|
+
|
|
32
31
|
self.PROJECT_NAME = uuid.uuid4().hex
|
|
33
32
|
|
|
34
33
|
def test_network_segment_range_create_delete(self):
|
|
@@ -20,10 +20,8 @@ class TestNetworkServiceProvider(common.NetworkTests):
|
|
|
20
20
|
"""Functional tests for network service provider"""
|
|
21
21
|
|
|
22
22
|
def setUp(self):
|
|
23
|
-
super(
|
|
24
|
-
|
|
25
|
-
if not self.haz_network:
|
|
26
|
-
self.skipTest("No Network service present")
|
|
23
|
+
super().setUp()
|
|
24
|
+
|
|
27
25
|
# NOTE(slaweq):
|
|
28
26
|
# that tests should works only when "standard" Neutron L3 agent is
|
|
29
27
|
# used, as e.g. OVN L3 plugin don't supports that.
|
|
@@ -23,9 +23,9 @@ class NetworkTrunkTests(common.NetworkTests):
|
|
|
23
23
|
|
|
24
24
|
def setUp(self):
|
|
25
25
|
super().setUp()
|
|
26
|
-
|
|
27
|
-
if not self.
|
|
28
|
-
self.skipTest("No
|
|
26
|
+
|
|
27
|
+
if not self.is_extension_enabled("trunk"):
|
|
28
|
+
self.skipTest("No trunk extension present")
|
|
29
29
|
|
|
30
30
|
network_name = uuid.uuid4().hex
|
|
31
31
|
subnet_name = uuid.uuid4().hex
|
|
@@ -25,7 +25,7 @@ class PortTests(common.NetworkTagTests):
|
|
|
25
25
|
|
|
26
26
|
@classmethod
|
|
27
27
|
def setUpClass(cls):
|
|
28
|
-
|
|
28
|
+
super().setUpClass()
|
|
29
29
|
if cls.haz_network:
|
|
30
30
|
cls.NAME = uuid.uuid4().hex
|
|
31
31
|
cls.NETWORK_NAME = uuid.uuid4().hex
|
|
@@ -42,13 +42,7 @@ class PortTests(common.NetworkTagTests):
|
|
|
42
42
|
)
|
|
43
43
|
cls.assertOutput('', raw_output)
|
|
44
44
|
finally:
|
|
45
|
-
super(
|
|
46
|
-
|
|
47
|
-
def setUp(self):
|
|
48
|
-
super(PortTests, self).setUp()
|
|
49
|
-
# Nothing in this class works with Nova Network
|
|
50
|
-
if not self.haz_network:
|
|
51
|
-
self.skipTest("No Network service present")
|
|
45
|
+
super().tearDownClass()
|
|
52
46
|
|
|
53
47
|
def test_port_delete(self):
|
|
54
48
|
"""Test create, delete multiple"""
|
|
@@ -20,12 +20,6 @@ class RouterTests(common.NetworkTagTests):
|
|
|
20
20
|
|
|
21
21
|
base_command = 'router'
|
|
22
22
|
|
|
23
|
-
def setUp(self):
|
|
24
|
-
super(RouterTests, self).setUp()
|
|
25
|
-
# Nothing in this class works with Nova Network
|
|
26
|
-
if not self.haz_network:
|
|
27
|
-
self.skipTest("No Network service present")
|
|
28
|
-
|
|
29
23
|
def test_router_create_and_delete(self):
|
|
30
24
|
"""Test create options, delete multiple"""
|
|
31
25
|
name1 = uuid.uuid4().hex
|
|
@@ -19,10 +19,7 @@ class SecurityGroupTests(common.NetworkTests):
|
|
|
19
19
|
"""Functional tests for security group"""
|
|
20
20
|
|
|
21
21
|
def setUp(self):
|
|
22
|
-
super(
|
|
23
|
-
# Nothing in this class works with Nova Network
|
|
24
|
-
if not self.haz_network:
|
|
25
|
-
self.skipTest("No Network service present")
|
|
22
|
+
super().setUp()
|
|
26
23
|
|
|
27
24
|
self.NAME = uuid.uuid4().hex
|
|
28
25
|
self.OTHER_NAME = uuid.uuid4().hex
|
|
@@ -19,10 +19,7 @@ class SecurityGroupRuleTests(common.NetworkTests):
|
|
|
19
19
|
"""Functional tests for security group rule"""
|
|
20
20
|
|
|
21
21
|
def setUp(self):
|
|
22
|
-
super(
|
|
23
|
-
# Nothing in this class works with Nova Network
|
|
24
|
-
if not self.haz_network:
|
|
25
|
-
self.skipTest("No Network service present")
|
|
22
|
+
super().setUp()
|
|
26
23
|
|
|
27
24
|
self.SECURITY_GROUP_NAME = uuid.uuid4().hex
|
|
28
25
|
|
|
@@ -23,7 +23,7 @@ class SubnetTests(common.NetworkTagTests):
|
|
|
23
23
|
|
|
24
24
|
@classmethod
|
|
25
25
|
def setUpClass(cls):
|
|
26
|
-
|
|
26
|
+
super().setUpClass()
|
|
27
27
|
if cls.haz_network:
|
|
28
28
|
cls.NETWORK_NAME = uuid.uuid4().hex
|
|
29
29
|
|
|
@@ -44,13 +44,7 @@ class SubnetTests(common.NetworkTagTests):
|
|
|
44
44
|
)
|
|
45
45
|
cls.assertOutput('', raw_output)
|
|
46
46
|
finally:
|
|
47
|
-
super(
|
|
48
|
-
|
|
49
|
-
def setUp(self):
|
|
50
|
-
super(SubnetTests, self).setUp()
|
|
51
|
-
# Nothing in this class works with Nova Network
|
|
52
|
-
if not self.haz_network:
|
|
53
|
-
self.skipTest("No Network service present")
|
|
47
|
+
super().tearDownClass()
|
|
54
48
|
|
|
55
49
|
def test_subnet_create_and_delete(self):
|
|
56
50
|
"""Test create, delete multiple"""
|
|
@@ -217,7 +211,6 @@ class SubnetTests(common.NetworkTagTests):
|
|
|
217
211
|
+ ' --description bbbb '
|
|
218
212
|
+ '--no-dhcp '
|
|
219
213
|
+ '--gateway 10.10.11.1 '
|
|
220
|
-
+ '--service-type network:floatingip_agent_gateway '
|
|
221
214
|
+ name
|
|
222
215
|
)
|
|
223
216
|
self.assertOutput('', cmd_output)
|
|
@@ -242,27 +235,16 @@ class SubnetTests(common.NetworkTagTests):
|
|
|
242
235
|
'10.10.11.1',
|
|
243
236
|
cmd_output["gateway_ip"],
|
|
244
237
|
)
|
|
245
|
-
self.assertEqual(
|
|
246
|
-
['network:floatingip_agent_gateway'],
|
|
247
|
-
cmd_output["service_types"],
|
|
248
|
-
)
|
|
249
238
|
|
|
250
239
|
# Test unset
|
|
251
|
-
cmd_output = self.openstack(
|
|
252
|
-
'subnet unset '
|
|
253
|
-
+ '--service-type network:floatingip_agent_gateway '
|
|
254
|
-
+ new_name
|
|
255
|
-
)
|
|
240
|
+
cmd_output = self.openstack('subnet unset --gateway ' + new_name)
|
|
256
241
|
self.assertOutput('', cmd_output)
|
|
257
242
|
|
|
258
243
|
cmd_output = self.openstack(
|
|
259
244
|
'subnet show ' + new_name,
|
|
260
245
|
parse_output=True,
|
|
261
246
|
)
|
|
262
|
-
self.
|
|
263
|
-
[],
|
|
264
|
-
cmd_output["service_types"],
|
|
265
|
-
)
|
|
247
|
+
self.assertIsNone(cmd_output["gateway_ip"])
|
|
266
248
|
|
|
267
249
|
def _subnet_create(self, cmd, name, is_type_ipv4=True):
|
|
268
250
|
# Try random subnet range for subnet creating
|