@Service public class DefaultSnmpController extends Object implements SnmpController
| Modifier and Type | Field and Description |
|---|---|
protected com.btisystems.pronx.ems.core.snmp.ISnmpSessionFactory |
sessionFactory |
protected Map<org.onosproject.net.DeviceId,com.btisystems.pronx.ems.core.snmp.ISnmpSession> |
sessionMap |
protected Map<org.onosproject.net.DeviceId,SnmpDevice> |
snmpDeviceMap |
| Constructor and Description |
|---|
DefaultSnmpController() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(org.osgi.service.component.ComponentContext context) |
void |
addDevice(org.onosproject.net.DeviceId did,
SnmpDevice device)
Add a device with a specific DeviceId.
|
DefaultAlarm |
buildWalkFailedAlarm(org.onosproject.net.DeviceId deviceId)
Creates an error alarm if the interaction with the device failed.
|
void |
deactivate() |
SnmpDevice |
getDevice(org.onosproject.net.DeviceId did)
Gets a device for a specific deviceId.
|
Collection<SnmpDevice> |
getDevices()
Return all the devices that this controller has notion of.
|
com.btisystems.pronx.ems.core.snmp.ISnmpSession |
getSession(org.onosproject.net.DeviceId deviceId)
Gets an Instance of ISnmpSession for a specific device.
|
void |
removeDevice(org.onosproject.net.DeviceId did)
Removes a specific device.
|
protected com.btisystems.pronx.ems.core.snmp.ISnmpSessionFactory sessionFactory
protected final Map<org.onosproject.net.DeviceId,com.btisystems.pronx.ems.core.snmp.ISnmpSession> sessionMap
protected final Map<org.onosproject.net.DeviceId,SnmpDevice> snmpDeviceMap
@Activate public void activate(org.osgi.service.component.ComponentContext context)
@Deactivate public void deactivate()
public com.btisystems.pronx.ems.core.snmp.ISnmpSession getSession(org.onosproject.net.DeviceId deviceId)
throws IOException
SnmpControllergetSession in interface SnmpControllerdeviceId - device to retrieve the session for.IOException - if the session can't be established.public Collection<SnmpDevice> getDevices()
SnmpControllergetDevices in interface SnmpControllerpublic SnmpDevice getDevice(org.onosproject.net.DeviceId did)
SnmpControllergetDevice in interface SnmpControllerdid - device id of the devicepublic void removeDevice(org.onosproject.net.DeviceId did)
SnmpControllerremoveDevice in interface SnmpControllerdid - device id of the device to be removedpublic void addDevice(org.onosproject.net.DeviceId did,
SnmpDevice device)
SnmpControlleraddDevice in interface SnmpControllerdid - deviceId of the devicedevice - device to add to this controllerpublic DefaultAlarm buildWalkFailedAlarm(org.onosproject.net.DeviceId deviceId)
SnmpControllerbuildWalkFailedAlarm in interface SnmpControllerdeviceId - the device with a failed interaction