ToineSiebelink | f0527c5 | 2021-07-06 13:03:03 +0100 | [diff] [blame] | 1 | /* |
| 2 | ============LICENSE_START======================================================= |
| 3 | Copyright (C) 2020-2021 Pantheon.tech |
| 4 | Modifications Copyright (C) 2020 Nordix Foundation. |
| 5 | Modifications Copyright (C) 2020-2021 Bell Canada. |
| 6 | ================================================================================ |
| 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | you may not use this file except in compliance with the License. |
| 9 | You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | |
| 19 | SPDX-License-Identifier: Apache-2.0 |
| 20 | ============LICENSE_END========================================================= |
| 21 | */ |
| 22 | |
Ruslan Kashapov | 7cca029 | 2020-11-24 11:13:43 +0200 | [diff] [blame] | 23 | INSERT INTO DATASPACE (ID, NAME) VALUES |
| 24 | (1001, 'DATASPACE-001'), (1002, 'DATASPACE-002'); |
| 25 | |
| 26 | INSERT INTO SCHEMA_SET (ID, NAME, DATASPACE_ID) VALUES |
niamhcore | d042222 | 2021-09-01 17:12:28 +0100 | [diff] [blame] | 27 | (2001, 'SCHEMA-SET-001', 1001), |
| 28 | (2002, 'SCHEMA-SET-002', 1001), |
Ruslan Kashapov | 6f25d3a | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 29 | (2100, 'SCHEMA-SET-100', 1001), -- for removal, not referenced by anchors |
niamhcore | d042222 | 2021-09-01 17:12:28 +0100 | [diff] [blame] | 30 | (2101, 'SCHEMA-SET-101', 1001), -- for removal, having anchor and data associated |
| 31 | (2003, 'SCHEMA-SET-003', 1002), |
niamhcore | 052b755 | 2021-09-17 10:30:56 +0100 | [diff] [blame^] | 32 | (2004, 'SCHEMA-SET-004', 1002), |
| 33 | (2005, 'SCHEMA-SET-005', 1001); |
Ruslan Kashapov | 7cca029 | 2020-11-24 11:13:43 +0200 | [diff] [blame] | 34 | |
niamhcore | d042222 | 2021-09-01 17:12:28 +0100 | [diff] [blame] | 35 | INSERT INTO YANG_RESOURCE (ID, NAME, CONTENT, CHECKSUM, MODULE_NAME, REVISION) VALUES |
| 36 | (3001, 'module1@2020-02-02.yang', 'CONTENT-001', 'e8bdda931099310de66532e08c3fafec391db29f55c81927b168f6aa8f81b73b',null,null), |
| 37 | (3002, 'module2@2020-02-02.yang', 'CONTENT-002', '7e7d48afbe066ed0a890a09081859046d3dde52300dfcdb13be5b20780353a11','MODULE-NAME-002','REVISION-002'), |
| 38 | (3003, 'module3@2020-02-02.yang', 'CONTENT-003', 'ca20c45fec8547633f05ff8905c48ffa7b02b94ec3ad4ed79922e6ba40779df3','MODULE-NAME-003','REVISION-002'), |
| 39 | (3004, 'module4@2020-02-02.yang', 'CONTENT-004', 'f6ed09d343562e4d4ae5140f3c6a55df9c53f6da8e30dda8cbd9eaf9cd449be0','MODULE-NAME-004','REVISION-004'), |
| 40 | (3100, 'orphan@2020-02-02.yang', 'ORPHAN', 'checksum',null,null), -- for auto-removal as orphan |
| 41 | (3005, 'module5@2020-02-02.yang', 'CONTENT-005', 'checksum-005','MODULE-NAME-005','REVISION-002'), |
| 42 | (3006, 'module6@2020-02-02.yang', 'CONTENT-006', 'checksum-006','MODULE-NAME-006','REVISION-006'); |
Ruslan Kashapov | 7cca029 | 2020-11-24 11:13:43 +0200 | [diff] [blame] | 43 | |
| 44 | INSERT INTO SCHEMA_SET_YANG_RESOURCES (SCHEMA_SET_ID, YANG_RESOURCE_ID) VALUES |
Ruslan Kashapov | 6f25d3a | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 45 | (2001, 3001), (2001, 3002), |
niamhcore | 052b755 | 2021-09-17 10:30:56 +0100 | [diff] [blame^] | 46 | (2002, 3003), (2005, 3004), |
Ruslan Kashapov | 6f25d3a | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 47 | (2100, 3003), (2100, 3100), -- orphan removal case |
niamhcore | d042222 | 2021-09-01 17:12:28 +0100 | [diff] [blame] | 48 | (2101, 3003), (2101, 3004), |
| 49 | (2003, 3005), (2004, 3006); |
Ruslan Kashapov | 6f25d3a | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 50 | |
| 51 | INSERT INTO ANCHOR (ID, NAME, DATASPACE_ID, SCHEMA_SET_ID) VALUES -- anchors for removal |
| 52 | (6001, 'ANCHOR1', 1001, 2101), |
niamhcore | 052b755 | 2021-09-17 10:30:56 +0100 | [diff] [blame^] | 53 | (6002, 'ANCHOR2', 1001, 2101), |
| 54 | (6003, 'ANCHOR3', 1001, 2005); |
Ruslan Kashapov | 6f25d3a | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 55 | |
| 56 | INSERT INTO FRAGMENT (ID, XPATH, ANCHOR_ID, DATASPACE_ID) VALUES |
niamhcore | d042222 | 2021-09-01 17:12:28 +0100 | [diff] [blame] | 57 | (7001, '/XPATH', 6001, 1001); |