Skip to content

Commit

Permalink
Merge pull request #8 from J-hoplin1/k3s-version-select
Browse files Browse the repository at this point in the history
fix : InstanceNameAlreadyTakenChecker decorator bug
  • Loading branch information
J-Hoplin authored Jul 11, 2023
2 parents f181ff7 + ffc4702 commit c51d4b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ def terminate_cluster(self):
print(self.getNormalMessage("Complete to terminate cluster!"))

@InstanceNameAlreadyTakenChecker()
def add_node(self, name, version, **kwargs):
def add_node(self, name, *args, **kwargs):
version = args[0][0]
masterConfig: dict = self.readConfig(Assets.MASTER_CONFIG)
# Get worker node config
workerConfig: dict = self.readConfig(Assets.WORKER_CONFIG)
Expand Down
2 changes: 1 addition & 1 deletion decorator/instanceNameAlreadyTakenChecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ def wrapper(instance, name, *args, **kwargs):
raise exceptions.InvalidNodeGenerationDetected(
self.getCriticalMessage(
f"Name with '{name}' already in use! Ignore generating worker-node config '{name}'"))
result = fn(instance, name, node_name=name)
result = fn(instance, name, args, node_name=name)
return result
return wrapper

0 comments on commit c51d4b8

Please sign in to comment.