geni.aggregate.vts

class HostPOAs(vtsam)[source]
execcmd(context, sname, client_ids, cmd)[source]
getARPTable(context, sname, client_ids)[source]
getRouteTable(context, sname, client_ids)[source]
svcStatus(context, sname, client_ids)[source]
class Policy(vtsam)[source]
getText(context, pid=None)[source]

Get the text contents of the policy requested. If no policy is specified and only one policy exists at the aggregate, that policy text will be returned.

Parameters:
  • context – geni-lib context
  • pid – policy ID (typically from getversion output)
Returns:

str – Text contents of policy

giveConsent(context, pid)[source]

Give consent to the policy indicated for the user URN in the credential used.

Parameters:
  • context – geni-lib context
  • pid – policy ID
revokeConsent(context, pid)[source]

Revoke consent from this date forward to the policy indicated for the user URN in the credential used.

Parameters:
  • context – geni-lib context
  • pid – policy ID
class VTS(name, host, url=None)[source]

Wrapper for all VTS-supported AMAPI functions

exception InvalidRSpecPathError(path)
args
message
exception VTS.UnspecifiedComponentManagerError
args
message
VTS.addDNSResourceRecord(context, sname, client_id, record_name, record_type, record_value, record_ttl=7200)[source]
VTS.addFlows(context, sname, flows)[source]
VTS.addSSHKeys(context, sname, client_ids, keys)[source]
VTS.allocate(context, sname, rspec)[source]
VTS.amtype
VTS.api
VTS.changeController(context, sname, url, datapaths, ofver=None)[source]
VTS.clearFlows(context, sname, datapaths)[source]

Clear all installed flows from the requested datapaths.

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name
  • datapaths (list) – A list of datapath client_id strings
VTS.clearL2Table(context, sname, client_ids)[source]
VTS.component_manager_id
VTS.createsliver(context, sname, rspec)

GENI AM APIv2 method to reserve resources at this aggregate.

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name
  • rspec (geni.rspec.RSpec) – Valid request RSpec
VTS.deleteDNSResourceRecord(context, sname, client_id, record_name, record_type)[source]
VTS.deletesliver(context, sname)

GENI AM APIv2 method to delete a resource reservation at this aggregate.

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name
VTS.dropboxFinalize(context, authcode)[source]

Finalize the Dropbox account link for this aggregate.

Parameters:
  • context – geni-lib context
  • authcode (str) – Authorization code given by Dropbox

Link your user_urn to a Dropbox account at this aggregate.

Parameters:context – geni-lib context
Returns:str – Dropbox authorization URL to paste into web browser
VTS.dropboxUpload(context, sname, cvols)[source]

Trigger upload to associated Dropbox account from requested container volumes.

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name
  • cvols (list) – List of (container client-id, volume-id) tuples
VTS.dumpFlows(context, sname, datapaths, show_hidden=False)[source]

Get the current flows and flow stats from the requested datapaths.

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name
  • datapaths (list) – A list of datapath client_id strings
  • show_hidden (bool) – Show hidden flows (if any)
Returns:

dict – Key/Value dictionary of format { client_id : [(flow_field, ...), ...] }

VTS.getAllDNSResourceRecords(context, sname, client_ids)[source]
VTS.getL2Table(context, sname, client_ids)[source]
VTS.getLastDNSDHCPops(context, sname, client_ids, number_of_operations, dns_OR_dhcp)[source]
VTS.getLeaseInfo(context, sname, client_ids)[source]
VTS.getPortInfo(context, sname, datapaths)[source]
VTS.getRSTPInfo(context, sname, datapaths)[source]
VTS.getSTPInfo(context, sname, datapaths)[source]
VTS.getversion(context)

GENI AM API method to get the version information for this aggregate.

Parameters:context – geni-lib context
Returns:dict – Dictionary of key/value pairs with version information from this aggregate.
VTS.hgPull(context, sname, cvols)[source]

Update an HgMount volume with the latest data from the source repository.

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name
  • cvols (list) – List of (container client-id, volume-id) tuples
VTS.listresources(context, sname=None, available=False)

GENI AM APIv2 method to get available resources from an aggregate, or resources allocated to a specific sliver.

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name (optional)
  • available (bool) – Only list available resources
Returns:

geni.rspec.RSpec – If sname is provided, listresources will return a manifest rspec for the given slice name. Otherwise, listresources will return the advertisement rspec for the given aggregate.

VTS.portDown(context, sname, client_id)[source]
VTS.portUp(context, sname, client_id)[source]
VTS.provision(context, sname)[source]
VTS.renewsliver(context, sname, date)

GENI AM APIv2 method to renew a sliver until the given datetime.

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name
  • date (str) – RFC 3339-compliant date string for new expiration date

Note

Aggregates may have maximum expiration limits, restricting how far in the future you can set your expiration. This call may result in an error in such cases, or success with a sooner future date.

VTS.setDHCPSubnet(context, sname, subnet_tuples)[source]
VTS.setDeleteLock(context, sname)[source]

Prevent the given sliver from being deleted by another user with the credential.

Note

Locks are cumulative, and removed by calling deletesliver. When the last locking user calls deletesliver, the sliver will be deleted. It is not possible to remove your lock without risking deletion.

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name
VTS.setPortBehaviour(context, sname, port_list)[source]
VTS.setPortTrunk(context, sname, port_list)[source]
VTS.setPortVLAN(context, sname, port_tuples)[source]
VTS.sliverstatus(context, sname)

GENI AM APIv2 method to get the status of a current sliver at the given aggregate.

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name
Returns:

dict – Mapping of key/value pairs for status information the aggregate supports.

aggregateFromHost(host)[source]
aggregates()[source]
name_to_aggregate()[source]
class v4RouterPOAs(vtsam)[source]
addOSPFNetworks(context, sname, client_ids, nets)[source]

Add OSPF Networks to areas on the given routers

Parameters:
  • context – geni-lib context
  • sname (str) – Slice name
  • client_ids (list) – A list of client-id strings
  • nets (list) – A list of (network, area) tuples
getOSPFNeighbors(context, sname, client_ids)[source]
getRouteTable(context, sname, client_ids)[source]