summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* test: fix service testsRadek Novacek2013-10-311-1/+7
| | | | | | | | lmishell no longer automatically refresh the instance after calling some method on it. refresh() must be called manually. Also fix path to the failing.service file when running the test script directly.
* test: Don't test connection in the service providerRadek Novacek2013-10-311-30/+0
| | | | | | The test for creating socket and http connection get removed, because: * socket connection might not work on the buildbot * http(s) connection is tested in the service provider tests anyway
* Add lmi_get_computer_system function and fix lmi_get_system_nameRadek Novacek2013-10-3191-581/+477
| | | | | | | | | | | | | | PG_ComputerSystem has different method how to get hostname than our providers. In order to create the associations to this class we need to enumerate it. The downside is that all providers must supply CMPIContext to the lmi_init function. New function lmi_get_computer_system returns CMPIObjectPath to the configured CIM_ComputerSystem subclass instance. This object should be used in all references with ComputerSystem. Function lmi_get_system_name has been altered to return same value as ComputerSystem "Name" property.
* indmanager: Use proper mutex error checkingTomas Bzatek2013-10-301-2/+6
| | | | | | | | | | | Things are bit harsh in the indication manager when it comes to cancellation. At certain situation we force-cancel the polling thread, having no chance for cleanup. The mutex we use to protect memory shared between threads may be left in undefined state. The pthread_mutex_unlock() call in im_stop_ind() may be called on already unlocked mutex which, in default setup, causes a segfault. Setting a mutex attribute PTHREAD_MUTEX_ERRORCHECK will prevent this, returning proper error.
* journald: Tweak and cleanup the MOF fileTomas Bzatek2013-10-251-0/+1
| | | | | | | A bit of cleanup, adding "Implemented(true)" qualifiers where applicable, adding forgotten properties used by the provider and also added and modified description for the methods we implement. Note that only modified descriptions have been added, the unchanged ones get inherited just fine.
* python: bumped egg versions to 0.4.0Michal Minar2013-10-243-3/+3
|
* python: let's not hardcode version in setupsMichal Minar2013-10-2410-8/+98
| | | | | | Let's write openlmi version to the main __init__ module of each python egg at build time. This version information is easily accessible from setup scripts.
* tests: use shared base class in provider testsMichal Minar2013-10-2411-389/+54
| | | | Done for: Account, Journald and LogicalFile
* tests: added base class for our test casesMichal Minar2013-10-242-0/+467
| | | | | | | | import it in your tests with: from lmi.test.base import LmiTestCase For imports to work, run: export PYTHONPATH=${PROVIDERS_GIT_ROOT}/src/python before nosetests or before running them individually.
* pcp: fixed setupMichal Minar2013-10-242-0/+22
| | | | | Added missing 'lmi' package to packages. This fixes installation to user directory.
* minor test improvementsMichal Minar2013-10-2416-15/+27
|
* cmake: don't use hardcoded pathsRadek Novacek2013-10-231-1/+1
| | | | | | | Path to the qualifiers and jobs mofs was hardcoded, now it's a variable. There is now also a variable for openlmi-mof-register script - this fixes (un)register-Provider targets.
* service: fix service file locationJan Safranek2013-10-231-1/+1
| | | | The test is started with undeterministic current working directory.
* services: fix test_service_get_status_when_stoppped testJan Safranek2013-10-231-0/+1
| | | | The test must reload service status from CIMOM.
* services: disable test_service_with_null_nameJan Safranek2013-10-231-0/+1
| | | | It breaks Pegasus.
* service: fix test_service_race_conditionJan Safranek2013-10-231-1/+5
| | | | failing.service was removed twice without checking.
* service: fix test_restart_service_broker test, we must wait for the CIMOM to ↵Jan Safranek2013-10-231-3/+16
| | | | | | | | restart. The test expected that the CIMOM restarts atomically, which is not the case - there are few seconds of no CIM service and the test must wait until the CIMOM becomes online.
* Remove 'verify_server_cert=False' from test.Jan Safranek2013-10-221-3/+3
| | | | | We expect that test machines have correct https setup and certificates are distributed to the right places.
* Fixed sending of indications.Jan Safranek2013-10-221-2/+2
|
* Increase verbosity of logged exceptions.Jan Safranek2013-10-221-2/+2
| | | | There is too much noise in TRACE_VERBOSE and exception stack trace is more important than e.g. entering/leaving messages.
* Fix some compilation warnings and coverity issuesRadek Novacek2013-10-224-5/+7
|
* Rework documentation.Jan Safranek2013-10-1871-7306/+0
| | | | | | | | | | - Everything is in openlmi-providers/doc/admin directory. - 'make doc' automatically builds documentation of all enabled providers. - Documentation shares one 'conf.py' for sphinx. - All documentation uses the same directory structure. There is only one CMakefile.txt to generate all the docs.
* software: Fix doc theme pathTomas Bzatek2013-10-181-1/+1
| | | | A fallout from commit b60cd25e366d
* journald: Add documentationTomas Bzatek2013-10-186-0/+568
|
* journald: Rename common test module to prevent conflictTomas Bzatek2013-10-184-3/+3
| | | | When running nosetest over all tests, modules having same name are not re-imported.
* fan: added documentationMichal Minar2013-10-187-0/+690
|
* software: make the admin documentation the same wayMichal Minar2013-10-1813-6/+8
| | | | | | Let's not deviate from other providers by having '_build' directory. Also moved the sources to source directory - just like the other providers.
* software: decorate function correctlyMichal Minar2013-10-183-6/+8
| | | | | | | Preserve the attributes of function being wrapped when creating a wrapper in decorator. Also removed redundant logging.
* python: correctly create function wrappersMichal Minar2013-10-181-0/+2
| | | | | | Function wrappers should look like the functions being wrapped. Without the *wraps()* decorator, the resulting function would not have assigned doc string, would have wrong name etc.
* service: fix syntax error in tests (true -> True)Radek Novacek2013-10-171-1/+1
|
* software: Use LANG=C when calling yum repoinfoRadek Novacek2013-10-171-1/+1
| | | | | Big number are displayed as 12,345 which breaks the parsing, with LANG=C they're displayed as 12345 and parsed correctly.
* account: Fix invalid change from migration from Linux_ to PG_Radek Novacek2013-10-171-1/+1
|
* power: Disable debug print to stderrRadek Novacek2013-10-171-3/+0
|
* power: Fix InstanceIDs to follow OpenLMI standard schemeRadek Novacek2013-10-175-7/+21
|
* Use the same heading, theme and conditional class tree and reference for all ↵Jan Safranek2013-10-174-14/+24
| | | | providers.
* power: Fetch definition of Implemented qualifier to konkretcmpiRadek Novacek2013-10-171-0/+1
|
* power: Fix memory leakRadek Novacek2013-10-172-0/+2
|
* power: Replace fprintf with debug()Radek Novacek2013-10-171-4/+6
|
* power: Add documentation for power providerRadek Novacek2013-10-1711-0/+588
|
* Hardware: Created documentationPeter Schiffer2013-10-167-0/+725
|
* realmd: Fix documentation theme pathTomas Bzatek2013-10-151-1/+1
|
* documentation: extended configuration sectionMichal Minar2013-10-151-0/+4
|
* journald: Adapt to recent global logging changesTomas Bzatek2013-10-157-4/+35
|
* journald: Add tests for new records writingTomas Bzatek2013-10-151-0/+43
|
* journald: Support writing new recordsTomas Bzatek2013-10-153-1/+142
| | | | | | | | | | | | | | | | | | | This change adds ability to report new messages in the journal log. This is done by the LMI_JournalLogRecord.CreateInstance() method call taking only CreationClassName, LogCreationClassName, LogName and DataFormat key properties as mandatory, with no need to specify the MessageTimestamp and RecordID key properties. The returned instance will contain all the information with actual RecordID key property of the new record. As long as sd_journal_send() actually only queues the request, we need to watch for journal changes in order to find the new record. This is quite unfortunate as the daemon could be busy and we can't wait forever. Messages are available immediately usually, a timeout is set to 5 seconds for the moment. Record matching is done by comparing the message itself, the origin function name and PID. This brings sufficient amount of confidence though more sophisticated approach may be needed in future to ensure full uniqueness.
* journald: Update tests to match modified message formatTomas Bzatek2013-10-151-1/+1
| | | | | The commit c7777bfa1b1114fd9d changed format of the message we expose to include process name and PID so let's update our tests accordingly.
* journald: Add iterator testsTomas Bzatek2013-10-153-1/+188
| | | | | | | Tests basic iterator operations, assumes accessible journal and several (> 10) records available. Also comes with a simple example script for downloading complete journal.
* journald: Add support for iteratorsTomas Bzatek2013-10-153-13/+462
| | | | | | | | | | | | | | | | | | | | | | | | | This implements CIM_MessageLog iterator functionality according to the model. The only limitation, or, let's say shortcoming, is a free-form output data format from the GetRecord call. Currently we feed the uint8 array with UTF-8 chars and it's up to the client to deal with it (as suggested in the model). This may be subject to change. Many methods are returning modified iterator that has been passed in and that allows having persistent iterators. As long as CIMOMs may destroy the instances and unload providers on inactivity, any particular delay would cause loss of the iterator. The iterator string contains journal cursor string, uniquely identifying a record. When this part of the iterator string is valid, the provider is able to reopen journal and seek to that position, allowing seamless continuation of the itearation process. If the cursor points to non-existing record, an error is returned. This typically happens when journal is rotated or the cursor is very old. The provider keeps track of active iterators during its lifetime, keeping the journal open for fast access. Clients are supposed to close the iterator by calling the CancelIteration method.
* journald: Include process name and PID in the messageTomas Bzatek2013-10-151-3/+28
| | | | Let's be consistent with traditional syslog message format.
* journald: Map the PRIORITY field to CIM_RecordForLog.PerceivedSeverityTomas Bzatek2013-10-151-0/+39
| | | | | | | | | | | | | | | Records in journal may contain syslog-style priority value so let's use them. Unfortunately mapping the particular values between syslog and CIM classes is not linear, manual mapping is needed. The LOG_ERR may also map to PerceivedSeverity = Major but it's kept on Minor for the moment. If no such information is provided by the Journal, the CIM property is left unset for the particular record. See e.g. http://schemas.dmtf.org/wbem/cim-html/2.34.0/CIM_RecordForLog.html for valuemap description.