Table Of Contents

This Page

nepi.resources.planetlab package

Submodules

nepi.resources.planetlab.node module

class nepi.resources.planetlab.node.PlanetlabNode(ec, guid)[source]

Bases: nepi.resources.linux.node.LinuxNode

do_discover()[source]

Based on the attributes defined by the user, discover the suitable nodes for provision.

do_provision()[source]

Add node to user’s slice after verifing that the node is functioning correctly

do_release()[source]
fail_discovery()[source]
fail_node_not_alive(hostname=None)[source]
fail_node_not_available(hostname)[source]
fail_not_enough_nodes()[source]
fail_plapi()[source]
lock = <thread.lock object at 0x7f3057038550>
plapi[source]
valid_connection(guid)[source]

nepi.resources.planetlab.plcapi module

class nepi.resources.planetlab.plcapi.PLCAPI(username, password, hostname, urlpattern, ec, proxy, session_key=None, local_peer='PLE')[source]

Bases: object

add_slice_nodes(slicename, nodes)[source]
api[source]
blacklist_host(node_id)[source]
blacklisted()[source]
delete_slice_node(slice_id_or_name, node_id_or_hostname)[source]
finish_multicall()[source]
get_interfaces(interface_id_or_ip=None, fields=None, **kw)[source]
get_node_flavour(node)[source]

Returns detailed information on a given node’s flavour, i.e. its base installation.

This depends on the global PLC settings in the PLC_FLAVOUR area, optionnally overridden by any of the following tags if set on that node: ‘arch’, ‘pldistro’, ‘fcdistro’, ‘deployment’, ‘extensions’

Params:

  • node : int or string
    • int, Node identifier
    • string, Fully qualified hostname

Returns:

struct
  • extensions : array of string, extensions to add to the base install
  • fcdistro : string, the fcdistro this node should be based upon
  • nodefamily : string, the nodefamily this node should be based upon
  • plain : boolean, use plain bootstrapfs image if set (for tests)
get_node_info(node_id)[source]
get_node_tags(node_tag_id=None, fields=None, **kw)[source]
get_nodes(node_id_or_name=None, fields=None, **kw)[source]

Returns an array of structs containing details about nodes. If node_id_or_name is specified and is an array of node identifiers or hostnames, or the filters keyword argument with struct of node attributes, or node attributes by keyword argument, only nodes matching the filter will be returned.

If fields is specified, only the specified details will be returned. NOTE that if fields is unspecified, the complete set of native fields are returned, which DOES NOT include tags at this time.

Some fields may only be viewed by admins.

Special params:

fields: an optional list of fields to retrieve. The default is all.

filters: an optional mapping with custom filters, which is the only
way to support complex filters like negation and numeric comparisons.
peer: a string (or sequence of strings) with the name(s) of peers
to filter - or None for local nodes.
get_slice_id(slicename)[source]
get_slice_nodes(slicename)[source]
get_slice_tags(slice_tag_id=None, fields=None, **kw)[source]
get_slice_vnet_sys_tag(slicename)[source]
get_slices(slice_id_or_name=None, fields=None, **kw)[source]
mcapi[source]
network_types[source]
peer_map[source]
release()[source]
reserve_host(node_id)[source]
reserved()[source]
start_multicall()[source]
test()[source]
unblacklist_host(node_id)[source]
unreserve_host(node_id)[source]
update_slice(slice_id_or_name, **kw)[source]
class nepi.resources.planetlab.plcapi.PLCAPIFactory[source]

Bases: object

Note

It allows PlanetLab RMs sharing a same slice, to use a same plcapi instance, and to sincronize blacklisted and reserved hosts.

classmethod create_api(pl_user, pl_pass, pl_host, pl_ptn, ec, proxy=None)[source]

Create an PLCAPI instance

Parameters:
  • pl_user (str) – Planelab user name (used for web login)
  • pl_pass (str) – Planetlab password (used for web login)
  • pl_host (str) – Planetlab registry host (e.g. “www.planet-lab.eu”)
  • pl_ptn (str) – XMLRPC service pattern (e.g. https://%(hostname)s:443/PLCAPI/)
  • proxy – Proxy service url
classmethod get_api(pl_user, pl_pass, pl_host, pl_ptn, ec, proxy=None)[source]

Get existing PLCAPI instance

Parameters:
  • pl_user (str) – Planelab user name (used for web login)
  • pl_pass (str) – Planetlab password (used for web login)
  • pl_host (str) – Planetlab registry host (e.g. “www.planet-lab.eu”)
  • pl_ptn (str) – XMLRPC service pattern (e.g. https://%(hostname)s:443/PLCAPI/)
  • proxy – Proxy service url

nepi.resources.planetlab.sfa_node module

class nepi.resources.planetlab.sfa_node.PlanetlabSfaNode(ec, guid)[source]

Bases: nepi.resources.linux.node.LinuxNode

do_discover()[source]

Based on the attributes defined by the user, discover the suitable nodes for provision.

do_provision()[source]

Add node to user’s slice and verifing that the node is functioning correctly. Check ssh, file system.

do_release()[source]
fail_discovery()[source]
fail_node_not_alive(hostname=None)[source]
fail_node_not_available(hostname)[source]
fail_not_enough_nodes()[source]
fail_sfaapi()[source]
sfaapi[source]

Property to instanciate the SFA API based in sfi client. For each SFA method called this instance is used.

valid_connection(guid)[source]

nepi.resources.planetlab.tap module

class nepi.resources.planetlab.tap.PlanetlabTap(ec, guid)[source]

Bases: nepi.resources.linux.tap.LinuxTap

gre_connect(remote_endpoint, connection_app_home, connection_run_home)[source]
node[source]
upload_sources()[source]
upload_start_command()[source]
valid_connection(guid)[source]
vif_name_file[source]
wait_vif_name(exec_run_home=None)[source]

Waits until the vif_name file for the command is generated, and returns the vif_name for the device

nepi.resources.planetlab.tun module

class nepi.resources.planetlab.tun.PlanetlabTun(ec, guid)[source]

Bases: nepi.resources.planetlab.tap.PlanetlabTap

nepi.resources.planetlab.vroute module

class nepi.resources.planetlab.vroute.PlanetlabVroute(ec, guid)[source]

Bases: nepi.resources.linux.application.LinuxApplication

do_deploy()[source]
do_release()[source]
do_start()[source]
do_stop()[source]
node[source]
tap[source]
upload_sources()[source]
upload_start_command()[source]
valid_connection(guid)[source]

Module contents