summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* jobmanager: fixed coverity issuesMichal Minar2014-07-012-39/+32
| | | | | | | | removed unused variables made sure that code works the same in (no)debug mode got rid of double frees
* providers: logging fixesMichal Minar2014-07-013-8/+6
| | | | | Fixes logging of messages taking CMPIStatus::msg as an argument. *msg* needs to be wrapped in CMGetCharsPtr().
* software-dbus: implemented LMI_SoftwareInstModificationProviderMichal Minar2014-07-011-6/+40
|
* software-dbus: implemented LMI_SoftwareInstCreationProviderMichal Minar2014-07-011-6/+40
|
* software-dbus: implemented AssociatedSoftwareInstallationServiceCapabilitiesPeter Schiffer2014-06-261-3/+57
|
* PEP8 and PyFlakes cleanup: src/account/testAlois Mahdal2014-06-269-72/+111
|
* Update error messagesAlois Mahdal2014-06-251-10/+10
| | | | | * Fix copypasting error * use natural "source instances" instead of pluralizing dict key
* software-dbus: implemented LMI_SoftwareInstallationsServiceMichal Minar2014-06-253-8/+264
| | | | Currently only InstallFromSoftwareIdentity() method is implemented.
* software-dbus: implemented LMI_SoftwareInstallationJobMichal Minar2014-06-251-14/+227
|
* software-dbus: use common software init and cleanupMichal Minar2014-06-2510-20/+20
| | | | | Each software provider shall use the same sw-common initialization and cleanup function.
* software-dbus: implemented installation job processingMichal Minar2014-06-255-0/+1106
| | | | | Added initialization and cleanup functions to software utilities needed to initialize job manager.
* software-dbus: require and link with jobmanagerMichal Minar2014-06-251-1/+4
|
* software-dbus: fix compilation warningsMichal Minar2014-06-255-11/+18
| | | | | Compile functions needed for rpm verification only if the rpm library is detected.
* software-dbus: define mutex only if it is neededMichal Minar2014-06-251-3/+3
|
* indsender: fixed compilation on RHEL6Michal Minar2014-06-251-0/+1
|
* added job manager libraryMichal Minar2014-06-258-0/+6738
|
* all: fetch computer system using safe functionsMichal Minar2014-06-2561-146/+156
| | | | | Use newly added utility functions to fetch computer system or its system name with current context either from cache or from broker.
* openlmi: make sure computer system instance gets loadedMichal Minar2014-06-252-59/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When broker is started with some indication subscriptions active, it immediately loads and starts corresponding providers that try to do their init functions. At this time it's not possible to query the broker for an instance of PG\_ComputerSystem though. Broker replies with NOT\_FOUND. This patch adds safe functions: lmi_get_computer_system_safe() lmi_get_system_name_safe() accepting current context. They make sure that computer system will be loaded even if the first attempt at init time failed. Following functions are now marked as deprecated: lmi_get_computer_system() lmi_get_system_name() Correct and ideal solution would be lazy evalution - load the computer system when it's needed for the first time, not before. This means: 1. `get_computer_system()` cleared away from init 2. `lmi_get_computer_system()` and `lmi_get_system_name()` accepting context and calling `get_computer_system()` to fetch it either from cache or from broker Unfortunately this would break libopenlmi's API.
* software-dbus: implemented LMI_SoftwareInstallationServiceCapabilitiesProviderPeter Schiffer2014-06-242-6/+97
|
* Improve API to cover indications and source instancesAlois Mahdal2014-06-243-108/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With writing new tests, some limitations of current framework emerged. For example, there has been assumption that one LMIIndication container will only hold one CIMIndication instance. This is mostly true so far, but does not have to be always, so is dangersous for further decisions. Overview of changes: * Interface of IndicationTestProbe for retrieving data about delivered indications has been split from get_cns to get_indications and get_ssource_instances. These don't expose LMIIndication containers, but rather collect all indications to one big list, and source instances to parallel list. * Furthermore, as opposed to rather confusing get_cns, these new methods don't automatically create PackedSequence or sort indications. Instead, describe_* methods have been created solely for this purpose. Similar change has been done to get_ans, which is now split to get_actions and describe_* for reporting. * Also the number-baseded test had been oversimplified, which caused confusion when trying to use it with LMI_Groups, where indication name alias is different than sourceInstance alias. * Assertions about streams are now made separately for indications and source instances. This is now reflected in tests, which have the oracles defined separately (expected_*_stream) and also have aggregated the repeating code to check_* methods so that new group assertions can be added easily on the go.
* software: support older versions of PackageKit apiMichal Minar2014-06-241-7/+9
| | | | | continuation of former commit (dbddcd9) replacing pk_details_* functions unavailable in PackageKit v0.8.9
* Fixed 'service xxx status' exit code checks.Jan Safranek2014-06-231-1/+3
| | | | There are differences on systems with systemd and with old SysV init.
* software-dbus: bugfixes for LMI_SoftwareIdentityFileCheckProviderPeter Schiffer2014-06-201-34/+50
| | | | | * fixed FileSize - RPM is not using sb.st_size when comparing sizes * don't count checksum for symbolic links
* common: added utility functionMichal Minar2014-06-202-0/+75
| | | | | | | Added function for checking computer system instance name. This is usefull particularly in methods expecting an instance of CIM_ComputerSystem passed as a parameter and needing to check whether it matches current system.
* added indication sender libraryMichal Minar2014-06-205-0/+989
|
* indications: fixed succeeded static filterMichal Minar2014-06-201-1/+1
| | | | | Succeeded static filter had wrong constant hardcoded for successful job state.
* software-dbus: use is_elem_name_installed() in InstalledSWProviderPeter Schiffer2014-06-201-24/+8
| | | | | Use is_elem_name_installed() function in associators and references method of LMI_InstalledSoftwareIdentityProvider instead of manually checking it.
* Fix comparison methodAlois Mahdal2014-06-201-2/+2
| | | | CIMDateTime is apparently able to compare itself
* software-dbus: implemented LMI_SoftwareIdentityChecksProviderPeter Schiffer2014-06-194-50/+476
|
* Sort reports before extracting info from themAlois Mahdal2014-06-181-5/+7
| | | | | | This is how it was supposed to be in the first place (and how I incorrectly presented the framework so far). Apparently I forgot to add the sorting call.
* software-dbus: implemented LMI_SoftwareIdentityFileCheckProviderPeter Schiffer2014-06-176-26/+527
|
* added openlmi-utils to openlmicommon libraryMichal Minar2014-06-173-1/+116
|
* Add event-based tests for indications (basic set)Alois Mahdal2014-06-101-0/+148
| | | | | | | | | | | | | Basic set of tests with focus on this flow: 1. add set of subscriptions 2. add set of handlers 3. trigger sequence of "interesting" events 4. collect indications 5. and make assertions as needed Currently the assertions are mostly that correct classes have been delivered, reporting the events in correct order.
* added cmake option to build software-dbusMichal Minar2014-06-101-1/+5
| | | | It defaults to off - python implementation is preferred.
* support older versions of PackageKit apiMichal Minar2014-06-101-12/+36
| | | | | | | | Functions like: pk_details_get_package_id pk_details_get_description are available since version 0.8.12. In RHEL7 we have 0.8.9. Let's avoid using them.
* New provider: LocaleVitezslav Crhonek2014-06-047-0/+904
|
* journald: Enhance indication tests for UID/GID/PID matchingTomas Bzatek2014-05-261-3/+11
|
* journald: Fix instance number limiterTomas Bzatek2014-05-261-1/+1
| | | | Off-by-one.
* journald: Expose UID, GID, PID and syslog facility/severity fieldsTomas Bzatek2014-05-261-33/+82
| | | | This is useful e.g. for indication filtering.
* Fix error in PackedSequenceAlois Mahdal2014-05-221-2/+33
| | | | | PackedSequence failed to normalize properly sequences like "1a,0b,1a", which it returned as "a,a" instead of "2a"
* Add AccountIndicationTestDriver, application of indication testing framework.Alois Mahdal2014-05-221-0/+38
|
* Add indication testing frameworkAlois Mahdal2014-05-221-0/+411
| | | | | | | | | A small test framework for testing LMI Indications. Oriented on data-driven testing approach and capable of "provoking" events and tracking relevant indications. Classes should be extended on provider-level to include provider- -specific actions and knowledge.
* Add BaseTestDriver base classAlois Mahdal2014-05-221-0/+119
| | | | This will be used for indication test cases
* software: proper logging setup for python 2.6Michal Minar2014-05-222-59/+48
| | | | Properly configure logging of YumWorker process under older python.
* test lmi: use only one connection for test-casePeter Hatina2014-05-211-3/+5
| | | | Use the same pattern in LmiTestCase.conn as CIMTestCase.wbemconnection. This saves the time and network bandwidth and also prepares test suite for lmiwbem module, where we could potentially run out of file descriptors range.
* hardware: replace subprocess.check_output with PopenRadek Novacek2014-05-191-1/+2
| | | | | There is no check_output function in subprocess module in python 2.6, Popen will be used instead.
* Test: get rid of 'import unittest'Radek Novacek2014-05-197-7/+5
| | | | | Always use 'from lmi.test import unittest' instead of plain 'import unittest', because it automagically imports unittest2 on python 2.6.
* PEP8, Flake8, readability improvementsAlois Mahdal2014-05-191-31/+52
|
* Software: don't fail when logging.config doesn't have dictConfigRadek Novacek2014-05-191-1/+4
| | | | | python 2.6 doesn't have logging.config.dictConfig, skip the logging configuration in that case.
* test base: use service instead of systemctl commandRadek Novacek2014-05-191-1/+1
| | | | | service command is compatible even with non-systemd distribution and still works with systemd.