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

Commit

Permalink
fix(Flavor):fixed wrong key
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Nov 20, 2019
1 parent fffc43a commit 482cb04
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,19 +365,18 @@ def import_keypair(self, keyname, public_key):
def openstack_flav_to_thrift_flav(self, flavor):
try:
if "id" in flavor:
flav = self.conn.compute.get_flavor(flavor["id"]).to_dict()
name = flav["name"]
flavor = self.conn.compute.get_flavor(flavor["id"]).to_dict()
name = flavor["name"]
openstack_id = flavor["id"]
else:
# Giessen
flav = flavor['flavor']
name = flav["original_name"]
name = flavor["original_name"]
openstack_id = None

flav = Flavor(
vcpus=flav["vcpus"],
ram=flav["ram"],
disk=flav["disk"],
vcpus=flavor["vcpus"],
ram=flavor["ram"],
disk=flavor["disk"],
name=name,
openstack_id=openstack_id,
)
Expand Down

0 comments on commit 482cb04

Please sign in to comment.