add support for rest_service and rest_tenant
diff --git a/xos/core/models/service.py b/xos/core/models/service.py
index 511bb1b..4014f5d 100644
--- a/xos/core/models/service.py
+++ b/xos/core/models/service.py
@@ -77,7 +77,8 @@
('admin', 'Admin'),
('django_library', 'Django Library'),
('synchronizer', 'Synchronizer'),
- ('rest', 'REST API'),
+ ('rest_service', 'REST API (service)'),
+ ('rest_tenant', 'REST API (tenant)'),
('tosca_custom_types', 'Tosca Custom Types'),
('tosca_resource', 'Tosca Resource'),
('private_key', 'Private Key'),
diff --git a/xos/onboard/exampleservice/exampleservice-onboard.yaml b/xos/onboard/exampleservice/exampleservice-onboard.yaml
index 32fb1ef..e8eab6a 100644
--- a/xos/onboard/exampleservice/exampleservice-onboard.yaml
+++ b/xos/onboard/exampleservice/exampleservice-onboard.yaml
@@ -17,5 +17,8 @@
admin: admin.py
synchronizer: synchronizer/manifest
tosca_custom_types: exampleservice.yaml
+ rest_service: api/service/exampleservice.py
+ rest_tenant: api/service/exampletenant.py
private_key: file:///opt/xos/key_import/exampleservice_rsa
public_key: file:///opt/xos/key_import/exampleservice_rsa.pub
+
diff --git a/xos/synchronizers/onboarding/xosbuilder.py b/xos/synchronizers/onboarding/xosbuilder.py
index 0bfc3a9..a1fccb5 100644
--- a/xos/synchronizers/onboarding/xosbuilder.py
+++ b/xos/synchronizers/onboarding/xosbuilder.py
@@ -34,6 +34,8 @@
"synchronizer": "%s/synchronizers/%s/" % (xos_base, service_name),
"tosca_custom_types": "%s/tosca/custom_types/" % (xos_base),
"tosca_resource": "%s/tosca/resources/" % (xos_base),
+ "rest_service": "%s/api/service/" % (xos_base),
+ "rest_tenant": "%s/api/service/" % (xos_base),
"private_key": "%s/services/%s/keys" % (xos_base, service_name),
"public_key": "%s/services/%s/keys/" % (xos_base, service_name)}
return base_dirs[scr.kind]
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index eb0703d..2a0c496 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -76,6 +76,14 @@
type: string
required: false
description: url of tosca custom_types
+ rest_service:
+ type: string
+ required: false
+ description: url of REST API service file
+ rest_tenant:
+ type: string
+ required: false
+ description: url of REST API tenant file
private_key:
type: string
required: false
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index 997de12..6efd9f5 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -184,6 +184,14 @@
type: string
required: false
description: url of tosca custom_types
+ rest_service:
+ type: string
+ required: false
+ description: url of REST API service file
+ rest_tenant:
+ type: string
+ required: false
+ description: url of REST API tenant file
private_key:
type: string
required: false
diff --git a/xos/tosca/resources/servicecontroller.py b/xos/tosca/resources/servicecontroller.py
index 187dca5..34b95c2 100644
--- a/xos/tosca/resources/servicecontroller.py
+++ b/xos/tosca/resources/servicecontroller.py
@@ -37,4 +37,6 @@
self.postprocess_resource_prop(obj, "synchronizer", "manifest")
self.postprocess_resource_prop(obj, "private_key", "raw")
self.postprocess_resource_prop(obj, "public_key", "raw")
+ self.postprocess_resource_prop(obj, "rest_service", "python")
+ self.postprocess_resource_prop(obj, "rest_tenant", "python")