elasticslice.rpc package

Submodules

elasticslice.rpc.protogeni module

elasticslice.rpc.protogeni contains an object-based implementation of the basic ProtoGeni test client-side python code, plus several more useful classes for building client-side (i.e., slice- and experiment-managing) ProtoGENI programs. It requires geni-lib (i.e., the geni.* modules imported below). Cloudlab maintains its own copy of this repository which has the latest Cloudlab additions that may not have made it upstream yet. This library doesn’t currently require those additions; just FYI. The Cloudlab repository can be found at https://bitbucket.org/emulab/geni-lib/ ; the main repository is https://bitbucket.org/barnstorm/geni-lib .

class elasticslice.rpc.protogeni.Credential(credential)[source]

Bases: object

__init__(credential)[source]
elasticslice.rpc.protogeni.GeniTimeStampToLocalTimeStamp(ts)[source]
Parameters:timestring – a GENI (UTC) UNIX time stamp
Returns:a local UNIX time stamp
elasticslice.rpc.protogeni.GeniTimeStringToLocalTimeStamp(timestring)[source]
Parameters:timestring – a GENI time string (UTC)
Returns:a local UNIX time stamp
elasticslice.rpc.protogeni.LocalTimeStampToGeniTimeString(ts)[source]
Parameters:timestring – a local UNIX time stamp
Returns:a GENI time string (UTC)
class elasticslice.rpc.protogeni.NoHostCheckHTTPSConnection(host, port=None, strict=None, **ssl)[source]

Bases: M2Crypto.httpslib.HTTPSConnection

connect()[source]
class elasticslice.rpc.protogeni.NoHostChecker(host=None, peerCertHash=None, peerCertDigest='sha1')[source]

Bases: M2Crypto.SSL.Checker.Checker

elasticslice.rpc.protogeni.PassPhraseCB(v, prompt1='Enter passphrase:', prompt2='Verify passphrase:', passphrasefile='/root/.ssl/password')[source]

Acquire the encrypted certificate passphrase by reading a file or prompting the user.

This is an M2Crypto callback. If the passphrase file exists and is readable, use it. If the passphrase file does not exist or is not readable, delegate to the standard M2Crypto passphrase callback. Return the passphrase.

class elasticslice.rpc.protogeni.ProtoGeniClientDefs[source]

XMLRPC/HTTP return codes from a ProtoGeni server.

RESPONSE_ALREADYEXISTS = 17
RESPONSE_BADARGS = 1
RESPONSE_BADVERSION = 4
RESPONSE_BUSY = 14
RESPONSE_DBERROR = 9
RESPONSE_ERROR = 2
RESPONSE_EXPIRED = 15
RESPONSE_FORBIDDEN = 3
RESPONSE_INPROGRESS = 16
RESPONSE_INSUFFICIENT_BANDWIDTH = 25
RESPONSE_INSUFFICIENT_MEMORY = 27
RESPONSE_INSUFFICIENT_NODES = 26
RESPONSE_NOT_IMPLEMENTED = 100
RESPONSE_NO_MAPPING = 28
RESPONSE_REFUSED = 7
RESPONSE_RPCERROR = 10
RESPONSE_SEARCHFAILED = 12
RESPONSE_SERVERERROR = 5
RESPONSE_SERVER_UNAVAILABLE = 503
RESPONSE_SUCCESS = 0
RESPONSE_TIMEDOUT = 8
RESPONSE_TOOBIG = 6
RESPONSE_UNAVAILABLE = 11
RESPONSE_UNSUPPORTED = 13
RESPONSE_VLAN_UNAVAILABLE = 24
class elasticslice.rpc.protogeni.ProtoGeniClientServer(addr='0.0.0.0', port=15243, username=None, password=None, passwdDict=None, modules=None, cert=None, cacert='/root/.ssl/emulab-cacert.pem', noCertHostChecking=False, ext_addr=None, ext_port=None)[source]

Bases: M2Crypto.SSL.SSLServer.ThreadingSSLServer, SimpleXMLRPCServer.SimpleXMLRPCDispatcher

This is a simple client-side, threaded XMLRPC server that server-side ProtoGeni components can invoke to send notifications, and possibly request information. For now, the only module they might try to invoke is the ‘dynslice’ module.

