diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/AllocationPool.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/AllocationPool.java
new file mode 100644
index 0000000..df9b2d9
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/AllocationPool.java
@@ -0,0 +1,38 @@
+/*
+ * 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.app.vtnrsc;
+
+import org.onlab.packet.IpAddress;
+
+/**
+ * The continuous IP address range between the start address and the end address for the allocation pools.
+ */
+public interface AllocationPool {
+
+    /**
+     * The start address for the allocation pool.
+     *
+     * @return startIp
+     */
+    IpAddress startIP();
+
+    /**
+     * The end address for the allocation pool.
+     *
+     * @return endIp
+     */
+    IpAddress endIP();
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/AllowedAddressPair.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/AllowedAddressPair.java
new file mode 100644
index 0000000..313a507
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/AllowedAddressPair.java
@@ -0,0 +1,94 @@
+/*
+ * 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.app.vtnrsc;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import java.util.Objects;
+
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+
+/**
+ * Immutable representation of a allowed address pair.
+ */
+public final class AllowedAddressPair {
+    private final IpAddress ip;
+    private final MacAddress mac;
+    // Public construction is prohibited
+    private AllowedAddressPair(IpAddress ip, MacAddress mac) {
+        checkNotNull(ip, "IpAddress cannot be null");
+        checkNotNull(mac, "MacAddress cannot be null");
+        this.ip = ip;
+        this.mac = mac;
+    }
+    /**
+     * Returns the AllowedAddressPair ip address.
+     *
+     * @return ip address
+     */
+    public IpAddress ip() {
+        return ip;
+    }
+
+    /**
+     * Returns the AllowedAddressPair MAC address.
+     *
+     * @return MAC address
+     */
+    public MacAddress mac() {
+        return mac;
+    }
+
+
+    /**
+     * Creates a allowedAddressPair using the supplied ipAddress &amp;
+     * macAddress.
+     *
+     * @param ip IP address
+     * @param mac MAC address
+     * @return AllowedAddressPair
+     */
+    public static AllowedAddressPair allowedAddressPair(IpAddress ip,
+                                                        MacAddress mac) {
+        return new AllowedAddressPair(ip, mac);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(ip, mac);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof AllowedAddressPair) {
+            final AllowedAddressPair that = (AllowedAddressPair) obj;
+            return Objects.equals(this.ip, that.ip)
+                    && Objects.equals(this.mac, that.mac);
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return toStringHelper(this).add("ip", ip).add("mac", mac).toString();
+    }
+
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/FixedIp.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/FixedIp.java
new file mode 100644
index 0000000..82c86fd
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/FixedIp.java
@@ -0,0 +1,93 @@
+/*
+ * 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.app.vtnrsc;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import java.util.Objects;
+
+import org.onlab.packet.IpAddress;
+
+/**
+ * Immutable representation of a IP address for the port, Include the IP address
+ * and subnet identity.
+ */
+public final class FixedIp {
+    private final SubnetId subnetId;
+    private final IpAddress ip;
+    // Public construction is prohibited
+    private FixedIp(SubnetId subnetId, IpAddress ip) {
+        checkNotNull(subnetId, "SubnetId cannot be null");
+        checkNotNull(ip, "IpAddress cannot be null");
+        this.subnetId = subnetId;
+        this.ip = ip;
+    }
+
+    /**
+     * Returns the FixedIp subnet identifier.
+     *
+     * @return subnet identifier
+     */
+    public SubnetId subnetId() {
+        return subnetId;
+    }
+
+    /**
+     * Returns the FixedIp IP address.
+     *
+     * @return IP address
+     */
+    public IpAddress ip() {
+        return ip;
+    }
+
+    /**
+     * Creates a fixed ip using the supplied fixedIp.
+     *
+     * @param subnetId subnet identity
+     * @param ip IP address
+     * @return FixedIp
+     */
+    public static FixedIp fixedIp(SubnetId subnetId, IpAddress ip) {
+        return new FixedIp(subnetId, ip);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(subnetId, ip);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof FixedIp) {
+            final FixedIp that = (FixedIp) obj;
+            return Objects.equals(this.subnetId, that.subnetId)
+                    && Objects.equals(this.ip, that.ip);
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return toStringHelper(this).add("subnetId", subnetId).add("ip", ip)
+                .toString();
+    }
+
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/HostRoute.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/HostRoute.java
new file mode 100644
index 0000000..77f930c
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/HostRoute.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.app.vtnrsc;
+
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
+
+/**
+ * Host route dictionaries for the subnet.
+ */
+public interface HostRoute {
+
+    /**
+     * Returns the next hop address.
+     *
+     * @return next hop address
+     */
+    IpAddress nexthop();
+
+    /**
+     * Returns the destination address.
+     *
+     * @return destination address
+     */
+    IpPrefix destination();
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/PhysicalNetwork.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/PhysicalNetwork.java
new file mode 100644
index 0000000..5b0e0f2
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/PhysicalNetwork.java
@@ -0,0 +1,77 @@
+/*
+ * 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.app.vtnrsc;
+
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Immutable representation of a physicalnetwork identity.
+ */
+public final class PhysicalNetwork {
+
+    private final String physicalnetwork;
+
+    // Public construction is prohibited
+    private PhysicalNetwork(String physicalnetwork) {
+        checkNotNull(physicalnetwork, "Physicalnetwork cannot be null");
+        this.physicalnetwork = physicalnetwork;
+    }
+
+    /**
+     * Creates a network id using the physicalnetwork.
+     *
+     * @param physicalnetwork network String
+     * @return physicalnetwork
+     */
+    public static PhysicalNetwork physicalNetwork(String physicalnetwork) {
+        return new PhysicalNetwork(physicalnetwork);
+    }
+
+    /**
+     *
+     * @return physicalnetwork
+     */
+    public String physicalnetwork() {
+        return physicalnetwork;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(physicalnetwork);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof PhysicalNetwork) {
+            final PhysicalNetwork that = (PhysicalNetwork) obj;
+            return this.getClass() == that.getClass()
+                    && Objects.equals(this.physicalnetwork,
+                                      that.physicalnetwork);
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return physicalnetwork;
+    }
+
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/SecurityGroup.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/SecurityGroup.java
new file mode 100644
index 0000000..4171362
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/SecurityGroup.java
@@ -0,0 +1,77 @@
+/*
+ * 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.app.vtnrsc;
+
+import java.util.Objects;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Immutable representation of a security group.
+ */
+public final class SecurityGroup {
+    private final String securityGroup;
+
+    /**
+     * Returns the securityGroup.
+     *
+     * @return securityGroup
+     */
+    public String securityGroup() {
+        return securityGroup;
+    }
+    // Public construction is prohibited
+    private SecurityGroup(String securityGroup) {
+        checkNotNull(securityGroup, "SecurityGroup cannot be null");
+        this.securityGroup = securityGroup;
+    }
+
+    /**
+     * Creates a securityGroup using the supplied securityGroup.
+     *
+     * @param securityGroup security group
+     * @return securityGroup
+     */
+    public static SecurityGroup securityGroup(String securityGroup) {
+        return new SecurityGroup(securityGroup);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(securityGroup);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof SecurityGroup) {
+            final SecurityGroup that = (SecurityGroup) obj;
+            return this.getClass() == that.getClass()
+                    && Objects.equals(this.securityGroup, that.securityGroup);
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return toStringHelper(this).add("securityGroup", securityGroup)
+                .toString();
+    }
+
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/SegmentationId.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/SegmentationId.java
new file mode 100644
index 0000000..ec3ac32
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/SegmentationId.java
@@ -0,0 +1,76 @@
+/*
+ * 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.app.vtnrsc;
+
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Immutable representation of a Segmentation identity.
+ */
+public final class SegmentationId {
+
+    private final String segmentationid;
+
+    // Public construction is prohibited
+    private SegmentationId(String segmentationid) {
+        checkNotNull(segmentationid, "Segmentationid cannot be null");
+        this.segmentationid = segmentationid;
+    }
+
+    /**
+     * Creates a network id using the segmentationid.
+     *
+     * @param segmentationid network String
+     * @return SegmentationId
+     */
+    public static SegmentationId segmentationID(String segmentationid) {
+        return new SegmentationId(segmentationid);
+    }
+
+    /**
+     *
+     * @return segmentationid
+     */
+    public String segmentationid() {
+        return segmentationid;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(segmentationid);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof SegmentationId) {
+            final SegmentationId that = (SegmentationId) obj;
+            return this.getClass() == that.getClass()
+                    && Objects.equals(this.segmentationid, that.segmentationid);
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return segmentationid;
+    }
+
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/Subnet.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/Subnet.java
new file mode 100644
index 0000000..f2a5726
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/Subnet.java
@@ -0,0 +1,130 @@
+/*
+ *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.app.vtnrsc;
+
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpAddress.Version;
+import org.onlab.packet.IpPrefix;
+
+/**
+ * Representation of a subnet.
+ */
+public interface Subnet {
+
+    /**
+     * Coarse classification of the type of the ipV6Mode.
+     */
+    public enum Mode {
+        DHCPV6_STATEFUL, DHCPV6_STATELESS, SLAAC
+    }
+
+    /**
+     * Returns the ID of the subnet.
+     *
+     * @return id
+     */
+    SubnetId id();
+
+    /**
+     * Returns the name of the subnet.
+     *
+     * @return subnetName
+     */
+    String subnetName();
+
+    /**
+     * Returns the ID of the attached network.
+     *
+     * @return networkID
+     */
+    TenantNetworkId networkId();
+
+    /**
+     * Returns the The ID of the tenant who owns the network. Only
+     * administrative users can specify a tenant ID other than their own. You
+     * cannot change this value through authorization policies.
+     *
+     * @return tenantID
+     */
+    TenantId tenantId();
+
+    /**
+     * Returns the IP version, which is 4 or 6.
+     *
+     * @return ipVersion
+     */
+    Version ipVersion();
+
+    /**
+     * Returns the cidr.
+     *
+     * @return cidr
+     */
+    IpPrefix cidr();
+
+    /**
+     * Returns the gateway IP address..
+     *
+     * @return gatewayIP
+     */
+    IpAddress gatewayIp();
+
+    /**
+     * Returns true if DHCP is enabled and return false if DHCP is disabled.
+     *
+     * @return dhcpEnabled
+     */
+    boolean dhcpEnabled();
+
+    /**
+     * Indicates whether this tenantNetwork is shared across all tenants. By
+     * default,only administrative user can change this value.
+     *
+     * @return shared
+     */
+    boolean shared();
+
+    /**
+     * Returns an iterable collections of hostRoutes.
+     *
+     * @return hostRoutes collection
+     */
+    Iterable<HostRoute> hostRoutes();
+
+    /**
+     * Returns the ipV6AddressMode. A valid value is dhcpv6-stateful,
+     * dhcpv6-stateless, or slaac.
+     *
+     * @return ipV6AddressMode
+     */
+    Mode ipV6AddressMode();
+
+    /**
+     * Returns the ipV6RaMode.A valid value is dhcpv6-stateful,
+     * dhcpv6-stateless, or slaac.
+     *
+     * @return ipV6RaMode
+     */
+    Mode ipV6RaMode();
+
+    /**
+     * Returns an iterable collection of allocation_pools.
+     *
+     * @return allocationPools collection
+     */
+
+    Iterable<AllocationPool> allocationPools();
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/SubnetId.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/SubnetId.java
new file mode 100644
index 0000000..73c2cb2
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/SubnetId.java
@@ -0,0 +1,68 @@
+/*
+ * 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.app.vtnrsc;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import java.util.Objects;
+
+/**
+ * Immutable representation of a subnet identity.
+ */
+public final class SubnetId {
+
+    private final String subnetId;
+
+    // Public construction is prohibited
+    private SubnetId(String subnetId) {
+        checkNotNull(subnetId, "SubnetId cannot be null");
+        this.subnetId = subnetId;
+    }
+
+    /**
+     * Creates a subnet identifier.
+     *
+     * @param subnetId subnet identifier
+     * @return SubnetId SubnetId
+     */
+    public static SubnetId subnetId(String subnetId) {
+        return new SubnetId(subnetId);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(subnetId);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof SubnetId) {
+            final SubnetId that = (SubnetId) obj;
+            return this.getClass() == that.getClass()
+                    && Objects.equals(this.subnetId, that.subnetId);
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return subnetId;
+    }
+
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/TenantId.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/TenantId.java
new file mode 100644
index 0000000..4ae9b57
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/TenantId.java
@@ -0,0 +1,76 @@
+/*
+ * 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.app.vtnrsc;
+
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Immutable representation of a network identity.
+ */
+public final class TenantId {
+
+    private final String tenantid;
+
+    // Public construction is prohibited
+    private TenantId(String tenantid) {
+        this.tenantid = tenantid;
+    }
+
+    /**
+     * Creates a network id using the tenantid.
+     *
+     * @param tenantid network String
+     * @return TenantId
+     */
+    public static TenantId tenantId(String tenantid) {
+        checkNotNull(tenantid, "Tenantid can not be null");
+        return new TenantId(tenantid);
+    }
+
+    /**
+     *
+     * @return tenantid
+     */
+    public String tenantid() {
+        return tenantid;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(tenantid);
+    }
+
+    @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.tenantid, that.tenantid);
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return tenantid;
+    }
+
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/TenantNetwork.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/TenantNetwork.java
new file mode 100644
index 0000000..e7b033c
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/TenantNetwork.java
@@ -0,0 +1,130 @@
+/*
+ * 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.app.vtnrsc;
+
+/**
+ * Representation of the tenantNetwork.
+ */
+public interface TenantNetwork {
+
+    /**
+     * Coarse classification of the state of the tenantNetwork.
+     */
+    public enum State {
+        /**
+         * Signifies that a tenantNetwork is currently active.This state means
+         * that this network is available.
+         */
+        ACTIVE,
+        /**
+         * Signifies that a tenantNetwork is currently built.
+         */
+        BUILD,
+        /**
+         * Signifies that a tenantNetwork is currently unavailable.
+         */
+        DOWN,
+        /**
+         * Signifies that a tenantNetwork is currently error.
+         */
+        ERROR
+    }
+
+    /**
+     * Coarse classification of the type of the tenantNetwork.
+     */
+    public enum Type {
+        /**
+         * Signifies that a tenantNetwork is local.
+         */
+        LOCAL
+    }
+
+    /**
+     * Returns the tenantNetwork identifier.
+     *
+     * @return tenantNetwork identifier
+     */
+    TenantNetworkId id();
+
+    /**
+     * Returns the tenantNetwork name.
+     *
+     * @return tenantNetwork name
+     */
+    String name();
+
+    /**
+     * Returns the administrative state of the tenantNetwork,which is up(true)
+     * or down(false).
+     *
+     * @return network admin state up
+     */
+    boolean adminStateUp();
+
+    /**
+     * Returns the tenantNetwork state.
+     *
+     * @return tenantNetwork state
+     */
+    State state();
+
+    /**
+     * Indicates whether this tenantNetwork is shared across all tenants. By
+     * default,only administrative user can change this value.
+     *
+     * @return tenantNetwork shared
+     */
+    boolean shared();
+
+    /**
+     * Returns the UUID of the tenant that will own the tenantNetwork. This
+     * tenant can be different from the tenant that makes the create
+     * tenantNetwork request.
+     *
+     * @return tenantNetwork tenant identifier
+     */
+    TenantId tenantId();
+
+    /**
+     * Returns the routerExternal.Indicates whether this network is externally
+     * accessible.
+     *
+     * @return true if tenantNetwork router external
+     */
+    boolean routerExternal();
+
+    /**
+     * Returns the tenantNetwork Type.
+     *
+     * @return tenantNetwork Type
+     */
+    Type type();
+
+    /**
+     * Returns the tenantNetwork physical network.
+     *
+     * @return tenantNetwork physical network
+     */
+    PhysicalNetwork physicalNetwork();
+
+    /**
+     * Returns the tenantNetwork segmentation id.
+     *
+     * @return tenantNetwork segmentation id
+     */
+    SegmentationId segmentationId();
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/TenantNetworkId.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/TenantNetworkId.java
new file mode 100644
index 0000000..bb80feb
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/TenantNetworkId.java
@@ -0,0 +1,75 @@
+/*
+ * 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.app.vtnrsc;
+
+import java.util.Objects;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Immutable representation of a tenantNetwork identity.
+ */
+public final class TenantNetworkId {
+
+    private final String networkid;
+
+    // Public construction is prohibited
+    private TenantNetworkId(String networkid) {
+        this.networkid = networkid;
+    }
+
+    /**
+     * Creates a tenantNetwork id using the networkid.
+     *
+     * @param networkid tenantnetwork String
+     * @return NetworkId
+     */
+    public static TenantNetworkId networkId(String networkid) {
+        checkNotNull(networkid, "Networkid cannot be null");
+        return new TenantNetworkId(networkid);
+    }
+
+    /**
+     *
+     * @return tenantNetworkid
+     */
+    public String networkid() {
+        return networkid;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(networkid);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof TenantNetworkId) {
+            final TenantNetworkId that = (TenantNetworkId) obj;
+            return this.getClass() == that.getClass()
+                    && Objects.equals(this.networkid, that.networkid);
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return networkid;
+    }
+
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/VirtualPort.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/VirtualPort.java
new file mode 100644
index 0000000..082170d
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/VirtualPort.java
@@ -0,0 +1,156 @@
+/*
+ * 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.app.vtnrsc;
+
+import java.util.Collection;
+
+import org.onlab.packet.MacAddress;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.HostId;
+
+/**
+ * Representation of a virtual port.
+ */
+public interface VirtualPort {
+    /**
+     * Coarse classification of the type of the virtual port.
+     */
+    public enum State {
+        /**
+         * Signifies that a virtualPort is currently active,This state mean that
+         * this virtualPort is available.
+         */
+        ACTIVE,
+        /**
+         * Signifies that a virtualPort is currently unavailable.
+         */
+        DOWN;
+    }
+
+    /**
+     * Returns the virtualPort identifier.
+     *
+     * @return virtualPort identifier
+     */
+    VirtualPortId portId();
+
+    /**
+     * Returns the network identifier.
+     *
+     * @return tenantNetwork ID
+     */
+    TenantNetworkId networkId();
+
+    /**
+     * Returns the symbolic name for the virtualPort.
+     *
+     * @return virtualPort name
+     */
+    String name();
+
+    /**
+     * Returns the administrative status of the port,which is up(true) or
+     * down(false).
+     *
+     * @return true or false
+     */
+    Boolean adminStateUp();
+
+    /**
+     * Returns the state.
+     *
+     * @return state
+     */
+    State state();
+
+    /**
+     * Returns the MAC address.
+     *
+     * @return MAC Address
+     */
+    MacAddress macAddress();
+
+    /**
+     * Returns the port tenantId.
+     *
+     * @return port tenantId
+     */
+    TenantId tenantId();
+
+    /**
+     * Returns the device identifier.
+     *
+     * @return deviceId
+     */
+    DeviceId deviceId();
+
+    /**
+     * Returns the identifier of the entity that uses this port.
+     *
+     * @return deviceOwner
+     */
+    String deviceOwner();
+
+    /**
+     * Returns the virtualPort allowedAddressPairs.
+     *
+     * @return virtualPort allowedAddressPairs
+     */
+    Collection<AllowedAddressPair> allowedAddressPairs();
+
+    /**
+     * Returns the IP address for the port, Include the IP address and subnet
+     * identity.
+     *
+     * @return port fixedIps
+     */
+    FixedIp fixedIps();
+
+    /**
+     * Returns the virtualPort bindinghostId.
+     *
+     * @return virtualPort bindinghostId
+     */
+    HostId bindingHostId();
+
+    /**
+     * Returns the virtualPort bindingVnicType.
+     *
+     * @return virtualPort bindingVnicType
+     */
+    String bindingVnicType();
+
+    /**
+     * Returns the virtualPort bindingVifType.
+     *
+     * @return virtualPort bindingVifType
+     */
+    String bindingVifType();
+
+    /**
+     * Returns the virtualPort bindingvifDetail.
+     *
+     * @return virtualPort bindingvifDetail
+     */
+    String bindingvifDetails();
+
+    /**
+     * Returns the security groups.
+     *
+     * @return port security groups
+     */
+    Iterable<SecurityGroup> securityGroups();
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/VirtualPortId.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/VirtualPortId.java
new file mode 100644
index 0000000..d21e60a
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/VirtualPortId.java
@@ -0,0 +1,70 @@
+/*
+ * 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.app.vtnrsc;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import java.util.Objects;
+
+/**
+ * Immutable representation of a virtual port identifier.
+ */
+public final class VirtualPortId {
+    private final String portId;
+    // Public construction is prohibited
+    private VirtualPortId(String virtualPortId) {
+        checkNotNull(virtualPortId, "VirtualPortId cannot be null");
+        this.portId = virtualPortId;
+    }
+
+    public String portId() {
+        return portId;
+    }
+
+    /**
+     * Creates a virtualPort id using the supplied portId.
+     *
+     * @param portId virtualport identifier
+     * @return VirtualPortId
+     */
+    public static VirtualPortId portId(String portId) {
+        return new VirtualPortId(portId);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(portId);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof VirtualPortId) {
+            final VirtualPortId that = (VirtualPortId) obj;
+            return this.getClass() == that.getClass()
+                    && Objects.equals(this.portId, that.portId);
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return portId;
+    }
+
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/subnet/SubnetService.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/subnet/SubnetService.java
new file mode 100644
index 0000000..9ef0229
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/subnet/SubnetService.java
@@ -0,0 +1,72 @@
+/*
+ * 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.app.vtnrsc.subnet;
+
+import org.onosproject.app.vtnrsc.Subnet;
+import org.onosproject.app.vtnrsc.SubnetId;
+
+
+/**
+ * Service for interacting with the inventory of subnets.
+ */
+public interface SubnetService {
+    /**
+     * Returns the subnet with the specified identifier.
+     *
+     * @param subnetId subnet identifier
+     * @return true or false
+     */
+    boolean exists(SubnetId subnetId);
+    /**
+     * Returns a collection of the currently known subnets.
+     *
+     * @return iterable collection of subnets
+     */
+    Iterable<Subnet> getSubnets();
+
+    /**
+     * Returns the subnet with the specified identifier.
+     *
+     * @param subnetId subnet identifier
+     * @return subnet or null if one with the given identifier is not known
+     */
+    Subnet getSubnet(SubnetId subnetId);
+    /**
+     * Creates new subnets.
+     *
+     * @param subnets the iterable collection of subnets
+     * @return true  if the identifier subnet has been created right
+     */
+    boolean createSubnets(Iterable<Subnet> subnets);
+
+    /**
+     * Updates existing subnets.
+     *
+     * @param subnets the iterable collection of subnets
+     * @return true if all subnets were updated successfully
+     */
+    boolean updateSubnets(Iterable<Subnet> subnets);
+
+    /**
+     * Administratively removes the specified subnets from the store.
+     *
+     * @param subnetIds the iterable collection of  subnets identifier
+     * @return true if remove identifier subnets successfully
+     */
+    boolean removeSubnets(Iterable<SubnetId> subnetIds);
+
+
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/tenantnetwork/TenantNetworkService.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/tenantnetwork/TenantNetworkService.java
new file mode 100644
index 0000000..cf20e70
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/tenantnetwork/TenantNetworkService.java
@@ -0,0 +1,80 @@
+/*
+ * 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.app.vtnrsc.tenantnetwork;
+
+import org.onosproject.app.vtnrsc.TenantNetwork;
+import org.onosproject.app.vtnrsc.TenantNetworkId;
+
+/**
+ * Service for interacting with the inventory of tenantNetwork.
+ */
+public interface TenantNetworkService {
+
+    /**
+     * Returns if the tenantNetwork is existed.
+     *
+     * @param networkId tenantNetwork identifier
+     * @return true or false if one with the given identifier exists.
+     */
+    boolean exists(TenantNetworkId networkId);
+
+    /**
+     * Returns the number of tenantNetwork known to the system.
+     *
+     * @return number of tenantNetwork.
+     */
+    int getNetworkCount();
+
+    /**
+     * Returns an iterable collection of the currently known tenantNetwork.
+     *
+     * @return collection of tenantNetwork.
+     */
+    Iterable<TenantNetwork> getNetworks();
+
+    /**
+     * Returns the tenantNetwork with the identifier.
+     *
+     * @param networkId TenantNetwork identifier
+     * @return TenantNetwork or null if one with the given identifier is not
+     *         known.
+     */
+    TenantNetwork getNetwork(TenantNetworkId networkId);
+
+    /**
+     * Creates tenantNetworks by networks.
+     *
+     * @param networks the collection of tenantNetworks
+     * @return true if all given identifiers created successfully.
+     */
+    boolean createNetworks(Iterable<TenantNetwork> networks);
+
+    /**
+     * Updates tenantNetworks by tenantNetworks.
+     *
+     * @param networks the collection of tenantNetworks
+     * @return true if all given identifiers updated successfully.
+     */
+    boolean updateNetworks(Iterable<TenantNetwork> networks);
+
+    /**
+     * Deletes tenantNetwork by tenantNetworkIds.
+     *
+     * @param networksId the collection of tenantNetworkIds
+     * @return true if the specified tenantNetwork deleted successfully.
+     */
+    boolean removeNetworks(Iterable<TenantNetworkId> networksId);
+}
diff --git a/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/virtualport/VirtualPortService.java b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/virtualport/VirtualPortService.java
new file mode 100644
index 0000000..51d3001
--- /dev/null
+++ b/apps/vtnrsc/src/main/java/org/onosproject/app/vtnrsc/virtualport/VirtualPortService.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2015 Open Porting 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.app.vtnrsc.virtualport;
+
+import java.util.Collection;
+
+import org.onosproject.app.vtnrsc.TenantNetworkId;
+import org.onosproject.app.vtnrsc.TenantId;
+import org.onosproject.app.vtnrsc.VirtualPort;
+import org.onosproject.app.vtnrsc.VirtualPortId;
+import org.onosproject.net.DeviceId;
+
+/**
+ * Service for interacting with the inventory of virtualPort.
+ */
+public interface VirtualPortService {
+    /**
+     * Returns if the virtualPort is existed.
+     *
+     * @param virtualPortId virtualPort identifier
+     * @return true or false if one with the given identifier is not existed.
+     */
+    boolean exists(VirtualPortId virtualPortId);
+
+    /**
+     * Returns the virtualPort with the identifier.
+     *
+     * @param virtualPortId virtualPort ID
+     * @return VirtualPort or null if one with the given ID is not know.
+     */
+    VirtualPort getPort(VirtualPortId virtualPortId);
+
+    /**
+     * Returns the collection of the currently known virtualPort.
+     *
+     * @return virtualPort.
+     */
+    Collection<VirtualPort> getPorts();
+
+    /**
+     * Returns the collection of the virtualPorts associated with the networkId.
+     *
+     * @param networkId
+     * @return collection of virtualPort.
+     */
+    Collection<VirtualPort> getPorts(TenantNetworkId networkId);
+
+    /**
+     * Returns the collection of the virtualPorts associated with the tenantId.
+     *
+     * @param tenantId
+     * @return collection of virtualPort.
+     */
+    Collection<VirtualPort> getPorts(TenantId tenantId);
+
+    /**
+     * Returns the collection of the virtualPorts associated with the deviceId.
+     *
+     * @param deviceId
+     * @return collection of virtualPort.
+     */
+    Collection<VirtualPort> getPorts(DeviceId deviceId);
+
+    /**
+     * Creates virtualPorts by virtualPorts.
+     *
+     * @param virtualPorts the iterable collection of virtualPorts
+     * @return true if all given identifiers created successfully.
+     */
+    boolean createPorts(Iterable<VirtualPort> virtualPorts);
+
+    /**
+     * Updates virtualPorts by virtualPorts.
+     *
+     * @param virtualPorts the iterable  collection of virtualPorts
+     * @return true if all given identifiers updated successfully.
+     */
+    boolean updatePorts(Iterable<VirtualPort> virtualPorts);
+
+    /**
+     * Deletes virtualPortIds by virtualPortIds.
+     *
+     * @param virtualPortIds the iterable collection of virtualPort identifiers
+     * @return true or false if one with the given identifier to delete is
+     *         successfully.
+     */
+    boolean removePorts(Iterable<VirtualPortId> virtualPortIds);
+}
diff --git a/apps/vtnrsc/src/main/webapp/WEB-INF/web.xml b/apps/vtnrsc/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..9c0c69b
--- /dev/null
+++ b/apps/vtnrsc/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="ONOS" version="2.5">
+    <display-name>Vtnrsc Routing REST API v1.0</display-name>
+
+    <servlet>
+        <servlet-name>JAX-RS Service</servlet-name>
+        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+        <init-param>
+            <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
+            <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value>
+        </init-param>
+        <init-param>
+            <param-name>com.sun.jersey.config.property.classnames</param-name>
+            <param-value>
+                org.onosproject.app.vtnrsc.web.SubnetWebResource,
+                org.onosproject.app.vtnrsc.web.NeutronNetworkWebResource,
+                org.onosproject.app.vtnrsc.web.VirtualPortWebResource
+            </param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>JAX-RS Service</servlet-name>
+        <url-pattern>/*</url-pattern>
+    </servlet-mapping>
+</web-app>
