Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
fixed keypair creatioN
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Jul 5, 2022
1 parent 9b817f0 commit 31ed4e3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,6 @@ def get_cluster_status(self, cluster_id):
json_resp = response.json(strict=False)
json_resp["log"] = str(json_resp.get("log", ""))
json_resp["msg"] = str(json_resp.get("msg", ""))

return json_resp

def bibigrid_available(self):
Expand Down Expand Up @@ -2069,7 +2068,7 @@ def add_cluster_machine(
}

if not self.conn.compute.find_keypair(key_name):
self.conn.compute.create_keypair(name=key_name, public_key=pub_key)
self.conn.compute.create_keypair(name=name, public_key=pub_key)

server = self.conn.create_server(
name=name,
Expand All @@ -2084,7 +2083,7 @@ def add_cluster_machine(
)
LOG.info(f"Created cluster machine:{server['id']}")

self.delete_keypair(key_name)
self.delete_keypair(name)

return server["id"]

Expand Down

0 comments on commit 31ed4e3

Please sign in to comment.