@ -5,25 +5,21 @@
# Source : gitea.ucarmesin.de
# ---------------------------------------------------------------------------------------------------------
"""
This abstract class Cl iFcts defines the interface for the execution of any command - line - functions .
This abstract class Ap iFcts defines the interface for the execution of any command - line - functions .
It uses the following configuration
. a ) COMP . conf - > artifact - > cl i- > [ system ] : for structural attributes of the operating - system \n
. c ) COMP . conf - > conn - > [ cl i] : for connection - attributes and structural attributes ,
. a ) COMP . conf - > artifact - > ap i- > [ system ] : for structural attributes of the operating - system \n
. c ) COMP . conf - > conn - > [ ap i] : for connection - attributes and structural attributes ,
maybe specialized for the operating - system
The attribute type resolves which technique is used , implemented in a specific tool - class :
* cmd , bash , powersh . . . for specific local operating - system
* ssh , hadoop . . . for specific remote operating - system
* nifi ,
The main tasks are : \n
.1 . executing the command - array - with attributes
* conn . ip , host , port , user , password , . . . for synchronous db - connection
* conn . root , . . . for path - definitions for file - implementations ( csv , )
"""
import basic . program
import utils . config_tool
class Cl iFcts( ) :
class Ap iFcts( ) :
"""
This interface defines each necessary connection to any kind of database .
The specific technique how to connect to the concrete DBMS has to be implemented in the specific tool .
@ -35,7 +31,17 @@ class CliFcts():
def setComp ( self , comp ) :
self . comp = comp
def execCommand ( self , comp , command ) :
def startCommand ( self , comp , args ) :
""" method to execute the statement
this method should only called by the class itself """
raise Exception ( " method is not implemented " )
def statusCommand ( self , comp , args ) :
""" method to execute the statement
this method should only called by the class itself """
raise Exception ( " method is not implemented " )
def stopCommand ( self , comp , args ) :
""" method to execute the statement
this method should only called by the class itself """
raise Exception ( " method is not implemented " )