Search in sources :

Example 76 with DriverHandler

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

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

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

Example 79 with DriverHandler

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

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

Aggregations

DriverHandler (org.onosproject.net.driver.DriverHandler)104 DeviceId (org.onosproject.net.DeviceId)46 DriverService (org.onosproject.net.driver.DriverService)22 NetconfController (org.onosproject.netconf.NetconfController)22 NetconfException (org.onosproject.netconf.NetconfException)22 MastershipService (org.onosproject.mastership.MastershipService)20 ArrayList (java.util.ArrayList)12 DefaultDriverHandler (org.onosproject.net.driver.DefaultDriverHandler)12 ItemNotFoundException (org.onlab.util.ItemNotFoundException)9 DeviceService (org.onosproject.net.device.DeviceService)9 OvsdbClientService (org.onosproject.ovsdb.controller.OvsdbClientService)9 DefaultDriverData (org.onosproject.net.driver.DefaultDriverData)8 Driver (org.onosproject.net.driver.Driver)8 Test (org.junit.Test)7 ControllerInfo (org.onosproject.net.behaviour.ControllerInfo)6 RestSBController (org.onosproject.protocol.rest.RestSBController)6 JsonNode (com.fasterxml.jackson.databind.JsonNode)5 ByteArrayInputStream (java.io.ByteArrayInputStream)5 PolicerConfigurable (org.onosproject.net.behaviour.trafficcontrol.PolicerConfigurable)5 PolicerId (org.onosproject.net.behaviour.trafficcontrol.PolicerId)5