This simple server uses your GENI certificate as its CA certificate, and validates the incoming RPC invocations from ProtoGeni servers. In addition to certificate validation, it can also use HTTPS username/passwd authentication (and the ProtoGeni server programs will use that if specified).

__init__(addr='0.0.0.0', port=15243, username=None, password=None, passwdDict=None, modules=None, cert=None, cacert='/root/.ssl/emulab-cacert.pem', noCertHostChecking=False, ext_addr=None, ext_port=None)[source]
checkAuthorizationHeader(header)[source]
getModule(modname)[source]
getURL()[source]
handle_requests_threaded(timeout=0.1)[source]
stop_handling()[source]
verify_request(request, client_address)[source]
wantsAuthorization()[source]
class elasticslice.rpc.protogeni.ProtoGeniClientServerEndpoint(clientServer=None)[source]

Bases: object

A stub class from which all ClientServer Endpoints should descend.

__init__(clientServer=None)[source]
setClientServer(s)[source]
class elasticslice.rpc.protogeni.ProtoGeniClientXMLRPCRequestHandler(request, client_address, server)[source]

Bases: BaseHTTPServer.BaseHTTPRequestHandler

Simple XML-RPC request handler class.

Handles all HTTP POST requests and attempts to decode them as XML-RPC requests. Taken from the SimpleXMLRPCServer module and heavily modified with path-based # dispatch.

do_AUTHHEAD()[source]
do_POST()[source]

Handles the HTTP POST request.

Attempts to interpret all HTTP POST requests as XML-RPC calls, and handle them here so we have path info. Can’t forward to ._dispatch in the server because we lose the path info.

log_request(code='-', size='-')[source]

Selectively log an accepted request.

protocol_version = 'HTTP/1.0'
class elasticslice.rpc.protogeni.ProtoGeniManifestWrapper(path=None, xml=None)[source]

Bases: geni.rspec.pgmanifest.Manifest

A simple wrapper for the geni-lib ProtoGeni Manifest. The intent is to provide users some syntactic sugar to obtain common interesting pieces of information without walking the XML themselves.

__init__(path=None, xml=None)[source]
getHostnameAndPort(node)[source]
getLinkAddressInfo(lan_client_id)[source]

Returns a dict of address info for the specified lan’s client_id, which contains:

'netmasks' : [netmask,...] (there really should only be one
                              entry here, of course)
'min_ip' : ip
'max_ip' : ip

The intent is that this could help an IP address algorithm generate addresses for new nodes, but so that they don’t overlap with existing addresses.

getLinkClientIds()[source]

Returns a list of link client_ids.

iptonum(ip)[source]
class elasticslice.rpc.protogeni.ProtoGeniResponse(code, value=0, output='')[source]

An object encapsulating a ProtoGeni RPC Server method response.

__init__(code, value=0, output='')[source]
class elasticslice.rpc.protogeni.ProtoGeniServer(config=None, cert='/root/.ssl/encrypted.pem', passphrasefile='/root/.ssl/password', cacert=None, noCertHostChecking=False, endpoints={}, devuser=None, slicename=None, sliceurn=None, cms={'clemson': 'https://www.clemson.cloudlab.us:12369/protogeni/xmlrpc', 'clutah': 'https://www.utah.cloudlab.us:12369/protogeni/xmlrpc', 'emulab': 'https://www.emulab.net:12369/protogeni/xmlrpc', 'wisc': 'https://www.wisc.cloudlab.us:12369/protogeni/xmlrpc', 'apt': 'https://boss.apt.emulab.net:12369/protogeni/xmlrpc'}, default_cm='emulab', cmuri=None, sauri=None, speaksforcredential=None, fscache=True, fscachedir=None, cache_times={'sa': {'DiscoverResources': 3600, 'GetCredential': 300, 'Resolve': 3600, 'GetKeys': 31536000}, 'cm': {'DiscoverResources': 600, 'SliverStatus': 60, 'Resolve': 3600}}, nolock=False)[source]

Bases: object

