/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2023 Nordix Foundation
+ * Copyright (C) 2023-2024 Nordix Foundation
* Modifications Copyright (C) 2022-2023 TechMahindra Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the 'License');
}
def setupBookstoreInfraStructure() {
- cpsAdminService.createDataspace(FUNCTIONAL_TEST_DATASPACE_1)
- cpsAdminService.createDataspace(FUNCTIONAL_TEST_DATASPACE_2)
- cpsAdminService.createDataspace(FUNCTIONAL_TEST_DATASPACE_3)
- def bookstoreYangModelAsString = readResourceDataFile('bookstore/bookstore.yang')
- cpsModuleService.createSchemaSet(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_SCHEMA_SET, [bookstore: bookstoreYangModelAsString])
- cpsModuleService.createSchemaSet(FUNCTIONAL_TEST_DATASPACE_2, BOOKSTORE_SCHEMA_SET, [bookstore: bookstoreYangModelAsString])
- cpsModuleService.createSchemaSet(FUNCTIONAL_TEST_DATASPACE_3, BOOKSTORE_SCHEMA_SET, [bookstore: bookstoreYangModelAsString])
-
+ cpsDataspaceService.createDataspace(FUNCTIONAL_TEST_DATASPACE_1)
+ cpsDataspaceService.createDataspace(FUNCTIONAL_TEST_DATASPACE_2)
+ cpsDataspaceService.createDataspace(FUNCTIONAL_TEST_DATASPACE_3)
+ createStandardBookStoreSchemaSet(FUNCTIONAL_TEST_DATASPACE_1)
+ createStandardBookStoreSchemaSet(FUNCTIONAL_TEST_DATASPACE_2)
+ createStandardBookStoreSchemaSet(FUNCTIONAL_TEST_DATASPACE_3)
}
def addBookstoreData() {
def restoreBookstoreDataAnchor(anchorNumber) {
def anchorName = 'bookstoreAnchor' + anchorNumber
- cpsAdminService.deleteAnchor(FUNCTIONAL_TEST_DATASPACE_1, anchorName)
- cpsAdminService.createAnchor(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_SCHEMA_SET, anchorName)
- cpsDataService.saveData(FUNCTIONAL_TEST_DATASPACE_1, anchorName, bookstoreJsonData.replace("Easons", "Easons-"+anchorNumber.toString()), OffsetDateTime.now())
+ cpsAnchorService.deleteAnchor(FUNCTIONAL_TEST_DATASPACE_1, anchorName)
+ cpsAnchorService.createAnchor(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_SCHEMA_SET, anchorName)
+ cpsDataService.saveData(FUNCTIONAL_TEST_DATASPACE_1, anchorName, bookstoreJsonData.replace('Easons', 'Easons-'+anchorNumber.toString()), OffsetDateTime.now())
}
}