NCD::CLI¶
NAME NCD::CLI¶
Module for the ncm-ncd CLI script
FUNCTIONS¶
app_options
Extend
CAF::Applicationoptions
setLockCCMConfig
Set
CACHEMGRattribute with EDG::WP4::CCM::CacheManager fromcacherootandCCM_CONFIGattribute with locked configuration withprofileID.Return SUCCESS on success, undef otherwise.
getCCMConfig
Return the CCM configuration instance from the
CCM_CONFIGatribute (set bysetLockCCMConfigmethod).
lock
Try to take the lock for the
ncm-ncdapplication. Lock instance is set inLOCKattribute.Return SUCCESS on success, undef otherwise.
finish
Release the lock (if this instance has it) and exit with
retexitcode.
_initialize
Initialize the
CAF::Application
check_noquattor
Handle the presence of the /etc/noquattor file. Exits, does not return anything.
check_options
Check for any conflicting options.
Exits on any conflict, does not return anything.
_report_state_simple
Create basic report for components from hashref
stateand configuration namecfgname.
_report_state_nagios
Create report in nagios check format for components from hashref
stateand configuration namecfgname.
report_state
Report the state of the components from
statedirinformat.
action
Take action: list, unconfigure or (default) configure.
Report the components with
listand exit. Otherwise return a hashref and the action name.Takes existing exception context as argument.
report_exit
Given the result of the
NCD::ComponentProxyListaction, report the succes and/or any errors and warnings andexitwith the appropriate exitcode.Takes a second argument
actionto create appropriate message.
main
The CLI main method