A ProtoGeniServer is a class that provides a client user with the ability to call RPCs at ProtoGENI SA (slice authority) and CM (component manager) (aka AM – aggregate manager) servers. In the Cloudlab/PG world, Emulab central is the SA, and the various clusters are CM/AMs. This client helps you create a slice at an SA (defaults to Emulab, or whomever issued your certificate), then create slivers at one or more CM/AMs by submitting an RSpec to each cluster. An RSpec describes the resources you want allocated and how they’re configured/connected.

It is a generic class that lets you directly invoke PG/GENI methods on a CH, SA, AM, CM; but it also provides wrappers for key functions on ProtoGENI’s SA and CM interfaces. It creates an XMLRPC connection for each RPC you invoke, although it attempts to cache credentials and state from your previous RPCs, and only renew those things as necessary.

Some of the methods cache results for you. Some RPCs are very heavyweight (i.e. DiscoverResources), and you just don’t need to refresh the resource list all that often. However, you may want to review the information it contains more regularly, and only refresh periodically or in exceptional cases. The caching infrastructure helps with this pattern. Generally speaking, the rule is that any RPCs that modify resources or state on the server are not cached; whereas requests for information are cached. Any method that caches an RPC’s result has several keyword args (i.e., force, cache_notifier) that help you interact with the cache usefully. Finally, the cache persists itself by default to HOME/.protogeni/cache .

Finally, this server stub can be multithreaded; it locks itself to prevent parallel invocation of certain methods. Right now it uses one big lock; this should be broken out into a cache lock, and locks for each RPC endpoint URI. This may seem stupid, but we really want to reduce weird things happening (i.e., two parallel CM.AddNodes calls on the same slice, or two parallel CM.SliverStatus calls that duplicate work).

class CacheNotifier(server)[source]

Bases: object

A simple cache notifier object, to tell the caller (if it cares) whether the return value is cached, is new, and when it expires.

__init__(server)[source]
Parameters:server – The ProtoGeniServer instance object this CacheNotifier belongs to.
added = None

The add/update timestamp (ctime) of this cached value.

cached = None

True if this value was cached; False if not.

expires = None

The expiration timestamp of this cached value.

key = None

The key for this cached value.

reset()[source]

Resets all fields (except server) to constructor defaults.

Returns:self (a convenience so you can reuse the object trivially by passing cache_notifier=notifier.reset() to a caching ProtoGeniServer method)
server = None

The ProtoGeniServer instance object this CacheNotifier belongs to.

updated = None

True if this value was updated as a result of the operation associated with this CacheNotifier; False if not.

ProtoGeniServer.__init__(config=None, cert='/root/.ssl/encrypted.pem', passphrasefile='/root/.ssl/password', cacert=None, noCertHostChecking=False, endpoints={}, devuser=None, slicename=None, sliceurn=None, cms={'clemson': 'https://www.clemson.cloudlab.us:12369/protogeni/xmlrpc', 'clutah': 'https://www.utah.cloudlab.us:12369/protogeni/xmlrpc', 'emulab': 'https://www.emulab.net:12369/protogeni/xmlrpc', 'wisc': 'https://www.wisc.cloudlab.us:12369/protogeni/xmlrpc', 'apt': 'https://boss.apt.emulab.net:12369/protogeni/xmlrpc'}, default_cm='emulab', cmuri=None, sauri=None, speaksforcredential=None, fscache=True, fscachedir=None, cache_times={'sa': {'DiscoverResources': 3600, 'GetCredential': 300, 'Resolve': 3600, 'GetKeys': 31536000}, 'cm': {'DiscoverResources': 600, 'SliverStatus': 60, 'Resolve': 3600}}, nolock=False)[source]
Parameters:
  • cert – Your GENI user certificate. It should be encrypted, and you’ll need to supply a passphrase. Defaults to ~/.ssl/encrypted.pem .
  • passphrasefile – If you place your certificate passphrase into a file and tell the constructor, you won’t be prompted to enter your password all the time.
  • cacert – The certificate authority who issued your cert. Defaults to ~/.ssl/@<default_cm>-cacert.pem .
  • default_cm – The CM to use by default (if none is specified to any of the CM API wrapper functions via cm= keyword arg)
  • noCertHostChecking – Usually, when certs are verified during SSL session establishment, the CN field is checked for a matching hostname. This should only be disabled if you’re trying to talk to a server that doesn’t have a real certificate – or a server that is using a GENI identity cert as its certificate.
  • endpoints – A dictionary of endpoint types to endpoint URL information. This is useful if you would like to use a non-default SA, CH, etc.
  • devuser – If you want to invoke RPCs through an Emulab developer’s development tree, provide the dev’s loginuid here, and it will get added to RPC URLs in the right way.
  • slicename – The HRN of the “default” slice that will be used in any RPCs for which a slicename is required and not supplied in that call.
  • sliceurn – The URN of the “default” slice that will be used in any RPCs for which a slicename is required and not supplied in that call.
  • cms – A dict of known CMs; defaults to protogeniclientlib.DEFAULT_CMS.
  • default_cm – The default cm to use for CM RPCs when one isn’t specified as a method argument. Must be a key in @cms.
  • cmuri – Provide a custom CM URI here instead of filling out cms. If this is set, it will become your @default_cm (with a name of “custom”).
  • sauri – Provide a custom SA URI here.
  • speaksforcredential – A credential of a GENI user on whose behalf you are invoking RPCs.
  • fscache – Should we cache method results to the filesystem; True or False
  • fscachedir – The location of the fscache; defaults to HOME/.protogeni/cache
  • cache_times – A dict of SA/CM RPCs to cache times in seconds; defaults to DEFAULT_METHOD_CACHE_TIMES.
  • nolock – Set this to true if you don’t want any locking.
