elasticluster.gc3pie_config

elasticluster.gc3pie_config.create_gc3pie_config_snippet(cluster)[source]

Create a configuration file snippet to be used with GC3Pie.

elasticluster.gc3pie_config.inspect_node(node)[source]

This function accept a elasticluster.cluster.Node class, connects to a node and tries to discover the kind of batch system installed, and some other information.

elasticluster.gc3pie_config.to_bytes(s)[source]

Convert string s to an integer number of bytes. Suffixes like ‘KB’, ‘MB’, ‘GB’ (up to ‘YB’), with or without the trailing ‘B’, are allowed and properly accounted for. Case is ignored in suffixes.

Examples:

>>> to_bytes('12')
12
>>> to_bytes('12B')
12
>>> to_bytes('12KB')
12000
>>> to_bytes('1G')
1000000000

Binary units ‘KiB’, ‘MiB’ etc. are also accepted:

>>> to_bytes('1KiB')
1024
>>> to_bytes('1MiB')
1048576