add VTN to Tosca
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index dc23c84..30798d5 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -166,6 +166,19 @@
type: string
required: false
+ tosca.nodes.ONOSVTNApp:
+ derived_from: tosca.nodes.Root
+ description: >
+ An ONOS VTN Application.
+ properties:
+ xos_base_tenant_props
+ dependencies:
+ type: string
+ required: false
+ rest_onos/v1/network/configuration/:
+ type: string
+ required: false
+
tosca.nodes.VCPEService:
description: >
CORD: The vCPE Service.
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index 1256c3b..63d7395 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -195,6 +195,26 @@
type: string
required: false
+ tosca.nodes.ONOSVTNApp:
+ derived_from: tosca.nodes.Root
+ description: >
+ An ONOS VTN Application.
+ properties:
+ kind:
+ type: string
+ default: generic
+ description: Kind of tenant
+ service_specific_id:
+ type: string
+ required: false
+ description: Service specific ID opaque to XOS but meaningful to service
+ dependencies:
+ type: string
+ required: false
+ rest_onos/v1/network/configuration/:
+ type: string
+ required: false
+
tosca.nodes.VCPEService:
description: >
CORD: The vCPE Service.
diff --git a/xos/tosca/resources/onosapp.py b/xos/tosca/resources/onosapp.py
index 7ed47d7..42cb0bf 100644
--- a/xos/tosca/resources/onosapp.py
+++ b/xos/tosca/resources/onosapp.py
@@ -12,7 +12,7 @@
from xosresource import XOSResource
class XOSONOSApp(XOSResource):
- provides = ["tosca.nodes.ONOSApp", "tosca.nodes.ONOSvBNGApp", "tosca.nodes.ONOSvOLTApp"]
+ provides = ["tosca.nodes.ONOSApp", "tosca.nodes.ONOSvBNGApp", "tosca.nodes.ONOSvOLTApp", "tosca.nodes.ONOSVTNApp"]
xos_model = ONOSApp
copyin_props = ["service_specific_id", "dependencies"]
diff --git a/xos/tosca/samples/vtn.yaml b/xos/tosca/samples/vtn.yaml
index 9cb7c95..64d2b66 100644
--- a/xos/tosca/samples/vtn.yaml
+++ b/xos/tosca/samples/vtn.yaml
@@ -18,13 +18,16 @@
pubkey: /opt/xos/observers/onos/onos_key.pub
VTN_ONOS_app:
- type: tosca.nodes.ONOSvBNGApp
+ type: tosca.nodes.ONOSVTNApp
requirements:
- onos_tenant:
node: service_ONOS_VTN
relationship: tosca.relationships.TenantOfService
properties:
-# dependencies: org.onosproject.proxyarp, org.onosproject.virtualbng, org.onosproject.openflow, org.onosproject.fwd
+ dependencies: org.onosproject.openstackswitching, org.onosproject.cordvtn
+ rest_onos/v1/network/configuration/: { get_atrifact: [ SELF, vtn_network_cfg_json, LOCAL_FILE ] }
+ artifacts:
+ vtn_network_cfg_json: /root/setup/vtn-network-cfg.json
# docker image for vcpe containers
docker-onos: