Add besteffort queue to QUEUE_TYPES
Even though there are references to the besteffort
queue in some parts of the code (For eg. https://gitlab.inria.fr/discovery/enoslib/-/blob/main/enoslib/infra/enos_g5k/g5k_api_utils.py#L632 as of the time of this commit), any attempt to use the besteffort queue is rejected by the JSON validation logic:
Stack trace
File "/workspaces/greenflow/greenflow/g5k.py", line 52, in __init__
.finalize()
File "/home/g/.pyenv/versions/mambaforge/envs/greenflow/lib/python3.10/site-packages/enoslib/infra/configuration.py", line 61, in finalize
self.validate(d)
File "/home/g/.pyenv/versions/mambaforge/envs/greenflow/lib/python3.10/site-packages/enoslib/infra/configuration.py", line 51, in validate
cls._VALIDATOR.validate(dictionnary)
File "/home/g/.pyenv/versions/mambaforge/envs/greenflow/lib/python3.10/site-packages/jsonschema/validators.py", line 348, in validate
raise error
jsonschema.exceptions.ValidationError: 'besteffort' is not one of ['default', 'production', 'testing']
Failed validating 'enum' in schema['properties']['queue']:
{'enum': ['default', 'production', 'testing'], 'type': 'string'}
On instance['queue']:
'besteffort'
In call to configurable '__init__' (<function G5KPlatform.__init__ at 0x7efdfaf957e0>)
In call to configurable 'G5KPlatform' (<class 'greenflow.g5k.G5KPlatform'>)
In call to configurable 'deploy' (<function deploy at 0x7efe000f4940>)
Therefore, this MR simply adds the support for the besteffort
queue when reserving a node from enoslib.
Edited by KOVILKKATT PANICKERVEETIL Govind