Since the order of the list in the dict can change, the assertEqual
might fail. assertCountEqual not only checks the count, it also checks
for matching elements regardless of the order. assertCountEqual is
Python=>3.2.
Domain lifecycle event was not using the callback provided event type
for the tag, but rather using the realy event. Harmonize this with the
other callbacks
Use a dictionary to describe all events objects (domain, network, pool,
nodedev and secret). This allows future extensions of the data
describing these objects.
Also make sure to provide the object UUID where one exists since some
client applications use them to identify objects.
Parameters order is different when firing events on master or minion.
The order for master was wrong. Also added documentation on how to setup
polkit to run the engine on a master node.
Given:
```
root@minion2:~ # atq
Date Owner Queue Job#
Fri Apr 6 23:18:00 UTC 2018 root c 4
root@minion2:~ #
```
Running at.atq on this minion will fail:
```
root@master:~ # salt 'minion2' at.atq
minion2:
The minion function caused an exception: Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/salt/minion.py", line 1493, in _thread_return
return_data = executor.execute()
File "/usr/local/lib/python3.6/site-packages/salt/executors/direct_call.py", line 28, in execute
return self.func(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/salt/modules/at.py", line 110, in atq
job = tmp[6]
IndexError: list index out of range
root@master:~ #
```
This patch seems to make it work:
```
root@master:~ # salt 'minion1' at.atq
minion1:
----------
jobs:
|_
----------
date:
2018-04-06
job:
7
queue:
c
tag:
time:
23:42:00
user:
root
root@master:~ #
```
Tested against:
```
root@minion1:~ # uname -r
11.1-RELEASE-p9
root@minion1:~ # pkg info | grep salt
py36-salt-2017.7.4_1 Distributed remote execution and configuration management system
root@minion1:~ #
```