diff options
Diffstat (limited to 'framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual')
20 files changed, 0 insertions, 1106 deletions
diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/DefaultVirtualDevice.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/DefaultVirtualDevice.java deleted file mode 100644 index e3339a9a..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/DefaultVirtualDevice.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import org.onlab.packet.ChassisId; -import org.onosproject.net.DefaultDevice; -import org.onosproject.net.DeviceId; -import org.onosproject.net.provider.ProviderId; - -import java.util.Objects; - -import static com.google.common.base.MoreObjects.*; - -/** - * Default representation of a virtual device. - */ -public class DefaultVirtualDevice extends DefaultDevice implements VirtualDevice { - - private static final String VIRTUAL = "virtual"; - private static final ProviderId PID = new ProviderId(VIRTUAL, VIRTUAL); - - private final NetworkId networkId; - - /** - * Creates a network element attributed to the specified provider. - * - * @param networkId network identifier - * @param id device identifier - */ - public DefaultVirtualDevice(NetworkId networkId, DeviceId id) { - super(PID, id, Type.VIRTUAL, VIRTUAL, VIRTUAL, VIRTUAL, VIRTUAL, - new ChassisId(0)); - this.networkId = networkId; - } - - @Override - public NetworkId networkId() { - return networkId; - } - - @Override - public int hashCode() { - return 31 * super.hashCode() + networkId.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj instanceof DefaultVirtualDevice) { - DefaultVirtualDevice that = (DefaultVirtualDevice) obj; - return super.equals(that) && Objects.equals(this.networkId, that.networkId); - } - return false; - } - - @Override - public String toString() { - return toStringHelper(this).add("networkId", networkId).toString(); - } -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/DefaultVirtualNetwork.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/DefaultVirtualNetwork.java deleted file mode 100644 index c1141912..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/DefaultVirtualNetwork.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import java.util.Objects; - -import static com.google.common.base.MoreObjects.toStringHelper; - -/** - * Default implementation of the virtual network descriptor. - */ -public class DefaultVirtualNetwork implements VirtualNetwork { - - private final NetworkId id; - private final TenantId tenantId; - - /** - * Creates a new virtual network descriptor. - * - * @param id network identifier - * @param tenantId tenant identifier - */ - public DefaultVirtualNetwork(NetworkId id, TenantId tenantId) { - this.id = id; - this.tenantId = tenantId; - } - - @Override - public NetworkId id() { - return id; - } - - @Override - public TenantId tenantId() { - return tenantId; - } - - @Override - public int hashCode() { - return Objects.hash(id, tenantId); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj instanceof DefaultVirtualNetwork) { - DefaultVirtualNetwork that = (DefaultVirtualNetwork) obj; - return Objects.equals(this.id, that.id) - && Objects.equals(this.tenantId, that.tenantId); - } - return false; - } - - @Override - public String toString() { - return toStringHelper(this) - .add("id", id) - .add("tenantId", tenantId) - .toString(); - } -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/NetworkId.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/NetworkId.java deleted file mode 100644 index 27123287..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/NetworkId.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import com.google.common.annotations.Beta; - -import java.util.Objects; - -/** - * Representation of network identity. - */ -@Beta -public final class NetworkId { - - /** - * Represents no network, or an unspecified network. - */ - public static final NetworkId NONE = networkId(-1L); - - /** - * Represents the underlying physical network. - */ - public static final NetworkId PHYSICAL = networkId(0L); - - - private final long id; - - // Public construction is prohibited - private NetworkId(long id) { - this.id = id; - } - - - // Default constructor for serialization - protected NetworkId() { - this.id = -1; - } - - /** - * Creates a network id using the supplied backing id. - * - * @param id network id - * @return network identifier - */ - public static NetworkId networkId(long id) { - return new NetworkId(id); - } - - @Override - public int hashCode() { - return Objects.hash(id); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj instanceof NetworkId) { - final NetworkId that = (NetworkId) obj; - return this.getClass() == that.getClass() && this.id == that.id; - } - return false; - } - - @Override - public String toString() { - return Long.toString(id); - } - -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/TenantId.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/TenantId.java deleted file mode 100644 index 196c17d4..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/TenantId.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import com.google.common.annotations.Beta; - -import java.util.Objects; - -import static com.google.common.base.Preconditions.checkArgument; - -/** - * Representation of network tenant. - */ -@Beta -public final class TenantId { - - /** - * Represents no tenant, or an unspecified tenant. - */ - public static final TenantId NONE = new TenantId(); - - - private final String id; - - // Public construction is prohibited - private TenantId(String id) { - checkArgument(id != null && id.length() > 0, "Tenant ID cannot be null or empty"); - this.id = id; - } - - - // Default constructor for serialization - protected TenantId() { - this.id = ""; - } - - /** - * Creates a tenant id using the supplied backing id. - * - * @param id network id - * @return network identifier - */ - public static TenantId tenantId(String id) { - return new TenantId(id); - } - - @Override - public int hashCode() { - return id.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj instanceof TenantId) { - final TenantId that = (TenantId) obj; - return this.getClass() == that.getClass() && - Objects.equals(this.id, that.id); - } - return false; - } - - @Override - public String toString() { - return id; - } - -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualDevice.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualDevice.java deleted file mode 100644 index 59e781a3..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualDevice.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import com.google.common.annotations.Beta; -import org.onosproject.net.Device; - -/** - * Abstraction of a virtual device. - */ -@Beta -public interface VirtualDevice extends VirtualElement, Device { -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualElement.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualElement.java deleted file mode 100644 index 791b8e24..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualElement.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import com.google.common.annotations.Beta; - -/** - * Abstraction of a virtual element. - */ -@Beta -public interface VirtualElement { - - /** - * Returns the network identifier to which this virtual element belongs. - * - * @return network identifier - */ - NetworkId networkId(); -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualHost.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualHost.java deleted file mode 100644 index fdea8b61..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualHost.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import com.google.common.annotations.Beta; -import org.onosproject.net.Host; - -/** - * Abstraction of a virtual end-station host. - */ -@Beta -public interface VirtualHost extends VirtualElement, Host { -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualLink.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualLink.java deleted file mode 100644 index ac0063fe..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualLink.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import com.google.common.annotations.Beta; -import org.onosproject.net.Link; - -/** - * Abstraction of a virtual link. - */ -@Beta -public interface VirtualLink extends VirtualElement, Link { -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetwork.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetwork.java deleted file mode 100644 index b28a5d3a..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetwork.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import com.google.common.annotations.Beta; - -/** - * Representation of a virtual network. - */ -@Beta -public interface VirtualNetwork { - - /** - * Returns the network identifier. - * - * @return network id - */ - NetworkId id(); - - /** - * Returns the identifier of the tenant to which this virtual network belongs. - * - * @return tenant identifier - */ - TenantId tenantId(); - -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkAdminService.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkAdminService.java deleted file mode 100644 index 07c399c0..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkAdminService.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import com.google.common.annotations.Beta; -import org.onosproject.incubator.net.tunnel.TunnelId; -import org.onosproject.net.ConnectPoint; -import org.onosproject.net.DeviceId; -import org.onosproject.net.Port; -import org.onosproject.net.PortNumber; - -import java.util.Set; - -/** - * Service for managing the inventory of virtual networks. - */ -@Beta -public interface VirtualNetworkAdminService extends VirtualNetworkService { - - /** - * Registers the specified, externally generated tenant identifier. - * - * @param tenantId tenant identifier - */ - void registerTenantId(TenantId tenantId); - - /** - * Unregisters the specified, externally generated tenant identifier. - * - * @param tenantId tenant identifier - * @throws IllegalStateException if there are networks still owned by this tenant - */ - void unregisterTenantId(TenantId tenantId); - - /** - * Returns the set of tenant identifiers known to the system. - * - * @return set of known tenant identifiers - */ - Set<TenantId> getTenantIds(); - - - /** - * Creates a new virtual network for the specified tenant. - * - * @param tenantId tenant identifier - * @return newly created virtual network - */ - VirtualNetwork createVirtualNetwork(TenantId tenantId); - - /** - * Removes the specified virtual network and all its devices and links. - * - * @param networkId network identifier - */ - void removeVirtualNetwork(NetworkId networkId); - - - /** - * Creates a new virtual device within the specified network. The device id - * must be unique within the bounds of the network. - * - * @param networkId network identifier - * @param deviceId device identifier - * @return newly created device - * @throws org.onlab.util.ItemNotFoundException if no such network found - */ - VirtualDevice createVirtualDevice(NetworkId networkId, DeviceId deviceId); - - /** - * Removes the specified virtual device and all its ports and affiliated links. - * - * @param networkId network identifier - * @param deviceId device identifier - * @throws org.onlab.util.ItemNotFoundException if no such network or device found - */ - void removeVirtualDevice(NetworkId networkId, DeviceId deviceId); - - - /** - * Creates a new virtual link within the specified network. - * - * @param networkId network identifier - * @param src source connection point - * @param dst destination connection point - * @param realizedBy identifier of the tunnel using which this link is realized - * @return newly created virtual link - * @throws org.onlab.util.ItemNotFoundException if no such network found - */ - VirtualLink createVirtualLink(NetworkId networkId, - ConnectPoint src, ConnectPoint dst, - TunnelId realizedBy); - - // TODO: Discuss whether we should provide an alternate createVirtualLink - // which is backed by a Path instead; I'm leaning towards not doing that. - - /** - * Removes the specified virtual link. - * - * @param networkId network identifier - * @param src source connection point - * @param dst destination connection point - * @throws org.onlab.util.ItemNotFoundException if no such network or link found - */ - void removeVirtualLink(NetworkId networkId, ConnectPoint src, ConnectPoint dst); - - /** - * Creates a new virtual port on the specified device. - * - * @param networkId network identifier - * @param deviceId device identifier - * @param portNumber port number - * @param realizedBy underlying port using which this virtual port is realized - * @return newly created port - * @throws org.onlab.util.ItemNotFoundException if no such network or device found - */ - VirtualPort createVirtualPort(NetworkId networkId, DeviceId deviceId, - PortNumber portNumber, Port realizedBy); - - /** - * Removes the specified virtual port. - * - * @param networkId network identifier - * @param deviceId device identifier - * @param portNumber port number - * @throws org.onlab.util.ItemNotFoundException if no such network or port found - */ - void removeVirtualPort(NetworkId networkId, DeviceId deviceId, PortNumber portNumber); - -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkEvent.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkEvent.java deleted file mode 100644 index 7e076e09..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkEvent.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import org.onosproject.event.AbstractEvent; - -/** - * Describes virtual network event. - */ -public class VirtualNetworkEvent extends AbstractEvent<VirtualNetworkEvent.Type, NetworkId> { - - /** - * Type of virtual network events. - */ - public enum Type { - /** - * Signifies that a new tenant identifier was registered. - */ - TENANT_REGISTERED, - /** - * Signifies that a tenant identifier was unregistered. - */ - TENANT_UNREGISTERED, - /** - * Signifies that a new virtual network was added. - */ - NETWORK_ADDED, - /** - * Signifies that a virtual network was updated. - */ - NETWORK_UPDATED, - /** - * Signifies that a virtual network was removed. - */ - NETWORK_REMOVED - } - - /** - * Creates an event of a given type and for the specified subject and the - * current time. - * - * @param type event type - * @param subject event subject - */ - public VirtualNetworkEvent(Type type, NetworkId subject) { - super(type, subject); - } - - /** - * Creates an event of a given type and for the specified subject and time. - * - * @param type device event type - * @param subject event subject - * @param time occurrence time - */ - public VirtualNetworkEvent(Type type, NetworkId subject, long time) { - super(type, subject, time); - } -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkListener.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkListener.java deleted file mode 100644 index 707ca8a7..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkListener.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import org.onosproject.event.EventListener; - -/** - * Represents entity capable of receiving virtual network events. - */ -public interface VirtualNetworkListener extends EventListener<VirtualNetworkEvent> { -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkProvider.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkProvider.java deleted file mode 100644 index bf4a4855..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkProvider.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.onosproject.incubator.net.virtual; - -import org.onosproject.incubator.net.tunnel.TunnelId; -import org.onosproject.net.ConnectPoint; -import org.onosproject.net.provider.Provider; - -/** - * Entity capable of providing traffic isolation constructs for use in - * implementation of virtual devices and virtual links. - */ -public interface VirtualNetworkProvider extends Provider { - - /** - * Creates a network tunnel for all traffic from the specified source - * connection point to the indicated destination connection point. - * - * @param networkId virtual network identifier - * @param src source connection point - * @param dst destination connection point - * @return new tunnel's id - */ - TunnelId createTunnel(NetworkId networkId, ConnectPoint src, ConnectPoint dst); - - /** - * Destroys the specified network tunnel. - * - * @param networkId virtual network identifier - * @param tunnelId tunnel identifier - */ - void destroyTunnel(NetworkId networkId, TunnelId tunnelId); - -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkProviderRegistry.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkProviderRegistry.java deleted file mode 100644 index 4e893165..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkProviderRegistry.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2014 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import org.onosproject.net.provider.ProviderRegistry; - -/** - * Abstraction of a virtual network provider registry. - */ -public interface VirtualNetworkProviderRegistry - extends ProviderRegistry<VirtualNetworkProvider, VirtualNetworkProviderService> { -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkProviderService.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkProviderService.java deleted file mode 100644 index cba933c9..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkProviderService.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.onosproject.incubator.net.virtual; - -import org.onosproject.net.provider.ProviderService; - -/** - * Service through which virtual network providers can inject information into - * the core. - */ -public interface VirtualNetworkProviderService extends ProviderService<VirtualNetworkProvider> { - // TODO: Add methods for notification of core about damaged tunnels, etc. -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkService.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkService.java deleted file mode 100644 index 01681ef4..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkService.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import com.google.common.annotations.Beta; -import org.onosproject.net.DeviceId; - -import java.util.Set; - -/** - * Service for querying virtual network inventory. - */ -@Beta -public interface VirtualNetworkService { - - /** - * Returns a collection of all virtual networks created on behalf of the - * specified tenant. - * - * @param tenantId tenant identifier - * @return collection of networks - * @throws org.onlab.util.ItemNotFoundException if no such network found - */ - Set<VirtualNetwork> getVirtualNetworks(TenantId tenantId); - - /** - * Returns a collection of all virtual devices in the specified network. - * - * @param networkId network identifier - * @return collection of devices - * @throws org.onlab.util.ItemNotFoundException if no such network found - */ - Set<VirtualDevice> getVirtualDevices(NetworkId networkId); - - /** - * Returns collection of all virtual links in the specified network. - * - * @param networkId network identifier - * @return collection of links - * @throws org.onlab.util.ItemNotFoundException if no such network found - */ - Set<VirtualLink> getVirtualLinks(NetworkId networkId); - - /** - * Returns list of all virtual ports of the specified device. - * - * @param networkId network identifier - * @param deviceId device identifier - * @return list of ports - * @throws org.onlab.util.ItemNotFoundException if no such network found - */ - Set<VirtualPort> getVirtualPorts(NetworkId networkId, DeviceId deviceId); - - /** - * Returns implementation of the specified service class for operating - * in the context of the given network. - * <p> - * The following services will be available: - * <ul> - * <li>{@link org.onosproject.net.device.DeviceService}</li> - * <li>{@link org.onosproject.net.link.LinkService}</li> - * <li>{@link org.onosproject.net.host.HostService}</li> - * <li>{@link org.onosproject.net.topology.TopologyService}</li> - * <li>{@link org.onosproject.net.topology.PathService}</li> - * <li>{@link org.onosproject.net.flow.FlowRuleService}</li> - * <li>{@link org.onosproject.net.flowobjective.FlowObjectiveService}</li> - * <li>{@link org.onosproject.net.intent.IntentService}</li> - * </ul> - * - * @param networkId network identifier - * @param serviceClass service class - * @param <T> type of service - * @return implementation class - * @throws org.onlab.util.ItemNotFoundException if no such network found - * @throws org.onlab.osgi.ServiceNotFoundException if no implementation found - */ - <T> T get(NetworkId networkId, Class<T> serviceClass); - -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkStore.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkStore.java deleted file mode 100644 index 49ad2f2b..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkStore.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import org.onosproject.incubator.net.tunnel.TunnelId; -import org.onosproject.net.ConnectPoint; -import org.onosproject.net.DeviceId; -import org.onosproject.net.Port; -import org.onosproject.net.PortNumber; -import org.onosproject.store.Store; - -import java.util.Set; - -/** - * Mechanism for distributing and storing virtual network model information. - */ -public interface VirtualNetworkStore - extends Store<VirtualNetworkEvent, VirtualNetworkStoreDelegate> { - - /** - * Adds a new tenant ID to the store. - * - * @param tenantId tenant identifier - */ - void addTenantId(TenantId tenantId); - - /** - * Removes the specified tenant ID from the store. - * - * @param tenantId tenant identifier - */ - void removeTenantId(TenantId tenantId); - - /** - * Returns set of registered tenant IDs. - * - * @return set of tenant identifiers - */ - Set<TenantId> getTenantIds(); - - /** - * Adds a new virtual network for the specified tenant to the store. - * - * @param tenantId tenant identifier - * @return the virtual network - */ - VirtualNetwork addNetwork(TenantId tenantId); - - /** - * Removes the specified virtual network from the store. - * - * @param networkId network identifier - */ - void removeNetwork(NetworkId networkId); - - /** - * Adds a new virtual device to the store. This device will have no ports. - * - * @param networkId network identifier - * @param deviceId device identifier - * @return the virtual device - */ - VirtualDevice addDevice(NetworkId networkId, DeviceId deviceId); - - /** - * Renmoves the specified virtual device from the given network. - * - * @param networkId network identifier - * @param deviceId device identifier - */ - void removeDevice(NetworkId networkId, DeviceId deviceId); - - /** - * Adds a new virtual link. - * - * @param networkId network identifier - * @param src source end-point of the link - * @param dst destination end-point of the link - * @param realizedBy underlying tunnel using which this link is realized - * @return the virtual link - */ - VirtualLink addLink(NetworkId networkId, ConnectPoint src, ConnectPoint dst, - TunnelId realizedBy); - - /** - * Removes the specified link from the store. - * - * @param networkId network identifier - * @param src source connection point - * @param dst destination connection point - */ - void removeLink(NetworkId networkId, ConnectPoint src, ConnectPoint dst); - - /** - * Adds a new virtual port to the network. - * - * @param networkId network identifier - * @param deviceId device identifier - * @param portNumber port number - * @param realizedBy underlying port which realizes the virtual port - * @return the virtual port - */ - VirtualPort addPort(NetworkId networkId, DeviceId deviceId, - PortNumber portNumber, Port realizedBy); - - /** - * Removes the specified port from the given device and network. - * - * @param networkId network identifier - * @param deviceId device identifier - * @param portNumber port number - */ - void removePort(NetworkId networkId, DeviceId deviceId, PortNumber portNumber); - - /** - * Returns the list of networks. - * - * @param tenantId tenant identifier - * @return set of virtual networks - */ - Set<VirtualNetwork> getNetworks(TenantId tenantId); - - /** - * Returns the list of devices in the specified virtual network. - * - * @param networkId network identifier - * @return set of virtual devices - */ - Set<VirtualDevice> getDevices(NetworkId networkId); - - /** - * Returns the list of virtual links in the specified virtual network. - * - * @param networkId network identifier - * @return set of virtual links - */ - Set<VirtualLink> getLinks(NetworkId networkId); - - /** - * Returns the list of ports of the specified virtual device. - * - * @param networkId network identifier - * @param deviceId device identifier - * @return set of virtual networks - */ - Set<VirtualPort> getPorts(NetworkId networkId, DeviceId deviceId); - -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkStoreDelegate.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkStoreDelegate.java deleted file mode 100644 index e57c3d3a..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkStoreDelegate.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import org.onosproject.store.StoreDelegate; - -/** - * Network configuration store delegate abstraction. - */ -public interface VirtualNetworkStoreDelegate extends StoreDelegate<VirtualNetworkEvent> { -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualPort.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualPort.java deleted file mode 100644 index 179bb2c9..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualPort.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.virtual; - -import com.google.common.annotations.Beta; -import org.onosproject.net.Port; - -/** - * Representation of a virtual port. - */ -@Beta -public interface VirtualPort extends Port { - - /** - * Returns the underlying port using which this port is realized. - * - * @return underlying port which realizes this virtual port - */ - Port realizedBy(); - -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/package-info.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/package-info.java deleted file mode 100644 index 3a0676a5..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Network virtualization data models and services. - */ -package org.onosproject.incubator.net.virtual;
\ No newline at end of file |