Changeset 2260


Ignore:
Timestamp:
06/05/19 20:20:19 (5 years ago)
Author:
nanardon
Message:

Allow to set in config monitored attributes

Location:
trunk/LATMOS-Accounts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts.pm

    r2243 r2260  
    156156        map { $_ => ($self->val('_defattr_', $_)) } 
    157157        $self->Parameters('_defattr_'); 
     158 
     159    $params{monitored} = {}; 
     160    foreach my $item ($self->val($section, 'monitored')) { 
     161        $params{monitored}{lc($item)} = 1; 
     162    } 
    158163 
    159164    my $base = LATMOS::Accounts::Bases->new( 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Attributes.pm

    r2175 r2260  
    3737        $attributes->{_name} = $attributes->{name}; 
    3838        $attributes->{_otype} = $otype; 
     39        $attributes->{monitored} ||= $base->config('monitored')->{ lc( $otype . '.' . $attributes->{name} ) }; 
     40 
    3941        return bless($attributes, $class); 
    4042    } else { 
     
    4547        $attr_info->{_name} = $attributes; 
    4648        $attr_info->{_otype} = $otype; 
     49        $attr_info->{monitored} ||= $base->config('monitored')->{ lc( $otype . '.' . $attributes ) }; 
    4750 
    4851        return bless($attr_info, $class); 
  • trunk/LATMOS-Accounts/man/man8/latmos-accounts-base-sql.pod

    r2189 r2260  
    2828Don't compute dynamic attribute at commit but let syncManager do it 
    2929asynchronously. 
     30 
     31=head2 monitored 
     32 
     33Allow to specify monitored attributes. Monitored attributes will have their 
     34value logued when changed. 
     35 
     36Can be specified multiple times: 
     37 
     38    monitored=user.loginShell 
     39    monitored=nethost.ip 
    3040 
    3141=head1 FEATURES 
Note: See TracChangeset for help on using the changeset viewer.