def test_pods_sharing_pvc_on_same_zone_first_consumer(self): sc_name = 'test-pods-sharing-zone' KubeUtils.create_storage_class_with_cleanup( self, sc_name, PARAMS_CONCATENATED_VPG, volumeBindingMode=VolumeBindingMode.Immediate) self._check_pods_using_same_pvc_are_on_same_zone(sc_name)
def _test_single_allowed_topology(self, volumeBindingMode): storage_class_name = 'sc-test-allowed-topologies' zone_name = TestConfig.Topology['zones'].keys()[0] allowed_zones = [zone_name] allowedTopologies = self.build_allowed_topologies(allowed_zones) KubeUtils.create_storage_class_with_cleanup( self, storage_class_name, PARAMS_CONCATENATED_VPG, volumeBindingMode=volumeBindingMode, allowedTopologies=allowedTopologies) pod_names = self._create_multiple_pods_each_with_own_pvc( storage_class_name, num_of_pods=6) # collect Pod, Node and Zone data info = self._collect_pods_info(pod_names) self.make_sure_pods_in_correct_zone(allowed_zones, info)