summaryrefslogtreecommitdiffstats
path: root/appc-sequence-generator/appc-sequence-generator-model
diff options
context:
space:
mode:
Diffstat (limited to 'appc-sequence-generator/appc-sequence-generator-model')
-rw-r--r--appc-sequence-generator/appc-sequence-generator-model/pom.xml83
-rw-r--r--appc-sequence-generator/appc-sequence-generator-model/src/main/yang/sequence-generator.yang223
2 files changed, 306 insertions, 0 deletions
diff --git a/appc-sequence-generator/appc-sequence-generator-model/pom.xml b/appc-sequence-generator/appc-sequence-generator-model/pom.xml
new file mode 100644
index 000000000..8c492b046
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-model/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.openecomp.appc</groupId>
+ <artifactId>appc-sequence-generator</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>appc-sequence-generator-model</artifactId>
+ <name>appc-sequence-generator-model</name>
+ <packaging>bundle</packaging>
+ <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.yangtools.version}</version> -->
+ <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.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
+ <outputBaseDir>${salGeneratorPath}</outputBaseDir>
+ </generator>
+ </codeGenerators>
+ <inspectDependencies>true</inspectDependencies>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>yang-binding</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-common</artifactId>
+ </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>
+</project>
diff --git a/appc-sequence-generator/appc-sequence-generator-model/src/main/yang/sequence-generator.yang b/appc-sequence-generator/appc-sequence-generator-model/src/main/yang/sequence-generator.yang
new file mode 100644
index 000000000..6777dad63
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-model/src/main/yang/sequence-generator.yang
@@ -0,0 +1,223 @@
+module sequence-generator {
+ yang-version 1;
+
+ namespace "org:openecomp:appc:sequencegenerator";
+ prefix sequencegenerator;
+
+ description
+ "Defines sequence generator api interface for App-C services";
+
+ revision "2017-07-06" {
+ description
+ "Initial draft";
+ }
+
+ grouping request-info {
+ container request-info{
+ leaf action {
+ type enumeration {
+ enum "Start";
+ enum "Stop";
+ }
+ }
+ leaf action-level {
+ type enumeration {
+ enum "vm";
+ enum "vnfc";
+ enum "vnf";
+ enum "vf-module";
+ }
+ }
+ container action-identifier {
+ leaf vnf-id {
+ description "identifies the VNF to which this action is to be applied(vnf-id uniquely identifies the service-instance referred to).";
+ type string;
+ }
+ leaf vnfc-name {
+ type string;
+ }
+ leaf vserver-id {
+ type string;
+ }
+ }
+ leaf payload {
+ description "An action-specific value opaque to the APPC handler.
+ The value can be any valid JSON type (primitive, object, collection of those two).
+ APPC will pass the value as raw JSON string";
+ type string;
+ }
+ }
+ }
+
+ grouping inventory-info {
+ container inventory-info {
+ container vnf-info {
+ leaf vnf-id {
+ type string;
+ }
+ leaf vnf-name {
+ type string;
+ }
+ leaf vnf-type {
+ type string;
+ }
+ list vm {
+ key "vserver-id";
+ leaf vserver-id {
+ type string;
+ }
+ container vnfc {
+ leaf vnfc-type {
+ type string;
+ }
+ leaf vnfc-name {
+ type string;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ grouping dependency-info {
+ container dependency-info {
+ list vnfcs {
+ leaf vnfc-type {
+ type string;
+ }
+ leaf mandatory {
+ type boolean;
+ }
+ leaf resilience {
+ type string;
+ }
+ leaf-list parents {
+ type string;
+ }
+ }
+ }
+ }
+
+ grouping tunable-parameters {
+ container tunable-parameters {
+ leaf strategy {
+ type enumeration {
+ enum "FORWARD";
+ enum "REVERSE";
+ }
+ }
+ leaf wait-time {
+ type uint16;
+ }
+ leaf retry-count {
+ type uint16;
+ }
+ }
+ }
+
+ grouping capabilities {
+ container capabilities {
+ leaf-list vnf {
+ type string;
+ }
+ leaf-list vf-module {
+ type string;
+ }
+ leaf-list vm {
+ type string;
+ }
+ leaf-list vnfc {
+ type string;
+ }
+ }
+ }
+
+ grouping response {
+ container status {
+ leaf code {
+ type uint16;
+ }
+ leaf message {
+ type string;
+ }
+ }
+ list transactions{
+ key "transaction-id";
+ leaf transaction-id{
+ type uint16;
+ }
+ leaf action{
+ type string;
+ }
+ leaf action-level{
+ type string;
+ }
+ container action-identifier{
+ leaf vserver-id {
+ type string;
+ }
+ leaf vnfc-name {
+ type string;
+ }
+ leaf vnf-id {
+ type string;
+ }
+ }
+ leaf payload{
+ type string;
+ }
+ leaf precheck-operator{
+ type string;
+ }
+ list precheck-options{
+ leaf pre-transaction-id{
+ type uint16;
+ }
+ leaf param-name{
+ type string;
+ }
+ leaf param-value{
+ type string;
+ }
+ leaf rule{
+ type string;
+ }
+ }
+ list responses{
+ leaf response-message{
+ type string;
+ }
+ container response-action{
+ leaf wait{
+ type uint16;
+ }
+ leaf retry{
+ type uint16;
+ }
+ leaf continue{
+ type boolean;
+ }
+ leaf stop{
+ type boolean;
+ }
+ leaf ignore{
+ type boolean;
+ }
+ }
+ }
+ }
+ }
+
+ rpc generate-sequence {
+ input{
+ uses request-info;
+ uses inventory-info;
+ uses dependency-info;
+ uses tunable-parameters;
+ uses capabilities;
+ }
+ output{
+ uses response;
+ }
+ }
+ } \ No newline at end of file