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;
31 import org.onap.cps.ncmp.api.inventory.CompositeState;
32 import org.onap.cps.ncmp.api.models.CmHandleQueryApiParameters;
33 import org.onap.cps.ncmp.api.models.DmiPluginRegistration;
34 import org.onap.cps.ncmp.api.models.DmiPluginRegistrationResponse;
35 import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle;
36 import org.onap.cps.spi.model.ModuleReference;
39 * Datastore interface for handling CPS data.
41 public interface NetworkCmProxyDataService {
44 * Registration of New CM Handles.
46 * @param dmiPluginRegistration Dmi Plugin Registration
47 * @return dmiPluginRegistrationResponse
49 DmiPluginRegistrationResponse updateDmiRegistrationAndSyncModule(DmiPluginRegistration dmiPluginRegistration);
52 * Get resource data for data store pass-through operational
55 * @param cmHandleId cm handle identifier
56 * @param resourceIdentifier resource identifier
57 * @param optionsParamInQuery options query
58 * @param topicParamInQuery topic name for (triggering) async responses
59 * @param requestId unique requestId for async request
60 * @return {@code Object} resource data
62 Object getResourceDataOperationalForCmHandle(String cmHandleId,
63 String resourceIdentifier,
64 String optionsParamInQuery,
65 String topicParamInQuery,
69 * Get resource data for data store pass-through running
72 * @param cmHandleId cm handle identifier
73 * @param resourceIdentifier resource identifier
74 * @param optionsParamInQuery options query
75 * @param topicParamInQuery topic name for (triggering) async responses
76 * @param requestId unique requestId for async request
77 * @return {@code Object} resource data
79 Object getResourceDataPassThroughRunningForCmHandle(String cmHandleId,
80 String resourceIdentifier,
81 String optionsParamInQuery,
82 String topicParamInQuery,
86 * Write resource data for data store pass-through running
87 * using dmi for given cm-handle.
88 * @param cmHandleId cm handle identifier
89 * @param resourceIdentifier resource identifier
90 * @param operation required operation
91 * @param requestBody request body to create resource
92 * @param contentType content type in body
93 * @return {@code Object} return data
95 Object writeResourceDataPassThroughRunningForCmHandle(String cmHandleId,
96 String resourceIdentifier,
97 OperationEnum operation,
102 * Retrieve module references for the given cm handle.
104 * @param cmHandleId cm handle identifier
105 * @return a collection of modules names and revisions
107 Collection<ModuleReference> getYangResourcesModuleReferences(String cmHandleId);
110 * Query cm handle details by cm handle's name.
112 * @param cmHandleId cm handle identifier
113 * @return a collection of cm handle details.
115 NcmpServiceCmHandle getNcmpServiceCmHandle(String cmHandleId);
118 * Get cm handle public properties by cm handle id.
120 * @param cmHandleId cm handle identifier
121 * @return a collection of cm handle public properties.
123 Map<String, String> getCmHandlePublicProperties(String cmHandleId);
126 * Get cm handle composite state by cm handle id.
128 * @param cmHandleId cm handle identifier
129 * @return a cm handle composite state
131 CompositeState getCmHandleCompositeState(String cmHandleId);
134 * Query and return cm handles that match the given query parameters.
136 * @param cmHandleQueryApiParameters the cm handle query parameters
137 * @return collection of cm handles
139 Set<NcmpServiceCmHandle> executeCmHandleSearch(CmHandleQueryApiParameters cmHandleQueryApiParameters);
142 * Query and return cm handle ids that match the given query parameters.
144 * @param cmHandleQueryApiParameters the cm handle query parameters
145 * @return collection of cm handle ids
147 Set<String> executeCmHandleIdSearch(CmHandleQueryApiParameters cmHandleQueryApiParameters);