use of org.onosproject.scalablegateway.api.ScalableGatewayService in project onos by opennetworkinglab.
the class ScalableGatewayDeleteCommand method doExecute.
@Override
protected void doExecute() {
ScalableGatewayService service = get(ScalableGatewayService.class);
GatewayNode gatewayNode = service.getGatewayNode(DeviceId.deviceId(deviceId));
if (gatewayNode == null) {
print(UNKNOWN);
return;
}
if (service.deleteGatewayNode(gatewayNode)) {
print(SUCCESS);
} else {
print(FAIL);
}
}
use of org.onosproject.scalablegateway.api.ScalableGatewayService in project onos by opennetworkinglab.
the class ScalableGatewayAddCommand method doExecute.
@Override
protected void doExecute() {
ScalableGatewayService service = get(ScalableGatewayService.class);
GatewayNode gatewayNode = GatewayNode.builder().gatewayDeviceId(DeviceId.deviceId(deviceId)).dataIpAddress(Ip4Address.valueOf(ipAddress)).uplinkIntf(interfaceName).build();
if (service.addGatewayNode(gatewayNode)) {
print(SUCCESS);
} else {
print(FAIL);
}
}
use of org.onosproject.scalablegateway.api.ScalableGatewayService in project onos by opennetworkinglab.
the class ScalableGatewayListCommand method doExecute.
@Override
protected void doExecute() {
ScalableGatewayService service = get(ScalableGatewayService.class);
service.getGatewayNodes().forEach(node -> print(FORMAT, node.getGatewayDeviceId().toString(), node.getDataIpAddress().toString(), node.getUplinkIntf().toString()));
}
Aggregations