2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2021 highstreet technologies GmbH
4 * Modifications Copyright (C) 2021-2022 Nordix Foundation
5 * Modifications Copyright (C) 2021 Pantheon.tech
6 * Modifications Copyright (C) 2022 Bell Canada
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
20 * SPDX-License-Identifier: Apache-2.0
21 * ============LICENSE_END=========================================================
24 package org.onap.cps.ncmp.api;
26 import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum;
28 import java.util.Collection;
29 import org.onap.cps.ncmp.api.models.DmiPluginRegistration;
30 import org.onap.cps.ncmp.api.models.DmiPluginRegistrationResponse;
31 import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle;
32 import org.onap.cps.spi.model.ModuleReference;
35 * Datastore interface for handling CPS data.
37 public interface NetworkCmProxyDataService {
40 * Registration of New CM Handles.
42 * @param dmiPluginRegistration Dmi Plugin Registration
43 * @return dmiPluginRegistrationResponse
45 DmiPluginRegistrationResponse updateDmiRegistrationAndSyncModule(DmiPluginRegistration dmiPluginRegistration);
48 * Get resource data for data store pass-through operational
51 * @param cmHandleId cm handle identifier
52 * @param resourceIdentifier resource identifier
53 * @param optionsParamInQuery options query
54 * @param topicParamInQuery topic name for (triggering) async responses
55 * @return {@code Object} resource data
57 Object getResourceDataOperationalForCmHandle(String cmHandleId,
58 String resourceIdentifier,
59 String optionsParamInQuery,
60 String topicParamInQuery);
63 * Get resource data for data store pass-through running
66 * @param cmHandleId cm handle identifier
67 * @param resourceIdentifier resource identifier
68 * @param optionsParamInQuery options query
69 * @param topicParamInQuery topic query
70 * @return {@code Object} resource data
72 Object getResourceDataPassThroughRunningForCmHandle(String cmHandleId,
73 String resourceIdentifier,
74 String optionsParamInQuery,
75 String topicParamInQuery);
78 * Write resource data for data store pass-through running
79 * using dmi for given cm-handle.
80 * @param cmHandleId cm handle identifier
81 * @param resourceIdentifier resource identifier
82 * @param operation required operation
83 * @param requestBody request body to create resource
84 * @param contentType content type in body
85 * @return {@code Object} return data
87 Object writeResourceDataPassThroughRunningForCmHandle(String cmHandleId,
88 String resourceIdentifier,
89 OperationEnum operation,
94 * Retrieve module references for the given cm handle.
96 * @param cmHandleId cm handle identifier
97 * @return a collection of modules names and revisions
99 Collection<ModuleReference> getYangResourcesModuleReferences(String cmHandleId);
102 * Query cm handle identifiers for the given collection of module names.
104 * @param moduleNames module names.
105 * @return a collection of cm handle identifiers. The schema set for each cm handle must include all the
108 Collection<String> executeCmHandleHasAllModulesSearch(Collection<String> moduleNames);
111 * Query cm handle details by cm handle's name.
113 * @param cmHandleId cm handle identifier
114 * @return a collection of cm handle details.
116 NcmpServiceCmHandle getNcmpServiceCmHandle(String cmHandleId);