diff options
Diffstat (limited to 'sli/model/src/main/yang')
-rwxr-xr-x | sli/model/src/main/yang/sliapi.yang | 123 | ||||
-rwxr-xr-x | sli/model/src/main/yang/test-model@2019-07-23.yang | 210 |
2 files changed, 333 insertions, 0 deletions
diff --git a/sli/model/src/main/yang/sliapi.yang b/sli/model/src/main/yang/sliapi.yang new file mode 100755 index 000000000..a7d52928b --- /dev/null +++ b/sli/model/src/main/yang/sliapi.yang @@ -0,0 +1,123 @@ +module SLI-API { + + yang-version 1; + + namespace "org:onap:ccsdk:sli:core:sliapi"; + + prefix sample; + + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + + organization "ONAP"; + + contact + "Dan Timoney"; + + description + "Defines API to service logic interpreter"; + + revision "2016-11-10" { + description + "REST API to Service Logic Interpreter"; + } + + grouping parameter-setting { + description + "Parameter setting"; + + leaf parameter-name { + type string; + description "Parameter name"; + } + + leaf int-value { + type int32; + } + leaf string-value { + type string; + } + leaf boolean-value { + type boolean; + } + leaf ipaddress-value { + type inet:ip-address; + } + leaf ipprefix-value { + type inet:ip-prefix; + } + leaf port-number { + type inet:port-number; + } + leaf dscp { + type inet:dscp; + } + } + + grouping response-fields { + leaf response-code { + type string; + } + leaf ack-final-indicator { + type string; + } + leaf response-message { + type string; + } + leaf context-memory-json { + type string; + } + } + + container test-results { + description "Test results"; + + list test-result { + key "test-identifier"; + + leaf test-identifier { + type string; + } + + leaf-list results { + type string; + } + } + } + + rpc execute-graph { + description " Method to add a new parameter."; + input { + + leaf module-name { + type string; + } + + leaf rpc-name { + type string; + } + + leaf mode { + type enumeration { + enum sync; + enum async; + } + } + + list sli-parameter { + key "parameter-name"; + uses parameter-setting; + } + } + + output { + uses response-fields; + } + } + + rpc healthcheck { + output { + uses response-fields; + } + } + +} diff --git a/sli/model/src/main/yang/test-model@2019-07-23.yang b/sli/model/src/main/yang/test-model@2019-07-23.yang new file mode 100755 index 000000000..fc8e8b007 --- /dev/null +++ b/sli/model/src/main/yang/test-model@2019-07-23.yang @@ -0,0 +1,210 @@ +module test-model { + + yang-version 1; + + namespace "org:onap:ccsdk:sli:core:testmodel"; + + prefix sample; + + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + + organization "ONAP"; + + contact + "Test Author"; + + description + "A test model not used in business flows"; + + revision "2019-07-23" { + description + "First release of the test model"; + } + + identity sample-identity { + description + "Base identity"; + } + + typedef percentage { + type uint8 { + range "0 .. 100"; + } + description "represents a percentage"; + } + + grouping builtin { + leaf sample-binary { + type binary; + } + leaf sample-bits { + type bits{ + bit fan-running { + position 0; + } + bit hd-led { + position 1; + } + bit power-led { + position 2; + } + } + } + leaf sample-boolean { + type boolean; + } + leaf sample-decimal64 { + type decimal64{ + fraction-digits 1; + } + } + leaf sample-empty { + type empty; + } + leaf sample-enumeration { + type enumeration{ + enum "shelf.slot.port"; + enum "not available"; + enum "CURRENTLY_AVAILABLE"; + enum "200OK"; + enum "hyphen-separated-value"; + } + } + leaf sample-identityref { + type identityref { + base "sample-identity"; + } + } + leaf sample-int8 { + type int8; + } + leaf sample-int16 { + type int16; + } + leaf sample-int32 { + type int32; + } + leaf sample-int64 { + type int64; + } + leaf sample-leafref { + type leafref { + path "../sample-boolean"; + } + } + leaf sample-string { + type string; + } + leaf sample-uint8 { + type uint8; + } + leaf sample-uint16 { + type uint16; + } + leaf sample-uint32 { + type uint32; + } + leaf sample-uint64 { + type uint64; + } + leaf sample-union { + type union { + type int32; + type enumeration { + enum "unbounded"; + } + } + } + leaf percent-completed { + type percentage; + } + } + + grouping inet-types-grouping { + leaf ip-version { + type inet:ip-version; + } + leaf dscp { + type inet:dscp; + } + leaf port-number { + type inet:port-number; + } + leaf ipv6-flow-label { + type inet:ipv6-flow-label; + } + leaf as-number { + type inet:as-number; + } + leaf ip-address { + type inet:ip-address; + } + leaf ipv4-address { + type inet:ipv4-address; + } + leaf ipv6-address { + type inet:ipv6-address; + } + leaf ip-address-no-zone { + type inet:ip-address-no-zone; + } + leaf ipv4-address-no-zone { + type inet:ipv4-address-no-zone; + } + leaf ipv6-address-no-zone { + type inet:ipv6-address-no-zone; + } + leaf ip-prefix { + type inet:ip-prefix; + } + leaf ipv4-prefix { + type inet:ipv4-prefix; + } + leaf ipv6-prefix { + type inet:ipv6-prefix; + } + leaf domain-name { + type inet:domain-name; + } + leaf host { + type inet:host; + } + leaf uri { + type inet:uri; + } + anyxml data; + } + + container sample-container { + leaf customer-name { + type string; + } + + leaf-list customer-nicknames { + type string; + } + + container login { + leaf message { + type string; + description + "Message given at start of login session"; + } + + list customer-addresses { + key "address-name"; + leaf address-name { + type string; + } + leaf street-address { + type string; + } + leaf state { + type string; + } + } + } + uses builtin; + uses inet-types-grouping; + } +} |