add default_isolation to slice tosca
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index 3606601..4f726fc 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -588,6 +588,10 @@
type: integer
default: 10
description: Quota of instances that this slice may create.
+ default_isolation:
+ type: string
+ required: false
+ description: default isolation to use when bringing up instances (default to 'vm')
tosca.nodes.Node:
derived_from: tosca.nodes.Root
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index 7a6030e..246c922 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -776,6 +776,10 @@
type: integer
default: 10
description: Quota of instances that this slice may create.
+ default_isolation:
+ type: string
+ required: false
+ description: default isolation to use when bringing up instances (default to 'vm')
tosca.nodes.Node:
derived_from: tosca.nodes.Root
diff --git a/xos/tosca/resources/slice.py b/xos/tosca/resources/slice.py
index 2c02365..e37bfc8 100644
--- a/xos/tosca/resources/slice.py
+++ b/xos/tosca/resources/slice.py
@@ -12,7 +12,7 @@
class XOSSlice(XOSResource):
provides = "tosca.nodes.Slice"
xos_model = Slice
- copyin_props = ["enabled", "description", "slice_url", "max_instances"]
+ copyin_props = ["enabled", "description", "slice_url", "max_instances", "default_isolation"]
def get_xos_args(self):
args = super(XOSSlice, self).get_xos_args()
diff --git a/xos/tosca/samples/container_slice.yaml b/xos/tosca/samples/container_slice.yaml
new file mode 100644
index 0000000..520bec0
--- /dev/null
+++ b/xos/tosca/samples/container_slice.yaml
@@ -0,0 +1,24 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ * Create a new deployment, controller, and site.
+ * Add a SiteDeployment from the site to the deployment using the controller.
+ * Create a Slice in the Site, with one Instance
+
+imports:
+ - custom_types/xos.yaml
+
+topology_template:
+ node_templates:
+ mysite:
+ type: tosca.nodes.Site
+
+ mysite_containers:
+ type: tosca.nodes.Slice
+ requirements:
+ - slice:
+ node: mysite
+ relationship: tosca.relationships.MemberOfSite
+ properties:
+ default_isolation: container
+