aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2022-07-12 09:52:01 +0000
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2022-07-18 09:49:01 +0000
commit0a7c213c87d9b0916080d62d8e97ac4d47851688 (patch)
tree4599fc1da6a74decdd789f70d01b057e8f426308 /samples
parentdc0b8a7349225066f0e8e55c8decc0049696b21f (diff)
[CPS] Create CPS resources using data provider0.7.0
Create: - dataspace - anchor - schema set Issue-ID: INT-2135 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: I49fa9aa34bd4157372571275774c6a410d1bedcb
Diffstat (limited to 'samples')
-rw-r--r--samples/cps-bookstore.yang61
-rw-r--r--samples/cps.yaml22
2 files changed, 83 insertions, 0 deletions
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