@@ -74,33 +74,32 @@ class TestSegmentationId(BaseSegmentationIdTest):
7474 ]
7575 num_hosts = 1
7676
77- def test_change_segmentation_id_no_ports_in_network (self ):
78- network = self ._create_network ()
79- # Now change segmentation_id to some other value
80- self ._update_segmentation_id (network )
81-
82- def test_change_segmentation_id_with_unbound_ports_in_network (self ):
77+ def test_change_segmentation_id (self ):
8378 network = self ._create_network ()
79+ # Now change segmentation_id to some other value when there are no
80+ # ports created in network
81+ network = self ._update_segmentation_id (network )
8482
8583 self .safe_client .create_subnet (
8684 self .project_id , network ['id' ], '20.0.0.0/24' )
8785
86+ # Create some unbound and binding_failed ports
8887 # Unbound port
8988 self .safe_client .create_port (self .project_id , network ['id' ])
9089 # Port failed to bind
9190 self .safe_client .create_port (self .project_id , network ['id' ],
9291 "non-existing-host" )
9392
94- self ._update_segmentation_id (network )
95-
96- def test_change_segmentation_id_with_bound_ports_in_network (self ):
97- network = self ._create_network ()
93+ # Test update segmentation_id to some othe value with unbound and
94+ # binding_failed ports created in the network
95+ network = self ._update_segmentation_id (network )
9896
99- self .safe_client .create_subnet (
100- self .project_id , network ['id' ], '20.0.0.0/24' )
97+ # Create bound port
10198 self .safe_client .create_port (self .project_id , network ['id' ],
10299 self .environment .hosts [0 ].hostname )
103100
101+ # Test update segmentation_id to some othe value when bound ports are
102+ # created in the network
104103 self ._update_segmentation_id (network )
105104
106105
0 commit comments