blob: adfcfa172ed80dbbc55360ebee75728ae9d38a08 [file] [log] [blame]
ToineSiebelinkf0527c52021-07-06 13:03:03 +01001/*
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 Kashapov7cca0292020-11-24 11:13:43 +020023INSERT INTO DATASPACE (ID, NAME) VALUES
24 (1001, 'DATASPACE-001'), (1002, 'DATASPACE-002');
25
26INSERT INTO SCHEMA_SET (ID, NAME, DATASPACE_ID) VALUES
Ruslan Kashapov6f25d3a2021-01-11 15:34:10 +020027 (2001, 'SCHEMA-SET-001', 1001), (2002, 'SCHEMA-SET-002', 1001),
28 (2100, 'SCHEMA-SET-100', 1001), -- for removal, not referenced by anchors
29 (2101, 'SCHEMA-SET-101', 1001); -- for removal, having anchor and data associated
Ruslan Kashapov7cca0292020-11-24 11:13:43 +020030
Ruslan Kashapov4ab9d0e2020-12-10 10:49:59 +020031INSERT INTO YANG_RESOURCE (ID, NAME, CONTENT, CHECKSUM) VALUES
puthuparambil.aditya2555da92021-03-10 11:55:33 +000032 (3001, 'module1@2020-02-02.yang', 'CONTENT-001', 'e8bdda931099310de66532e08c3fafec391db29f55c81927b168f6aa8f81b73b'),
33 (3002, 'module2@2020-02-02.yang', 'CONTENT-002', '7e7d48afbe066ed0a890a09081859046d3dde52300dfcdb13be5b20780353a11'),
34 (3003, 'module3@2020-02-02.yang', 'CONTENT-003', 'ca20c45fec8547633f05ff8905c48ffa7b02b94ec3ad4ed79922e6ba40779df3'),
35 (3004, 'module4@2020-02-02.yang', 'CONTENT-004', 'f6ed09d343562e4d4ae5140f3c6a55df9c53f6da8e30dda8cbd9eaf9cd449be0'),
Ruslan Kashapov6f25d3a2021-01-11 15:34:10 +020036 (3100, 'orphan@2020-02-02.yang', 'ORPHAN', 'checksum'); -- for auto-removal as orphan
Ruslan Kashapov7cca0292020-11-24 11:13:43 +020037
38INSERT INTO SCHEMA_SET_YANG_RESOURCES (SCHEMA_SET_ID, YANG_RESOURCE_ID) VALUES
Ruslan Kashapov6f25d3a2021-01-11 15:34:10 +020039 (2001, 3001), (2001, 3002),
40 (2002, 3003), (2002, 3004),
41 (2100, 3003), (2100, 3100), -- orphan removal case
42 (2101, 3003), (2101, 3004);
43
44INSERT INTO ANCHOR (ID, NAME, DATASPACE_ID, SCHEMA_SET_ID) VALUES -- anchors for removal
45 (6001, 'ANCHOR1', 1001, 2101),
46 (6002, 'ANCHOR2', 1001, 2101);
47
48INSERT INTO FRAGMENT (ID, XPATH, ANCHOR_ID, DATASPACE_ID) VALUES
49 (7001, '/XPATH', 6001, 1001);