some help with openlmi-indications
by jiun bookworm
First, i was able to get openlmi indications working, but that was a few
months ago on a fedora 20/21 vm,
i tried again the last few days but im unable to get them working at all,
here is what i tried, (attempting to get an indication that a service has
stopped),
c = connect('localhost', 'pegasus', 'pegasus')
print c.subscribe_indication(
Name="service_modification-other-safe-X",
QueryLanguage="WQL",
Query='SELECT * FROM CIM_InstModification',
CreationNamespace="root/interop",
SubscriptionCreationClassName="CIM_IndicationSubscription",
FilterCreationClassName="CIM_IndicationFilter",
FilterSystemCreationClassName="CIM_ComputerSystem",
FilterSourceNamespace="root/cimv2",
HandlerCreationClassName="CIM_IndicationHandlerCIMXML",
HandlerSystemCreationClassName="CIM_ComputerSystem",
Destination="http://localhost:12131"
)
def handler(indication, d):
print("called")
print(indication)
d.update({'ind': indication})
d={}
listener = LMIIndicationListener('localhost', 12131)
unique_name = listener.add_handler("safeharbour-service-XXXXXXXX",
handler, d)
listener.start()
iv tried other types like this for accounts for debug purposes, but all
have given me blank, nothing happens
above when i stop/start a service or below when i create/destroy a user
account:
> c = connect('localhost', 'pegasus', 'pegasus')
> q = ("select * from LMI_AccountInstanceDeletionIndication where
sourceinstance isa LMI_Account")
> c.subscribe_indication(Name="hello", Destination="http://localhost:12121",
Query=q)
LMIReturnValue(rval=True, rparams=NocaseDict({}), errorstr='')
> import lmi.shell
> d = {}
> l = lmi.shell.LMIIndicationListener("0.0.0.0", 1234)
> han = lambda ind, d: d.update({'ind': ind})
> l.add_handler("hello", han, d)
'hello'
> l.start()
> d
iv tried the example in RHEL's docs :
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/...
but the handler never seems to get called.
i tried all this with and without selinux enabled with negative results, on
fedora 21 and fed 22,
i have these installed:
tog-pegasus openlmi-providers openlmi-tools openlmi-scripts-account
openlmi-scripts-hardware openlmi-scripts-journald openlmi-scripts-locale
openlmi-scripts-logicalfile openlmi-scripts-networking
openlmi-scripts-powermanagement openlmi-scripts-realmd
openlmi-scripts-selinux openlmi-scripts-service openlmi-scripts-software
openlmi-scripts-storage openlmi-scripts-system
the cimserver was started.
i could not get openlmi-scripts-sssd because of some dependency error on
openlmi-tools-10x or thereabouts, see below
Error: Package: openlmi-scripts-sssd-0.4.0-2.fc21.noarch (updates)
Requires: openlmi-tools = 0.10.4
Available: openlmi-tools-0.10.2-1.fc21.noarch (fedora)
openlmi-tools = 0.10.2-1.fc21
Installing: openlmi-tools-0.10.5-1.fc21.noarch (updates)
openlmi-tools = 0.10.5-1.fc21
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
im not sure whether this contributes but i doubt.
Can anyone point out anything im doing wrong?
Jiun
Sorry if this is not a help channel.
8 years, 5 months