class ActionAbapProfileValidation__params(QtModelMixin, Base, OperatorMixin, BaseMixin): """ Configuration for the profile validation : """ __tablename__ = pluginName+'__params' check = relationship(pluginName, back_populates="params") # TODO: Reenable when developing a restriction approach # restrictions = relationship(pluginName+'__params__restrictions') id = Column(Integer, ForeignKey('checks_metadata.id'), primary_key=True) param_set_name = Column(String, qt_label='Parameter Set Name', qt_description='Parameter Set Description') profiletype = Column(Integer, qt_label='Profile', choices=AbapProfileChoice.CHOICES, default=AbapProfileChoice.DEFAULT) parameter = Column(String, qt_label='Parameter', qt_description='Profile Parameter') expected=Column(String, qt_label='Expected') __qtmap__ = [param_set_name, parameter, profiletype, OperatorMixin.operator, expected]
class ActionAbapManualCheck__params(QtModelMixin, Base, BaseMixin, TableNameMixin): __tablename__ = plugin_name + '__params' __table_args__ = {'extend_existing': True} id = Column(Integer, primary_key=True) parent_id = Column(Integer, ForeignKey(plugin_name + '.id')) param_set_name = Column( String, nullable=False, qt_description= 'Name of the parameter set. It is easier to navigate a large list of parameter sets, if they have a descriptive name', qt_label='Parameter Set Name', qt_show=False, default='Please Maintain') description = Column( RichString, nullable=True, qt_description='Detailed description of the manual activity', qt_label='Manual Action', ) check = relationship("ActionAbapCountTableEntries", back_populates="params") __qtmap__ = [param_set_name, description]
class GenericSystemTreeNode(Base, QtModelMixin, BaseMixin): """ A generic node that is the foundation of the tree stored in a database table""" __tablename__ = 'systems' __table_args__ = {'extend_existing': True} id = Column(Integer, primary_key=True, qt_label='Primary Key') parent_id = Column(Integer, ForeignKey('systems.id'), qt_label='Parent Key') type = Column(String(50), qt_show=False, qt_label='Type') name = Column(String(50), qt_show=True, qt_label='Name') description = Column( RichString, nullable=True, qt_label='Description', qt_description='Brief description', ) children = relationship( 'GenericSystemTreeNode', cascade="all, delete-orphan", backref=backref("parent_node", remote_side=id), ) __mapper_args__ = { 'polymorphic_identity': 'GenericSystemTreeNode', 'polymorphic_on': type, } __qtmap__ = [name, description] def _dump(self, _indent=0) -> str: """ Recursively return the structure of the node and all its children as text """ return " " * _indent + repr(self) + \ "\n" + \ "".join([ c._dump(_indent + 1) for c in self.children ]) def _system_node(self): return None def logon_info(self): """ Provide the Logon Information to the system Reimplement this method for all relevant system nodes """ return None
class ActionAbapJobSchedulingValidation(Check, ActionAbapIsNotClientSpecificMixin): __tablename__ = pluginName id = Column(Integer, ForeignKey('checks_metadata.id'), primary_key=True) params = relationship(pluginName+'__params', cascade="all, delete-orphan") __mapper_args__ = { 'polymorphic_identity':pluginName, } __qtmap__ = [Check.name, Check.description, Check.failcriteria, Check.criticality]
class ActionAbapCountTableEntries__params(QtModelMixin, Base, OperatorMixin, BaseMixin, TableNameMixin): __table_args__ = {'extend_existing': True} id = Column(Integer, primary_key=True) parent_id = Column(Integer, ForeignKey('ActionAbapCountTableEntries.id')) param_set_name = Column( String, nullable=False, qt_description= 'Name of the parameter set. It is easier to navigate a large list of parameter sets, if they have a descriptive name', qt_label='Parameter Set Name', qt_show=False, default='Please Maintain') table_name = Column(String, nullable=False, qt_description='Table Name', qt_label='Table Name', qt_show=False, default='Please Maintain') table_fields = Column(String, nullable=True, qt_description='Table Fields, separated by a ";"', qt_label='Table Fields', qt_show=False) where_clause = Column(String, nullable=True, qt_description='Where Clause', qt_label='Where Clause', qt_show=False) expected_count = Column( Integer, nullable=True, qt_description='Expected Count', qt_label='Expected Count', qt_show=False, ) check = relationship("ActionAbapCountTableEntries", back_populates="params") __qtmap__ = [ param_set_name, table_name, table_fields, where_clause, expected_count, OperatorMixin.operator ]
class CheckTreeStructure(QtModelMixin, Base, BaseMixin, TableNameMixin): __tablename__ = 'checks_metadata' __table_args__ = (UniqueConstraint("type", "name"), { 'extend_existing': True }) id = Column(Integer, primary_key=True, qt_show=False) parent_id = Column(Integer, ForeignKey('checks_metadata.id'), qt_label='Parent Key', qt_show=False) name = Column(String(250), nullable=False, qt_label='Folder or Check Name', qt_description='Name of the check or folder', qt_show=True) description = Column( RichString, nullable=True, qt_label='Check Description', qt_description='Brief description what the check does', ) children = relationship( 'CheckTreeStructure', cascade="all, delete-orphan", backref=backref("parent_node", remote_side=id), ) type = Column( String(250), nullable=False, qt_label='Node Type', qt_description='Node Type', ) __qtmap__ = [name, description] __icon__ = ':Folder' __mapper_args__ = { 'polymorphic_identity': 'CheckFolder', 'polymorphic_on': type, }
class ActionAbapRsusr002(Check, ActionAbapIsClientSpecificMixin): __tablename__ = pluginName __table_args__ = {'extend_existing': True} id = Column(Integer, ForeignKey('checks_metadata.id'), primary_key=True) params = relationship(pluginName + '__params', cascade="all, delete-orphan") consolidation = Column( Integer, default=ActionAbapRsusr002ResultConsolidationChoice.INDIVIDUAL, qt_description='Merge so that only common results are presented', qt_label='Result Set Merge Strategy', choices=ActionAbapRsusr002ResultConsolidationChoice.CHOICES) __qtmap__ = [ Check.name, Check.description, Check.failcriteria, consolidation, Check.criticality ] __mapper_args__ = { 'polymorphic_identity': pluginName, }
class ActionAbapRsusr002__params(QtModelMixin, Base, BaseMixin): """ The config data for the RSUSR002 plugin. Possible Parameters of the Function Module: ok: IT_USER TYPE SUSR_T_RANGE_4_XUBNAME Benutzerliste ok: IT_GROUP TYPE SUSR_T_SEL_OPT_GROUP Benutzergruppeliste ok: IT_UGROUP TYPE SUSR_T_SEL_OPT_GROUP Selektionsoptionen für Benutzergruppe ok: IT_UALIAS TYPE SUSR_T_SEL_OPT_ALIAS Selektionsoptionen für Alias ok: IT_UTYPE TYPE SUSR_T_SEL_OPT_UTYPE Selektionsoptionen für Benutzetyp ok: IT_SECPOL TYPE SUSR_T_SEL_OPT_SECPOL Selektionsoptionen für Sicherheitsrichtlinie ok: IT_SNC TYPE SUSR_T_SEL_OPT_SNC Selektionsoptionen für SNC ok: IV_USER_LOCK TYPE SUIM_LOCK_SEL Sperrestatus Y=gesperrt, N=nicht gesperrt, Space = irrelevant ok: IV_PWD_LOCK TYPE SUIM_LOCK_SEL Sperrestatus Y=gesperrt, N=nicht gesperrt, Space = irrelevant ok: IV_LOCK TYPE BOOLE_D Alle Benutzer mit Administrator- oder Kennwortspe: TRUE (='X') und FALSE (=' ') ok: IV_UNLOCK TYPE BOOLE_D Nur Benutzer ohne Sperren: TRUE (='X') und FALSE (=' ') ok: IV_FDATE TYPE CDDATUM Ablauf Gültigkeit von ok: IV_TDATE TYPE CDDATUM Ablauf Gültigkeit bis later: IT_LIC_TYPE TYPE SUSR_T_SEL_OPT_LIC_TYPE Selektionsoptionen für Lizenztypen later: IT_ACCNT TYPE SUSR_T_SEL_OPT_ACCNT Selektionsoptionen für Account-Id later: IT_KOSTL TYPE SUSR_T_SEL_OPT_KOSTL Selektionsoptionen für Kostenstelle later: IT_STCOD TYPE SUSR_T_SEL_OPT_STCOD Selektionsoptionen für Startmenü later: IT_LANGU TYPE SUSR_T_SEL_OPT_LANGU Selektionsoptionen für Sprache later: IV_DCPFM TYPE SUSR_T_SEL_OPT_DCPFM Dezimaldarstellung later: IV_DATFM TYPE SUSR_T_SEL_OPT_DATFM Datumsdarstellung later: IV_TIMEFM TYPE SUSR_T_SEL_OPT_TIMEFM Zeitformat (12-/24-Stundenangabe) later: IT_SPLD TYPE SUSR_T_SEL_OPT_SPLD Selektionsoptionen für Gerätenamen later: IV_TZONE TYPE TZNZONE Zeitzone later: IV_CATTK TYPE BOOLE_D Datenelement zur Domäne BOOLE: TRUE (='X') und FALSE (=' ') later: IT_PARID TYPE SUSR_T_SEL_OPT_PARID Selektionsoptionen für Set-/Get-Paramter-Id ok: IV_TCODE TYPE TCODE Transaktionscode ok: IV_START_TX TYPE BOOLE_D nur ausführbare Transaktion ok: IT_UREF TYPE SUSR_T_SEL_OPT_REF Selektionsoptionen für Referenzbenutzer ok: IT_ACTGRPS TYPE SUSR_T_SEL_OPT_AGR Selektionsoptionen für Rolle ok: IT_PROF1 TYPE SUSR_T_SEL_OPT_PROF Selektionsoptionen für Profile ok: IV_PROF2 TYPE XUPROFNAME Berechtigungsprofil in Benutzerstammpflege ok: IV_PROF3 TYPE XUPROFNAME Berechtigungsprofil in Benutzerstammpflege ok: IV_CONV1 TYPE BOOLE_D Datenelement zur Domäne BOOLE: TRUE (='X') und FALSE (=' ') ok: IV_AUTH_FLD TYPE FIELDNAME Feldname ok: IV_AUTH_VAL TYPE XUVAL Berechtigungswert ok: IT_OBJCT TYPE SUSR_T_SEL_OPT_OBJECT Selektionsoptionen für Berechtigungsobjekte ok: IT_AUTH TYPE SUSR_T_SEL_OPT_AUTH Selektionsoptionen für Berechtigungen ok: IV_CONV TYPE BOOLE_D Datenelement zur Domäne BOOLE: TRUE (='X') und FALSE (=' ') ok: IT_VALUES TYPE SUSR_T_SEL_OPT_VAL Übergabestruk. für Abgrenzungen bei Sel. nach Berecht.werten """ __tablename__ = pluginName + '__params' __table_args__ = {'extend_existing': True} check = relationship(pluginName, back_populates="params") id = Column(Integer, ForeignKey('checks_metadata.id'), primary_key=True) param_set_name = Column(String, qt_label='Parameter Set Name', qt_description='Parameter Set Description') IT_USER = qtRelationship(pluginName + '__IT_USER', qt_label='User', cascade="all, delete-orphan") IT_GROUP = qtRelationship(pluginName + '__IT_GROUP', qt_label='Group for Authorization', cascade="all, delete-orphan") IT_UGROUP = qtRelationship(pluginName + '__IT_UGROUP', qt_label='User group (general)', cascade="all, delete-orphan") IT_UALIAS = qtRelationship(pluginName + '__IT_UALIAS', qt_label='Alias', cascade="all, delete-orphan") IT_UTYPE = qtRelationship(pluginName + '__IT_UTYPE', qt_label='User Type', cascade="all, delete-orphan") IT_SECPOL = qtRelationship(pluginName + '__IT_SECPOL', qt_label='Security Policy', cascade="all, delete-orphan") IT_SNC = qtRelationship(pluginName + '__IT_SNC', qt_label='SNC Name', cascade="all, delete-orphan") IV_USER_LOCK = Column(String, nullable=False, default=ActionAbapSuimLockStatusChoice.IGNORE, qt_label='Administrator Lock', qt_description='Administrator Lock Status', choices=ActionAbapSuimLockStatusChoice.CHOICES) IV_PWD_LOCK = Column(String, nullable=False, default=ActionAbapSuimLockStatusChoice.IGNORE, qt_label='Invalid Password Locks', qt_description='Invalid Password Locks', choices=ActionAbapSuimLockStatusChoice.CHOICES) IV_LOCK = Column( Boolean, default=False, qt_label='All Users with Admin and Password Locks', qt_description='All Users with Admin and Password Locks', ) IV_UNLOCK = Column( Boolean, default=True, qt_label='Only Unlocked Users', qt_description='Only Unlocked Users', ) IV_FDATE = Column( String, qt_label='Valid From Date', qt_description='Valid From Date', ) IV_TDATE = Column( String, qt_label='Valid To Date', qt_description='Valid To Date', ) IV_TCODE = Column( String(20), default='', qt_label='Transaction Code', qt_description='Transaction Code', ) IV_START_TX = Column( Boolean, default=True, qt_label='Only Executable Transactions', qt_description='Only Executable Transactions', ) IT_UREF = qtRelationship(pluginName + '__IT_UREF', qt_label='Reference User', cascade="all, delete-orphan") IT_ACTGRPS = qtRelationship(pluginName + '__IT_ACTGRPS', qt_label='Role', cascade="all, delete-orphan") IT_PROF1 = qtRelationship(pluginName + '__IT_PROF1', qt_label='Profile Name', cascade="all, delete-orphan") IV_PROF2 = Column( String(12), nullable=True, qt_label='AND Profile', qt_description='Additional Authorization Profile Name', ) IV_PROF3 = Column( String(12), nullable=True, qt_label='AND Profile', qt_description='Authorization Profile Name', ) IV_CONV1 = Column( Boolean, default=False, qt_label='Always Convert Value', qt_description='Always Convert Value', ) IV_AUTH_FLD = Column( String(12), nullable=True, qt_label='Authorization Field', qt_description='Authorization Field', ) IV_AUTH_VAL = Column( String(12), nullable=True, qt_label='Authorization Value', qt_description='Authorization Value', ) IT_OBJCT = qtRelationship(pluginName + '__IT_OBJCT', qt_label='Authorization Object', cascade="all, delete-orphan") IT_AUTH = qtRelationship(pluginName + '__IT_AUTH', qt_label='Authorization', cascade="all, delete-orphan") IV_CONV = Column( Boolean, default=False, qt_label='Always Convert Value', qt_description='Always Convert Value', ) IT_VALUES = qtRelationship(pluginName + '__IT_VALUES') __qtmap__ = [ param_set_name, IV_PWD_LOCK, IV_TCODE, IT_USER, IT_GROUP, IT_UGROUP ]
class ActionAbapJobSchedulingValidation__params(QtModelMixin, Base, OperatorMixin, BaseMixin): """ Job Scheduling Validation: """ __tablename__ = pluginName+'__params' check = relationship(pluginName, back_populates="params") id = Column(Integer, ForeignKey('checks_metadata.id'), primary_key=True) param_set_name = Column(String, qt_label='Parameter Set Name', qt_description='Parameter Set Description') expected_count = Column(Integer, qt_label='Expected Executions') operator = Column(String, qt_label='Comparison Operator', choices=ActionAbapJobSchedulingValidationComparisonOperator.CHOICES, default=ActionAbapJobSchedulingValidationComparisonOperator.LE) interval = Column(Integer, qt_label='Interval', qt_description='Interval, for example 3 for 3 hours') interval_type=Column(String, qt_label='Interval Type', qt_description='Interval Type', choices=ActionAbapJobSchedulingValidationIntervalType.CHOICES, default=ActionAbapJobSchedulingValidationIntervalType.HOUR) #executionclient = Column(String, qt_label='Client', qt_description='Client') abapname = Column(String, qt_label='ABAP Program Name', qt_description='Name of the ABAP Program') sel_jobname = Column(String, qt_label='Job Name', qt_description='Name of the Job') sel_jobcount = Column(String, qt_label='Job Count', qt_description='Internal Number of the job') sel_jobgroup = Column(String, qt_label='Job Group', qt_description='Job Group') sel_username = Column(String, qt_label='Username', qt_description='Job Scheduler') sel_from_date = Column(Date, qt_label='From Date', qt_description='From Date') sel_from_time = Column(Time, qt_label='From Time', qt_description='From Time') sel_to_date = Column(Date, qt_label='To Date', qt_description='To Date') sel_to_time = Column(Time, qt_label='To Time', qt_description='To Time') sel_no_date = Column(Boolean, qt_label='Without Date', qt_description='No Date', choices=models.meta.YesNoChoice.CHOICES) sel_with_pred = Column(Boolean, qt_label='With Predecessor', qt_description='With Predecessor', choices=models.meta.YesNoChoice.CHOICES) sel_eventid = Column(String, qt_label='Event ID', qt_description='Event ID') sel_eventpara = Column(String, qt_label='Event Parameter', qt_description='Event Parameter') sel_prelim = Column(Boolean, qt_label='Status Preliminary', qt_description='Status Preliminary', choices=models.meta.YesNoChoice.CHOICES) sel_schedul= Column(Boolean, qt_label='Status Scheduled', qt_description='Status Scheduled', choices=models.meta.YesNoChoice.CHOICES) sel_ready = Column(Boolean, qt_label='Status Ready', qt_description='Status Ready', choices=models.meta.YesNoChoice.CHOICES) sel_running = Column(Boolean, qt_label='Status Running', qt_description='Status Running', choices=models.meta.YesNoChoice.CHOICES) sel_finished = Column(Boolean, qt_label='Status Finished', qt_description='Status Finished', choices=models.meta.YesNoChoice.CHOICES) sel_aborted = Column(Boolean, qt_label='Status Aborted', qt_description='Status Aborted', choices=models.meta.YesNoChoice.CHOICES) #TODO: At some point, add the selection options for dates and time __qtmap__ = [param_set_name, expected_count, operator, interval, interval_type, abapname, sel_jobname, sel_jobcount, sel_jobgroup, sel_username, sel_with_pred, sel_eventid, sel_prelim, sel_schedul, sel_ready, sel_running, sel_finished, sel_aborted]