add nodelabel to tosca
diff --git a/xos/configurations/cord-pod/cord-vtn-vsg.yaml b/xos/configurations/cord-pod/cord-vtn-vsg.yaml
index 89ef49a..994ab3e 100644
--- a/xos/configurations/cord-pod/cord-vtn-vsg.yaml
+++ b/xos/configurations/cord-pod/cord-vtn-vsg.yaml
@@ -61,6 +61,9 @@
mysite:
type: tosca.nodes.Site
+ label_vsg:
+ type: tosca.nodes.NodeLabel
+
# Networks required by the CORD setup
mysite_vsg-access:
type: tosca.nodes.network.Network
diff --git a/xos/configurations/cord/cord.yaml b/xos/configurations/cord/cord.yaml
index 07d4b68..aa2673b 100644
--- a/xos/configurations/cord/cord.yaml
+++ b/xos/configurations/cord/cord.yaml
@@ -270,6 +270,8 @@
mysite:
type: tosca.nodes.Site
+ label_vsg:
+ type: tosca.nodes.NodeLabel
# CORD Slices
mysite_vsg:
diff --git a/xos/configurations/vtn/cord-vtn-vsg.yaml b/xos/configurations/vtn/cord-vtn-vsg.yaml
index 1b26bba..c4332e2 100644
--- a/xos/configurations/vtn/cord-vtn-vsg.yaml
+++ b/xos/configurations/vtn/cord-vtn-vsg.yaml
@@ -21,7 +21,7 @@
public_addresses:
type: tosca.nodes.AddressPool
properties:
- addresses: 10.123.0.0/24 10.124.0.0/24
+ addresses: 10.123.0.128/25
service_vsg:
type: tosca.nodes.VSGService
@@ -62,6 +62,9 @@
mysite:
type: tosca.nodes.Site
+ label_vsg:
+ type: tosca.nodes.NodeLabel
+
# Networks required by the CORD setup
mysite_vsg-access:
type: tosca.nodes.network.Network
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index 15e9710..dd96d03 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -715,6 +715,16 @@
node:
type: tosca.capabilities.xos.Node
+ tosca.nodes.NodeLabel:
+ derived_from: tosca.nodes.Root
+ description: >
+ An XOS NodeLabel.
+ properties:
+ xos_base_props
+ capabilities:
+ node:
+ type: tosca.capabilities.xos.NodeLabel
+
tosca.nodes.DashboardView:
derived_from: tosca.nodes.Root
description: >
@@ -893,6 +903,10 @@
derived_from: tosca.capabilities.Root
description: An XOS Node
+ tosca.capabilities.xos.NodeLabel:
+ derived_from: tosca.capabilities.Root
+ description: An XOS NodeLabel
+
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 88b3388..cf930b3 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -1005,6 +1005,27 @@
node:
type: tosca.capabilities.xos.Node
+ tosca.nodes.NodeLabel:
+ derived_from: tosca.nodes.Root
+ description: >
+ An XOS NodeLabel.
+ 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:
+ node:
+ type: tosca.capabilities.xos.NodeLabel
+
tosca.nodes.DashboardView:
derived_from: tosca.nodes.Root
description: >
@@ -1194,6 +1215,10 @@
derived_from: tosca.capabilities.Root
description: An XOS Node
+ tosca.capabilities.xos.NodeLabel:
+ derived_from: tosca.capabilities.Root
+ description: An XOS NodeLabel
+
tosca.capabilities.xos.Image:
derived_from: tosca.capabilities.Root
description: An XOS Image
diff --git a/xos/tosca/resources/nodelabel.py b/xos/tosca/resources/nodelabel.py
new file mode 100644
index 0000000..9a8df3e
--- /dev/null
+++ b/xos/tosca/resources/nodelabel.py
@@ -0,0 +1,15 @@
+import os
+import pdb
+import sys
+import tempfile
+sys.path.append("/opt/tosca")
+from translator.toscalib.tosca_template import ToscaTemplate
+
+from core.models import NodeLabel
+
+from xosresource import XOSResource
+
+class XOSNodeLabel(XOSResource):
+ provides = "tosca.nodes.NodeLabel"
+ xos_model = NodeLabel
+