def create(self, namespace_value, conf): config.load_kube_config(config_file=self.kubeconfig) scale_function.set_global_namespace_value(namespace_value) if not (scale_function.check_namespace_exists()): scale_function.create_namespace() if not (scale_function.check_deployment_exists()): scale_function.create_deployment() if not (scale_function.check_cluster_role_exists( "ibm-spectrum-scale-csi-operator")): scale_function.create_cluster_role() if not (scale_function.check_service_account_exists( "ibm-spectrum-scale-csi-operator")): scale_function.create_service_account() if not (scale_function.check_cluster_role_binding_exists( "ibm-spectrum-scale-csi-operator")): scale_function.create_cluster_role_binding() if not (scale_function.check_crd_exists()): scale_function.create_crd()
def __init__(self, kubeconfig_value, namespace_value): self.kubeconfig = kubeconfig_value scale_function.set_global_namespace_value(namespace_value) ob.set_namespace_value(namespace_value) crd_body = self.get_operator_body() crd_full_version = crd_body["CustomResourceDefinition"]["apiVersion"].split("/") self.crd_version = crd_full_version[1]
def delete_test_ns(self, kubeconfig): config.load_kube_config(config_file=kubeconfig) scale_function.set_global_namespace_value(self.test_ns) if scale_function.check_namespace_exists(): scale_function.delete_namespace() scale_function.check_namespace_deleted()
def create_test_ns(self, kubeconfig): config.load_kube_config(config_file=kubeconfig) scale_function.set_global_namespace_value(self.test_ns) if not(scale_function.check_namespace_exists()): scale_function.create_namespace()
def __init__(self, kubeconfig_value, namespace_value): self.kubeconfig = kubeconfig_value scale_function.set_global_namespace_value(namespace_value) ob.set_namespace_value(namespace_value)