Initial sketch of the virtual network constructs.

Change-Id: Ibcdafb9e56edb29fb37b80d7b0da321ad989c564
diff --git a/core/api/src/main/java/org/onosproject/net/Device.java b/core/api/src/main/java/org/onosproject/net/Device.java
index e36d762..8066a7a 100644
--- a/core/api/src/main/java/org/onosproject/net/Device.java
+++ b/core/api/src/main/java/org/onosproject/net/Device.java
@@ -26,7 +26,7 @@
      * Coarse classification of the type of the infrastructure device.
      */
     public enum Type {
-        SWITCH, ROUTER, ROADM, OTN, ROADM_OTN, FIREWALL, BALANCER, IPS, IDS, CONTROLLER, OTHER
+        SWITCH, ROUTER, ROADM, OTN, ROADM_OTN, FIREWALL, BALANCER, IPS, IDS, CONTROLLER, VIRTUAL, OTHER
     }
 
     /**
@@ -79,10 +79,4 @@
      */
     ChassisId chassisId();
 
-    // Device realizedBy(); ?
-
-    // ports are not provided directly, but rather via DeviceService.getPorts(Device device);
-
-    // Set<Behavior> behaviours(); // set of supported behaviours
-
 }
diff --git a/core/api/src/main/java/org/onosproject/net/Link.java b/core/api/src/main/java/org/onosproject/net/Link.java
index 2dc8eec..7541f75 100644
--- a/core/api/src/main/java/org/onosproject/net/Link.java
+++ b/core/api/src/main/java/org/onosproject/net/Link.java
@@ -51,7 +51,12 @@
         /**
          * Signifies that this link is realized by fiber (either single channel or WDM).
          */
-        OPTICAL
+        OPTICAL,
+
+        /**
+         * Signifies that this link is a virtual link or a pseudo-wire.
+         */
+        VIRTUAL
     }
 
     /**
diff --git a/core/api/src/main/java/org/onosproject/net/Port.java b/core/api/src/main/java/org/onosproject/net/Port.java
index 87d7535..d70b1e1 100644
--- a/core/api/src/main/java/org/onosproject/net/Port.java
+++ b/core/api/src/main/java/org/onosproject/net/Port.java
@@ -53,7 +53,12 @@
          * Signifies optical fiber-based WDM port (called W-port).
          * Optical Multiplexing Section (See ITU G.709).
          */
-        OMS
+        OMS,
+
+        /**
+         * Signifies virtual port.
+         */
+        VIRTUAL
     }
 
     /**
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/PortConfig.java b/core/api/src/main/java/org/onosproject/net/behaviour/PortConfig.java
index 464698e..7de2861 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/PortConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/PortConfig.java
@@ -17,11 +17,12 @@
 
 import com.google.common.primitives.UnsignedInteger;
 import org.onosproject.net.device.PortDescription;
+import org.onosproject.net.driver.HandlerBehaviour;
 
 /**
  * Means to configure a logical port at the device.
  */
-public interface PortConfig {
+public interface PortConfig extends HandlerBehaviour {
 
     /**
      * Apply QoS configuration on a device.
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/NetworkId.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/NetworkId.java
new file mode 100644
index 0000000..2712328
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/NetworkId.java
@@ -0,0 +1,84 @@
+/*
+ * 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/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/TenantId.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/TenantId.java
new file mode 100644
index 0000000..a00f880
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/TenantId.java
@@ -0,0 +1,83 @@
+/*
+ * 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 Objects.hash(id);
+    }
+
+    @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/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualDevice.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualDevice.java
new file mode 100644
index 0000000..59e781a
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualDevice.java
@@ -0,0 +1,26 @@
+/*
+ * 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/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualElement.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualElement.java
new file mode 100644
index 0000000..1c74b92
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualElement.java
@@ -0,0 +1,39 @@
+/*
+ * 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 identifier of the tenant to which this virtual element belongs.
+     *
+     * @return tenant identifier
+     */
+    TenantId tenantId();
+
+    /**
+     * Returns the network identifier to which this virtual element belongs.
+     *
+     * @return network identifier
+     */
+    NetworkId networkId();
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualHost.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualHost.java
new file mode 100644
index 0000000..fdea8b6
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualHost.java
@@ -0,0 +1,26 @@
+/*
+ * 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/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualLink.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualLink.java
new file mode 100644
index 0000000..ac0063f
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualLink.java
@@ -0,0 +1,26 @@
+/*
+ * 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/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetwork.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetwork.java
new file mode 100644
index 0000000..b28a5d3
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetwork.java
@@ -0,0 +1,40 @@
+/*
+ * 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/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkAdminService.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkAdminService.java
new file mode 100644
index 0000000..1e3648b
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkAdminService.java
@@ -0,0 +1,147 @@
+/*
+ * 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.Tunnel;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.Port;
+import org.onosproject.net.PortNumber;
+import org.onosproject.net.device.DeviceDescription;
+import org.onosproject.net.device.PortDescription;
+import org.onosproject.net.link.LinkDescription;
+
+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 description device description
+     * @return newly created device
+     * @throws org.onlab.util.ItemNotFoundException if no such network found
+     */
+    VirtualDevice createVirtualDevice(NetworkId networkId, DeviceDescription description);
+
+    /**
+     * 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 description link description
+     * @param realizedBy  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, LinkDescription description,
+                                  Tunnel 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. Note that the port
+     * description can only request the resources which the underlying port
+     * port is capable of providing. It is, however, permissible to request
+     * only portion of those resources.
+     *
+     * @param networkId   network identifier
+     * @param deviceId    device identifier
+     * @param description port description
+     * @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,
+                                  PortDescription description, 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/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkService.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkService.java
new file mode 100644
index 0000000..01681ef
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkService.java
@@ -0,0 +1,92 @@
+/*
+ * 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/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualPort.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualPort.java
new file mode 100644
index 0000000..179bb2c
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualPort.java
@@ -0,0 +1,34 @@
+/*
+ * 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/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/package-info.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/package-info.java
new file mode 100644
index 0000000..3a0676a
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * 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