diff options
author | Dan Timoney <dtimoney@att.com> | 2017-07-18 20:32:15 -0400 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2017-08-01 15:10:25 -0400 |
commit | ea5bf0a1c8a4e525d2cee03841b8e8f9b3563ed0 (patch) | |
tree | 5b85db0e570d86a2d3a7f5db5880196e45d8fe6f /asdcApi/model | |
parent | b658ce359742d141428a068ba5ebff876ada3d0a (diff) |
[CCSDK-6] Populate seed code
Add seed code for sli/northbound repository
Update groupId to org.onap.ccsdk.sli.northbound
Update to use CCSDK version of sli core
Change-Id: Id3a154a53150a74f4b65060544e76f3e0cad932e
Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'asdcApi/model')
-rwxr-xr-x | asdcApi/model/pom.xml | 81 | ||||
-rwxr-xr-x | asdcApi/model/src/main/yang/ASDC-API.yang | 63 | ||||
-rwxr-xr-x | asdcApi/model/src/main/yang/asdc-api-common.yang | 53 | ||||
-rwxr-xr-x | asdcApi/model/src/main/yang/asdc-license-model.yang | 369 |
4 files changed, 566 insertions, 0 deletions
diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml new file mode 100755 index 000000000..b9f48326d --- /dev/null +++ b/asdcApi/model/pom.xml @@ -0,0 +1,81 @@ +<?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> + <artifactId>asdcApi</artifactId> + <groupId>org.onap.ccsdk.sli.northbound</groupId> + <version>0.0.1-SNAPSHOT</version> + </parent> + <groupId>org.onap.ccsdk.sli.northbound</groupId> + <artifactId>asdcApi-model</artifactId> + <version>0.0.1-SNAPSHOT</version> + <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> + <version>${odl.yangtools.yang.maven.plugin.version}</version> + <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.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>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> +</project> diff --git a/asdcApi/model/src/main/yang/ASDC-API.yang b/asdcApi/model/src/main/yang/ASDC-API.yang new file mode 100755 index 000000000..401ec7da9 --- /dev/null +++ b/asdcApi/model/src/main/yang/ASDC-API.yang @@ -0,0 +1,63 @@ + +module ASDC-API { + yang-version "1"; + + namespace "org:openecomp:sdnc"; + + prefix asdc-api; + + import asdc-api-common { prefix asdc-api-common; } + + + import asdc-license-model { prefix asdc-license-model; } + + import ietf-inet-types { + prefix inet; + revision-date "2010-09-24"; + } + + organization + "OpenECOMP"; + + contact + "Dan Timoney"; + + description + "SDC Interface"; + + revision 2017-02-01 { + description "database definitions"; + } + + // Containers + container artifacts { + list artifact { + key "artifact-name artifact-version"; + + uses asdc-api-common:artifact-fields; + } + } + + + + container vf-license-model-versions { + list vf-license-model-version { + key artifact-version; + uses asdc-api-common:artifact-fields; + uses asdc-license-model:vf-license-model-grouping; + } + } + + + // RPCs + + rpc vf-license-model-update { + input { + uses asdc-api-common:artifact-fields; + uses asdc-license-model:vf-license-model-grouping; + } + output { + uses asdc-api-common:asdc-api-response; + } + } +} diff --git a/asdcApi/model/src/main/yang/asdc-api-common.yang b/asdcApi/model/src/main/yang/asdc-api-common.yang new file mode 100755 index 000000000..126368d4f --- /dev/null +++ b/asdcApi/model/src/main/yang/asdc-api-common.yang @@ -0,0 +1,53 @@ + +module asdc-api-common { + yang-version "1"; + + // Use same namespace defined for file upload in 15.12 + namespace "org:openecomp:sdnc:asdcapi:common"; + + prefix asdcapi; + + organization + "OpenECOMP"; + + contact + "Dan Timoney"; + + description + "ASDC/SDN-C API common data"; + + revision 2017-02-01 { + description "Initial release"; + } + + + + // Groupings + + grouping artifact-fields { + leaf artifact-name { + type string; + description "Name of artifact"; + } + + leaf artifact-version { + type string; + description "Version of artifact"; + } + } + + grouping asdc-api-response { + leaf asdc-api-response-code { + type string; + description "Code indicating success/failure"; + } + + leaf asdc-api-response-text { + type string; + description "Text indicating reason for failure"; + } + } + + + +} diff --git a/asdcApi/model/src/main/yang/asdc-license-model.yang b/asdcApi/model/src/main/yang/asdc-license-model.yang new file mode 100755 index 000000000..37ae869bd --- /dev/null +++ b/asdcApi/model/src/main/yang/asdc-license-model.yang @@ -0,0 +1,369 @@ +module asdc-license-model { + + namespace "http://xmlns.openecomp.org/asdc/license-model/1.0"; + prefix le; + organization "openecomp"; + contact "asdc"; + description "schema for both vendor license and VF license models"; + revision 2016-04-27 { + description "xxxx"; + reference "xxxx"; + } + + container vendor-license-model { + description "xxxx"; + leaf vendor-name { + type string{ + length "1..200"; + } + description "xxxx"; + } + uses entitlement-pools; + uses license-key-groups; + } + + grouping entitlement-pools { + description "xxxx"; + container entitlement-pool-list { + description "xxxx"; + uses entitlement-pool; + } + } + + grouping entitlement-pool { + description "xxxx"; + list entitlement-pool { + description "xxxx"; + leaf entitlement-pool-uuid { + type string; + description "xxxx"; + } + leaf name { + type string{ + length "1..120"; + } + description "xxxx"; + } + leaf description { + type string{ + length "1..1000"; + } + description "xxxx"; + } + leaf manufacturer-reference-number { + type string{ + length "1..100"; + } + description "xxxx"; + } + uses operational-scope; + uses threshold-value; + uses entitlement-metric; + leaf increments { + type string{ + length "1..120"; + } + description "xxxx"; + } + uses aggregation-function; + uses time; + } + } + + grouping operational-scope { + description "xxxx"; + container operational-scope { + description "xxxx"; + leaf value { + type enumeration { + enum "Network_Wide"{ + description "xxxx"; + } + enum "Availability_Zone"{ + description "xxxx"; + } + enum "Data_Center"{ + description "xxxx"; + } + enum "Tenant"{ + description "xxxx"; + } + enum "VM"{ + description "xxxx"; + } + enum "CPU"{ + description "xxxx"; + } + enum "Core"{ + description "xxxx"; + } + enum "Other"{ + description "xxxx"; + } + } + description "xxxx"; + } + leaf other { + type string{ + length "1..200"; + } + description "xxxx"; + } + } + } + + grouping threshold-value { + description "xxxx"; + container threshold-value { + description "xxxx"; + leaf value { + type uint32{ + range "0..9999999"; + } //TBD Change to type number + description "xxxx"; + } + leaf unit { + type enumeration { + enum "Absolute"{ + description "xxxx"; + } + enum "Percentage"{ + description "xxxx"; + } + } + description "xxxx"; + } + } + } + + grouping entitlement-metric { + description "xxxx"; + container entitlement-metric { + description "xxxx"; + leaf value { + type enumeration { + enum "Software_Instances_Count"{ + description "xxxx"; + } + enum "CPU"{ + description "xxxx"; + } + enum "Core"{ + description "xxxx"; + } + enum "Trunks"{ + description "xxxx"; + } + enum "User"{ + description "xxxx"; + } + enum "Subscribers"{ + description "xxxx"; + } + enum "Tenants"{ + description "xxxx"; + } + enum "Tokens"{ + description "xxxx"; + } + enum "Seats"{ + description "xxxx"; + } + enum "Units_TB"{ + description "xxxx"; + } + enum "Units_GB"{ + description "xxxx"; + } + enum "Units_MB"{ + description "xxxx"; + } + enum "Other"{ + description "xxxx"; + } + } + description "xxxx"; + } + leaf other { + type string{ + length "1..200"; + } + description "xxxx"; + } + } + } + + grouping aggregation-function { + description "xxxx"; + container aggregation-function { + description "xxxx"; + leaf value { + type enumeration { + enum "Peak"{ + description "xxxx"; + } + enum "Average"{ + description "xxxx"; + } + enum "Other"{ + description "xxxx"; + } + } + description "xxxx"; + } + leaf other { + type string{ + length "1..200"; + } + description "xxxx"; + } + } + } + + grouping time { + description "xxxx"; + container time { + description "xxxx"; + leaf value { + type enumeration { + enum "Hour"{ + description "xxxx"; + } + enum "Day"{ + description "xxxx"; + } + enum "Month"{ + description "xxxx"; + } + enum "Quarter"{ + description "xxxx"; + } + enum "Year"{ + description "xxxx"; + } + enum "Other"{ + description "xxxx"; + } + } + description "xxxx"; + } + leaf other { + type string{ + length "1..200"; + } + description "xxxx"; + } + } + } + + + + grouping license-key-groups { + description "xxxx"; + container license-key-group-list { + description "xxxx"; + leaf name { + type string; + description "xxxx"; + } + uses license-key-group; + } + } + + grouping license-key-group { + description "xxxx"; + list license-key-group { + description "xxxx"; + leaf license-key-group-uuid { + type string; + description "xxxx"; + } + leaf name { + type string{ + length "1..120"; + } + description "xxxx"; + } + leaf description { + type string{ + length "1..1000"; + } + description "xxxx"; + } + uses operational-scope; + leaf type { + type enumeration { + enum "Universal"{ + description "xxxx"; + } + enum "Unique"{ + description "xxxx"; + } + enum "One_Time"{ + description "xxxx"; + } + } + description "xxxx"; + } + } + } + + grouping vf-license-model-grouping { + description "xxxx"; + container vf-license-model { + description "xxxx"; + leaf vf-id { + type string{ + length "1..200"; + } + description "xxxx"; + } + leaf vendor-name { + type string{ + length "1..200"; + } + description "xxxx"; + } + uses feature-groups; + } + } + + grouping feature-groups { + description "xxxx"; + container feature-group-list { + description "xxxx"; + uses feature-group-grouping; + } + } + + grouping feature-group-grouping { + description "xxxx"; + list feature-group { + description "xxxx"; + leaf name{ + type string{ + length "1..120"; + } + description "xxxx"; + } + leaf feature-group-uuid{ + type string; + description "xxxx"; + } + leaf description { + type string{ + length "1..1000"; + } + description "xxxx"; + } + leaf att-part-number { + type string{ + length "1..100"; + } + description "xxxx"; + } + uses entitlement-pools; + uses license-key-groups; + } + } +} |