The networking_cisco.plugins.cisco.device_manager.rpc.devices_cfgagent_rpc_cb Module

class networking_cisco.plugins.cisco.device_manager.rpc.devices_cfgagent_rpc_cb.DeviceMgrCfgRpcCallback(plugin)

Bases: object

Cisco cfg agent rpc support in Device mgr service plugin.

register_for_duty(context, host)

Report that Cisco cfg agent is ready for duty.

This function is supposed to be called when the agent has started, is ready to take on assignments and before any callbacks to fetch logical resources are issued.

Parameters:
  • context – contains user information
  • host – originator of callback
Returns:

True if successfully registered, False if not successfully registered, None if no handler found. If unsuccessful the agent should retry registration a few seconds later

report_non_responding_hosting_devices(context, host, hosting_device_ids)

Report that a hosting device is determined to be dead.

Parameters:
  • context – contains user information
  • host – originator of callback
  • hosting_device_ids – list of non-responding hosting devices
target = <Target version=1.1>
update_hosting_device_status(context, host, status_info)

Report status changes for hosting devices.

Parameters:
  • context – contains user information
  • host – originator of callback
  • status_info

    Dictionary with list of hosting device ids for each type of hosting device status to be updated i.e.:

    {
        HD_ACTIVE: list_of_ids_of_active_hds,
        HD_NOT_RESPONDING: list_of_ids_of_not_responding_hds,
        HD_DEAD: list_of_ids_of_dead_hds,
        ...
    }