Ravel Python API Reference
A Database-Defined Network Controller
|
Superclass for a network provider. More...
Public Member Functions | |
def | __init__ |
def | cacheNodes |
Cache node-name mapping in memory from database. More... | |
def | addLink |
Add a link to the topology. More... | |
def | removeLink |
Remove a link from the topology. More... | |
def | addSwitch |
Add a new switch to the topology. More... | |
def | removeSwitch |
Remove a switch from the topology. More... | |
def | addHost |
Add a new host to the topology. More... | |
def | removeHost |
Remove a host from the topology. More... | |
def | start |
Start the network provider and any components in the network. | |
def | stop |
Stop the network provider and any components in the network. | |
def | cli |
Pass commands to the network provider's CLI, if it has its own. More... | |
Superclass for a network provider.
A network provider exposes the underlying topology to Ravel's database and CLI. It also receives and handles changes to the topology that are made from the database (eg, a link is removed from the database)
def ravel.network.NetworkProvider.__init__ | ( | self, | |
queue_id, | |||
db | |||
) |
queue_id | an integer id to be used for the database to communicate with the provider for updates to the topology inserted into the database |
db | a ravel.db.RavelDb instance |
def ravel.network.NetworkProvider.addHost | ( | self, | |
msg | |||
) |
Add a new host to the topology.
msg | an AddHostMessage object |
def ravel.network.NetworkProvider.addLink | ( | self, | |
msg | |||
) |
Add a link to the topology.
msg | an AddLinkMessage object |
def ravel.network.NetworkProvider.addSwitch | ( | self, | |
msg | |||
) |
Add a new switch to the topology.
msg | an AddSwitchMessage object |
def ravel.network.NetworkProvider.cacheNodes | ( | self, | |
nodes | |||
) |
Cache node-name mapping in memory from database.
nodes | dictionary of (name, id) values |
def ravel.network.NetworkProvider.cli | ( | self, | |
cmd | |||
) |
Pass commands to the network provider's CLI, if it has its own.
Preferably, the behavior should follow the same pattern as Ravel's application sub-shells, which executes a command is one is given, otherwise loop in the CLI on an empty input
cmd | the command run within the provider's CLI |
def ravel.network.NetworkProvider.removeHost | ( | self, | |
msg | |||
) |
Remove a host from the topology.
msg | a RemoveHostMessage object |
def ravel.network.NetworkProvider.removeLink | ( | self, | |
msg | |||
) |
Remove a link from the topology.
msg | a RemoveLinkMessage object |
def ravel.network.NetworkProvider.removeSwitch | ( | self, | |
msg | |||
) |
Remove a switch from the topology.
msg | a RemoveSwitchMessage object |