add vcpe_synced to subscriber rest api
diff --git a/xos/core/xoslib/methods/cordsubscriber.py b/xos/core/xoslib/methods/cordsubscriber.py
index ee6a431..5e8a60c 100644
--- a/xos/core/xoslib/methods/cordsubscriber.py
+++ b/xos/core/xoslib/methods/cordsubscriber.py
@@ -200,6 +200,7 @@
@classmethod
def get_urlpatterns(self):
patterns = super(CordSubscriberViewSet, self).get_urlpatterns()
+ patterns.append( self.detail_url("vcpe_synced/$", {"get": "get_vcpe_synced"}, "vcpe_synced") )
patterns.append( self.detail_url("url_filter/$", {"get": "get_url_filter"}, "url_filter") )
patterns.append( self.detail_url("url_filter/(?P<level>[a-zA-Z0-9\-_]+)/$", {"put": "set_url_filter"}, "url_filter") )
patterns.append( self.detail_url("services/$", {"get": "get_services"}, "services") )
@@ -230,6 +231,10 @@
return Response({"subscribers": serializer.data})
+ def get_vcpe_synced(self, request, pk=None):
+ subscriber = self.get_object()
+ return Response({"vcpe_synced": subscriber.vcpe_synced})
+
def get_url_filter(self, request, pk=None):
subscriber = self.get_object()
return Response({"level": subscriber.url_filter_level})