summaryrefslogtreecommitdiffstats
path: root/sliapi/model
diff options
context:
space:
mode:
Diffstat (limited to 'sliapi/model')
-rwxr-xr-xsliapi/model/pom.xml17
-rw-r--r--sliapi/model/swagger/pom.xml222
-rw-r--r--sliapi/model/swagger/src/main/json/sliapi.json1
-rw-r--r--sliapi/model/swagger/src/main/yaml/sliapi.yaml378
-rwxr-xr-xsliapi/model/yang/pom.xml27
-rw-r--r--sliapi/model/yang/src/main/resources/sli-api.20161110.json (renamed from sliapi/model/src/main/resources/sli-api.20161110.json)0
-rw-r--r--sliapi/model/yang/src/main/resources/sli-api.20161110.yaml254
-rwxr-xr-xsliapi/model/yang/src/main/yang/sliapi.yang (renamed from sliapi/model/src/main/yang/sliapi.yang)13
8 files changed, 889 insertions, 23 deletions
diff --git a/sliapi/model/pom.xml b/sliapi/model/pom.xml
index dfe7753a6..4ac5a8510 100755
--- a/sliapi/model/pom.xml
+++ b/sliapi/model/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
- <artifactId>binding-parent</artifactId>
+ <artifactId>odlparent-lite</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
@@ -12,16 +12,13 @@
<groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>sliapi-model</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
+ <packaging>pom</packaging>
- <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name>
+ <name>ccsdk-sli-core :: sliapi</name>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
- <artifactId>rfc6991</artifactId>
- </dependency>
+ <modules>
+ <module>yang</module>
+ <module>swagger</module>
+ </modules>
-
- </dependencies>
</project>
diff --git a/sliapi/model/swagger/pom.xml b/sliapi/model/swagger/pom.xml
new file mode 100644
index 000000000..544f4f9e5
--- /dev/null
+++ b/sliapi/model/swagger/pom.xml
@@ -0,0 +1,222 @@
+<?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.ccsdk.parent</groupId>
+ <artifactId>oparent</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sliapi-model-swagger</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name>
+ <description>Generates swagger model from yang model</description>
+ <url>http://wiki.onap.org</url>
+
+ <properties>
+ <api.name>sliapi</api.name>
+ <jackson.version>2.9.5</jackson.version>
+ </properties>
+
+ <dependencies>
+ <!-- This is where the yang comes from -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>sliapi-model-yang</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- End this is where the yang comes from -->
+ </dependencies>
+
+ <repositories>
+ <repository>
+ <id>>bintray-yang2swagger-yang2swagge</id>
+ <name>bintray</name>
+ <url>https://dl.bintray.com/yang2swagger/yang2swagger</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.10</version>
+ <configuration>
+ <outputDirectory>${project.build.directory}/dependency</outputDirectory>
+ <includes>**\/*.yang</includes>
+ <includeGroupIds>org.opendaylight.mdsal.model,org.opendaylight.mdsal.binding.model.ietf,org.onap.ccsdk.sli.core</includeGroupIds>
+ </configuration>
+ <executions>
+ <execution>
+ <id>unpack-shared-resources</id>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <phase>initialize</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <phase>initialize</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <tasks>
+ <!-- flatten out structure -->
+ <move todir="${project.build.directory}/dependency" failonerror="false">
+ <fileset dir="${project.build.directory}/dependency"/>
+ <mapper type="flatten"/>
+ </move>
+ <!-- move to yang folder -->
+ <copy todir="${project.build.directory}/yang" failonerror="false">
+ <fileset dir="${project.build.directory}/dependency" includes="**/*.yang"/>
+ <mapper type="flatten"/>
+ </copy>
+ </tasks>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ <version>1.2.3</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.module</groupId>
+ <artifactId>jackson-module-jaxb-annotations</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-base</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-json-provider</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.mrv.yangtools</groupId>
+ <artifactId>swagger-maven-plugin</artifactId>
+ <version>1.1.12</version>
+ </dependency>
+ <dependency>
+ <groupId>com.github.romix</groupId>
+ <artifactId>java-concurrent-hash-trie-map</artifactId>
+ <version>0.2.23</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>yang2swagger-json</id>
+ <goals>
+ <goal>generate-sources</goal>
+ </goals>
+ <configuration>
+ <codeGenerators>
+ <generator>
+ <codeGeneratorClass>com.mrv.yangtools.maven.gen.swagger.MavenSwaggerGenerator</codeGeneratorClass>
+ <outputBaseDir>${project.basedir}/src/main/json</outputBaseDir>
+ <resourceBaseDir>${project.build.directory}/yang</resourceBaseDir>
+ <additionalConfiguration>
+ <api-version>${project.version}</api-version>
+ <base-module>${api.name}</base-module>
+ <swagger-format>json</swagger-format>
+ <path-format>odl</path-format>
+ <use-namespaces>true</use-namespaces>
+ </additionalConfiguration>
+ </generator>
+ </codeGenerators>
+ <inspectDependencies>false</inspectDependencies>
+ <yangFilesRootDir>${project.build.directory}/yang</yangFilesRootDir>
+ </configuration>
+ </execution>
+ <execution>
+ <id>yang2swagger-yaml</id>
+ <goals>
+ <goal>generate-sources</goal>
+ </goals>
+ <configuration>
+ <codeGenerators>
+ <generator>
+ <codeGeneratorClass>com.mrv.yangtools.maven.gen.swagger.MavenSwaggerGenerator</codeGeneratorClass>
+ <outputBaseDir>${project.basedir}/src/main/yaml</outputBaseDir>
+ <resourceBaseDir>${project.build.directory}/yang</resourceBaseDir>
+ <additionalConfiguration>
+ <api-version>${project.version}</api-version>
+ <base-module>${api.name}</base-module>
+ <swagger-format>yaml</swagger-format>
+ <path-format>odl</path-format>
+ <use-namespaces>true</use-namespaces>
+ </additionalConfiguration>
+ </generator>
+ </codeGenerators>
+ <inspectDependencies>false</inspectDependencies>
+ <yangFilesRootDir>${project.build.directory}/yang</yangFilesRootDir>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.10</version>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>src/main/json/${api.name}.json</file>
+ <type>json</type>
+ </artifact>
+ <artifact>
+ <file>src/main/yaml/${api.name}.yaml</file>
+ <type>yaml</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sliapi/model/swagger/src/main/json/sliapi.json b/sliapi/model/swagger/src/main/json/sliapi.json
new file mode 100644
index 000000000..99a69861e
--- /dev/null
+++ b/sliapi/model/swagger/src/main/json/sliapi.json
@@ -0,0 +1 @@
+{"swagger":"2.0","info":{"description":"Defines API to service logic interpreter,This module contains a collection of generally useful derived\nYANG data types.\n\nCopyright (c) 2013 IETF Trust and the persons identified as\nauthors of the code. All rights reserved.\n\nRedistribution and use in source and binary forms, with or\nwithout modification, is permitted pursuant to, and subject\nto the license terms contained in, the Simplified BSD License\nset forth in Section 4.c of the IETF Trust's Legal Provisions\nRelating to IETF Documents\n(http://trustee.ietf.org/license-info).\n\nThis version of this YANG module is part of RFC 6991; see\nthe RFC itself for full legal notices.,This module contains a collection of generally useful derived\nYANG data types for Internet addresses and related things.\n\nCopyright (c) 2013 IETF Trust and the persons identified as\nauthors of the code. All rights reserved.\n\nRedistribution and use in source and binary forms, with or\nwithout modification, is permitted pursuant to, and subject\nto the license terms contained in, the Simplified BSD License\nset forth in Section 4.c of the IETF Trust's Legal Provisions\nRelating to IETF Documents\n(http://trustee.ietf.org/license-info).\n\nThis version of this YANG module is part of RFC 6991; see\nthe RFC itself for full legal notices.","version":"1.0.0-SNAPSHOT","title":"SLI-API,ietf-yang-types,ietf-inet-types API"},"consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"paths":{"/config/SLI-API:test-results/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.TestResults","parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.TestResults","schema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"},"responseSchema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"}}}},"post":{"tags":["SLI-API"],"description":"creates sli.api.TestResults","parameters":[{"in":"body","name":"sli.api.TestResults.body-param","description":"sli.api.TestResults to be added to list","required":false,"schema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"409":{"description":"Object already exists"}}},"put":{"tags":["SLI-API"],"description":"creates or updates sli.api.TestResults","parameters":[{"in":"body","name":"sli.api.TestResults.body-param","description":"sli.api.TestResults to be added or updated","required":false,"schema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"204":{"description":"Object modified"}}},"delete":{"tags":["SLI-API"],"description":"removes sli.api.TestResults","parameters":[],"responses":{"400":{"description":"Internal error"},"204":{"description":"Object deleted"}}}},"/config/SLI-API:test-results/SLI-API:test-result/":{"post":{"description":"creates sli.api.testresults.TestResult","parameters":[{"in":"body","name":"sli.api.testresults.TestResult.body-param","description":"sli.api.testresults.TestResult to be added to list","required":false,"schema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"409":{"description":"Object already exists"}}}},"/config/SLI-API:test-results/SLI-API:test-result/{test-identifier}/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"}],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.testresults.TestResult","schema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"},"responseSchema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}}},"post":{"tags":["SLI-API"],"description":"creates sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"},{"in":"body","name":"sli.api.testresults.TestResult.body-param","description":"sli.api.testresults.TestResult to be added to list","required":false,"schema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"409":{"description":"Object already exists"}}},"put":{"tags":["SLI-API"],"description":"creates or updates sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"},{"in":"body","name":"sli.api.testresults.TestResult.body-param","description":"sli.api.testresults.TestResult to be added or updated","required":false,"schema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"204":{"description":"Object modified"}}},"delete":{"tags":["SLI-API"],"description":"removes sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"}],"responses":{"400":{"description":"Internal error"},"204":{"description":"Object deleted"}}}},"/operational/SLI-API:test-results/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.TestResults","parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.TestResults","schema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"},"responseSchema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"}}}}},"/operational/SLI-API:test-results/SLI-API:test-result/{test-identifier}/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"}],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.testresults.TestResult","schema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"},"responseSchema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}}}},"/operations/SLI-API:execute-graph/":{"post":{"tags":["SLI-API"],"parameters":[{"in":"body","name":"sli.api.executegraph.Input.body-param","required":false,"schema":{"properties":{"input":{"$ref":"#/definitions/sli.api.executegraph.Input","originalRef":"#/definitions/sli.api.executegraph.Input"}}}}],"responses":{"400":{"description":"Internal error"},"200":{"description":"Correct response","schema":{"$ref":"#/definitions/sli.api.ExecuteGraph","originalRef":"#/definitions/sli.api.ExecuteGraph"},"responseSchema":{"$ref":"#/definitions/sli.api.ExecuteGraph","originalRef":"#/definitions/sli.api.ExecuteGraph"}},"201":{"description":"No response"}}}},"/operations/SLI-API:healthcheck/":{"post":{"tags":["SLI-API"],"parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"Correct response","schema":{"$ref":"#/definitions/sli.api.Healthcheck","originalRef":"#/definitions/sli.api.Healthcheck"},"responseSchema":{"$ref":"#/definitions/sli.api.Healthcheck","originalRef":"#/definitions/sli.api.Healthcheck"}},"201":{"description":"No response"}}}},"/operations/SLI-API:vlbcheck/":{"post":{"tags":["SLI-API"],"parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"Correct response","schema":{"$ref":"#/definitions/sli.api.Vlbcheck","originalRef":"#/definitions/sli.api.Vlbcheck"},"responseSchema":{"$ref":"#/definitions/sli.api.Vlbcheck","originalRef":"#/definitions/sli.api.Vlbcheck"}},"201":{"description":"No response"}}}}},"definitions":{"sli.api.ExecuteGraph":{"type":"object","properties":{"output":{"$ref":"#/definitions/sli.api.ResponseFields","originalRef":"#/definitions/sli.api.ResponseFields"}}},"sli.api.Healthcheck":{"type":"object","properties":{"output":{"$ref":"#/definitions/sli.api.ResponseFields","originalRef":"#/definitions/sli.api.ResponseFields"}}},"sli.api.ModeEnumeration":{"type":"string","enum":["sync","async"]},"sli.api.ParameterSetting":{"type":"object","properties":{"string-value":{"type":"string"},"boolean-value":{"type":"boolean"},"parameter-name":{"type":"string","description":"Parameter name"},"int-value":{"type":"integer","format":"int32"}}},"sli.api.ResponseFields":{"type":"object","properties":{"response-code":{"type":"string"},"response-message":{"type":"string"},"context-memory-json":{"type":"string"},"ack-final-indicator":{"type":"string"}}},"sli.api.TestResults":{"type":"object","properties":{"test-result":{"type":"array","items":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}}},"sli.api.Vlbcheck":{"type":"object","properties":{"output":{"$ref":"#/definitions/sli.api.ResponseFields","originalRef":"#/definitions/sli.api.ResponseFields"}}},"sli.api.executegraph.Input":{"type":"object","properties":{"mode":{"$ref":"#/definitions/sli.api.ModeEnumeration","originalRef":"#/definitions/sli.api.ModeEnumeration"},"module-name":{"type":"string"},"sli-parameter":{"type":"array","items":{"$ref":"#/definitions/sli.api.ParameterSetting","originalRef":"#/definitions/sli.api.ParameterSetting"}},"rpc-name":{"type":"string"}}},"sli.api.testresults.TestResult":{"type":"object","properties":{"results":{"type":"array","items":{"type":"string"}},"test-identifier":{"type":"string"}}}}} \ No newline at end of file
diff --git a/sliapi/model/swagger/src/main/yaml/sliapi.yaml b/sliapi/model/swagger/src/main/yaml/sliapi.yaml
new file mode 100644
index 000000000..c8f2997eb
--- /dev/null
+++ b/sliapi/model/swagger/src/main/yaml/sliapi.yaml
@@ -0,0 +1,378 @@
+---
+swagger: "2.0"
+info:
+ description: "Defines API to service logic interpreter,This module contains a collection\
+ \ of generally useful derived\nYANG data types.\n\nCopyright (c) 2013 IETF Trust\
+ \ and the persons identified as\nauthors of the code. All rights reserved.\n\n\
+ Redistribution and use in source and binary forms, with or\nwithout modification,\
+ \ is permitted pursuant to, and subject\nto the license terms contained in, the\
+ \ Simplified BSD License\nset forth in Section 4.c of the IETF Trust's Legal Provisions\n\
+ Relating to IETF Documents\n(http://trustee.ietf.org/license-info).\n\nThis version\
+ \ of this YANG module is part of RFC 6991; see\nthe RFC itself for full legal\
+ \ notices.,This module contains a collection of generally useful derived\nYANG\
+ \ data types for Internet addresses and related things.\n\nCopyright (c) 2013\
+ \ IETF Trust and the persons identified as\nauthors of the code. All rights reserved.\n\
+ \nRedistribution and use in source and binary forms, with or\nwithout modification,\
+ \ is permitted pursuant to, and subject\nto the license terms contained in, the\
+ \ Simplified BSD License\nset forth in Section 4.c of the IETF Trust's Legal Provisions\n\
+ Relating to IETF Documents\n(http://trustee.ietf.org/license-info).\n\nThis version\
+ \ of this YANG module is part of RFC 6991; see\nthe RFC itself for full legal\
+ \ notices."
+ version: "1.0.0-SNAPSHOT"
+ title: "SLI-API,ietf-yang-types,ietf-inet-types API"
+consumes:
+- "application/json"
+- "application/xml"
+produces:
+- "application/json"
+- "application/xml"
+paths:
+ /config/SLI-API:test-results/:
+ get:
+ tags:
+ - "SLI-API"
+ description: "returns sli.api.TestResults"
+ parameters: []
+ responses:
+ 400:
+ description: "Internal error"
+ 200:
+ description: "sli.api.TestResults"
+ schema:
+ $ref: "#/definitions/sli.api.TestResults"
+ originalRef: "#/definitions/sli.api.TestResults"
+ responseSchema:
+ $ref: "#/definitions/sli.api.TestResults"
+ originalRef: "#/definitions/sli.api.TestResults"
+ post:
+ tags:
+ - "SLI-API"
+ description: "creates sli.api.TestResults"
+ parameters:
+ - in: "body"
+ name: "sli.api.TestResults.body-param"
+ description: "sli.api.TestResults to be added to list"
+ required: false
+ schema:
+ $ref: "#/definitions/sli.api.TestResults"
+ originalRef: "#/definitions/sli.api.TestResults"
+ responses:
+ 400:
+ description: "Internal error"
+ 201:
+ description: "Object created"
+ 409:
+ description: "Object already exists"
+ put:
+ tags:
+ - "SLI-API"
+ description: "creates or updates sli.api.TestResults"
+ parameters:
+ - in: "body"
+ name: "sli.api.TestResults.body-param"
+ description: "sli.api.TestResults to be added or updated"
+ required: false
+ schema:
+ $ref: "#/definitions/sli.api.TestResults"
+ originalRef: "#/definitions/sli.api.TestResults"
+ responses:
+ 400:
+ description: "Internal error"
+ 201:
+ description: "Object created"
+ 204:
+ description: "Object modified"
+ delete:
+ tags:
+ - "SLI-API"
+ description: "removes sli.api.TestResults"
+ parameters: []
+ responses:
+ 400:
+ description: "Internal error"
+ 204:
+ description: "Object deleted"
+ /config/SLI-API:test-results/SLI-API:test-result/:
+ post:
+ description: "creates sli.api.testresults.TestResult"
+ parameters:
+ - in: "body"
+ name: "sli.api.testresults.TestResult.body-param"
+ description: "sli.api.testresults.TestResult to be added to list"
+ required: false
+ schema:
+ $ref: "#/definitions/sli.api.testresults.TestResult"
+ originalRef: "#/definitions/sli.api.testresults.TestResult"
+ responses:
+ 400:
+ description: "Internal error"
+ 201:
+ description: "Object created"
+ 409:
+ description: "Object already exists"
+ /config/SLI-API:test-results/SLI-API:test-result/{test-identifier}/:
+ get:
+ tags:
+ - "SLI-API"
+ description: "returns sli.api.testresults.TestResult"
+ parameters:
+ - name: "test-identifier"
+ in: "path"
+ description: "Id of test-result"
+ required: true
+ type: "string"
+ responses:
+ 400:
+ description: "Internal error"
+ 200:
+ description: "sli.api.testresults.TestResult"
+ schema:
+ $ref: "#/definitions/sli.api.testresults.TestResult"
+ originalRef: "#/definitions/sli.api.testresults.TestResult"
+ responseSchema:
+ $ref: "#/definitions/sli.api.testresults.TestResult"
+ originalRef: "#/definitions/sli.api.testresults.TestResult"
+ post:
+ tags:
+ - "SLI-API"
+ description: "creates sli.api.testresults.TestResult"
+ parameters:
+ - name: "test-identifier"
+ in: "path"
+ description: "Id of test-result"
+ required: true
+ type: "string"
+ - in: "body"
+ name: "sli.api.testresults.TestResult.body-param"
+ description: "sli.api.testresults.TestResult to be added to list"
+ required: false
+ schema:
+ $ref: "#/definitions/sli.api.testresults.TestResult"
+ originalRef: "#/definitions/sli.api.testresults.TestResult"
+ responses:
+ 400:
+ description: "Internal error"
+ 201:
+ description: "Object created"
+ 409:
+ description: "Object already exists"
+ put:
+ tags:
+ - "SLI-API"
+ description: "creates or updates sli.api.testresults.TestResult"
+ parameters:
+ - name: "test-identifier"
+ in: "path"
+ description: "Id of test-result"
+ required: true
+ type: "string"
+ - in: "body"
+ name: "sli.api.testresults.TestResult.body-param"
+ description: "sli.api.testresults.TestResult to be added or updated"
+ required: false
+ schema:
+ $ref: "#/definitions/sli.api.testresults.TestResult"
+ originalRef: "#/definitions/sli.api.testresults.TestResult"
+ responses:
+ 400:
+ description: "Internal error"
+ 201:
+ description: "Object created"
+ 204:
+ description: "Object modified"
+ delete:
+ tags:
+ - "SLI-API"
+ description: "removes sli.api.testresults.TestResult"
+ parameters:
+ - name: "test-identifier"
+ in: "path"
+ description: "Id of test-result"
+ required: true
+ type: "string"
+ responses:
+ 400:
+ description: "Internal error"
+ 204:
+ description: "Object deleted"
+ /operational/SLI-API:test-results/:
+ get:
+ tags:
+ - "SLI-API"
+ description: "returns sli.api.TestResults"
+ parameters: []
+ responses:
+ 400:
+ description: "Internal error"
+ 200:
+ description: "sli.api.TestResults"
+ schema:
+ $ref: "#/definitions/sli.api.TestResults"
+ originalRef: "#/definitions/sli.api.TestResults"
+ responseSchema:
+ $ref: "#/definitions/sli.api.TestResults"
+ originalRef: "#/definitions/sli.api.TestResults"
+ /operational/SLI-API:test-results/SLI-API:test-result/{test-identifier}/:
+ get:
+ tags:
+ - "SLI-API"
+ description: "returns sli.api.testresults.TestResult"
+ parameters:
+ - name: "test-identifier"
+ in: "path"
+ description: "Id of test-result"
+ required: true
+ type: "string"
+ responses:
+ 400:
+ description: "Internal error"
+ 200:
+ description: "sli.api.testresults.TestResult"
+ schema:
+ $ref: "#/definitions/sli.api.testresults.TestResult"
+ originalRef: "#/definitions/sli.api.testresults.TestResult"
+ responseSchema:
+ $ref: "#/definitions/sli.api.testresults.TestResult"
+ originalRef: "#/definitions/sli.api.testresults.TestResult"
+ /operations/SLI-API:execute-graph/:
+ post:
+ tags:
+ - "SLI-API"
+ parameters:
+ - in: "body"
+ name: "sli.api.executegraph.Input.body-param"
+ required: false
+ schema:
+ properties:
+ input:
+ $ref: "#/definitions/sli.api.executegraph.Input"
+ originalRef: "#/definitions/sli.api.executegraph.Input"
+ responses:
+ 400:
+ description: "Internal error"
+ 200:
+ description: "Correct response"
+ schema:
+ $ref: "#/definitions/sli.api.ExecuteGraph"
+ originalRef: "#/definitions/sli.api.ExecuteGraph"
+ responseSchema:
+ $ref: "#/definitions/sli.api.ExecuteGraph"
+ originalRef: "#/definitions/sli.api.ExecuteGraph"
+ 201:
+ description: "No response"
+ /operations/SLI-API:healthcheck/:
+ post:
+ tags:
+ - "SLI-API"
+ parameters: []
+ responses:
+ 400:
+ description: "Internal error"
+ 200:
+ description: "Correct response"
+ schema:
+ $ref: "#/definitions/sli.api.Healthcheck"
+ originalRef: "#/definitions/sli.api.Healthcheck"
+ responseSchema:
+ $ref: "#/definitions/sli.api.Healthcheck"
+ originalRef: "#/definitions/sli.api.Healthcheck"
+ 201:
+ description: "No response"
+ /operations/SLI-API:vlbcheck/:
+ post:
+ tags:
+ - "SLI-API"
+ parameters: []
+ responses:
+ 400:
+ description: "Internal error"
+ 200:
+ description: "Correct response"
+ schema:
+ $ref: "#/definitions/sli.api.Vlbcheck"
+ originalRef: "#/definitions/sli.api.Vlbcheck"
+ responseSchema:
+ $ref: "#/definitions/sli.api.Vlbcheck"
+ originalRef: "#/definitions/sli.api.Vlbcheck"
+ 201:
+ description: "No response"
+definitions:
+ sli.api.ExecuteGraph:
+ type: "object"
+ properties:
+ output:
+ $ref: "#/definitions/sli.api.ResponseFields"
+ originalRef: "#/definitions/sli.api.ResponseFields"
+ sli.api.Healthcheck:
+ type: "object"
+ properties:
+ output:
+ $ref: "#/definitions/sli.api.ResponseFields"
+ originalRef: "#/definitions/sli.api.ResponseFields"
+ sli.api.ModeEnumeration:
+ type: "string"
+ enum:
+ - "sync"
+ - "async"
+ sli.api.ParameterSetting:
+ type: "object"
+ properties:
+ string-value:
+ type: "string"
+ boolean-value:
+ type: "boolean"
+ parameter-name:
+ type: "string"
+ description: "Parameter name"
+ int-value:
+ type: "integer"
+ format: "int32"
+ sli.api.ResponseFields:
+ type: "object"
+ properties:
+ response-code:
+ type: "string"
+ response-message:
+ type: "string"
+ context-memory-json:
+ type: "string"
+ ack-final-indicator:
+ type: "string"
+ sli.api.TestResults:
+ type: "object"
+ properties:
+ test-result:
+ type: "array"
+ items:
+ $ref: "#/definitions/sli.api.testresults.TestResult"
+ originalRef: "#/definitions/sli.api.testresults.TestResult"
+ sli.api.Vlbcheck:
+ type: "object"
+ properties:
+ output:
+ $ref: "#/definitions/sli.api.ResponseFields"
+ originalRef: "#/definitions/sli.api.ResponseFields"
+ sli.api.executegraph.Input:
+ type: "object"
+ properties:
+ mode:
+ $ref: "#/definitions/sli.api.ModeEnumeration"
+ originalRef: "#/definitions/sli.api.ModeEnumeration"
+ module-name:
+ type: "string"
+ sli-parameter:
+ type: "array"
+ items:
+ $ref: "#/definitions/sli.api.ParameterSetting"
+ originalRef: "#/definitions/sli.api.ParameterSetting"
+ rpc-name:
+ type: "string"
+ sli.api.testresults.TestResult:
+ type: "object"
+ properties:
+ results:
+ type: "array"
+ items:
+ type: "string"
+ test-identifier:
+ type: "string"
diff --git a/sliapi/model/yang/pom.xml b/sliapi/model/yang/pom.xml
new file mode 100755
index 000000000..420d2ee0d
--- /dev/null
+++ b/sliapi/model/yang/pom.xml
@@ -0,0 +1,27 @@
+<?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.ccsdk.parent</groupId>
+ <artifactId>binding-parent</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sliapi-model-yang</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <name>ccsdk-sli-core :: sliapi :: ${project.artifactId}</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+ <artifactId>rfc6991</artifactId>
+ </dependency>
+
+
+ </dependencies>
+</project>
diff --git a/sliapi/model/src/main/resources/sli-api.20161110.json b/sliapi/model/yang/src/main/resources/sli-api.20161110.json
index 1c6cdabfe..1c6cdabfe 100644
--- a/sliapi/model/src/main/resources/sli-api.20161110.json
+++ b/sliapi/model/yang/src/main/resources/sli-api.20161110.json
diff --git a/sliapi/model/yang/src/main/resources/sli-api.20161110.yaml b/sliapi/model/yang/src/main/resources/sli-api.20161110.yaml
new file mode 100644
index 000000000..3420c66b5
--- /dev/null
+++ b/sliapi/model/yang/src/main/resources/sli-api.20161110.yaml
@@ -0,0 +1,254 @@
+---
+swagger: '2.0'
+info:
+ version: 1.0.0
+ title: "SLI API"
+basePath: '/restconf'
+schemes:
+ - http
+ - https
+paths:
+ '/restconf/config/SLI-API:test-results':
+ delete:
+ produces:
+ - application/json
+ - application/xml
+ responses:
+ '200':
+ description: No response was specified
+ description: Test results
+ operationId: delete-test-results
+ get:
+ produces:
+ - application/json
+ - application/xml
+ responses:
+ '200':
+ description: No response was specified
+ schema:
+ $ref: '#/definitions/test-results'
+ description: Test results
+ operationId: get-test-results
+ post:
+ consumes:
+ - application/json
+ - application/xml
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: body
+ name: testResults
+ required: false
+ schema:
+ $ref: '#/definitions/test-results'
+ responses:
+ '200':
+ description: No response was specified
+ schema:
+ $ref: '#/definitions/test-results'
+ description: Test results
+ operationId: post-test-results
+ put:
+ consumes:
+ - application/json
+ - application/xml
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: body
+ name: testResults
+ required: false
+ schema:
+ $ref: '#/definitions/test-results'
+ responses:
+ '200':
+ description: No response was specified
+ schema:
+ $ref: '#/definitions/test-results'
+ description: Test results
+ operationId: put-test-results
+
+ '/restconf/config/SLI-API:test-results/test-result/{test-identifier}':
+ delete:
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: path
+ name: test-identifier
+ required: true
+ type: string
+ responses:
+ '200':
+ description: No response was specified
+ operationId: delete-test-result
+ get:
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: path
+ name: test-identifier
+ required: true
+ type: string
+ responses:
+ '200':
+ description: No response was specified
+ schema:
+ $ref: '#/definitions/test-result'
+ operationId: get-test-result
+ put:
+ consumes:
+ - application/json
+ - application/xml
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: path
+ name: test-identifier
+ required: true
+ type: string
+ - in: body
+ name: testResult
+ required: false
+ schema:
+ $ref: '#/definitions/test-result'
+ responses:
+ '200':
+ description: No response was specified
+ schema:
+ $ref: '#/definitions/test-result'
+ operationId: PUT-test-result
+
+ '/restconf/operational/SLI-API:test-results':
+ get:
+ produces:
+ - application/json
+ - application/xml
+ responses:
+ '200':
+ description: No response was specified
+ schema:
+ $ref: '#/definitions/test-results'
+ description: Test results
+ operationId: GET-test-results
+ '/restconf/operations/SLI-API:execute-graph':
+ post:
+ consumes:
+ - application/json
+ - application/xml
+ produces:
+ - application/json
+ - application/xml
+ parameters:
+ - in: body
+ name: executeGraphInput
+ required: false
+ schema:
+ $ref: '#/definitions/execute-graph-input'
+ responses:
+ '200':
+ description: No response was specified
+ schema:
+ $ref: '#/definitions/response-fields'
+ description: ' Method to add a new parameter.'
+ operationId: execute-graph
+ '/restconf/operations/SLI-API:healthcheck':
+ post:
+ consumes:
+ - application/json
+ - application/xml
+ produces:
+ - application/json
+ - application/xml
+ responses:
+ '200':
+ description: No response was specified
+ schema:
+ $ref: '#/definitions/response-fields'
+ operationId: healthcheck
+ '/restconf/operations/SLI-API:vlbcheck':
+ post:
+ consumes:
+ - application/json
+ - application/xml
+ produces:
+ - application/json
+ - application/xml
+ responses:
+ '200':
+ description: No response was specified
+ schema:
+ $ref: '#/definitions/response-fields'
+ operationId: vlbcheck
+
+definitions:
+ parameter-setting:
+ type: object
+ properties:
+ parameter-name:
+ type: string
+ int-value:
+ type: integer
+ string-value:
+ type: string
+ boolean-value:
+ type: boolean
+
+ response-fields:
+ type: object
+ properties:
+ response-code:
+ type: string
+ ack-final-indicator:
+ type: string
+ response-message:
+ type: string
+ context-memory-json:
+ type: string
+
+ test-results:
+ type: object
+ properties:
+ test-results:
+ type: array
+ items:
+ $ref: '#/definitions/test-result'
+
+ test-result:
+ type: object
+ properties:
+ test-identifier:
+ type: string
+ results:
+ type: array
+ items:
+ type: string
+
+ execute-graph-input:
+ properties:
+ 'input':
+ type: object
+ properties:
+ 'mode':
+ type: string
+ 'module-name':
+ type: string
+ 'rpc-name':
+ type: string
+ 'sli-parameter':
+ items:
+ $ref: '#/definitions/parameter-setting'
+ type: array
+ type: object
+
+
+
+
+
+
+ unique_empty_identifier: {}
+
diff --git a/sliapi/model/src/main/yang/sliapi.yang b/sliapi/model/yang/src/main/yang/sliapi.yang
index b3272be80..98cbb2aa7 100755
--- a/sliapi/model/src/main/yang/sliapi.yang
+++ b/sliapi/model/yang/src/main/yang/sliapi.yang
@@ -103,25 +103,12 @@ module SLI-API {
}
rpc healthcheck {
- // OpenDaylight Fluorine version of restconf cannot handle RPCs with no input
- input {
- leaf dummy {
- type string;
- }
- }
output {
uses response-fields;
}
}
rpc vlbcheck {
- // OpenDaylight Fluorine version of restconf cannot handle RPCs with no input
- input {
- leaf dummy
- {
- type string;
- }
- }
output {
uses response-fields;
}