From fa52656a00695c96b44d70a51391566bad96bfed Mon Sep 17 00:00:00 2001 From: dweinholz Date: Thu, 15 Feb 2024 08:07:49 +0100 Subject: [PATCH 1/2] fix bibigrid ep --- simple_vm_client/bibigrid_connector/bibigrid_connector.py | 1 + simple_vm_client/config/config.yml | 2 +- simple_vm_client/config/config_local.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/simple_vm_client/bibigrid_connector/bibigrid_connector.py b/simple_vm_client/bibigrid_connector/bibigrid_connector.py index 3c3d081..03ab113 100644 --- a/simple_vm_client/bibigrid_connector/bibigrid_connector.py +++ b/simple_vm_client/bibigrid_connector/bibigrid_connector.py @@ -17,6 +17,7 @@ def __init__(self, config_file: str): self._BIBIGRID_PORT: str = "" self._BIBIGRID_ANSIBLE_ROLES = [] self._BIBIGRID_LOCAL_DNS_LOOKUP = False + self._BIBIGRID_EP = "" self._BIBIGRID_USE_MASTER_WITH_PUBLIC_IP: bool = False self._PRODUCTION_bool = True self.load_config_yml(config_file=config_file) diff --git a/simple_vm_client/config/config.yml b/simple_vm_client/config/config.yml index 829fd55..549c315 100644 --- a/simple_vm_client/config/config.yml +++ b/simple_vm_client/config/config.yml @@ -72,7 +72,7 @@ bibigrid: # FORC forc: - activated: True + activated: False # If Forc ist activated -- defaults to True forc_url: https://proxy-dev.bi.denbi.de:5000/ # URL for FORC. diff --git a/simple_vm_client/config/config_local.yml b/simple_vm_client/config/config_local.yml index 829fd55..ced3189 100644 --- a/simple_vm_client/config/config_local.yml +++ b/simple_vm_client/config/config_local.yml @@ -54,7 +54,7 @@ openstack: # Bibigrid configuration bibigrid: - activated: False + activated: True # If Bibigrid ist activated -- defaults to True port: 8080 # Port number for Bibigrid API. From 05ab8d808d14273ceeac1d4ddcdcc18cee9bcc3a Mon Sep 17 00:00:00 2001 From: dweinholz Date: Thu, 15 Feb 2024 09:14:27 +0100 Subject: [PATCH 2/2] fixed limits --- .../openstack_connector/openstack_connector.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index 4622069..2c58543 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -966,9 +966,12 @@ def get_or_create_project_security_group(self, project_name, project_id): def get_limits(self) -> dict[str, str]: logger.info("Get Limits") - limits = self.openstack_connection.get_compute_limits() - limits.update(self.openstack_connection.get_volume_limits()["absolute"]) + # Retrieve compute and volume limits + compute_limits = self.openstack_connection.get_compute_limits() + volume_limits = self.openstack_connection.get_volume_limits()["absolute"] + # Merge compute and volume limits into a single dictionary + limits = {**compute_limits, **volume_limits} return { "cores_limit": str(limits["max_total_cores"]), "vms_limit": str(limits["max_total_instances"]),