aboutsummaryrefslogtreecommitdiffstats
path: root/generic-resource-api/model
diff options
context:
space:
mode:
Diffstat (limited to 'generic-resource-api/model')
-rw-r--r--generic-resource-api/model/pom.xml161
-rwxr-xr-xgeneric-resource-api/model/scripts/python/yang2props.py57
-rw-r--r--generic-resource-api/model/src/main/yang/GENERIC-RESOURCE-API.yang1670
3 files changed, 1888 insertions, 0 deletions
diff --git a/generic-resource-api/model/pom.xml b/generic-resource-api/model/pom.xml
new file mode 100644
index 00000000..9b8b3fe1
--- /dev/null
+++ b/generic-resource-api/model/pom.xml
@@ -0,0 +1,161 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onap.sdnc.northbound</groupId>
+ <artifactId>generic-resource-api</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>generic-resource-api.model</artifactId>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>yang-binding</artifactId>
+ <version>${odl.mdsal.yang.binding.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-common</artifactId>
+ <version>${odl.yangtools.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-inet-types</artifactId>
+ <version>${odl.ietf-inet-types.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-yang-types</artifactId>
+ <version>${odl.ietf-yang-types.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Import-Package>*</Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>maven-sal-api-gen-plugin</artifactId>
+ <version>${odl.sal.api.gen.plugin.version}</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-sources</goal>
+ </goals>
+ <configuration>
+ <yangFilesRootDir>${yang.file.directory}</yangFilesRootDir>
+ <codeGenerators>
+ <generator>
+ <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
+ <outputBaseDir>${salGeneratorPath}</outputBaseDir>
+ </generator>
+ </codeGenerators>
+ <inspectDependencies>true</inspectDependencies>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <configuration>
+ <executable>python</executable>
+ <arguments>
+ <argument>scripts/python/yang2props.py</argument>
+ <argument>src/main/yang/GENERIC-RESOURCE-API.yang</argument>
+ <argument>target/generic-resource-api.properties</argument>
+ </arguments>
+ </configuration>
+ <id>generation</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/generic-resource-api.properties</file>
+ <type>properties</type>
+ <classifier>generic-resource-api</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.codehaus.mojo
+ </groupId>
+ <artifactId>
+ exec-maven-plugin
+ </artifactId>
+ <versionRange>
+ [1.2.1,)
+ </versionRange>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
diff --git a/generic-resource-api/model/scripts/python/yang2props.py b/generic-resource-api/model/scripts/python/yang2props.py
new file mode 100755
index 00000000..559d31b8
--- /dev/null
+++ b/generic-resource-api/model/scripts/python/yang2props.py
@@ -0,0 +1,57 @@
+#!/usr/bin/python
+
+import re
+import sys
+
+
+# Convert word from foo-bar to FooBar
+# words begining with a digit will be converted to _digit
+def to_enum(s):
+ if s[0].isdigit():
+ s = "_" + s
+ else:
+ s = s[0].upper() + s[1:]
+ return re.sub(r'(?!^)-([a-zA-Z])', lambda m: m.group(1).upper(), s)
+
+leaf = ""
+val = ""
+li = []
+
+if len(sys.argv) < 3:
+ print 'yang2props.py <input yang> <output properties>'
+ sys.exit(2)
+
+with open(sys.argv[1], "r") as ins:
+ for line in ins:
+ # if we see a leaf save the name for later
+ if "leaf " in line:
+ match = re.search(r'leaf (\S+)', line)
+ if match:
+ leaf = match.group(1)
+
+ # if we see enum convert the value to enum format and see if it changed
+ # if the value is different write a property entry
+ if "enum " in line:
+ match = re.search(r'enum "(\S+)";', line)
+ if match:
+ val = match.group(1)
+ enum = to_enum(val)
+
+ # see if converting to enum changed the string
+ if val != enum:
+ property = "yang."+leaf+"."+enum+"="+val
+ if property not in li:
+ li.append( property)
+
+
+# Open output file
+fo = open(sys.argv[2], "wb")
+fo.write("# yang conversion properties \n")
+fo.write("# used to convert Enum back to the original yang value \n")
+fo.write("\n".join(li))
+fo.write("\n")
+
+# Close opend file
+fo.close()
+
+
diff --git a/generic-resource-api/model/src/main/yang/GENERIC-RESOURCE-API.yang b/generic-resource-api/model/src/main/yang/GENERIC-RESOURCE-API.yang
new file mode 100644
index 00000000..233fbaf8
--- /dev/null
+++ b/generic-resource-api/model/src/main/yang/GENERIC-RESOURCE-API.yang
@@ -0,0 +1,1670 @@
+module GENERIC-RESOURCE-API {
+
+ namespace "org:onap:sdnc:northbound:generic-resource";
+
+ prefix generic-resource-api;
+
+ import ietf-inet-types { prefix "inet"; revision-date "2010-09-24"; }
+
+ import ietf-yang-types { prefix yang; }
+
+ revision "2017-08-24" {
+ description
+ "ONAP Amsterdam version";
+ }
+
+ grouping service-model-infrastructure {
+ list service {
+ key "service-instance-id";
+ leaf service-instance-id {
+ description "Keep as M";
+ type string;
+ mandatory true;
+ }
+ uses service-data;
+ uses service-status;
+ }
+ }
+ grouping service-data {
+ container service-data {
+ uses service-operation-information;
+ uses service-topology;
+ uses service-level-oper-status;
+ container networks {
+ list network {
+ key "network-id";
+ leaf network-id {
+ type string;
+ mandatory true;
+ }
+ container network-data {
+ uses network-operation-information;
+ uses network-topology;
+ container network-provided-allotted-resources {
+ leaf-list network-provided-ar-id {
+ description "List of allotted resources using capacity from this network";
+ type string;
+ ordered-by user;
+ }
+ }
+ uses network-level-oper-status;
+ }
+ }
+ }
+ container vnfs {
+ list vnf {
+ key "vnf-id";
+ leaf vnf-id {
+ type string;
+ mandatory true;
+ }
+ container vnf-data {
+ uses vnf-operation-information;
+ uses vnf-topology;
+ container vnf-provided-allotted-resources {
+ leaf-list vnf-provided-ar-id {
+ description "List of allotted resources using capacity from this vnf";
+ type string;
+ ordered-by user;
+ }
+ }
+ uses vnf-level-oper-status;
+ container vf-modules {
+ list vf-module {
+ key "vf-module-id";
+ leaf vf-module-id {
+ type string;
+ mandatory true;
+ }
+ container vf-module-data {
+ uses vf-module-operation-information;
+ uses vf-module-topology;
+ uses vf-module-level-oper-status;
+ }
+ }
+ }
+ }
+ }
+ }
+ container consumed-allotted-resources {
+ list consumed-allotted-resource {
+ key "allotted-resource-id";
+ uses allotted-resource-info;
+ }
+ }
+ container provided-allotted-resources {
+ list provided-allotted-resource {
+ key "allotted-resource-id";
+ uses allotted-resource-info;
+ }
+ }
+ }
+ }
+ grouping service-status {
+ container service-status {
+ leaf response-code {
+ type string;
+ }
+ leaf response-message {
+ type string;
+ }
+ leaf final-indicator {
+ type string;
+ }
+ leaf request-status {
+ type enumeration {
+ enum "synccomplete";
+ enum "asynccomplete";
+ enum "notifycomplete";
+ }
+ }
+ leaf action {
+ description "value would one of possible request-actions; match the list in service-data oper-status";
+ type string;
+ }
+ leaf rpc-name {
+ type string;
+ }
+ leaf rpc-action {
+ description "this is the svc-action from the incoming request";
+ type enumeration {
+ enum "assign";
+ enum "activate";
+ enum "configure";
+ enum "delete";
+ enum "unassign";
+ enum "deactivate";
+ }
+ }
+ leaf response-timestamp {
+ type string;
+ }
+ }
+ }
+ grouping service-operation-information {
+ uses sdnc-request-header;
+ uses request-information;
+ uses service-information;
+ uses service-request-input;
+ }
+ grouping service-request-input {
+ container service-request-input {
+ leaf service-instance-name {
+ type string;
+ }
+ container service-input-parameters {
+ uses param;
+ }
+ }
+ }
+ grouping service-topology {
+ container service-topology {
+ uses service-topology-identifier;
+ uses ecomp-model-information;
+ uses service-assignments;
+ uses service-parameters;
+ }
+ }
+ grouping service-topology-identifier {
+ container service-topology-identifier {
+ leaf service-instance-id {
+ description "repeated";
+ type string;
+ }
+ leaf service-type {
+ description "tag labeled subscription-service-type in the service-information input";
+ type string;
+ }
+ leaf service-id {
+ description "from MSO input on STO assign";
+ type string;
+ }
+ leaf service-instance-name {
+ description "optionally comes from service-request-input container or is assigned by sdn-c";
+ type string;
+ }
+ leaf global-customer-id {
+ type string;
+ }
+ }
+ }
+ grouping service-assignments {
+ container service-assignments {
+ }
+ }
+ grouping service-parameters {
+ container service-parameters {
+ list service-parameter {
+ key "service-parameter-name";
+ leaf service-parameter-name {
+ type string;
+ }
+ leaf service-parameter-value {
+ type string;
+ }
+ }
+ }
+ }
+ grouping service-level-oper-status {
+ container service-level-oper-status {
+ uses oper-status-data;
+ }
+ }
+ grouping network-operation-information {
+ uses sdnc-request-header;
+ uses request-information;
+ uses service-information;
+ uses network-information;
+ uses network-request-input;
+ }
+ grouping network-information {
+ container network-information {
+ leaf network-id {
+ type string;
+ }
+ leaf network-type {
+ type string;
+ }
+ uses ecomp-model-information;
+ }
+ }
+ grouping network-request-input {
+ container network-request-input {
+ leaf network-name {
+ type string;
+ }
+ uses region-identifier;
+ container network-input-parameters {
+ uses param;
+ }
+ }
+ }
+ grouping network-topology {
+ container network-topology {
+ uses network-topology-identifier-structure;
+ uses region-identifier;
+ uses ecomp-model-information;
+ uses network-assignments;
+ uses network-parameters;
+ }
+ }
+ grouping network-topology-identifier-structure {
+ container network-topology-identifier-structure {
+ leaf network-id {
+ type string;
+ }
+ leaf network-name {
+ type string;
+ }
+ leaf network-role {
+ type string;
+ }
+ leaf network-type {
+ type string;
+ }
+ leaf network-technology {
+ description "should we keep this?";
+ type string;
+ }
+ leaf eipam-v4-address-plan {
+ description "??";
+ type string;
+ }
+ leaf eipam-v6-address-plan {
+ type string;
+ }
+ }
+ }
+ grouping network-assignments {
+ container network-assignments {
+ }
+ }
+ grouping network-parameters {
+ container network-parameters {
+ list network-parameter {
+ key "network-parameter-name";
+ leaf network-parameter-name {
+ type string;
+ }
+ leaf network-parameter-value {
+ type string;
+ }
+ }
+ }
+ }
+ grouping network-level-oper-status {
+ container network-level-oper-status {
+ uses oper-status-data;
+ }
+ }
+ grouping vnf-operation-information {
+ uses sdnc-request-header;
+ uses request-information;
+ uses service-information;
+ uses vnf-information;
+ uses vnf-request-input;
+ }
+ grouping vnf-information {
+ container vnf-information {
+ leaf vnf-id {
+ type string;
+ }
+ leaf vnf-type {
+ description "vnf-model-id in Pats model?in Pats vnf submodule, contained within vnf-instance-topology-identifier grouping (along with vnf-name and vnf-instance-id)";
+ type string;
+ }
+ uses ecomp-model-information;
+ }
+ }
+ grouping vnf-request-input {
+ container vnf-request-input {
+ leaf request-version {
+ description "keep this? e.g. 1702";
+ type string;
+ }
+ leaf vnf-name {
+ description "in Pats vnf submodule, contained within vnf-instance-topology-identifier (along with vnf-model-id and vnf-instance-id)";
+ type string;
+ }
+ uses region-identifier;
+ container vnf-networks {
+ list vnf-network {
+ key "network-role";
+ uses vnf-network-data;
+ }
+ }
+ container vnf-input-parameters {
+ uses param;
+ }
+ }
+ }
+ grouping vnf-topology {
+ container vnf-topology {
+ uses vnf-topology-identifier-structure;
+ uses region-identifier;
+ uses ecomp-model-information;
+ uses vnf-resource-assignments;
+ container vnf-parameters-data {
+ uses param;
+ }
+ }
+ }
+ grouping vnf-topology-identifier-structure {
+ container vnf-topology-identifier-structure {
+ leaf vnf-id {
+ type string;
+ }
+ leaf vnf-type {
+ description "In preload tree, this label is used for the vf-module-type";
+ type string;
+ }
+ leaf nf-type {
+ type string;
+ }
+ leaf nf-role {
+ type string;
+ }
+ leaf nf-function {
+ type string;
+ }
+ leaf nf-code {
+ description "used in vnf naming";
+ type string;
+ }
+ leaf vnf-name {
+ description "optionally comes from vnf-request-input container or is assigned by sdn-c";
+ type string;
+ }
+ }
+ }
+ grouping vnf-resource-assignments {
+ container vnf-resource-assignments {
+ leaf vnf-status {
+ description "Do we need this?Orchestration status from AAI - to be set by SDNCWill not be used for vIPR.";
+ type string;
+ }
+ container availability-zones {
+ leaf-list availability-zone {
+ description "Openstack availability zone name or UUID";
+ type string;
+ ordered-by user;
+ }
+ leaf max-count {
+ description "From the TOSCA data. Indicates the largest availability zone count needed by any vf-module in the VNF.";
+ type uint8;
+ }
+ }
+ container vnf-networks {
+ list vnf-network {
+ key "network-role";
+ uses vnf-network-data;
+ }
+ }
+ }
+ }
+ grouping vnf-network-data {
+ leaf network-role {
+ description "A Network Role to which a VNF must connect";
+ type string;
+ }
+ leaf network-name {
+ description "Unique Neutron UUID of an instance of the network role ";
+ type string;
+ }
+ leaf neutron-id {
+ description "Unique Neutron UUID of an instance of the network role ";
+ type string;
+ }
+ leaf network-id {
+ description "Unique Neutron UUID of an instance of the network role ";
+ type string;
+ }
+ leaf contrail-network-fqdn {
+ description "contrail network policy object";
+ type string;
+ }
+ container subnets-data {
+ list subnet-data {
+ key "ip-version";
+ leaf ip-version {
+ description "Should be ipv4 or ipv6";
+ type string;
+ }
+ leaf subnet-id {
+ description "subnet UUID to be passed into the HEAT template";
+ type string;
+ }
+ }
+ }
+ }
+ grouping vnf-level-oper-status {
+ container vnf-level-oper-status {
+ uses oper-status-data;
+ }
+ }
+ grouping vf-module-operation-information {
+ uses sdnc-request-header;
+ uses request-information;
+ uses service-information;
+ uses vnf-information;
+ uses vf-module-information;
+ uses vf-module-request-input;
+ }
+ grouping vf-module-information {
+ container vf-module-information {
+ leaf vf-module-id {
+ type string;
+ }
+ leaf vf-module-type {
+ type string;
+ }
+ uses ecomp-model-information;
+ }
+ }
+ grouping vf-module-request-input {
+ container vf-module-request-input {
+ leaf request-version {
+ description "keep this?";
+ type string;
+ }
+ leaf vf-module-name {
+ type string;
+ }
+ uses region-identifier;
+ container vf-module-input-parameters {
+ uses param;
+ }
+ }
+ }
+ grouping vf-module-topology {
+ container vf-module-topology {
+ uses vf-module-topology-identifier;
+ uses region-identifier;
+ uses ecomp-model-information;
+ uses vf-module-assignments;
+ container vf-module-parameters {
+ uses param;
+ }
+ }
+ }
+ grouping vf-module-topology-identifier {
+ container vf-module-topology-identifier {
+ leaf vf-module-id {
+ description "vf-module id";
+ type string;
+ }
+ leaf vf-module-name {
+ description "vf-module-name";
+ type string;
+ }
+ leaf vf-module-type {
+ description "In Pats model referred to as model-id";
+ type string;
+ }
+ }
+ }
+ grouping vf-module-assignments {
+ container vf-module-assignments {
+ leaf vf-module-status {
+ description "Do we need this?Orchestration status from AAI - to be set by SDNCNot being used for vIPR.";
+ type string;
+ }
+ container vms {
+ list vm {
+ key "vm-type";
+ uses vm-topology-data;
+ }
+ }
+ }
+ }
+ grouping vm-topology-data {
+ leaf vm-type {
+ type string;
+ mandatory true;
+ }
+ leaf nfc-naming-code {
+ description "used in vm naming(draft 29: changed from nfc-code)";
+ type string;
+ }
+ leaf vm-type-tag {
+ description "from tosca data on vfc";
+ type string;
+ }
+ leaf vm-count {
+ type uint8;
+ }
+ container vm-names {
+ leaf-list vm-name {
+ description "ordered-by: user";
+ type string;
+ ordered-by user;
+ }
+ }
+ container vm-networks {
+ list vm-network {
+ key "network-role";
+ uses vm-network-data;
+ }
+ }
+ }
+ grouping vm-network-data {
+ leaf network-role {
+ description "network (identified by role) that this VM connects to. Should also be included in the vnf-networks for the containing VNF";
+ type string;
+ mandatory true;
+ }
+ leaf network-role-tag {
+ type string;
+ }
+ container network-information-items {
+ list network-information-item {
+ key "ip-version";
+ leaf ip-version {
+ description "Use ipv4 or ipv6";
+ type string;
+ }
+ leaf use-dhcp {
+ description "Indicator to use DHCP on this network for this VM";
+ type enumeration {
+ enum "Y";
+ enum "N";
+ }
+ }
+ leaf ip-count {
+ description "The number of ip addresses to be assigned per vm for this network role";
+ type uint8;
+ }
+ container network-ips {
+ leaf-list network-ip {
+ description "List of assigned ip addresses of type ip-version on a network. Is there a way to specify format to indicate ipv4 or ipv6 format?";
+ type string;
+ ordered-by user;
+ }
+ }
+ }
+ }
+ container mac-addresses {
+ leaf-list mac-address {
+ description "List of network assignments for this vm-type";
+ type string;
+ ordered-by user;
+ }
+ }
+ container floating-ips {
+ leaf-list floating-ip-v4 {
+ description "Floating ipv4 for VMs of a given type on this network";
+ type inet:ip-address;
+ ordered-by user;
+ }
+ leaf-list floating-ip-v6 {
+ description "Floating ipv6 for VMs of a given type on this network";
+ type inet:ipv6-address;
+ ordered-by user;
+ }
+ }
+ container interface-route-prefixes {
+ leaf-list interface-route-prefix {
+ description "ordered-by: user";
+ type string;
+ ordered-by user;
+ }
+ }
+ container sriov-parameters {
+ container heat-vlan-filters {
+ leaf-list heat-vlan-filter {
+ type string;
+ ordered-by user;
+ }
+ }
+ container application-tags {
+ container c-tags {
+ leaf-list c-tag {
+ type string;
+ ordered-by user;
+ }
+ }
+ container s-tags {
+ leaf-list s-tag {
+ type string;
+ ordered-by user;
+ }
+ }
+ }
+ }
+ }
+ grouping vf-module-level-oper-status {
+ container vf-module-level-oper-status {
+ uses oper-status-data;
+ }
+ }
+ grouping allotted-resource-info {
+ leaf allotted-resource-id {
+ type string;
+ }
+ leaf allotted-resource-type {
+ description "Not an enum, but expected values are contrail-route and security-zone.";
+ type string;
+ }
+ leaf allotted-resource-pointer {
+ description "Pointer to the allotted-resources topology";
+ type string;
+ }
+ }
+ grouping contrail-route-operation-information {
+ uses sdnc-request-header;
+ uses request-information;
+ uses service-information;
+ uses allotted-resource-information;
+ uses contrail-route-request-input;
+ }
+ grouping contrail-route-request-input {
+ container contrail-route-request-input {
+ container source-network {
+ uses network-info;
+ }
+ container dest-network {
+ uses network-info;
+ }
+ container contrail-applied-service-info {
+ leaf service-instance-id {
+ description "The service-instance-id of the service in which the resource(s) providing the applied-service are. For vIPR, this is the service-instance-id of the vIPR-ATM service in which the vIPR-ATM VNF Contrail service is the applied service. MSO will populate with the input data.";
+ type string;
+ }
+ leaf contrail-fqdn {
+ description "For future use by MSO on input; MSO not expected to populate in 1707. If MSO can identify the contrail-fqdn of the Contrail applied service for this contrail-route, then it would be specified here on input. Otherwise, SDN-C will look it up by the vIPR-ATM VNF in the service-instance-id of the contrail-applied-service-info grouing.";
+ type string;
+ }
+ }
+ container contrail-route-input-parameters {
+ uses param;
+ }
+ }
+ }
+ grouping network-info {
+ leaf network-id {
+ type string;
+ }
+ leaf network-role {
+ type string;
+ }
+ }
+ grouping contrail-route-topology {
+ container contrail-route-topology {
+ uses allotted-resource-identifiers;
+ uses ecomp-model-information;
+ uses contrail-route-assignments;
+ container contrail-route-parameters {
+ uses param;
+ }
+ }
+ }
+ grouping contrail-route-assignments {
+ container contrail-route-assignments {
+ leaf fq-name {
+ description "The Contrail fq-name of the network policy";
+ type string;
+ }
+ leaf contrail-id {
+ description "The ID assigned by Contrail to the network-policy (one for one with the fq-name)";
+ type string;
+ }
+ container source-network {
+ uses network-info;
+ }
+ container dest-network {
+ uses network-info;
+ }
+ container contrail-applied-service {
+ leaf service-instance-id {
+ description "The service-instance-id of the vnf from which the contrail applied service is coming";
+ type string;
+ }
+ leaf vnf-id {
+ description "The vnf representing the contrail applied service";
+ type string;
+ }
+ leaf contrail-fqdn {
+ description "This is the fq-name of the Contrail service instance through which the route is passing.";
+ type string;
+ }
+ }
+ leaf vlan-tag {
+ description "Contrail-assigned vlan-tag to the vipr vm interface for this route.";
+ type string;
+ }
+ }
+ }
+ grouping security-zone-operation-information {
+ uses sdnc-request-header;
+ uses request-information;
+ uses service-information;
+ uses allotted-resource-information;
+ uses security-zone-request-input;
+ }
+ grouping security-zone-request-input {
+ container security-zone-request-input {
+ leaf vlan-tag {
+ type string;
+ }
+ leaf trusted-network-role {
+ description "In the case of vIPR, this is the landing networks network-role; used in naming";
+ type string;
+ }
+ leaf untrusted-network-role {
+ description "In the case of vIPR, this is the tenant oam networks network-role; used in naming";
+ type string;
+ }
+ container security-zone-input-parameters {
+ uses param;
+ }
+ }
+ }
+ grouping security-zone-topology {
+ container security-zone-topology {
+ uses allotted-resource-identifiers;
+ uses ecomp-model-information;
+ uses security-zone-assignments;
+ container security-zone-parameters {
+ uses param;
+ }
+ }
+ }
+ grouping security-zone-assignments {
+ container security-zone-assignments {
+ leaf trusted-network-role {
+ description "In the case of vIPR, this is the landing networks network-role; used in naming";
+ type string;
+ }
+ leaf security-zone-name-trusted {
+ type string;
+ }
+ leaf untrusted-network-role {
+ description "In the case of vIPR, this is the tenant oam networks network-role; used in naming";
+ type string;
+ }
+ leaf security-zone-name-untrusted {
+ type string;
+ }
+ leaf security-zone-service-instance-id {
+ description "Will be the same as the parent-service-instance-id";
+ type string;
+ }
+ leaf security-zone-vnf-id {
+ description "Selected by SDNC from the security-zone-service-instance-id";
+ type string;
+ }
+ leaf vlan-tag {
+ type string;
+ }
+ }
+ }
+ grouping allotted-resource-information {
+ container allotted-resource-information {
+ leaf allotted-resource-id {
+ type string;
+ }
+ leaf allotted-resource-type {
+ description "Not an enum, but expected values are contrail-route and security-zone.";
+ type string;
+ }
+ leaf parent-service-instance-id {
+ description "Service-instance-id of the parent service to which this allotted resource belongs.";
+ type string;
+ }
+ uses ecomp-model-information;
+ }
+ }
+ grouping allotted-resource-identifiers {
+ container allotted-resource-identifiers {
+ leaf allotted-resource-id {
+ type string;
+ }
+ leaf allotted-resource-name {
+ description "For a contrail-route, the network policy name.";
+ type string;
+ }
+ leaf allotted-resource-type {
+ description "(Added in draft 32)Expected to be contrail-route or security-zone.";
+ type string;
+ }
+ leaf consuming-service-instance-id {
+ description "The service-instance-id of the consuming service of this allotted resource";
+ type string;
+ }
+ leaf parent-service-instance-id {
+ description "Service-instance-id of the parent service to which this allotted resource belongs.";
+ type string;
+ }
+ }
+ }
+ grouping allotted-resource-oper-status {
+ container allotted-resource-oper-status {
+ uses oper-status-data;
+ }
+ }
+ grouping allotted-resource-status {
+ container allotted-resource-status {
+ leaf response-code {
+ type string;
+ }
+ leaf response-message {
+ type string;
+ }
+ leaf final-indicator {
+ type string;
+ }
+ leaf request-status {
+ type enumeration {
+ enum "synccomplete";
+ enum "asynccomplete";
+ enum "notifycomplete";
+ }
+ }
+ leaf action {
+ description "value would one of possible request-actions; match the list in service-data oper-status";
+ type string;
+ }
+ leaf rpc-name {
+ type string;
+ }
+ leaf rpc-action {
+ description "this is the svc-action from the incoming request";
+ type enumeration {
+ enum "assign";
+ enum "activate";
+ enum "create";
+ enum "delete";
+ enum "unassign";
+ enum "deactivate";
+ }
+ }
+ leaf response-timestamp {
+ type string;
+ }
+ }
+ }
+ grouping topology-response-common {
+ leaf svc-request-id {
+ description "the request id from the request message for which this is the responseKeep as M";
+ type string;
+ }
+ leaf response-code {
+ description "a success code or an defined error codeKeep as M";
+ type string;
+ }
+ leaf response-message {
+ description "message included for error code";
+ type string;
+ }
+ leaf ack-final-indicator {
+ description "Expected to be Y or N.";
+ type string;
+ }
+ }
+ grouping sdnc-request-header {
+ container sdnc-request-header {
+ leaf svc-request-id {
+ description "Uniquely generated by calling system (e.g. MSO or SDN-GP)";
+ type string;
+ }
+ leaf svc-action {
+ description "Enumerated listThis is the rpcAction";
+ type enumeration {
+ enum "reserve";
+ enum "assign";
+ enum "activate";
+ enum "delete";
+ enum "changeassign";
+ enum "changedelete";
+ enum "rollback";
+ enum "deactivate";
+ enum "unassign";
+ enum "create";
+ }
+ }
+ leaf svc-notification-url {
+ description "Contains URL for asynchronous response";
+ type string;
+ }
+ }
+ }
+ grouping request-information {
+ container request-information {
+ leaf request-id {
+ description "Request ID generated upstream of MSO";
+ type string;
+ }
+ leaf request-action {
+ description "still need to work Disconnect";
+ type enumeration {
+ enum "CreateNetworkInstance";
+ enum "ActivateNetworkInstance";
+ enum "CreateServiceInstance";
+ enum "DeleteServiceInstance";
+ enum "DeleteNetworkInstance";
+ enum "CreateVnfInstance";
+ enum "ActivateVnfInstance";
+ enum "DeleteVnfInstance";
+ enum "CreateVfModuleInstance";
+ enum "ActivateVfModuleInstance";
+ enum "DeleteVfModuleInstance";
+ enum "CreateContrailRouteInstance";
+ enum "DeleteContrailRouteInstance";
+ enum "CreateSecurityZoneInstance";
+ enum "DeleteSecurityZoneInstance";
+ }
+ }
+ leaf source {
+ type string;
+ }
+ leaf notification-url {
+ type string;
+ }
+ leaf order-number {
+ type string;
+ }
+ leaf order-version {
+ type string;
+ }
+ }
+ }
+ grouping service-information {
+ container service-information {
+ leaf service-id {
+ description "This maps to the product-family-id in A&AI";
+ type string;
+ }
+ leaf subscription-service-type {
+ description "used to reference a&ai subscription-service-type. For example, we show as vIPR-ATM in example.";
+ type string;
+ }
+ uses ecomp-model-information;
+ leaf service-instance-id {
+ type string;
+ }
+ leaf global-customer-id {
+ description "need for put of data to AnAI (MSO provides)";
+ type string;
+ }
+ leaf subscriber-name {
+ description "Would not be expected for vIPR-ATM or mobility services.";
+ type string;
+ }
+ }
+ }
+ grouping ecomp-model-information {
+ container ecomp-model-information {
+ leaf model-invariant-uuid {
+ description "identifies the invariant uuid for this service or resource";
+ type string;
+ }
+ leaf model-customization-uuid {
+ description "customized resource for use within a given service.Would not be present at the service level but would be present for the resource level";
+ type string;
+ }
+ leaf model-uuid {
+ description "identifies the uuid for this service or resource, which is version specific";
+ type string;
+ }
+ leaf model-version {
+ type string;
+ }
+ leaf model-name {
+ type string;
+ }
+ }
+ }
+ grouping region-identifier {
+ leaf tenant {
+ type string;
+ }
+ leaf aic-cloud-region {
+ description "The AIC cloud region which maps to contrail versions";
+ type string;
+ }
+ leaf aic-clli {
+ description "Not expected to be used";
+ type string;
+ }
+ }
+ grouping param {
+ list param {
+ key "name";
+ leaf name {
+ type string;
+ }
+ leaf value {
+ type string;
+ }
+ }
+ }
+ grouping instance-reference {
+ leaf instance-id {
+ type string;
+ }
+ leaf object-path {
+ description "restconf retrieval path to this particular objectE.g. restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/service-topology/";
+ type string;
+ }
+ }
+ grouping oper-status-data {
+ leaf order-status {
+ description "TBD - do we need Request failed statuses? RequestFailed | InProgressTimeout";
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "PendingDelete";
+ enum "Deleted";
+ enum "Created";
+ }
+ }
+ leaf last-rpc-action {
+ type enumeration {
+ enum "assign";
+ enum "activate";
+ enum "delete";
+ enum "unassign";
+ enum "deactivate";
+ enum "create";
+ }
+ }
+ leaf last-action {
+ description "should be list of possible request-actions";
+ type enumeration {
+ enum "CreateNetworkInstance";
+ enum "ActivateNetworkInstance";
+ enum "CreateServiceInstance";
+ enum "DeleteServiceInstance";
+ enum "DeleteNetworkInstance";
+ enum "CreateVnfInstance";
+ enum "ActivateVnfInstance";
+ enum "DeleteVnfInstance";
+ enum "CreateVfModuleInstance";
+ enum "ActivateVfModuleInstance";
+ enum "DeleteVfModuleInstance";
+ enum "CreateContrailRouteInstance";
+ enum "DeleteContrailRouteInstance";
+ enum "CreateSecurityZoneInstance";
+ enum "DeleteSecurityZoneInstance";
+ }
+ }
+ leaf last-svc-request-id {
+ description "Not currently populated in service data.";
+ type string;
+ }
+ leaf last-order-status {
+ description "fieldused by generic-resource-api";
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "PendingDelete";
+ enum "Deleted";
+ enum "Created";
+ }
+ }
+ leaf create-timestamp {
+ description "Not currently populated in service data.";
+ type string;
+ }
+ leaf modify-timestamp {
+ type string;
+ }
+ }
+ grouping service-response-information {
+ container service-response-information {
+ uses instance-reference;
+ }
+ }
+ grouping network-response-information {
+ container network-response-information {
+ uses instance-reference;
+ }
+ }
+ grouping vnf-response-information {
+ container vnf-response-information {
+ uses instance-reference;
+ }
+ }
+ grouping vf-module-response-information {
+ container vf-module-response-information {
+ uses instance-reference;
+ }
+ }
+ grouping contrail-route-response-information {
+ container contrail-route-response-information {
+ uses instance-reference;
+ }
+ }
+ grouping security-zone-response-information {
+ container security-zone-response-information {
+ uses instance-reference;
+ }
+ }
+ grouping preload-model-information {
+ list vnf-preload-list {
+ key "vnf-name vnf-type";
+ leaf vnf-name {
+ description "vf-module-name or network name";
+ type string;
+ mandatory true;
+ }
+ leaf vnf-type {
+ description "vf-module-type or network type";
+ type string;
+ mandatory true;
+ }
+ uses preload-data;
+ }
+ }
+ grouping vnf-topology-response-body {
+ leaf svc-request-id {
+ type string;
+ }
+ leaf response-code {
+ type string;
+ }
+ leaf response-message {
+ type string;
+ }
+ leaf ack-final-indicator {
+ type string;
+ }
+ }
+ grouping preload-data {
+ container preload-data {
+ uses vnf-topology-information;
+ uses network-topology-information;
+ uses oper-status;
+ }
+ }
+ grouping vnf-topology-information {
+ container vnf-topology-information {
+ uses vnf-topology-identifier;
+ uses vnf-assignments;
+ uses vnf-parameters;
+ }
+ }
+ grouping vnf-topology-identifier {
+ container vnf-topology-identifier {
+ leaf service-type {
+ type string;
+ }
+ leaf service-id {
+ type string;
+ }
+ leaf vnf-name {
+ description "vf-module-name";
+ type string;
+ }
+ leaf vnf-type {
+ description "vf-module-type";
+ type string;
+ }
+ leaf generic-vnf-name {
+ type string;
+ }
+ leaf generic-vnf-type {
+ type string;
+ }
+ leaf generic-vnf-id {
+ type string;
+ }
+ }
+ }
+ grouping vnf-assignments {
+ container vnf-assignments {
+ leaf vnf-status {
+ description "Orchestration Status from AAI - to be set by SDNC";
+ type string;
+ }
+ list availability-zones {
+ key "availability-zone";
+ leaf availability-zone {
+ description "Openstack availability zone name or UUID";
+ type string;
+ }
+ }
+ list vnf-networks {
+ key "";
+ uses vnf-network;
+ uses sriov-vlan-filter-list;
+ }
+ uses vm-topology;
+ }
+ }
+ grouping vm-topology {
+ list vnf-vms {
+ key "vm-type";
+ leaf vm-type {
+ type string;
+ mandatory true;
+ }
+ leaf vm-count {
+ type uint8;
+ }
+ list vm-names {
+ key "vm-name";
+ leaf vm-name {
+ type string;
+ }
+ }
+ list vm-networks {
+ key "";
+ uses vm-network;
+ }
+ }
+ }
+ grouping vnf-network {
+ leaf network-role {
+ description "A Network Role to which a VNF must connect";
+ type string;
+ mandatory true;
+ }
+ leaf network-name {
+ description "Unique Neutron UUID of an instance of the network role ";
+ type string;
+ }
+ leaf neutron-id {
+ description "Unique Neutron UUID of an instance of the network role ";
+ type string;
+ }
+ leaf network-id {
+ description "Unique Neutron UUID of an instance of the network role ";
+ type string;
+ }
+ leaf subnet-id {
+ description "ipv4 subnet UUID to be passed into the HEAT template";
+ type string;
+ }
+ leaf subnet-name {
+ description "ipv4 subnet-name that corresponds to the ipv4 subnet-id";
+ type string;
+ }
+ leaf contrail-network-fqdn {
+ description "contrail network policy object";
+ type string;
+ }
+ leaf ipv6-subnet-id {
+ description "ipv6 subnet UUID to be passed into the HEAT template";
+ type string;
+ }
+ leaf ipv6-subnet-name {
+ description "ipv6 subnet-name that corresponds to the ipv6 subnet-id";
+ type string;
+ }
+ }
+ grouping sriov-vlan-filter-list {
+ list sriov-vlan-filter-list {
+ key "sriov-vlan-filter";
+ leaf sriov-vlan-filter {
+ type string;
+ }
+ }
+ }
+ grouping vm-network {
+ leaf network-role {
+ description "network (identified by role) that this VM connects to. Should also be included in the vnf-networks for the containing VNF";
+ type string;
+ }
+ leaf use-dhcp {
+ description "Indicator to use DHCP on this network for this VM";
+ type enumeration {
+ enum "Y";
+ enum "N";
+ }
+ }
+ leaf ip-count {
+ description "The number of ip addresses to be assigned per vm for this network role";
+ type uint8;
+ }
+ list network-ips {
+ key "ip-address";
+ leaf ip-address {
+ description "List of assigned ipv4 addresses on a network";
+ type inet:ip-address;
+ }
+ }
+ list network-ips-v6 {
+ key "ip-address-ipv6";
+ leaf ip-address-ipv6 {
+ description "List of assigned ipv6 addresses on a network";
+ type inet:ipv6-address;
+ }
+ }
+ list network-macs {
+ key "mac-address";
+ leaf mac-address {
+ description "List of network assignments for this VM (one per network)";
+ type string;
+ }
+ }
+ leaf floating-ip {
+ description "Floating ipv4 for VMs of a given type on this network";
+ type inet:ip-address;
+ }
+ leaf floating-ip-v6 {
+ description "Floating ipv6 for VMs of a given type on this network";
+ type inet:ipv6-address;
+ }
+ list interface-route-prefixes {
+ key "interface-route-prefix-cidr";
+ leaf interface-route-prefix-cidr {
+ description "route prefixes (CIDRs) in ip/cidr format to be provided to MSO in vnf-topology as a list of static routes";
+ type string;
+ mandatory true;
+ }
+ leaf interface-route-prefix {
+ description "route prefixes (CIDRs) to be provided to MSO in vnf-topology as a list of static routes";
+ type inet:ip-address;
+ }
+ }
+ }
+ grouping vnf-parameters {
+ list vnf-parameters {
+ key "vnf-parameter-name";
+ leaf vnf-parameter-name {
+ description "The name of an arbitrary instance-specific vnf-parameters";
+ type string;
+ }
+ leaf vnf-parameter-value {
+ description "The value of an arbitrary instance-specific vnf-parameters ";
+ type string;
+ }
+ }
+ }
+ grouping network-topology-information {
+ container network-topology-information {
+ uses network-topology-identifier;
+ uses subnets;
+ uses vpn-bindings;
+ uses network-policy;
+ uses route-table-reference;
+ uses provider-network-information;
+ }
+ }
+ grouping network-topology-identifier {
+ container network-topology-identifier {
+ leaf service-type {
+ type string;
+ }
+ leaf network-name {
+ type string;
+ }
+ leaf network-role {
+ type string;
+ }
+ leaf network-type {
+ type string;
+ }
+ leaf network-technology {
+ type string;
+ }
+ }
+ }
+ grouping subnets {
+ list subnets {
+ key "start-address";
+ leaf start-address {
+ type inet:ip-address;
+ }
+ leaf gateway-address {
+ type inet:ip-address;
+ }
+ leaf cidr-mask {
+ type string;
+ }
+ leaf ip-version {
+ type string;
+ }
+ leaf dhcp-enabled {
+ type enumeration {
+ enum "Y";
+ enum "N";
+ }
+ }
+ leaf dhcp-start-address {
+ type string;
+ }
+ leaf dhcp-end-address {
+ type string;
+ }
+ leaf subnet-name {
+ type string;
+ }
+ }
+ }
+ grouping vpn-bindings {
+ list vpn-bindings {
+ key "vpn-binding-id";
+ leaf vpn-binding-id {
+ type string;
+ }
+ leaf global-route-target {
+ type string;
+ }
+ }
+ }
+ grouping network-policy {
+ list network-policy {
+ key "network-policy-fqdn";
+ leaf network-policy-fqdn {
+ type string;
+ }
+ leaf network-policy-id {
+ type string;
+ }
+ }
+ }
+ grouping route-table-reference {
+ list route-table-reference {
+ key "route-table-reference-fqdn";
+ leaf route-table-reference-fqdn {
+ type string;
+ mandatory true;
+ }
+ leaf route-table-reference-id {
+ type string;
+ }
+ }
+ }
+ grouping provider-network-information {
+ leaf physical-network-name {
+ type string;
+ }
+ leaf is-provider-network {
+ type boolean;
+ }
+ leaf is-shared-network {
+ type boolean;
+ }
+ leaf is-external-network {
+ type boolean;
+ }
+ }
+ grouping oper-status {
+ container oper-status {
+ leaf order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "PendingDelete";
+ enum "Deleted";
+ }
+ }
+ leaf last-action {
+ description "this is preload request actions";
+ type enumeration {
+ enum "VNFActivateRequest";
+ enum "ChangeVNFActivateRequest";
+ enum "VnfInstanceActivateRequest";
+ enum "ChangeVnfInstanceActivateRequest";
+ enum "VfModuleActivateRequest";
+ enum "ChangeVfModuleActivateRequest";
+ enum "DisconnectVNFRequest";
+ enum "DisconnectVnfInstanceRequest";
+ enum "DisconnectVfModuleRequest";
+ enum "PreloadVNFRequest";
+ enum "DeletePreloadVNFRequest";
+ enum "PreloadVnfInstanceRequest";
+ enum "DeletePreloadVnfInstanceRequest";
+ enum "PreloadVfModuleRequest";
+ enum "DeletePreloadVfModuleRequest";
+ }
+ }
+ leaf last-svc-request-id {
+ type string;
+ }
+ leaf last-order-status {
+ type enumeration {
+ enum "Active";
+ enum "PendingAssignment";
+ enum "PendingCreate";
+ enum "PendingUpdate";
+ enum "PendingDelete";
+ enum "Deleted";
+ }
+ }
+ leaf create-timestamp {
+ type string;
+ }
+ leaf modify-timestamp {
+ type string;
+ }
+ leaf maintenance-indicator {
+ type enumeration {
+ enum "Y";
+ enum "N";
+ }
+ }
+ }
+ }
+ container services {
+ uses service-model-infrastructure;
+ }
+ container contrail-route-allotted-resources {
+ list contrail-route-allotted-resource {
+ key "allotted-resource-id";
+ leaf allotted-resource-id {
+ type string;
+ mandatory true;
+ }
+ container allotted-resource-data {
+ container allotted-resource-operation-information {
+ uses contrail-route-operation-information;
+ }
+ uses contrail-route-topology;
+ uses allotted-resource-oper-status;
+ }
+ uses allotted-resource-status;
+ }
+ }
+ container security-zone-allotted-resources {
+ list security-zone-allotted-resource {
+ key "allotted-resource-id";
+ leaf allotted-resource-id {
+ type string;
+ mandatory true;
+ }
+ container allotted-resource-data {
+ container allotted-resource-operation-information {
+ uses security-zone-operation-information;
+ }
+ uses security-zone-topology;
+ container security-zone-parameters {
+ uses param;
+ }
+ uses allotted-resource-oper-status;
+ }
+ uses allotted-resource-status;
+ }
+ }
+ rpc service-topology-operation {
+ input {
+ uses service-operation-information;
+ }
+ output {
+ uses topology-response-common;
+ uses service-response-information;
+ }
+ }
+ rpc network-topology-operation {
+ input {
+ uses network-operation-information;
+ }
+ output {
+ uses topology-response-common;
+ uses network-response-information;
+ uses service-response-information;
+ }
+ }
+ rpc vnf-topology-operation {
+ input {
+ uses vnf-operation-information;
+ }
+ output {
+ uses topology-response-common;
+ uses vnf-response-information;
+ uses service-response-information;
+ }
+ }
+ rpc vf-module-topology-operation {
+ input {
+ uses vf-module-operation-information;
+ }
+ output {
+ uses topology-response-common;
+ uses vf-module-response-information;
+ uses vnf-response-information;
+ uses service-response-information;
+ }
+ }
+ rpc contrail-route-topology-operation {
+ input {
+ uses contrail-route-operation-information;
+ }
+ output {
+ uses topology-response-common;
+ uses contrail-route-response-information;
+ uses service-response-information;
+ }
+ }
+ rpc security-zone-topology-operation {
+ input {
+ uses security-zone-operation-information;
+ }
+ output {
+ uses topology-response-common;
+ uses security-zone-response-information;
+ uses service-response-information;
+ }
+ }
+ container preload-vnfs {
+ uses preload-model-information;
+ }
+ rpc preload-vnf-topology-operation {
+ input {
+ uses sdnc-request-header;
+ uses request-information;
+ uses vnf-topology-information;
+ }
+ output {
+ uses vnf-topology-response-body;
+ }
+ }
+ rpc preload-network-topology-operation {
+ input {
+ uses sdnc-request-header;
+ uses request-information;
+ uses network-topology-information;
+ }
+ output {
+ uses vnf-topology-response-body;
+ }
+ }
+} ////closes the module