Skip to content

Commit

Permalink
Merge branch 'dev' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
vktrrdk committed Nov 5, 2024
2 parents 8604abc + 75ec7a2 commit 82a24ab
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
setuptools==75.2.0
setuptools==75.3.0
thrift==0.21.0
openstacksdk==4.0.1
deprecated==1.2.14
Expand All @@ -8,7 +8,7 @@ flake8==7.1.1
paramiko==3.5.0
ruamel.yaml==0.18.6
pyvim==3.0.3
redis==5.1.1
redis==5.2.0
requests==2.32.3
pyyaml==6.0.2
pre-commit==4.0.1
Expand Down
2 changes: 1 addition & 1 deletion simple_vm_client/forc_connector/playbook/playbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def copy_playbooks_and_init(self, public_key: str) -> None:
self.yaml_exec.dump(data_gp, generic_playbook)

def copy_and_init_research_environment(self) -> None:
if not self.research_environment_template:
if not self.research_environment_template or self.create_only_backend:
return

shutil.copytree(
Expand Down
3 changes: 1 addition & 2 deletions simple_vm_client/openstack_connector/openstack_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ def get_flavor(self, name_or_id: str, ignore_error: bool = False) -> Flavor:
message=f"Flavor {name_or_id} not found!", name_or_id=name_or_id
)
else:
return Flavor()
return None

return flavor

Expand Down Expand Up @@ -1263,7 +1263,6 @@ def get_server(self, openstack_id: str) -> Server:
ignore_not_active=True,
ignore_not_found=True,
)

server.flavor = self.get_flavor(
name_or_id=server.flavor["id"], ignore_error=True
)
Expand Down
6 changes: 5 additions & 1 deletion simple_vm_client/util/thrift_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ def os_to_thrift_server(openstack_server: OpenStack_Server) -> VM:
return VM(vm_state=VmStates.NOT_FOUND)
fixed_ip = ""
floating_ip = ""
flavor = os_to_thrift_flavor(openstack_flavor=openstack_server.flavor)
if openstack_server.flavor:

flavor = os_to_thrift_flavor(openstack_flavor=openstack_server.flavor)
else:
flavor = None
if openstack_server.image:
image = os_to_thrift_image(openstack_image=openstack_server.image)
else:
Expand Down

0 comments on commit 82a24ab

Please sign in to comment.