Search in sources :

Example 16 with VirtualNetworkAdminService

use of org.onosproject.incubator.net.virtual.VirtualNetworkAdminService in project onos by opennetworkinglab.

the class VirtualPortRemoveCommand method doExecute.

@Override
protected void doExecute() {
    VirtualNetworkAdminService service = get(VirtualNetworkAdminService.class);
    service.removeVirtualPort(NetworkId.networkId(networkId), DeviceId.deviceId(deviceId), PortNumber.portNumber(portNum));
    print("Virtual port successfully removed.");
}
Also used : VirtualNetworkAdminService(org.onosproject.incubator.net.virtual.VirtualNetworkAdminService)

Example 17 with VirtualNetworkAdminService

use of org.onosproject.incubator.net.virtual.VirtualNetworkAdminService in project onos by opennetworkinglab.

the class VirtualHostRemoveCommand method doExecute.

@Override
protected void doExecute() {
    VirtualNetworkAdminService service = get(VirtualNetworkAdminService.class);
    service.removeVirtualHost(NetworkId.networkId(networkId), HostId.hostId(id));
    print("Virtual host successfully removed.");
}
Also used : VirtualNetworkAdminService(org.onosproject.incubator.net.virtual.VirtualNetworkAdminService)

Example 18 with VirtualNetworkAdminService

use of org.onosproject.incubator.net.virtual.VirtualNetworkAdminService in project onos by opennetworkinglab.

the class VirtualLinkCreateCommand method doExecute.

@Override
protected void doExecute() {
    VirtualNetworkAdminService service = get(VirtualNetworkAdminService.class);
    ConnectPoint src = new ConnectPoint(DeviceId.deviceId(srcDeviceId), PortNumber.portNumber(srcPortNum));
    ConnectPoint dst = new ConnectPoint(DeviceId.deviceId(dstDeviceId), PortNumber.portNumber(dstPortNum));
    service.createVirtualLink(NetworkId.networkId(networkId), src, dst);
    if (bidirectional) {
        service.createVirtualLink(NetworkId.networkId(networkId), dst, src);
    }
    print("Virtual link successfully created.");
}
Also used : VirtualNetworkAdminService(org.onosproject.incubator.net.virtual.VirtualNetworkAdminService) ConnectPoint(org.onosproject.net.ConnectPoint)

Aggregations

VirtualNetworkAdminService (org.onosproject.incubator.net.virtual.VirtualNetworkAdminService)18 ConnectPoint (org.onosproject.net.ConnectPoint)4 TenantId (org.onosproject.net.TenantId)4 ArrayList (java.util.ArrayList)3 StringsCompleter (org.apache.karaf.shell.support.completers.StringsCompleter)2 VirtualNetwork (org.onosproject.incubator.net.virtual.VirtualNetwork)2 VirtualPort (org.onosproject.incubator.net.virtual.VirtualPort)2 DeviceService (org.onosproject.net.device.DeviceService)2 HashSet (java.util.HashSet)1 IpAddress (org.onlab.packet.IpAddress)1 MacAddress (org.onlab.packet.MacAddress)1 VlanId (org.onlab.packet.VlanId)1 VirtualDevice (org.onosproject.incubator.net.virtual.VirtualDevice)1 VirtualNetworkService (org.onosproject.incubator.net.virtual.VirtualNetworkService)1 HostLocation (org.onosproject.net.HostLocation)1