File tree Expand file tree Collapse file tree
openstackclient/tests/functional/network/v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020class FloatingIpTests (common .NetworkTests ):
2121 """Functional tests for floating ip"""
22- EXTERNAL_NETWORK_NAME = uuid .uuid4 ().hex
23- EXTERNAL_SUBNET_NAME = uuid .uuid4 ().hex
24- PRIVATE_NETWORK_NAME = uuid .uuid4 ().hex
25- PRIVATE_SUBNET_NAME = uuid .uuid4 ().hex
26- ROUTER = uuid .uuid4 ().hex
27- PORT_NAME = uuid .uuid4 ().hex
2822
2923 @classmethod
3024 def setUpClass (cls ):
3125 common .NetworkTests .setUpClass ()
3226 if cls .haz_network :
27+ cls .EXTERNAL_NETWORK_NAME = uuid .uuid4 ().hex
28+ cls .EXTERNAL_SUBNET_NAME = uuid .uuid4 ().hex
29+ cls .PRIVATE_NETWORK_NAME = uuid .uuid4 ().hex
30+ cls .PRIVATE_SUBNET_NAME = uuid .uuid4 ().hex
31+ cls .ROUTER = uuid .uuid4 ().hex
32+ cls .PORT_NAME = uuid .uuid4 ().hex
33+
3334 # Create a network for the floating ip
3435 json_output = json .loads (cls .openstack (
3536 'network create -f json ' +
Original file line number Diff line number Diff line change @@ -23,9 +23,10 @@ class IPAvailabilityTests(common.NetworkTests):
2323 def setUpClass (cls ):
2424 common .NetworkTests .setUpClass ()
2525 if cls .haz_network :
26- # Create a network for the subnet.
2726 cls .NAME = uuid .uuid4 ().hex
2827 cls .NETWORK_NAME = uuid .uuid4 ().hex
28+
29+ # Create a network for the subnet
2930 cls .openstack (
3031 'network create ' +
3132 cls .NETWORK_NAME
Original file line number Diff line number Diff line change 2222class TestMeterRule (common .NetworkTests ):
2323 """Functional tests for meter rule"""
2424
25- METER_NAME = uuid .uuid4 ().hex
2625 METER_ID = None
2726 METER_RULE_ID = None
2827
2928 @classmethod
3029 def setUpClass (cls ):
3130 common .NetworkTests .setUpClass ()
3231 if cls .haz_network :
32+ cls .METER_NAME = uuid .uuid4 ().hex
33+
3334 json_output = json .loads (cls .openstack (
3435 'network meter create -f json ' +
3536 cls .METER_NAME
Original file line number Diff line number Diff line change 1919
2020
2121class NetworkQosPolicyTests (common .NetworkTests ):
22- """Functional tests for QoS policy. """
23- NAME = uuid .uuid4 ().hex
22+ """Functional tests for QoS policy"""
2423 HEADERS = ['Name' ]
2524 FIELDS = ['name' ]
2625
2726 @classmethod
2827 def setUpClass (cls ):
2928 common .NetworkTests .setUpClass ()
3029 if cls .haz_network :
30+ cls .NAME = uuid .uuid4 ().hex
31+
3132 opts = cls .get_opts (cls .FIELDS )
3233 raw_output = cls .openstack (
3334 'network qos policy create ' +
Original file line number Diff line number Diff line change 2121class NetworkQosRuleTestsMinimumBandwidth (common .NetworkTests ):
2222 """Functional tests for QoS minimum bandwidth rule"""
2323 RULE_ID = None
24- QOS_POLICY_NAME = 'qos_policy_' + uuid .uuid4 ().hex
2524 MIN_KBPS = 2800
2625 MIN_KBPS_MODIFIED = 7500
2726 DIRECTION = '--egress'
@@ -33,6 +32,8 @@ class NetworkQosRuleTestsMinimumBandwidth(common.NetworkTests):
3332 def setUpClass (cls ):
3433 common .NetworkTests .setUpClass ()
3534 if cls .haz_network :
35+ cls .QOS_POLICY_NAME = 'qos_policy_' + uuid .uuid4 ().hex
36+
3637 opts = cls .get_opts (cls .FIELDS )
3738 cls .openstack (
3839 'network qos policy create ' +
Original file line number Diff line number Diff line change 1616
1717
1818class NetworkRBACTests (common .NetworkTests ):
19- """Functional tests for network rbac. """
20- NET_NAME = uuid .uuid4 ().hex
21- PROJECT_NAME = uuid .uuid4 ().hex
19+ """Functional tests for network rbac"""
2220 OBJECT_ID = None
2321 ID = None
2422 HEADERS = ['ID' ]
@@ -28,6 +26,9 @@ class NetworkRBACTests(common.NetworkTests):
2826 def setUpClass (cls ):
2927 common .NetworkTests .setUpClass ()
3028 if cls .haz_network :
29+ cls .NET_NAME = uuid .uuid4 ().hex
30+ cls .PROJECT_NAME = uuid .uuid4 ().hex
31+
3132 opts = cls .get_opts (cls .FIELDS )
3233 raw_output = cls .openstack (
3334 'network create ' + cls .NET_NAME + opts
Original file line number Diff line number Diff line change 1717
1818class NetworkSegmentTests (common .NetworkTests ):
1919 """Functional tests for network segment"""
20- NETWORK_NAME = uuid .uuid4 ().hex
21- PHYSICAL_NETWORK_NAME = uuid .uuid4 ().hex
2220 NETWORK_SEGMENT_ID = None
2321 NETWORK_ID = None
2422 NETWORK_SEGMENT_EXTENSION = None
@@ -27,7 +25,10 @@ class NetworkSegmentTests(common.NetworkTests):
2725 def setUpClass (cls ):
2826 common .NetworkTests .setUpClass ()
2927 if cls .haz_network :
30- # Create a network for the segment.
28+ cls .NETWORK_NAME = uuid .uuid4 ().hex
29+ cls .PHYSICAL_NETWORK_NAME = uuid .uuid4 ().hex
30+
31+ # Create a network for the segment
3132 opts = cls .get_opts (['id' ])
3233 raw_output = cls .openstack (
3334 'network create ' + cls .NETWORK_NAME + opts
Original file line number Diff line number Diff line change 1818
1919class PortTests (common .NetworkTests ):
2020 """Functional tests for port"""
21- NAME = uuid .uuid4 ().hex
22- NETWORK_NAME = uuid .uuid4 ().hex
2321
2422 @classmethod
2523 def setUpClass (cls ):
2624 common .NetworkTests .setUpClass ()
2725 if cls .haz_network :
28- # Create a network for the port
26+ cls .NAME = uuid .uuid4 ().hex
27+ cls .NETWORK_NAME = uuid .uuid4 ().hex
28+
29+ # Create a network for the port tests
2930 cls .openstack (
3031 'network create ' + cls .NETWORK_NAME
3132 )
Original file line number Diff line number Diff line change 1717
1818class SecurityGroupTests (common .NetworkTests ):
1919 """Functional tests for security group"""
20- NAME = uuid .uuid4 ().hex
21- OTHER_NAME = uuid .uuid4 ().hex
2220 HEADERS = ['Name' ]
2321 FIELDS = ['name' ]
2422
2523 @classmethod
2624 def setUpClass (cls ):
2725 common .NetworkTests .setUpClass ()
2826 if cls .haz_network :
27+ cls .NAME = uuid .uuid4 ().hex
28+ cls .OTHER_NAME = uuid .uuid4 ().hex
29+
2930 opts = cls .get_opts (cls .FIELDS )
3031 raw_output = cls .openstack (
3132 'security group create ' +
Original file line number Diff line number Diff line change 1717
1818class SecurityGroupRuleTests (common .NetworkTests ):
1919 """Functional tests for security group rule"""
20- SECURITY_GROUP_NAME = uuid .uuid4 ().hex
2120 SECURITY_GROUP_RULE_ID = None
2221 NAME_FIELD = ['name' ]
2322 ID_FIELD = ['id' ]
@@ -27,7 +26,9 @@ class SecurityGroupRuleTests(common.NetworkTests):
2726 def setUpClass (cls ):
2827 common .NetworkTests .setUpClass ()
2928 if cls .haz_network :
30- # Create the security group to hold the rule.
29+ cls .SECURITY_GROUP_NAME = uuid .uuid4 ().hex
30+
31+ # Create the security group to hold the rule
3132 opts = cls .get_opts (cls .NAME_FIELD )
3233 raw_output = cls .openstack (
3334 'security group create ' +
You can’t perform that action at this time.
0 commit comments