diff --git a/README.md b/README.md
index ea4b247..1a0bdf2 100644
--- a/README.md
+++ b/README.md
@@ -164,4 +164,5 @@
           - service#vrouter:
               node: service#vrouter
               relationship: tosca.relationships.MemberOfService
-```
\ No newline at end of file
+```
+
diff --git a/xos/synchronizer/models/convenience/vrouterapp.py b/xos/synchronizer/models/convenience/vrouterapp.py
new file mode 100644
index 0000000..3dafde2
--- /dev/null
+++ b/xos/synchronizer/models/convenience/vrouterapp.py
@@ -0,0 +1,33 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# 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.
+
+
+import json
+from xosapi.orm import ORMWrapper, register_convenience_wrapper
+
+class ORMWrapperVRouterApp(ORMWrapper):
+    @property
+    def interfaces(self):
+        app_interfaces = []
+        devices = self.stub.VRouterDevice.objects.filter(vrouter_service_id=self.vrouter_service.id)
+        for device in devices:
+            ports = self.stub.VRouterPort.objects.filter(vrouter_device_id=device.id)
+            for port in ports:
+                interfaces = self.stub.VRouterInterface.objects.filter(vrouter_port_id=port.id)
+                for iface in interfaces:
+                    app_interfaces.append(iface.name)
+        return app_interfaces
+
+register_convenience_wrapper("VRouterApp", ORMWrapperVRouterApp)
diff --git a/xos/synchronizer/models/convenience/vrouterservice.py b/xos/synchronizer/models/convenience/vrouterservice.py
new file mode 100644
index 0000000..28f1421
--- /dev/null
+++ b/xos/synchronizer/models/convenience/vrouterservice.py
@@ -0,0 +1,31 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# 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.
+
+
+import json
+from xosapi.orm import ORMWrapper, register_convenience_wrapper
+from xosapi.convenience.service import ORMWrapperService
+
+class ORMWrapperVRouterService(ORMWrapperService):
+    def get_gateways(self):
+        gateways = []
+
+        aps = self.addresspools.all()
+        for ap in aps:
+            gateways.append({"gateway_ip": ap.gateway_ip, "gateway_mac": ap.gateway_mac})
+
+        return gateways
+
+register_convenience_wrapper("VRouterService", ORMWrapperVRouterService)
diff --git a/xos/synchronizer/models/convenience/vroutertenant.py b/xos/synchronizer/models/convenience/vroutertenant.py
new file mode 100644
index 0000000..f9b76c2
--- /dev/null
+++ b/xos/synchronizer/models/convenience/vroutertenant.py
@@ -0,0 +1,67 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# 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.
+
+
+import json
+from xosapi.orm import ORMWrapper, register_convenience_wrapper
+
+class ORMWrapperVRouterTenant(ORMWrapper):
+    @property
+    def gateway_ip(self):
+        if not self.address_pool:
+            return None
+        return self.address_pool.gateway_ip
+
+    @property
+    def gateway_mac(self):
+        if not self.address_pool:
+            return None
+        return self.address_pool.gateway_mac
+
+    @property
+    def cidr(self):
+        if not self.address_pool:
+            return None
+        return self.address_pool.cidr
+
+    @property
+    def netbits(self):
+        # return number of bits in the network portion of the cidr
+        if self.cidr:
+            parts = self.cidr.split("/")
+            if len(parts) == 2:
+                return int(parts[1].strip())
+        return None
+
+    # Use for tenant_for_instance_id
+    # TODO: These should be reimplemented using real database models
+
+    def get_attribute(self, name, default=None):
+        if self.service_specific_attribute:
+            attributes = json.loads(self.service_specific_attribute)
+        else:
+            attributes = {}
+        return attributes.get(name, default)
+
+    def set_attribute(self, name, value):
+        if self.service_specific_attribute:
+            attributes = json.loads(self.service_specific_attribute)
+        else:
+            attributes = {}
+        attributes[name] = value
+        self.service_specific_attribute = json.dumps(attributes)
+
+
+register_convenience_wrapper("VRouterTenant", ORMWrapperVRouterTenant)
