add ssidmap API
diff --git a/xos/core/xoslib/methods/cordsubscriber.py b/xos/core/xoslib/methods/cordsubscriber.py
index 4d6890d..68dcf6b 100644
--- a/xos/core/xoslib/methods/cordsubscriber.py
+++ b/xos/core/xoslib/methods/cordsubscriber.py
@@ -209,6 +209,9 @@
patterns.append( url("^rs/initdemo/$", self.as_view({"put": "initdemo", "get": "initdemo"}), name="initdemo") )
+ patterns.append( url("^rs/ssidmap/(?P<ssid>[0-9\-]+)/$", self.as_view({"get": "ssiddetail"}), name="ssiddetail") )
+ patterns.append( url("^rs/ssidmap/$", self.as_view({"get": "ssidlist"}), name="ssidlist") )
+
return patterns
def list(self, request):
@@ -324,3 +327,18 @@
return Response({"id": voltTenant.id})
+ def ssidlist(self, request):
+ object_list = VOLTTenant.get_tenant_objects().all()
+
+ ssidmap = [ {"service_specific_id:": x.service_specific_id, "id": x.id} for x in object_list ]
+
+ return Response({"ssidmap": ssidmap})
+
+ def ssiddetail(self, pk=None, ssid=None):
+ object_list = VOLTTenant.get_tenant_objects().all()
+
+ ssidmap = [ {"service_specific_id:": x.service_specific_id, "id": x.id} for x in object_list if str(x.service_specific_id)==str(ssid) ]
+
+ return Response({"ssidmap": ssidmap})
+
+