Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
Remove default values to prevent parameters from being optional

Signed-off-by: Toni Finger <[email protected]>
  • Loading branch information
tonifinger committed Nov 8, 2024
1 parent 2301ba3 commit fa0247e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Tests/kaas/plugin/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ class KubernetesClusterPlugin():
class PluginX(KubernetesClusterPlugin):
def __init__(self, config_file=None):
def __init__(self, config_file):
self.config = config_file
def create_cluster(self, cluster_name="scs-cluster", version=None, kubeconfig_filepath=None):
def create_cluster(self, cluster_name, version, kubeconfig_filepath):
self.cluster = ClusterAPI(name=cluster_name, image=cluster_image, kubeconfig_filepath)
self.cluster.create(self.config)
def delete_cluster(self, cluster_name=None, version=None):
def delete_cluster(self, cluster_name, version):
self.cluster = ClusterAPI(cluster_name)
self.cluster.delete()
..
"""

def create_cluster(self, cluster_name="scs-cluster", version=None, kubeconfig_filepath=None):
def create_cluster(self, cluster_name, version, kubeconfig_filepath):
"""
This method is to be called to create a k8s cluster
:param: cluster_name:
Expand All @@ -46,7 +46,7 @@ def create_cluster(self, cluster_name="scs-cluster", version=None, kubeconfig_fi
"""
raise NotImplementedError

def delete_cluster(self, cluster_name=None, version=None):
def delete_cluster(self, cluster_name, version):
"""
This method is to be called in order to unprovision a cluster
:param: cluster_name:
Expand Down
6 changes: 3 additions & 3 deletions Tests/kaas/plugin/plugin_kind.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ class PluginKind(KubernetesClusterPlugin):
Plugin to handle the provisioning of kubernetes cluster for
conformance testing purpose with the use of Kind
"""
def __init__(self, config_file=None):
def __init__(self, config_file):
logger.info("Init PluginKind")
self.config = config_file
logger.debug(self.config)
self.working_directory = os.getcwd()
logger.debug(f"Working from {self.working_directory}")

def create_cluster(self, cluster_name="scs-cluster", version=None, kubeconfig=None):
def create_cluster(self, cluster_name, version, kubeconfig):
"""
This method is to be called to create a k8s cluster
:param: kubernetes_version:
Expand All @@ -45,6 +45,6 @@ def create_cluster(self, cluster_name="scs-cluster", version=None, kubeconfig=No
else:
self.cluster.create(self.config)

def delete_cluster(self, cluster_name=None, version=None):
def delete_cluster(self, cluster_name, version):
self.cluster = KindCluster(cluster_name)
self.cluster.delete()
6 changes: 3 additions & 3 deletions Tests/kaas/plugin/plugin_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class PluginStatic(KubernetesClusterPlugin):
using a kubeconfig file
"""

def __init__(self, config_file=None):
def __init__(self, config_file):
self.kubeconfig_path = config_file

def create_cluster(self, cluster_name="scs-cluster", version=None, kubeconfig=None):
def create_cluster(self, cluster_name, version, kubeconfig):
shutil.copyfile(self.kubeconfig_path, kubeconfig)

def delete_cluster(self, cluster_name=None, version=None):
def delete_cluster(self, cluster_name, version):
pass

0 comments on commit fa0247e

Please sign in to comment.