CORD-1008 add VRouterApp wrappers

Change-Id: I4c4020a0de7705e77c99c19e5ec8226558519bbf
diff --git a/xos/xos_client/xosapi/convenience/vrouterapp.py b/xos/xos_client/xosapi/convenience/vrouterapp.py
new file mode 100644
index 0000000..fe647cd
--- /dev/null
+++ b/xos/xos_client/xosapi/convenience/vrouterapp.py
@@ -0,0 +1,17 @@
+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.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/xos_client/xosapi/orm.py b/xos/xos_client/xosapi/orm.py
index 8b730a8..4f76a59 100644
--- a/xos/xos_client/xosapi/orm.py
+++ b/xos/xos_client/xosapi/orm.py
@@ -427,4 +427,5 @@
 import convenience.volttenant
 import convenience.vsgtenant
 import convenience.vroutertenant
+import convenience.vrouterapp