Skip to content

Commit

Permalink
fix func call
Browse files Browse the repository at this point in the history
  • Loading branch information
okozachenko1203 committed Jul 14, 2023
1 parent c6bb18a commit 0c13107
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions magnum_cluster_api/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion magnum_cluster_api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c13107

Please sign in to comment.