From 14d37304d8b83efc099ba19d6f3e7d5d53fead29 Mon Sep 17 00:00:00 2001 From: JvD_Ericsson Date: Thu, 7 Dec 2023 15:33:09 +0000 Subject: Clean up CSIT Test - Removed gitignore from csit and made it top level - Removed tabs from all files - Created sub-folder for cps-core and ncmp in the data folder - Deleted csit/data/postModuleRequestBody.json, was not used - Removed setting variable for most response.json() calls Issue-Id: CPS-734 Signed-off-by: JvD_Ericsson Change-Id: I32fd5b4f5a0132987a4684c336846b86df7b49e7 --- csit/data/bookstoreCreateExample.json | 34 --------------- csit/data/bookstorePatchExample.json | 59 --------------------------- csit/data/bookstoreUpdateExample.json | 8 ---- csit/data/cps-core/dataOperationRequest.json | 12 ++++++ csit/data/cps-core/test-tree.json | 28 +++++++++++++ csit/data/cps-core/test-tree.yang | 24 +++++++++++ csit/data/cps-core/testTreePatchExample.json | 11 +++++ csit/data/cps-core/yang-resources.zip | Bin 0 -> 18013 bytes csit/data/dataOperationRequest.json | 12 ------ csit/data/ncmp/bookstoreCreateExample.json | 34 +++++++++++++++ csit/data/ncmp/bookstorePatchExample.json | 59 +++++++++++++++++++++++++++ csit/data/ncmp/bookstoreUpdateExample.json | 8 ++++ csit/data/postModuleRequestBody.json | 11 ----- csit/data/test-tree.json | 28 ------------- csit/data/test-tree.yang | 24 ----------- csit/data/testTreePatchExample.json | 11 ----- csit/data/yang-resources.zip | Bin 18013 -> 0 bytes 17 files changed, 176 insertions(+), 187 deletions(-) delete mode 100644 csit/data/bookstoreCreateExample.json delete mode 100644 csit/data/bookstorePatchExample.json delete mode 100644 csit/data/bookstoreUpdateExample.json create mode 100644 csit/data/cps-core/dataOperationRequest.json create mode 100644 csit/data/cps-core/test-tree.json create mode 100644 csit/data/cps-core/test-tree.yang create mode 100644 csit/data/cps-core/testTreePatchExample.json create mode 100644 csit/data/cps-core/yang-resources.zip delete mode 100644 csit/data/dataOperationRequest.json create mode 100644 csit/data/ncmp/bookstoreCreateExample.json create mode 100644 csit/data/ncmp/bookstorePatchExample.json create mode 100644 csit/data/ncmp/bookstoreUpdateExample.json delete mode 100644 csit/data/postModuleRequestBody.json delete mode 100644 csit/data/test-tree.json delete mode 100644 csit/data/test-tree.yang delete mode 100644 csit/data/testTreePatchExample.json delete mode 100644 csit/data/yang-resources.zip (limited to 'csit/data') diff --git a/csit/data/bookstoreCreateExample.json b/csit/data/bookstoreCreateExample.json deleted file mode 100644 index ff8e202e3..000000000 --- a/csit/data/bookstoreCreateExample.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "categories": [ - { - "code": "01", - "name": "Sci-Fi", - "books": [ - { - "title": "A Sci-Fi book", - "lang": "English", - "authors": [ - "Joe & Rahul" - ], - "pub_year": "2001", - "price": "1000" - } - ] - }, - { - "code": "02", - "name": "Horror", - "books": [ - { - "title": "A Horror book", - "lang": "English", - "authors": [ - "Joe & Rahul" - ], - "pub_year": "2003", - "price": "2000" - } - ] - } - ] -} \ No newline at end of file diff --git a/csit/data/bookstorePatchExample.json b/csit/data/bookstorePatchExample.json deleted file mode 100644 index 039ea4bcd..000000000 --- a/csit/data/bookstorePatchExample.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "ietf-restconf:yang-patch":{ - "patch-id":"patch-1", - "edit":[ - { - "edit-id":"edit1", - "operation":"merge", - "target":"/", - "value":{ - "bookstore": { - "categories": [ - { - "code": "100", - "books": [ - { - "title": "A new book in a new category", - "pub_year": "2019", - "authors": [ - "Rahul" - ], - "lang": "English", - "price": "2011" - } - ], - "name": "Category100" - } - ] - } - } - }, - { - "edit-id":"edit2", - "operation":"merge", - "target":"/", - "value":{ - "bookstore": { - "categories": [ - { - "code": "02", - "name": "Horror", - "books": [ - { - "title": "A New book in existing category", - "lang": "English", - "authors": [ - "Joe & Rahul" - ], - "pub_year": "2003", - "price": "2000" - } - ] - } - ] - } - } - } - ] - } -} \ No newline at end of file diff --git a/csit/data/bookstoreUpdateExample.json b/csit/data/bookstoreUpdateExample.json deleted file mode 100644 index 2614b5922..000000000 --- a/csit/data/bookstoreUpdateExample.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "categories": [ - { - "code": "01", - "name": "Updated Sci-Fi Category Name" - } - ] -} \ No newline at end of file diff --git a/csit/data/cps-core/dataOperationRequest.json b/csit/data/cps-core/dataOperationRequest.json new file mode 100644 index 000000000..1b94a299d --- /dev/null +++ b/csit/data/cps-core/dataOperationRequest.json @@ -0,0 +1,12 @@ +{ + "operations": [ + { + "operation": "read", + "operationId": "operational-12", + "datastore": "ncmp-datastore:passthrough-operational", + "options": "(fields=schemas/schema)", + "resourceIdentifier": "parent/child", + "targetIds": ["850117873c9a4936856a5081be96e6a8"] + } + ] +} \ No newline at end of file diff --git a/csit/data/cps-core/test-tree.json b/csit/data/cps-core/test-tree.json new file mode 100644 index 000000000..8f4b52279 --- /dev/null +++ b/csit/data/cps-core/test-tree.json @@ -0,0 +1,28 @@ +{ + "test-tree": { + "branch": [ + { + "name": "LEFT/left", + "nest": { + "name": "SMALL/small", + "birds": [ + "SPARROW/sparrow", + "Robin", + "Finch" + ] + } + }, + { + "name": "Right", + "nest": { + "name": "Big", + "birds": [ + "Night Owl", + "Raven", + "Crow" + ] + } + } + ] + } +} \ No newline at end of file diff --git a/csit/data/cps-core/test-tree.yang b/csit/data/cps-core/test-tree.yang new file mode 100644 index 000000000..faba8a11d --- /dev/null +++ b/csit/data/cps-core/test-tree.yang @@ -0,0 +1,24 @@ +module test-tree { + yang-version 1.1; + + namespace "org:onap:cps:test:test-tree"; + prefix tree; + revision "2020-02-02"; + + container test-tree { + list branch { + key "name"; + leaf name { + type string; + } + container nest { + leaf name { + type string; + } + leaf-list birds { + type string; + } + } + } + } +} diff --git a/csit/data/cps-core/testTreePatchExample.json b/csit/data/cps-core/testTreePatchExample.json new file mode 100644 index 000000000..31210b628 --- /dev/null +++ b/csit/data/cps-core/testTreePatchExample.json @@ -0,0 +1,11 @@ +{ + "name": "Right", + "nest": { + "name": "Bigger", + "birds": [ + "Eagle", + "Falcon", + "Pigeon" + ] + } +} \ No newline at end of file diff --git a/csit/data/cps-core/yang-resources.zip b/csit/data/cps-core/yang-resources.zip new file mode 100644 index 000000000..42b110d5c Binary files /dev/null and b/csit/data/cps-core/yang-resources.zip differ diff --git a/csit/data/dataOperationRequest.json b/csit/data/dataOperationRequest.json deleted file mode 100644 index 1b94a299d..000000000 --- a/csit/data/dataOperationRequest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "operations": [ - { - "operation": "read", - "operationId": "operational-12", - "datastore": "ncmp-datastore:passthrough-operational", - "options": "(fields=schemas/schema)", - "resourceIdentifier": "parent/child", - "targetIds": ["850117873c9a4936856a5081be96e6a8"] - } - ] -} \ No newline at end of file diff --git a/csit/data/ncmp/bookstoreCreateExample.json b/csit/data/ncmp/bookstoreCreateExample.json new file mode 100644 index 000000000..ff8e202e3 --- /dev/null +++ b/csit/data/ncmp/bookstoreCreateExample.json @@ -0,0 +1,34 @@ +{ + "categories": [ + { + "code": "01", + "name": "Sci-Fi", + "books": [ + { + "title": "A Sci-Fi book", + "lang": "English", + "authors": [ + "Joe & Rahul" + ], + "pub_year": "2001", + "price": "1000" + } + ] + }, + { + "code": "02", + "name": "Horror", + "books": [ + { + "title": "A Horror book", + "lang": "English", + "authors": [ + "Joe & Rahul" + ], + "pub_year": "2003", + "price": "2000" + } + ] + } + ] +} \ No newline at end of file diff --git a/csit/data/ncmp/bookstorePatchExample.json b/csit/data/ncmp/bookstorePatchExample.json new file mode 100644 index 000000000..039ea4bcd --- /dev/null +++ b/csit/data/ncmp/bookstorePatchExample.json @@ -0,0 +1,59 @@ +{ + "ietf-restconf:yang-patch":{ + "patch-id":"patch-1", + "edit":[ + { + "edit-id":"edit1", + "operation":"merge", + "target":"/", + "value":{ + "bookstore": { + "categories": [ + { + "code": "100", + "books": [ + { + "title": "A new book in a new category", + "pub_year": "2019", + "authors": [ + "Rahul" + ], + "lang": "English", + "price": "2011" + } + ], + "name": "Category100" + } + ] + } + } + }, + { + "edit-id":"edit2", + "operation":"merge", + "target":"/", + "value":{ + "bookstore": { + "categories": [ + { + "code": "02", + "name": "Horror", + "books": [ + { + "title": "A New book in existing category", + "lang": "English", + "authors": [ + "Joe & Rahul" + ], + "pub_year": "2003", + "price": "2000" + } + ] + } + ] + } + } + } + ] + } +} \ No newline at end of file diff --git a/csit/data/ncmp/bookstoreUpdateExample.json b/csit/data/ncmp/bookstoreUpdateExample.json new file mode 100644 index 000000000..2614b5922 --- /dev/null +++ b/csit/data/ncmp/bookstoreUpdateExample.json @@ -0,0 +1,8 @@ +{ + "categories": [ + { + "code": "01", + "name": "Updated Sci-Fi Category Name" + } + ] +} \ No newline at end of file diff --git a/csit/data/postModuleRequestBody.json b/csit/data/postModuleRequestBody.json deleted file mode 100644 index e12af9d91..000000000 --- a/csit/data/postModuleRequestBody.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "operation": "read", - "data": { - "modules": [ - { - "name": "nc-notifications", - "revision": "2008-07-14" - } - ] - } -} \ No newline at end of file diff --git a/csit/data/test-tree.json b/csit/data/test-tree.json deleted file mode 100644 index 8f4b52279..000000000 --- a/csit/data/test-tree.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "test-tree": { - "branch": [ - { - "name": "LEFT/left", - "nest": { - "name": "SMALL/small", - "birds": [ - "SPARROW/sparrow", - "Robin", - "Finch" - ] - } - }, - { - "name": "Right", - "nest": { - "name": "Big", - "birds": [ - "Night Owl", - "Raven", - "Crow" - ] - } - } - ] - } -} \ No newline at end of file diff --git a/csit/data/test-tree.yang b/csit/data/test-tree.yang deleted file mode 100644 index faba8a11d..000000000 --- a/csit/data/test-tree.yang +++ /dev/null @@ -1,24 +0,0 @@ -module test-tree { - yang-version 1.1; - - namespace "org:onap:cps:test:test-tree"; - prefix tree; - revision "2020-02-02"; - - container test-tree { - list branch { - key "name"; - leaf name { - type string; - } - container nest { - leaf name { - type string; - } - leaf-list birds { - type string; - } - } - } - } -} diff --git a/csit/data/testTreePatchExample.json b/csit/data/testTreePatchExample.json deleted file mode 100644 index 31210b628..000000000 --- a/csit/data/testTreePatchExample.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "Right", - "nest": { - "name": "Bigger", - "birds": [ - "Eagle", - "Falcon", - "Pigeon" - ] - } -} \ No newline at end of file diff --git a/csit/data/yang-resources.zip b/csit/data/yang-resources.zip deleted file mode 100644 index 42b110d5c..000000000 Binary files a/csit/data/yang-resources.zip and /dev/null differ -- cgit 1.2.3-korg