2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Samsung Electronics. All rights reserved.
6 * ================================================================================
8 * =============================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
22 * ============LICENSE_END=========================================================
25 package org.onap.ccsdk.sli.adaptors.saltstack;
27 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
28 import org.onap.ccsdk.sli.core.sli.SvcLogicException;
29 import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
34 * This interface defines the operations that the Saltstack adapter exposes.
36 public interface SaltstackAdapter extends SvcLogicJavaPlugin {
38 * Returns the symbolic name of the adapter
40 * @return The adapter name
42 String getAdapterName();
44 /* Method to post a single command request for execution on SaltState server
45 * The response from Saltstack comes in json format and it is automatically put
46 * to context for DGs access, with a certain prefix*/
47 void reqExecCommand(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException;
49 /* Method for execution of saltstack SLS command on SaltState server
50 * The response from Saltstack comes in json format and it is automatically put
51 * to context for DGs access, with a certain prefix*/
52 void reqExecSLS(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException;
54 /* When SLS file is created/available then this Method can be used to post
55 * the file to saltstack server and execute the SLS file on SaltState server
56 * The response from Saltstack comes in json format and it is automatically put
57 * to context for DGs access, with a certain prefix*/
58 void reqExecSLSFile(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException;