Search in sources :

Example 16 with DriverService

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

the class VoltEthLoopbackCommand 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.loopbackEthOnu(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 17 with DriverService

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

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

the class VoltGetNniLinksCommand method doExecute.

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

Example 19 with DriverService

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

the class VoltGetOnuStatsCommand 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.getOnuStatistics(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)

Example 20 with DriverService

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

the class VoltGetOnusCommand 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.getOnus(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