Search in sources :

Example 1 with VoltNniLinkConfig

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

the class VoltSetNniLinkCommand 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);
    boolean reply = volt.setNniLink(target);
    if (!reply) {
        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 2 with VoltNniLinkConfig

use of org.onosproject.drivers.fujitsu.behaviour.VoltNniLinkConfig 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)

Aggregations

VoltNniLinkConfig (org.onosproject.drivers.fujitsu.behaviour.VoltNniLinkConfig)2 DriverHandler (org.onosproject.net.driver.DriverHandler)2 DriverService (org.onosproject.net.driver.DriverService)2