From 7b083fab886bf9a9cbf7f2bd0ad3392ac5c0437c Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 1 Mar 2010 17:37:50 +0000 Subject: [PATCH] add auditlog table git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5325 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Schema.pm | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 23f9ec876..2ccfc60eb 100644 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -780,6 +780,29 @@ eventlog => { disable => "Set to 'yes' or '1' to comment out this row.", }, }, + +auditlog => { + cols => [qw(recid audittime userid clientname clienttype command noderange args status comments disable)], + keys => [qw(recid)], + types => { + recid => 'INTEGER AUTO_INCREMENT', + }, + table_desc => ' Audit Data log.', + descriptions => { + recid => 'The record id.', + audittime => 'The timestamp for the audit entry.', + userid => 'The user running the command.', + clientname => 'The client machine, where the command originated.', + clienttype => 'Type of command: cli, Java, Web.', + command => 'Command executed.', + noderange => 'The noderange on which the command was run.', + args => 'The command argument list.', + status => 'Allowed or Denied.', + comments => 'Any user-provided notes.', + disable => "Set to 'yes' or '1' to comment out this row.", + }, +}, + prescripts => { cols => [qw(node begin end comments disable)], keys => [qw(node)], @@ -888,6 +911,7 @@ foreach my $tabname (keys(%xCAT::ExtTab::ext_tabspec)) { monitoring => { attrs => [], attrhash => {}, objkey => 'name' }, notification => { attrs => [], attrhash => {}, objkey => 'filename' }, eventlog => { attrs => [], attrhash => {}, objkey => 'recid' }, + auditlog => { attrs => [], attrhash => {}, objkey => 'recid' }, boottarget => { attrs => [], attrhash => {}, objkey => 'bprofile' }, ); @@ -1991,6 +2015,54 @@ push(@{$defspec{group}->{'attrs'}}, @nodeattrs); +@{$defspec{auditlog}->{'attrs'}} = ( + {attr_name => 'recid', + tabentry => 'auditlog.recid', + access_tabentry => 'auditlog.recid=attr:recid', + }, + {attr_name => 'audittime', + tabentry => 'auditlog.audittime', + access_tabentry => 'auditlog.recid=attr:recid', + }, + {attr_name => 'userid', + tabentry => 'auditlog.userid', + access_tabentry => 'auditlog.recid=attr:recid', + }, + {attr_name => 'clientname', + tabentry => 'auditlog.clientname', + access_tabentry => 'auditlog.recid=attr:recid', + }, + {attr_name => 'clienttype', + tabentry => 'auditlog.clienttype', + access_tabentry => 'auditlog.recid=attr:recid', + }, + {attr_name => 'command', + tabentry => 'auditlog.command', + access_tabentry => 'auditlog.recid=attr:recid', + }, + {attr_name => 'noderange', + tabentry => 'auditlog.noderange', + access_tabentry => 'auditlog.recid=attr:recid', + }, + {attr_name => 'args', + tabentry => 'auditlog.args', + access_tabentry => 'auditlog.recid=attr:recid', + }, + {attr_name => 'status', + tabentry => 'auditlog.status', + access_tabentry => 'auditlog.recid=attr:recid', + }, + {attr_name => 'comments', + tabentry => 'auditlog.comments', + access_tabentry => 'auditlog.recid=attr:recid', + }, + {attr_name => 'disable', + tabentry => 'auditlog.disable', + access_tabentry => 'auditlog.recid=attr:recid', + }, +); + + ###################################################