TenantOfService is the right relation, not MemberOfService
diff --git a/xos/tosca/resources/exampletenant.py b/xos/tosca/resources/exampletenant.py
index 2389812..608e75b 100644
--- a/xos/tosca/resources/exampletenant.py
+++ b/xos/tosca/resources/exampletenant.py
@@ -14,13 +14,13 @@
provides = "tosca.nodes.ExampleTenant"
xos_model = ExampleTenant
name_field = "service_specific_id"
- copyin_props = ("kind", "tenant_message")
+ copyin_props = ("tenant_message")
def get_xos_args(self, throw_exception=True):
args = super(XOSExampleTenant, self).get_xos_args()
# ExampleTenant must always have a provider_service
- provider_name = self.get_requirement("tosca.relationships.MemberOfService", throw_exception=True)
+ provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
if provider_name:
args["provider_service"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
diff --git a/xos/tosca/samples/exampleservice.yaml b/xos/tosca/samples/exampleservice.yaml
index cedd33b..5b90ce2 100644
--- a/xos/tosca/samples/exampleservice.yaml
+++ b/xos/tosca/samples/exampleservice.yaml
@@ -40,3 +40,8 @@
type: tosca.nodes.ExampleTenant
properties:
tenant_message: world
+ requirements:
+ - tenant:
+ node: service#exampleservice
+ relationship: tosca.relationships.TenantOfService
+