ProtoGeniServer.add_nodes(nodes={}, slicename=None, cm=None, URI=None, selfcredential=None)[source]

Add nodes to a sliver at a CM.

Parameters:
  • nodes – A Python dictionary where each key/val pair comforms to the specifications for the ‘nodes’ parameter to the CMv2::AddNodes method.
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the default CM will be used
ProtoGeniServer.create_slice(slicename=None, valid_until=None, selfcredential=None)[source]

Create a slice.

Parameters:
  • slicename – Specify a slice URN
  • valid_until – Specify a slice expiration time (as a GMT time string)
ProtoGeniServer.create_sliver(rspec, cm=None, slicename=None, dokeys=True, selfcredential=None, gen_random_key=False)[source]

Create a sliver at a CM.

Parameters:
  • rspec – An RSpec as an XML string
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the default CM will be used
  • dokeys – Install your pubkeys in the sliver if True
  • gen_random_key – Generate an unencrypted RSA key that will be installed on each node if True
ProtoGeniServer.delete_nodes(nodes=[], slicename=None, cm=None, URI=None, selfcredential=None)[source]

Delete nodes from a sliver at a CM.

Parameters:
  • nodes – A list of logical or physical node IDs that are in your slice.
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the default CM will be used
ProtoGeniServer.delete_slice(slicename=None, cmlist=None, selfcredential=None)[source]

Delete a slice.

Parameters:
  • slicename – Specify a slice URN
  • cmlist – A comma-separated list of CMs to delete slivers at; defaults to the default CM if unspecified.
ProtoGeniServer.delete_sliver(cm=None, slicename=None, selfcredential=None)[source]

Delete a sliver at a CM.

Parameters:
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the defaul CM will be used
ProtoGeniServer.do_method(module, method, params, URI=None, project=None, quiet=False, version=None, response_handler=None, cm=None, force=False, cache=False, cache_accept_stale=False, cache_add_params=[], cache_destroy_params=[], cache_destroy_extra=[], cache_replace_info=None, cache_notifier=None, cache_expire_func=None)[source]

Invoke an RPC.

