From bfb5e456756a94f6ee2c000c9e86faf2fb9ce44d Mon Sep 17 00:00:00 2001
From: XaverStiensmeier <xaverstiensmeier@gmx.de>
Date: Sat, 30 Nov 2024 16:27:36 +0100
Subject: [PATCH] fixed description bug

---
 bibigrid/core/provider.py                | 7 +++++--
 bibigrid/openstack/openstack_provider.py | 8 +++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/bibigrid/core/provider.py b/bibigrid/core/provider.py
index b1678bf7..ad810fc4 100644
--- a/bibigrid/core/provider.py
+++ b/bibigrid/core/provider.py
@@ -90,12 +90,15 @@ def list_servers(self):
         """
 
     @abstractmethod
-    def create_server(self, name, flavor, image, network, key_name=None, wait=True, volumes=None, security_groups=None,
+    def create_server(self, *, name, flavor, image, network, key_name=None, wait=True, volumes=None,
+                      security_groups=None,
                       boot_volume=None, boot_from_volume=False,
-                      terminate_boot_volume=False, volume_size=50):  # pylint: disable=too-many-arguments
+                      terminate_boot_volume=False, volume_size=50,
+                      description=""):  # pylint: disable=too-many-arguments
         """
         Creates a new server and waits for it to be accessible if wait=True. If volumes are given, they are attached.
         Returns said server (dict)
+        @param description: server description; ignored by some providers
         @param volume_size: Size of boot volume if set. Defaults to 50.
         @param terminate_boot_volume: if True, boot volume gets terminated on server termination
         @param boot_from_volume: if True, a boot volume is created from the image
diff --git a/bibigrid/openstack/openstack_provider.py b/bibigrid/openstack/openstack_provider.py
index 7c8d7b64..3b15ac06 100644
--- a/bibigrid/openstack/openstack_provider.py
+++ b/bibigrid/openstack/openstack_provider.py
@@ -114,9 +114,11 @@ def get_subnet_by_id_or_name(self, subnet_id_or_name):
     def list_servers(self):
         return [elem.toDict() for elem in self.conn.list_servers()]
 
-    def create_server(self, name, flavor, image, network, key_name=None, wait=True, volumes=None, security_groups=None,
-                      # pylint: disable=too-many-positional-arguments
-                      boot_volume=None, boot_from_volume=False, terminate_boot_volume=False, volume_size=50):
+    def create_server(self, *, name, flavor, image, network, key_name=None, wait=True, volumes=None,
+                      security_groups=None,
+                      # pylint: disable=too-many-positional-arguments,too-many-locals
+                      boot_volume=None, boot_from_volume=False, terminate_boot_volume=False, volume_size=50,
+                      description=""):
         try:
             server = self.conn.create_server(name=name, flavor=flavor, image=image, network=network, key_name=key_name,
                                              volumes=volumes, security_groups=security_groups, boot_volume=boot_volume,