properties for controller
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index b93f497..f247d66 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -26,6 +26,28 @@
capabilities:
controller:
type: tosca.capabilities.xos.Controller
+ properties:
+ backend_type:
+ type: string
+ required: false
+ version:
+ type: string
+ required: false
+ auth_url:
+ type: string
+ required: false
+ admin_user:
+ type: string
+ required: false
+ admin_password:
+ type: string
+ required: false
+ admin_tenant:
+ type: string
+ required: false
+ domain:
+ type: string
+ required: false
tosca.nodes.Site:
derived_from: tosca.nodes.Root
diff --git a/xos/tosca/resources/controller.py b/xos/tosca/resources/controller.py
index d5dc4b7..75725f4 100644
--- a/xos/tosca/resources/controller.py
+++ b/xos/tosca/resources/controller.py
@@ -19,6 +19,12 @@
def get_xos_args(self):
args = {"name": self.nodetemplate.name}
+ # copy simple string properties from the template into the arguments
+ for prop in ["backend_type", "version", "auth_url", "admin_user", "admin_password", "admin_tenant", "domain"]:
+ v = self.get_property(prop)
+ if v:
+ args[prop] = v
+
deployment_name = self.get_requirement("tosca.relationships.ControllerDeployment")
if deployment_name:
args["deployment"] = self.get_xos_object(Deployment, name=deployment_name)
diff --git a/xos/tosca/samples/new_site_deploy_slice.yaml b/xos/tosca/samples/new_site_deploy_slice.yaml
index 66f83d3..0718b65 100644
--- a/xos/tosca/samples/new_site_deploy_slice.yaml
+++ b/xos/tosca/samples/new_site_deploy_slice.yaml
@@ -16,6 +16,14 @@
- deployment:
node: newdeployment
relationship: tosca.relationships.ControllerDeployment
+ properties:
+ backend_type: openstack
+ version: v1.23.4
+ auth_url: http://foo/
+ admin_user: johndoe
+ admin_password: letmeout
+ admin_tenant: 12345678
+ domain: mydomain
newsite:
type: tosca.nodes.Site