geni.util

class APIEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None)[source]
default(obj)[source]
exception MissingPublicKeyError[source]
exception PathNotFoundError(path)[source]
buildContextFromBundle(bundle_path, pubkey_path=None, cert_pkey_path=None)[source]
builddot(manifests)[source]

Constructs a dotfile of the topology described in the passed in manifest list and returns it as a string.

checkavailrawpc(context, am)[source]

Returns a list of node objects representing available raw PCs at the given aggregate.

deleteSliverExists(am, context, slice)[source]

Attempts to delete all slivers for the given slice at the given AM, suppressing all returned errors.

getAdvertisements(context, ams)[source]

Returns a dictionary of the form:

{ site_object : advertisement_object, ...}

Containing the advertisements for all the requested aggregates. Requests are made in parallel and the function blocks until the slowest site returns (or times out).

Warning

Particularly large advertisements may break the shared memory queue used by this function.

getManifests(context, ams, slices)[source]

Returns a two-level dictionary of the form:

{slice_name : { site_object : manifest_object, ... }, ...}

Containing the manifests for all provided slices at all the provided sites. Requests are made in parallel and the function blocks until the slowest site returns (or times out).

hasDataContext()[source]
loadAggregates(path=None)[source]
loadContext(path=None, key_passphrase=None)[source]
printlogininfo(context=None, am=None, slice=None, manifest=None)[source]

Prints out host login info in the format:

[client_id][username] hostname:port

If a manifest object is provided the information will be mined from this data, otherwise you must supply a context, slice, and am and a manifest will be requested from the given aggregate.

saveAggregates(ammap, path=None)[source]
updateAggregates(context, ammap)[source]