use of org.onosproject.incubator.net.virtual.VirtualNetworkAdminService in project onos by opennetworkinglab.
the class VirtualDeviceCreateCommand method doExecute.
@Override
protected void doExecute() {
VirtualNetworkAdminService service = get(VirtualNetworkAdminService.class);
service.createVirtualDevice(NetworkId.networkId(networkId), DeviceId.deviceId(deviceId));
print("Virtual device successfully created.");
}
use of org.onosproject.incubator.net.virtual.VirtualNetworkAdminService in project onos by opennetworkinglab.
the class VirtualDeviceRemoveCommand method doExecute.
@Override
protected void doExecute() {
VirtualNetworkAdminService service = get(VirtualNetworkAdminService.class);
service.removeVirtualDevice(NetworkId.networkId(networkId), DeviceId.deviceId(deviceId));
print("Virtual device successfully removed.");
}
use of org.onosproject.incubator.net.virtual.VirtualNetworkAdminService in project onos by opennetworkinglab.
the class TenantAddCommand method doExecute.
@Override
protected void doExecute() {
VirtualNetworkAdminService service = get(VirtualNetworkAdminService.class);
service.registerTenantId(TenantId.tenantId(id));
print("Tenant successfully added.");
}
use of org.onosproject.incubator.net.virtual.VirtualNetworkAdminService in project onos by opennetworkinglab.
the class VirtualPortBindCommand method doExecute.
@Override
protected void doExecute() {
VirtualNetworkAdminService service = get(VirtualNetworkAdminService.class);
DeviceService deviceService = get(DeviceService.class);
VirtualPort vPort = getVirtualPort(PortNumber.portNumber(portNum));
checkNotNull(vPort, "The virtual Port does not exist");
ConnectPoint realizedBy = new ConnectPoint(DeviceId.deviceId(physDeviceId), PortNumber.portNumber(physPortNum));
service.bindVirtualPort(NetworkId.networkId(networkId), DeviceId.deviceId(deviceId), PortNumber.portNumber(portNum), realizedBy);
print("Virtual port is successfully bound.");
}
use of org.onosproject.incubator.net.virtual.VirtualNetworkAdminService in project onos by opennetworkinglab.
the class VirtualPortCreateCommand method doExecute.
@Override
protected void doExecute() {
VirtualNetworkAdminService service = get(VirtualNetworkAdminService.class);
DeviceService deviceService = get(DeviceService.class);
VirtualDevice virtualDevice = getVirtualDevice(DeviceId.deviceId(deviceId));
checkNotNull(virtualDevice, "The virtual device does not exist.");
ConnectPoint realizedBy = null;
if (physDeviceId != null && physPortNum != null) {
checkNotNull(physPortNum, "The physical port does not specified.");
realizedBy = new ConnectPoint(DeviceId.deviceId(physDeviceId), PortNumber.portNumber(physPortNum));
checkNotNull(realizedBy, "The physical port does not exist.");
}
service.createVirtualPort(NetworkId.networkId(networkId), DeviceId.deviceId(deviceId), PortNumber.portNumber(portNum), realizedBy);
print("Virtual port successfully created.");
}
Aggregations