UML
This section demonstrate how the infrastructure is built. This section goes
into quite a bit of details, and is a suplement to help reading the actual
source code of Genie.
Base
The infrastructure base classes are setup like this.
The following APIs are used to control the topology of the Testbed.
Base for all Genie objects, contains
__init__and__repr__.Base for all Genie
confobjects. Contains__init__which is setting all extrakwargsto the object. instantiates the__instancesdictionary which contains a weakref to all the Genie objects.testbedproperty is defined at this level.Contains
build_configandbuild_unconfigfunctions which are decorated via@lookup('os', 'context'). This enables abstraction based ondevice.osanddevice.contextforconfobjects when either of these two methods are calledContains default methods for all future features objects.
Base class for all Device-based feature object. What to when it is added, removed and so on.
Base class for all Interface-based feature object. What to when it is added,removed and so on.
Base class for all Link-based feature object. What to when it is added,removed and so on.
Contains all the APIs to manipulate a
link, and to addfeaturesto it.Contains all the APIs to manipulate the
testbed, add topology objects to it and alsofeatures.Contains all the APIs to manipulate a
device, and to addfeaturesto it.Contains all the APIs to manipulate an
interfaces, and to addfeaturesto it.
The following APIs are used to control the way the user interact with the objects attributes, and the structured objects.
Base object which allows to inherits attributes from parent object. Overwrites
__setattr__, `__getattr__, and__delattr__. Can also verify if a particular attribute is inherited.Base class fo subattributes classes. It addeds testbed property.
Go through the API doc for this one, cannot be sum up in a few lines.
Implementation of a KeyedSubattributes for a particular devices.
Implementation of a KeyedSubattributes for a particular interfaces.