add siteroll, slicerole, tenantrole, and deploymentrole to Tosca
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index c114652..4879584 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -792,6 +792,46 @@
flavor:
type: tosca.capabilities.xos.Flavor
+ tosca.nodes.SiteRole:
+ derived_from: tosca.nodes.Root
+ description: >
+ An XOS Site Role.
+ properties:
+ xos_base_props
+ capabilities:
+ siterole:
+ type: tosca.capabilities.xos.SiteRole
+
+ tosca.nodes.SliceRole:
+ derived_from: tosca.nodes.Root
+ description: >
+ An XOS Slice Role.
+ properties:
+ xos_base_props
+ capabilities:
+ slicerole:
+ type: tosca.capabilities.xos.SliceRole
+
+ tosca.nodes.TenantRole:
+ derived_from: tosca.nodes.Root
+ description: >
+ An XOS Tenant Role.
+ properties:
+ xos_base_props
+ capabilities:
+ tenantrole:
+ type: tosca.capabilities.xos.TenantRole
+
+ tosca.nodes.DeploymentRole:
+ derived_from: tosca.nodes.Root
+ description: >
+ An XOS Deployment Role.
+ properties:
+ xos_base_props
+ capabilities:
+ deploymentrole:
+ type: tosca.capabilities.xos.DeploymentRole
+
tosca.nodes.DashboardView:
derived_from: tosca.nodes.Root
description: >
@@ -997,6 +1037,22 @@
derived_from: tosca.capabilities.Root
description: An XOS Flavor
+ tosca.capabilities.xos.DeploymentRole:
+ derived_from: tosca.capabilities.Root
+ description: An XOS DeploymentRole
+
+ tosca.capabilities.xos.SliceRole:
+ derived_from: tosca.capabilities.Root
+ description: An XOS SliceRole
+
+ tosca.capabilities.xos.SiteRole:
+ derived_from: tosca.capabilities.Root
+ description: An XOS SiteRole
+
+ tosca.capabilities.xos.TenantRole:
+ derived_from: tosca.capabilities.Root
+ description: An XOS TenantRole
+
tosca.capabilities.xos.Image:
derived_from: tosca.capabilities.Root
description: An XOS Image
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index a89641c..fda4182 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -1236,6 +1236,90 @@
flavor:
type: tosca.capabilities.xos.Flavor
+ tosca.nodes.SiteRole:
+ derived_from: tosca.nodes.Root
+ description: >
+ An XOS Site Role.
+ properties:
+ no-delete:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to delete this object
+ no-create:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to create this object
+ no-update:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to update this object
+ capabilities:
+ siterole:
+ type: tosca.capabilities.xos.SiteRole
+
+ tosca.nodes.SliceRole:
+ derived_from: tosca.nodes.Root
+ description: >
+ An XOS Slice Role.
+ properties:
+ no-delete:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to delete this object
+ no-create:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to create this object
+ no-update:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to update this object
+ capabilities:
+ slicerole:
+ type: tosca.capabilities.xos.SliceRole
+
+ tosca.nodes.TenantRole:
+ derived_from: tosca.nodes.Root
+ description: >
+ An XOS Tenant Role.
+ properties:
+ no-delete:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to delete this object
+ no-create:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to create this object
+ no-update:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to update this object
+ capabilities:
+ tenantrole:
+ type: tosca.capabilities.xos.TenantRole
+
+ tosca.nodes.DeploymentRole:
+ derived_from: tosca.nodes.Root
+ description: >
+ An XOS Deployment Role.
+ properties:
+ no-delete:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to delete this object
+ no-create:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to create this object
+ no-update:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to update this object
+ capabilities:
+ deploymentrole:
+ type: tosca.capabilities.xos.DeploymentRole
+
tosca.nodes.DashboardView:
derived_from: tosca.nodes.Root
description: >
@@ -1452,6 +1536,22 @@
derived_from: tosca.capabilities.Root
description: An XOS Flavor
+ tosca.capabilities.xos.DeploymentRole:
+ derived_from: tosca.capabilities.Root
+ description: An XOS DeploymentRole
+
+ tosca.capabilities.xos.SliceRole:
+ derived_from: tosca.capabilities.Root
+ description: An XOS SliceRole
+
+ tosca.capabilities.xos.SiteRole:
+ derived_from: tosca.capabilities.Root
+ description: An XOS SiteRole
+
+ tosca.capabilities.xos.TenantRole:
+ derived_from: tosca.capabilities.Root
+ description: An XOS TenantRole
+
tosca.capabilities.xos.Image:
derived_from: tosca.capabilities.Root
description: An XOS Image
diff --git a/xos/tosca/resources/deploymentrole.py b/xos/tosca/resources/deploymentrole.py
new file mode 100644
index 0000000..4339026
--- /dev/null
+++ b/xos/tosca/resources/deploymentrole.py
@@ -0,0 +1,29 @@
+# note: this module named xossite.py instead of site.py due to conflict with
+# /usr/lib/python2.7/site.py
+
+import os
+import pdb
+import sys
+import tempfile
+sys.path.append("/opt/tosca")
+from translator.toscalib.tosca_template import ToscaTemplate
+
+from core.models import User, Deployment, DeploymentRole
+
+from xosresource import XOSResource
+
+class XOSDeploymentRole(XOSResource):
+ provides = "tosca.nodes.DeploymentRole"
+ xos_model = DeploymentRole
+ name_field = "role"
+
+ def get_xos_args(self):
+ args = super(XOSDeploymentRole, self).get_xos_args()
+
+ return args
+
+ def delete(self, obj):
+ super(XOSDeploymentRole, self).delete(obj)
+
+
+
diff --git a/xos/tosca/resources/siterole.py b/xos/tosca/resources/siterole.py
new file mode 100644
index 0000000..abb1f0d
--- /dev/null
+++ b/xos/tosca/resources/siterole.py
@@ -0,0 +1,29 @@
+# note: this module named xossite.py instead of site.py due to conflict with
+# /usr/lib/python2.7/site.py
+
+import os
+import pdb
+import sys
+import tempfile
+sys.path.append("/opt/tosca")
+from translator.toscalib.tosca_template import ToscaTemplate
+
+from core.models import User, Deployment, SiteRole
+
+from xosresource import XOSResource
+
+class XOSSiteRole(XOSResource):
+ provides = "tosca.nodes.SiteRole"
+ xos_model = SiteRole
+ name_field = "role"
+
+ def get_xos_args(self):
+ args = super(XOSSiteRole, self).get_xos_args()
+
+ return args
+
+ def delete(self, obj):
+ super(XOSSiteRole, self).delete(obj)
+
+
+
diff --git a/xos/tosca/resources/slicerole.py b/xos/tosca/resources/slicerole.py
new file mode 100644
index 0000000..fc7d3f1
--- /dev/null
+++ b/xos/tosca/resources/slicerole.py
@@ -0,0 +1,29 @@
+# note: this module named xossite.py instead of site.py due to conflict with
+# /usr/lib/python2.7/site.py
+
+import os
+import pdb
+import sys
+import tempfile
+sys.path.append("/opt/tosca")
+from translator.toscalib.tosca_template import ToscaTemplate
+
+from core.models import User, Deployment, SliceRole
+
+from xosresource import XOSResource
+
+class XOSSliceRole(XOSResource):
+ provides = "tosca.nodes.SliceRole"
+ xos_model = SliceRole
+ name_field = "role"
+
+ def get_xos_args(self):
+ args = super(XOSSliceRole, self).get_xos_args()
+
+ return args
+
+ def delete(self, obj):
+ super(XOSSliceRole, self).delete(obj)
+
+
+
diff --git a/xos/tosca/resources/tenantrole.py b/xos/tosca/resources/tenantrole.py
new file mode 100644
index 0000000..316a5a3
--- /dev/null
+++ b/xos/tosca/resources/tenantrole.py
@@ -0,0 +1,29 @@
+# note: this module named xossite.py instead of site.py due to conflict with
+# /usr/lib/python2.7/site.py
+
+import os
+import pdb
+import sys
+import tempfile
+sys.path.append("/opt/tosca")
+from translator.toscalib.tosca_template import ToscaTemplate
+
+from core.models import User, Deployment, TenantRole
+
+from xosresource import XOSResource
+
+class XOSTenantRole(XOSResource):
+ provides = "tosca.nodes.TenantRole"
+ xos_model = TenantRole
+ name_field = "role"
+
+ def get_xos_args(self):
+ args = super(XOSTenantRole, self).get_xos_args()
+
+ return args
+
+ def delete(self, obj):
+ super(XOSTenantRole, self).delete(obj)
+
+
+