The networking_cisco.plugins.cisco.cfg_agent.device_drivers.driver_mgr
Module¶
-
class
networking_cisco.plugins.cisco.cfg_agent.device_drivers.driver_mgr.
DeviceDriverManager
¶ Bases:
object
This class acts as a manager for device drivers.
The device driver manager maintains the relationship between the different neutron logical resource (eg: routers, firewalls, vpns etc.) and where they are hosted. For configuring a logical resource (router) in a hosting device, a corresponding device driver object is used. Device drivers encapsulate the necessary configuration information to configure a logical resource (eg: routers, firewalls, vpns etc.) on a hosting device (eg: CSR1kv).
The device driver class loads one driver object per hosting device. The loaded drivers are cached in memory, so when a request is made to get driver object for the same hosting device and resource (like router), the existing driver object is reused.
This class is used by the service helper classes.
-
get_driver
(resource_id)¶
-
get_driver_for_hosting_device
(hd_id)¶
-
remove_driver
(resource_id)¶ Remove driver associated to a particular resource.
-
remove_driver_for_hosting_device
(hd_id)¶ Remove driver associated to a particular hosting device.
-
set_driver
(resource)¶ Set the driver for a neutron resource.
Parameters: resource – Neutron resource in dict format. Expected keys:
{ 'id': <value>, 'hosting_device': { 'id': <value>, }, 'router_type': {'cfg_agent_driver': <value>, } }
Returns: driver object
-