Search in sources :

Example 21 with DriverService

use of org.onosproject.net.driver.DriverService in project onos by opennetworkinglab.

the class VoltGetPonLinksCommand method doExecute.

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

Example 22 with DriverService

use of org.onosproject.net.driver.DriverService in project onos by opennetworkinglab.

the class VoltOndemandFwdlCommand method doExecute.

@Override
protected void doExecute() {
    DriverService service = get(DriverService.class);
    deviceId = DeviceId.deviceId(uri);
    DriverHandler h = service.createHandler(deviceId);
    VoltFwdlConfig volt = h.behaviour(VoltFwdlConfig.class);
    String reply = volt.upgradeFirmwareOndemand(target);
    if (reply != null) {
        print("%s", reply);
    } else {
        print("ONU firmware-upgrade failure %s", deviceId.toString());
    }
}
Also used : DriverHandler(org.onosproject.net.driver.DriverHandler) DriverService(org.onosproject.net.driver.DriverService) VoltFwdlConfig(org.onosproject.drivers.fujitsu.behaviour.VoltFwdlConfig)

Example 23 with DriverService

use of org.onosproject.net.driver.DriverService in project onos by opennetworkinglab.

the class VoltRebootOnuCommand method doExecute.

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

Example 24 with DriverService

use of org.onosproject.net.driver.DriverService 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)

Example 25 with DriverService

use of org.onosproject.net.driver.DriverService in project onos by opennetworkinglab.

the class VoltSetOnuCommand method doExecute.

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

Aggregations

DriverService (org.onosproject.net.driver.DriverService)32 DriverHandler (org.onosproject.net.driver.DriverHandler)23 DeviceId (org.onosproject.net.DeviceId)9 DeviceService (org.onosproject.net.device.DeviceService)5 List (java.util.List)3 Set (java.util.Set)3 Tools.groupedThreads (org.onlab.util.Tools.groupedThreads)3 VoltOnuConfig (org.onosproject.drivers.fujitsu.behaviour.VoltOnuConfig)3 DefaultDriverData (org.onosproject.net.driver.DefaultDriverData)3 DefaultDriverHandler (org.onosproject.net.driver.DefaultDriverHandler)3 Driver (org.onosproject.net.driver.Driver)3 Beta (com.google.common.annotations.Beta)2 ImmutableSet (com.google.common.collect.ImmutableSet)2 Lists (com.google.common.collect.Lists)2 Maps (com.google.common.collect.Maps)2 Dictionary (java.util.Dictionary)2 Map (java.util.Map)2 Objects (java.util.Objects)2 Optional (java.util.Optional)2 ExecutorService (java.util.concurrent.ExecutorService)2