diff --git a/xos/core/models/service.py b/xos/core/models/service.py
index 953ea97..7cc5cb7 100644
--- a/xos/core/models/service.py
+++ b/xos/core/models/service.py
@@ -168,6 +168,18 @@
 
                 # print "add instance", s
 
+    def get_vtn_dependencies(self):
+        provider_net_ids = []
+        for tenant in self.subscribed_tenants.all():
+            if tenant.provider_service:
+                for slice in tenant.provider_service.slices.all():
+                    for ns in slice.networkslices.all():
+                        if ns.network:
+                            if not (ns.network.id) in provider_net_ids:
+                                provider_net_ids.append(ns.network_id)
+        return provider_net_ids
+
+
 class ServiceAttribute(PlCoreBase):
     name = models.CharField(help_text="Attribute Name", max_length=128)
     value = StrippedCharField(help_text="Attribute Value", max_length=1024)
diff --git a/xos/core/xoslib/methods/cordsubscriber.py b/xos/core/xoslib/methods/cordsubscriber.py
index 297ac4a..3892014 100644
--- a/xos/core/xoslib/methods/cordsubscriber.py
+++ b/xos/core/xoslib/methods/cordsubscriber.py
@@ -11,7 +11,7 @@
 from django.conf.urls import patterns, url
 from cord.models import VOLTTenant, VBNGTenant, CordSubscriberRoot
 from core.xoslib.objects.cordsubscriber import CordSubscriber
-from plus import PlusSerializerMixin
+from plus import PlusSerializerMixin, XOSViewSet
 from django.shortcuts import get_object_or_404
 from xos.apibase import XOSListCreateAPIView, XOSRetrieveUpdateDestroyAPIView, XOSPermissionDenied
 from xos.exceptions import *
@@ -158,30 +158,6 @@
         subscriber.save()
         return Response(serialize_user(subscriber,user))
 
-# this may be moved into plus.py...
-
-class XOSViewSet(viewsets.ModelViewSet):
-    @classmethod
-    def detail_url(self, pattern, viewdict, name):
-        return url(r'^' + self.method_name + r'/(?P<pk>[a-zA-Z0-9\-]+)/' + pattern,
-                   self.as_view(viewdict),
-                   name=self.base_name+"_"+name)
-
-    @classmethod
-    def list_url(self, pattern, viewdict, name):
-        return url(r'^' + self.method_name + r'/' + pattern,
-                   self.as_view(viewdict),
-                   name=self.base_name+"_"+name)
-
-    @classmethod
-    def get_urlpatterns(self):
-        patterns = []
-
-        patterns.append(url(r'^' + self.method_name + '/$', self.as_view({'get': 'list'}), name=self.base_name+'_list'))
-        patterns.append(url(r'^' + self.method_name + '/(?P<pk>[a-zA-Z0-9\-]+)/$', self.as_view({'get': 'retrieve', 'put': 'update', 'post': 'update', 'delete': 'destroy', 'patch': 'partial_update'}), name=self.base_name+'_detail'))
-
-        return patterns
-
 #------------------------------------------------------------------------------
 # The "new" API with many more REST endpoints.
 # This is for integration with with the subscriber GUI
diff --git a/xos/core/xoslib/methods/plus.py b/xos/core/xoslib/methods/plus.py
index 280c468..294fba8 100644
--- a/xos/core/xoslib/methods/plus.py
+++ b/xos/core/xoslib/methods/plus.py
@@ -3,6 +3,8 @@
 from rest_framework.response import Response
 from rest_framework import status
 from xos.apibase import XOSRetrieveUpdateDestroyAPIView, XOSListCreateAPIView
+from rest_framework import viewsets
+from django.conf.urls import patterns, url
 
 """ PlusSerializerMixin
 
@@ -26,7 +28,24 @@
     def getBackendHtml(self, obj):
         return obj.getBackendHtml()
 
+class XOSViewSet(viewsets.ModelViewSet):
+    @classmethod
+    def detail_url(self, pattern, viewdict, name):
+        return url(r'^' + self.method_name + r'/(?P<pk>[a-zA-Z0-9\-]+)/' + pattern,
+                   self.as_view(viewdict),
+                   name=self.base_name+"_"+name)
 
+    @classmethod
+    def list_url(self, pattern, viewdict, name):
+        return url(r'^' + self.method_name + r'/' + pattern,
+                   self.as_view(viewdict),
+                   name=self.base_name+"_"+name)
 
+    @classmethod
+    def get_urlpatterns(self):
+        patterns = []
 
+        patterns.append(url(r'^' + self.method_name + '/$', self.as_view({'get': 'list'}), name=self.base_name+'_list'))
+        patterns.append(url(r'^' + self.method_name + '/(?P<pk>[a-zA-Z0-9\-]+)/$', self.as_view({'get': 'retrieve', 'put': 'update', 'post': 'update', 'delete': 'destroy', 'patch': 'partial_update'}), name=self.base_name+'_detail'))
 
+        return patterns
diff --git a/xos/core/xoslib/methods/vtn.py b/xos/core/xoslib/methods/vtn.py
new file mode 100644
index 0000000..9c96fc5
--- /dev/null
+++ b/xos/core/xoslib/methods/vtn.py
@@ -0,0 +1,49 @@
+from rest_framework.decorators import api_view
+from rest_framework.response import Response
+from rest_framework.reverse import reverse
+from rest_framework import serializers
+from rest_framework import generics
+from rest_framework import viewsets
+from rest_framework.decorators import detail_route, list_route
+from rest_framework.views import APIView
+from core.models import *
+from django.forms import widgets
+from django.conf.urls import patterns, url
+from plus import PlusSerializerMixin, XOSViewSet
+from django.shortcuts import get_object_or_404
+from xos.apibase import XOSListCreateAPIView, XOSRetrieveUpdateDestroyAPIView, XOSPermissionDenied
+from xos.exceptions import *
+import json
+import subprocess
+
+class VTNViewSet(XOSViewSet):
+    base_name = "vtn"
+    method_name = "rs/vtn"
+    method_kind = "viewset"
+
+    # these are just because ViewSet needs some queryset and model, even if we don't use the
+    # default endpoints
+    queryset = Service.objects.none() # CordSubscriber.get_tenant_objects().select_related().all()
+    model = Service
+
+    @classmethod
+    def get_urlpatterns(self):
+        patterns = []
+        patterns.append( self.list_url("services/$", {"get": "get_services"}, "services") )
+        patterns.append( self.list_url("services/(?P<service>[a-zA-Z0-9\-_]+)/$", {"get": "get_service"}, "get_service") )
+
+        return patterns
+
+    def get_services(self, request, pk=None):
+        result = {}
+        for service in Service.objects.all():
+           result[service.id] = service.get_vtn_dependencies()
+        return Response(result)
+
+    def get_service(self, request, pk=None, service=None):
+        result=Service.objects.get(pk = service).get_vtn_dependencies()
+        return Response(result)
+
+    def list(self, request):
+        raise Exception("Not Implemented")
+
