g5k: expose OAR resources selection API
Currently, there are only two ways of controlling resource selection on G5K. Either by asking for a specific cluster:
.add_machine(
cluster="chifflot",
nodes=1,
...
)
or by asking for specific hosts by name:
en.G5kConf()
.add_machine(
servers=["parasilo-28.rennes.grid5000.fr"],
...
)
There are cases where this is not expressive enough, for instance one could want to ask for:
- any host with a GPU
- any host with a 25 Gb/s ethernet connection
- any host with a SSD as main disk
- any host with at least 42 GB of memory and an AMD CPU
- any host with exactly 4 CPU cores
-
n
hosts connected to the same network switch - any host on a given site (no constraint)
Here are some ideas on how to expose this in enoslib:
- raw SQL that would be passed directly to OAR: the most flexible, but not exactly user-friendly...
- using the new "aliases" introduced recently. This is much simpler, but it does not cover all use-cases. It can be mixed with the SQL syntax.
- an ORM-like syntax similar to Django field lookups
In all cases, specifying the site would be mandatory.
Edited by JONGLEZ Baptiste