From 0a7c213c87d9b0916080d62d8e97ac4d47851688 Mon Sep 17 00:00:00 2001 From: Michal Jagiello Date: Tue, 12 Jul 2022 09:52:01 +0000 Subject: [CPS] Create CPS resources using data provider Create: - dataspace - anchor - schema set Issue-ID: INT-2135 Signed-off-by: Michal Jagiello Change-Id: I49fa9aa34bd4157372571275774c6a410d1bedcb --- samples/cps-bookstore.yang | 61 ++++++++++++++++++++++++++++++++++++++++++++++ samples/cps.yaml | 22 +++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 samples/cps-bookstore.yang create mode 100644 samples/cps.yaml (limited to 'samples') diff --git a/samples/cps-bookstore.yang b/samples/cps-bookstore.yang new file mode 100644 index 0000000..0bfbfb7 --- /dev/null +++ b/samples/cps-bookstore.yang @@ -0,0 +1,61 @@ +module stores { + yang-version 1.1; + namespace "org:onap:ccsdk:sample"; + + prefix book-store; + + revision "2020-09-15" { + description + "Sample Model"; + } + container shops { + + container bookstore { + + leaf bookstore-name { + type string; + } + + leaf name { + type string; + } + + list categories { + + key "code"; + + leaf code { + type uint16; + } + + leaf name { + type string; + } + + leaf numberOfBooks { + type uint16; + } + + container books { + + list book { + key title; + + leaf title { + type string; + } + leaf price { + type uint16; + } + leaf-list label { + type string; + } + leaf-list edition { + type string; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/samples/cps.yaml b/samples/cps.yaml new file mode 100644 index 0000000..4c06fa6 --- /dev/null +++ b/samples/cps.yaml @@ -0,0 +1,22 @@ +# CPS Sample +odpSchemaVersion: 1.1 +resources: + cps-dataspaces: + - cps-dataspace: + dataspace-name: test-odp-dataspace + schema-sets: + - schema-set-name: &schema-set-name test-odp-schema-set + schema-set-file: samples/cps-bookstore.yang + anchors: + - anchor-name: test-odp-anchor + schema-set-name: *schema-set-name + cps-schema-sets: + - cps-schema-set: + schema-set-name: test-odp-schemaset + dataspace-name: test-odp-dataspace + schema-set-file: samples/cps-bookstore.yang + cps-anchors: + - cps-anchor: + anchor-name: test-odp-anchor + schema-set-name: test-odp-schemaset + dataspace-name: test-odp-dataspace -- cgit 1.2.3-korg