[SEBA-694]Add a rest endpoint to the Sadis application in order to flush the cache for a single subscriber
Change-Id: I2c540d743479c616b7000954c4aa36fa8058f423
diff --git a/xos/synchronizer/models/models.py b/xos/synchronizer/models/models.py
old mode 100755
new mode 100644
index fd25d01..94f96fa
--- a/xos/synchronizer/models/models.py
+++ b/xos/synchronizer/models/models.py
@@ -246,10 +246,12 @@
# if the access network is managed by voltha, validate that onu_device actually exist
# we assume RCORDService is connected only to the vOLTService
- volt_service = self.owner.provider_services[0].leaf_model
-
- if not volt_service.has_access_device(self.onu_device):
- raise XOSValidationError("The onu_device you specified (%s) does not exists" % self.onu_device)
+ for ps in self.owner.provider_services:
+ provider_service = ps.leaf_model
+ if provider_service.name.lower() == "volt":
+ volt_service = provider_service
+ if not volt_service.has_access_device(self.onu_device):
+ raise XOSValidationError("The onu_device you specified (%s) does not exists" % self.onu_device)
# if the access network is managed by voltha, validate that the tech_profile_id actually exists
if not self.validate_tech_profile_id():