saltstack adaptor reqExecLog API cleanup
[ccsdk/sli/adaptors.git] / saltstack-adapter / saltstack-adapter-provider / src / main / java / org / onap / ccsdk / sli / adaptors / saltstack / impl / ConnectionBuilder.java
index 3469103..bd811ff 100644 (file)
@@ -47,7 +47,6 @@ import java.io.StringWriter;
  * - return default sshclient (which only trusts known CAs from default cacerts file for process) this is the default
  * option
  **/
-//TODO: This class is to be altered completely based on the SALTSTACK server communication.
 public class ConnectionBuilder {
 
     private static final EELFLogger logger = EELFManager.getInstance().getLogger(ConnectionBuilder.class);
@@ -186,65 +185,4 @@ public class ConnectionBuilder {
         }
         return result;
     }
-
-    /**
-     * 1. Connect to SSH server.
-     * 2. Exec remote command over SSH. Return command execution status.
-     * Command output is written to out or err stream.
-     *
-     * @param commands   list of commands to execute
-     * @param payloadSLS has the SLS file location that is to be sent to server
-     * @param retryDelay delay between retry to make a SSH connection.
-     * @param retryCount number of count retry to make a SSH connection.
-     * @return command execution status
-     */
-    public SaltstackResult connectNExecuteSLS(String commands, String payloadSLS, int retryDelay, int retryCount) {
-
-        SaltstackResult result = new SaltstackResult();
-        try {
-            //TODO: to implement SSH connected client to Saltstack Server
-        } catch (Exception io) {
-            logger.error("Caught Exception", io);
-            result.setStatusCode(SaltstackResultCodes.IO_EXCEPTION.getValue());
-            result.setStatusMessage(io.getMessage());
-        }
-        return result;
-    }
-
-    /**
-     * Disconnect from SSH server.
-     */
-    public SaltstackResult disConnect() {
-
-        SaltstackResult result = new SaltstackResult();
-        try {
-            //TODO: to implement SSH connected client to Saltstack Server
-        } catch (Exception io) {
-            logger.error("Caught Exception", io);
-            result.setStatusCode(SaltstackResultCodes.IO_EXCEPTION.getValue());
-            result.setStatusMessage(io.getMessage());
-        }
-        return result;
-    }
-
-    /**
-     * Exec remote command over SSH. Return command execution status.
-     * Command output is written to out or err stream.
-     *
-     * @param cmd command to execute
-     * @return command execution status
-     */
-    public SaltstackResult connectNExecuteLog(String cmd) {
-
-        SaltstackResult result = new SaltstackResult();
-
-        try {
-            //TODO: to implement SSH command execute
-        } catch (Exception io) {
-            result.setStatusCode(SaltstackResultCodes.IO_EXCEPTION.getValue());
-            result.setStatusMessage(io.getMessage());
-            logger.error("Caught IOException", io);
-        }
-        return result;
-    }
 }