Search in sources :

Example 1 with VoltAlertConfig

use of org.onosproject.drivers.fujitsu.behaviour.VoltAlertConfig in project onos by opennetworkinglab.

the class VoltSubscribeCommand method doExecute.

@Override
protected void doExecute() {
    DriverService service = get(DriverService.class);
    deviceId = DeviceId.deviceId(uri);
    DriverHandler h = service.createHandler(deviceId);
    VoltAlertConfig volt = h.behaviour(VoltAlertConfig.class);
    volt.subscribe(mode);
}
Also used : VoltAlertConfig(org.onosproject.drivers.fujitsu.behaviour.VoltAlertConfig) DriverHandler(org.onosproject.net.driver.DriverHandler) DriverService(org.onosproject.net.driver.DriverService)

Example 2 with VoltAlertConfig

use of org.onosproject.drivers.fujitsu.behaviour.VoltAlertConfig in project onos by opennetworkinglab.

the class VoltGetAlertFilterCommand method doExecute.

@Override
protected void doExecute() {
    DriverService service = get(DriverService.class);
    deviceId = DeviceId.deviceId(uri);
    DriverHandler h = service.createHandler(deviceId);
    VoltAlertConfig voltNe = h.behaviour(VoltAlertConfig.class);
    String reply = voltNe.getAlertFilter();
    if (reply != null) {
        print("%s", reply);
    } else {
        print("No reply from %s", deviceId.toString());
    }
}
Also used : VoltAlertConfig(org.onosproject.drivers.fujitsu.behaviour.VoltAlertConfig) DriverHandler(org.onosproject.net.driver.DriverHandler) DriverService(org.onosproject.net.driver.DriverService)

Example 3 with VoltAlertConfig

use of org.onosproject.drivers.fujitsu.behaviour.VoltAlertConfig in project onos by opennetworkinglab.

the class VoltSetAlertFilterCommand method doExecute.

@Override
protected void doExecute() {
    DriverService service = get(DriverService.class);
    deviceId = DeviceId.deviceId(uri);
    DriverHandler h = service.createHandler(deviceId);
    VoltAlertConfig volt = h.behaviour(VoltAlertConfig.class);
    volt.setAlertFilter(severity);
}
Also used : VoltAlertConfig(org.onosproject.drivers.fujitsu.behaviour.VoltAlertConfig) DriverHandler(org.onosproject.net.driver.DriverHandler) DriverService(org.onosproject.net.driver.DriverService)

Aggregations

VoltAlertConfig (org.onosproject.drivers.fujitsu.behaviour.VoltAlertConfig)3 DriverHandler (org.onosproject.net.driver.DriverHandler)3 DriverService (org.onosproject.net.driver.DriverService)3