mendevi.cli.g5k

Help to excecute a script on a node of grid’5000.

Functions

guess_envname()

Try to find the envname.

guess_roles()

Return the roles list.

guess_servers()

Return the available nodes address with a wattmeter.

guess_storage()

Return the accessible paths under "/srv/storage".

is_g5k_frontend(*[, fail])

Test if we are on the grid'5000 frontend.

set_ansible_cfg()

Create and fill the file ~/.ansible.cfg.

Details

mendevi.cli.g5k.guess_envname() list[str][source]

Try to find the envname.

Returns

envnameslist[str]

The candidate envnames, as a list of urls formated like: https://api.grid5000.fr/stable/sites/{{site}}/public/{{username}}/{{file}}

mendevi.cli.g5k.guess_roles() list[str][source]

Return the roles list.

Returns

roleslist[str]

The name of the group to which one belongs

mendevi.cli.g5k.guess_servers() list[str][source]

Return the available nodes address with a wattmeter.

mendevi.cli.g5k.guess_storage() list[str][source]

Return the accessible paths under “/srv/storage”.

If they have not been mounted for a while, NFS disks may be hidden with a simple ls command. This function attempts to predict the volume name in order to increase the chances of success.

The rules are defined here: https://www.grid5000.fr/w/Group_Storage

mendevi.cli.g5k.is_g5k_frontend(*, fail: bool = True) bool[source]

Test if we are on the grid’5000 frontend.

mendevi.cli.g5k.set_ansible_cfg() None[source]

Create and fill the file ~/.ansible.cfg.