#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------------------------------------------- # Author : Ulrich Carmesin # Source : gitea.ucarmesin.de # --------------------------------------------------------------------------------------------------------- """ This abstract class ApiFcts defines the interface for the execution of any command-line-functions. It uses the following configuration .a) COMP.conf->artifact->api->[system] : for structural attributes of the operating-system \n .c) COMP.conf->conn->[api] : 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: * nifi, The main tasks are: \n """ import basic.program import utils.config_tool class ApiFcts(): """ 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. """ def __init__(self): self.comp = None pass def reset_TData(self, job): pass def setComp(self, comp): self.comp = comp def startCommand(self, comp, args): """ method to execute the statement this method should only called by the class itself """ raise Exception(B.EXCEPT_NOT_IMPLEMENT) def statusCommand(self, comp, args): """ method to execute the statement this method should only called by the class itself """ raise Exception(B.EXCEPT_NOT_IMPLEMENT) def stopCommand(self, comp, args): """ method to execute the statement this method should only called by the class itself """ raise Exception(B.EXCEPT_NOT_IMPLEMENT)