From 0c131075597084d3ebd3cd21a7af57303b357809 Mon Sep 17 00:00:00 2001 From: okozachenko1203 Date: Mon, 3 Jul 2023 19:12:28 +1000 Subject: [PATCH] fix func call --- magnum_cluster_api/driver.py | 4 ++-- magnum_cluster_api/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/magnum_cluster_api/driver.py b/magnum_cluster_api/driver.py index 55559910..60337b1f 100644 --- a/magnum_cluster_api/driver.py +++ b/magnum_cluster_api/driver.py @@ -31,7 +31,7 @@ def create_cluster(self, context, cluster, cluster_create_timeout): cluster.stack_id = utils.generate_cluster_api_name(self.k8s_api) cluster.save() - utils.validate_cluster(cluster) + utils.validate_cluster(context, cluster) osc = clients.get_openstack_api(context) @@ -188,7 +188,7 @@ def resize_cluster( nodes_to_remove, nodegroup=None, ): - utils.validate_cluster(cluster) + utils.validate_cluster(context, cluster) if nodegroup is None: nodegroup = cluster.default_ng_worker diff --git a/magnum_cluster_api/utils.py b/magnum_cluster_api/utils.py index 3ba41892..d039f12a 100644 --- a/magnum_cluster_api/utils.py +++ b/magnum_cluster_api/utils.py @@ -261,7 +261,7 @@ def format_event_message(event: pykube.Event): ) -def validate_cluster(cluster: magnum_objects.Cluster, context: context.RequestContext): +def validate_cluster(context: context.RequestContext, cluster: magnum_objects.Cluster): # Check master count if (cluster.master_count % 2) == 0: raise mcapi_exceptions.ClusterMasterCountEven