Parameters:
  • module – The RPC server module to invoke method within; sa, cm, dynslice, etc.
  • method – The RPC method to invoke.
  • params – A dict of params to pass to the method invocation.
  • URI – A custom URI to use; if not supplied, the full URI is constructed based on the specified @module and @cm.
  • project – If this is a Project URN (i.e. for ProtoGENI/Cloudlab), this is the project we need to stick into URLs for some SA calls (i.e. Register, RenewSlice).
  • version – Specify the version of the module/method being invoked (i.e., a str like “2.0”
  • cm – Call this method on a specific CM; defaults to self.default_cm.
  • force – If True, don’t simply return a cached value even if a valid, unexpired value exists in the cache; call the method on the server. Otherwise, if a non-zero, positive integer, if the value is cached and the result is older than force seconds, also call the method on the server.
  • cache – True if the caller of do_method wants the result cached. This is typically used by our method wrappers below to cache values.
  • cache_accept_stale – True if the caller will accept a stale value.
  • cache_notifier – A CacheNotifier object; caller can set this to find out if the response was already cached; if it was updated; and when it expires; these metadata are useful in the caller’s decision of when to next call a particular method.
  • cache_add_params,cache_destroy_params,cache_destroy_extra,cache_replace_info – These all control how the value is cached, uncached, or if it triggers destruction or replacement of other cached values. For instance, calling DeleteSliver at a CM should remove the result of any prior SliverStatus call. This is complicated to use and should only be used by this class’s wrapper functions.
  • cache_expire_func – A function that is applied to the response from the RPC server to determine its expiration time. For instance, we use this to extract the expiration time of credentials so that we can age them out in accordance with their expiration time. Like the arguments above, this should only be called by wrapper functions in this class.
Returns:

An (rval,response) tuple. The rval is a ProtoGeniClientDefs response code; the response is a dict containing a ‘value’ key/value, whose value is the output from the RPC.

ProtoGeniServer.do_method_retry(module, method, params, URI=None, project=None, retries=200, quiet=False, version=None, response_handler=None, cm=None, force=False, cache=False, cache_accept_stale=False, cache_add_params=[], cache_destroy_params=[], cache_destroy_extra=[], cache_replace_info=None, cache_notifier=None, cache_expire_func=None)[source]

Retries the RPC @retries times (default 200).

ProtoGeniServer.geni_am_response_handler(method, method_args)[source]

Handles the GENI AM responses, which are different from the ProtoGENI responses. ProtoGENI always returns a dict with three keys (code, value, and output. GENI AM operations return the value, or an XML RPC Fault if there was a problem.

ProtoGeniServer.geni_sr_response_handler(method, method_args)[source]

Handles the GENI SR responses, which are different from the ProtoGENI responses. ProtoGENI always returns a dict with three keys (code, value, and output). GENI SR operations return the value, or an XML RPC Fault if there was a problem.

ProtoGeniServer.get_cache_notifier()[source]
Returns:a ProtoGeniServer.CacheNotifier object that

can be passed to any ProtoGeniServer method that takes a cache_notifier parameter, to be notified if the return value was cached (if not cached, it’s new), and when it expires from the cache.

ProtoGeniServer.get_hostname_and_port(client_id, cm=None, slicename=None, force=False)[source]

Get a hostname and SSH port for the given client_id.

Parameters:
  • client_id – A GENI client_id (the logical name for a resource)
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the defaul CM will be used
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.get_keys(selfcredential=None, cache_notifier=None)[source]

Get user’s keys from the SA (SA:GetKeys).

ProtoGeniServer.get_manifest(cm=None, slicename=None, force=False)[source]

Get a sliver manifest from a CM.

Parameters:
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the defaul CM will be used
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.get_resources(cm=None, available=False, URI=None, selfcredential=None, force=False, cache_notifier=None)[source]

Get a resource advertisement from a CM.

Parameters:
  • available – Only list currently-available resources if True
  • cm – Specify a CM; otherwise the defaul CM will be used
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.get_self_credential(force=False, cache_notifier=None)[source]

Gets a self credential (SA::GetCredential).

Parameters:force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.get_slice_credential(slice=None, slicename=None, selfcredential=None, force=False, cache_notifier=None)[source]

Get a slice credential (SA::GetCredential).

Parameters:
  • slicename – Specify a slice URN
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.get_slice_expiration(slicename=None, selfcredential=None, force=False)[source]

Get the slice expiration as a local UNIX timestamp (SA::Resolve).

Parameters:
  • slicename – Specify a slice URN
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.get_sliver_credential(slicename=None, selfcredential=None, force=False, cache_notifier=None)[source]

Get a sliver credential (CM::GetSliver()).

Parameters:
  • slicename – Specify a slice URN
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.get_sliver_urn(cm=None, slicename=None, force=False)[source]

Get a sliver URN at a CM.

Parameters:
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the defaul CM will be used
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.get_user_email()[source]

Get your user email.

ProtoGeniServer.get_user_uid()[source]

Get your user uid.

ProtoGeniServer.get_user_urn()[source]

Get your user URN.

ProtoGeniServer.get_wrapped_manifest(cm=None, slicename=None, force=False)[source]
ProtoGeniServer.loadCache()[source]

Loads the persistent disk cache of RPC results; removes expired values.

ProtoGeniServer.renew_slice(slicename=None, additional_seconds=None, expiration_time=None, cmlist=None, selfcredential=None)[source]

Renew a slice (and possibly its slivers).

Parameters:
  • slicename – Specify a slice URN
  • expiration_time – Specify an expiration time string, in GMT
  • additional_seconds – If expiration_time is not set, and this is, <additional_seconds> will be added to your slice’s current expiration time.
  • cmlist – A comma-separated list of CMs to renew slivers at; defaults to the default CM if unspecified.
ProtoGeniServer.renew_sliver(cm=None, slicename=None, selfcredential=None)[source]

Renew sliver at a CM using the current slice expiration time.

Parameters:
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the defaul CM will be used
ProtoGeniServer.resolve_slice(slicename=None, selfcredential=None, force=False, cache_notifier=None)[source]

Resolve a slice (SA::Resolve(type=slice)).

Parameters:
  • slicename – Specify a slice URN
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.resolve_sliver(cm=None, slicename=None, selfcredential=None, force=False, cache_notifier=None)[source]

Resolve a sliver at a CM.

Parameters:
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the defaul CM will be used
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.resolve_user(urn=None, selfcredential=None, cache_notifier=None)[source]

Resolve a GENI user (SA::Resolve(type=user).

Parameters:urn – Specify a user URN
ProtoGeniServer.set_client_endpoint(clientserver, defwaittime=None, policy=None, cm=None, slicename=None, selfcredential=None)[source]
ProtoGeniServer.set_client_endpoint_options(defwaittime=None, policy=None, cm=None, slicename=None, selfcredential=None)[source]
ProtoGeniServer.sliver_status(cm=None, slicename=None, selfcredential=None, force=False, cache_notifier=None)[source]

Get sliver status from a CM.

Parameters:
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the defaul CM will be used
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
ProtoGeniServer.sliver_status_details(cm=None, slicename=None, selfcredential=None, force=False, cache_notifier=None, nodesonly=False)[source]

Get status for all resources in a sliver from a CM.

Parameters:
  • slicename – Specify a slice URN
  • cm – Specify a CM; otherwise the defaul CM will be used
  • force – If True, or if nonzero, positive integer and the cached value has been cached greater than force seconds — bypass the cache. Otherwise, might return a cached value.
  • nodesonly – Only show node status (i.e., not lans/links/etc)
elasticslice.rpc.protogeni.SENDMAIL(To, Subject, Msg, From=None, headers=None)[source]
class elasticslice.rpc.protogeni.SelfCredential(credential)[source]

Bases: elasticslice.rpc.protogeni.Credential

__init__(credential)[source]
class elasticslice.rpc.protogeni.Slice(urn, uuid, creator_uuid, creator_urn, gid, component_managers)[source]

Bases: object

__init__(urn, uuid, creator_uuid, creator_urn, gid, component_managers)[source]
class elasticslice.rpc.protogeni.SliceCredential(credential)[source]

Bases: elasticslice.rpc.protogeni.Credential

__init__(credential)[source]
class elasticslice.rpc.protogeni.Sliver[source]

Bases: object

__init__()[source]
class elasticslice.rpc.protogeni.User(uid, hrn, uuid, email, gid, name)[source]

Bases: object

__init__(uid, hrn, uuid, email, gid, name)[source]
elasticslice.rpc.protogeni.parse_bool(str)[source]
elasticslice.rpc.protogeni.parse_bool_or_int(str)[source]
elasticslice.rpc.protogeni.parse_cm_list(cmliststr)[source]
elasticslice.rpc.protogeni.parse_rspec_arg(_rspec)[source]
elasticslice.rpc.protogeni.parse_safe_eval(value)[source]
elasticslice.rpc.protogeni.parse_safe_list_or_eval(value)[source]
elasticslice.rpc.protogeni.parse_str_list(str)[source]

Module contents