@Service public class NetconfControllerImpl extends Object implements NetconfController
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.cfg.ComponentConfigService |
cfgService |
protected NetconfDeviceFactory |
deviceFactory |
protected org.onosproject.net.key.DeviceKeyService |
deviceKeyService |
protected org.onosproject.net.device.DeviceService |
deviceService |
static org.slf4j.Logger |
log |
protected Set<NetconfDeviceListener> |
netconfDeviceListeners |
protected static int |
netconfReplyTimeout |
| Constructor and Description |
|---|
NetconfControllerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(org.osgi.service.component.ComponentContext context) |
void |
addDeviceListener(NetconfDeviceListener listener)
Adds Device Event Listener.
|
NetconfDevice |
connectDevice(org.onosproject.net.DeviceId deviceId)
Tries to connect to a specific NETCONF device, if the connection is succesful
it creates and adds the device to the ONOS core as a NetconfDevice.
|
void |
deactivate() |
void |
disconnectDevice(org.onosproject.net.DeviceId deviceId,
boolean remove)
Disconnects a Netconf device and removes it from the core.
|
Map<org.onosproject.net.DeviceId,NetconfDevice> |
getDevicesMap()
Gets all the nodes information.
|
NetconfDevice |
getNetconfDevice(org.onosproject.net.DeviceId deviceInfo)
Gets a Netconf Device by node identifier.
|
NetconfDevice |
getNetconfDevice(org.onlab.packet.IpAddress ip,
int port)
Gets a Netconf Device by node identifier.
|
Set<org.onosproject.net.DeviceId> |
getNetconfDevices()
Gets all Netconf Devices.
|
void |
modified(org.osgi.service.component.ComponentContext context) |
void |
removeDevice(org.onosproject.net.DeviceId deviceId)
Removes a Netconf device from the core.
|
void |
removeDeviceListener(NetconfDeviceListener listener)
Removes Device Listener.
|
@Property(name="netconfReplyTimeout",
intValue=5,
label="Time (in seconds) waiting for a NetConf reply")
protected static int netconfReplyTimeout
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cfg.ComponentConfigService cfgService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.net.device.DeviceService deviceService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.net.key.DeviceKeyService deviceKeyService
public static final org.slf4j.Logger log
protected Set<NetconfDeviceListener> netconfDeviceListeners
protected NetconfDeviceFactory deviceFactory
@Activate public void activate(org.osgi.service.component.ComponentContext context)
@Deactivate public void deactivate()
@Modified public void modified(org.osgi.service.component.ComponentContext context)
public void addDeviceListener(NetconfDeviceListener listener)
NetconfControlleraddDeviceListener in interface NetconfControllerlistener - node listenerpublic void removeDeviceListener(NetconfDeviceListener listener)
NetconfControllerremoveDeviceListener in interface NetconfControllerlistener - node listenerpublic NetconfDevice getNetconfDevice(org.onosproject.net.DeviceId deviceInfo)
NetconfControllergetNetconfDevice in interface NetconfControllerdeviceInfo - node identifierpublic NetconfDevice getNetconfDevice(org.onlab.packet.IpAddress ip, int port)
NetconfControllergetNetconfDevice in interface NetconfControllerip - device ipport - device portpublic NetconfDevice connectDevice(org.onosproject.net.DeviceId deviceId) throws NetconfException
NetconfControllerconnectDevice in interface NetconfControllerdeviceId - deviceId of the device to connectNetconfException - when device is not availablepublic void disconnectDevice(org.onosproject.net.DeviceId deviceId,
boolean remove)
NetconfControllerdisconnectDevice in interface NetconfControllerdeviceId - id of the device to removeremove - true if device is to be removed from corepublic void removeDevice(org.onosproject.net.DeviceId deviceId)
NetconfControllerremoveDevice in interface NetconfControllerdeviceId - id of the device to removepublic Map<org.onosproject.net.DeviceId,NetconfDevice> getDevicesMap()
NetconfControllergetDevicesMap in interface NetconfControllerpublic Set<org.onosproject.net.DeviceId> getNetconfDevices()
NetconfControllergetNetconfDevices in interface NetconfController