2  * ============LICENSE_START=======================================================
 
   4  * ================================================================================
 
   5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 
   6  * ================================================================================
 
   7  * Copyright (C) 2017 Amdocs
 
   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.
 
  21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
 
  22  * ============LICENSE_END=========================================================
 
  25 package org.onap.ccsdk.sli.adaptors.saltstack;
 
  28 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
 
  29 import org.onap.ccsdk.sli.core.sli.SvcLogicException;
 
  30 import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
 
  33  * 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     /* When SLS file is created/available then this Method can be used to post
 
  50      *  the file to saltstack server and execute the SLS file on SaltState server
 
  51      *  The response from Saltstack comes in json format and it is automatically put
 
  52      *  to context for DGs access, with a certain prefix*/
 
  53     void reqExecSLS(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException;
 
  55     /* Method to get log of a saltState execution request
 
  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 reqExecLog(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException;
 
  61      * Set the command execution timeout
 
  62      * @param timeout time in milliseconds
 
  64     void setExecTimeout(long timeout);