[CORD-3007] Move provider_services and subscriber_service from convenience method to _decl models
Change-Id: I01bf6fe370ddf5abf6e4622ebde345c3e4ba7709
diff --git a/xos/core/models/service.py b/xos/core/models/service.py
index b6bdccf1..75be0f4 100644
--- a/xos/core/models/service.py
+++ b/xos/core/models/service.py
@@ -36,5 +36,21 @@
nets.append(net)
return nets
+ @property
+ def provider_services(self):
+ svcs = []
+ service_deps = self.subscribed_dependencies.all()
+ for dep in service_deps:
+ svcs.append(dep.provider_service)
+ return svcs
+
+ @property
+ def subscriber_services(self):
+ svcs = []
+ service_deps = self.provided_dependencies.all()
+ for dep in service_deps:
+ svcs.append(dep.subscriber_service)
+ return svcs
+