geni.util
- class APIEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]
- default(obj)[source]
- Implement this method in a subclass such that it returns a serializable object for - o, or calls the base implementation (to raise a- TypeError).- For example, to support arbitrary iterators, you could implement default like this: - def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) # Let the base class default method raise the TypeError return super().default(o) 
 
- 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). 
- 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.