phatina/lmiwbem — pull request #19 by miminar (2014-12-10 12:04:08+00:00)
Title: Set proper hostname for local connections.

LMIShell uses this value for creating indication filter and handler instances. With ``"unknown"`` hostname this results in similar errors:

Traceback (most recent call last):
File "/root/workspace/openlmi-tools/cli/lmi/scripts/common/command/checkresult.py", line 99, in take_action
result = self.execute_on_connection(connection, *args, **kwargs)
File "/root/workspace/openlmi-tools/cli/lmi/scripts/common/command/session.py", line 205, in execute_on_connection
return self.execute(connection, *args, **kwargs)
File "/root/workspace/openlmi-tools/cli/lmi/scripts/common/command/meta.py", line 110, in _execute
return func(__connection__, *args, **kwargs)
File "/root/workspace/openlmi-scripts/commands/journald/lmi/scripts/journald/__init__.py", line 118, in watch
ret = ns.connection.subscribe_indication(
File "/root/workspace/openlmi-tools/cli/lmi/shell/LMIConnection.py", line 531, in subscribe_indication
cim_subscription_props)
File "/root/workspace/openlmi-tools/cli/lmi/shell/LMIDecorators.py", line 319, in wrapped
lmi_raise_or_dump_exception(cim_error)
File "/root/workspace/openlmi-tools/cli/lmi/shell/LMIDecorators.py", line 316, in wrapped
rval = fn(*args, **kwargs)
File "/root/workspace/openlmi-tools/cli/lmi/shell/LMICIMXMLClient.py", line 754, in create_instance
cim_path = self._cliconn.CreateInstance(NewInstance=cim_instance)
CIMError: (4, 'CreateInstance: CIM_ERR_INVALID_PARAMETER: The value //unknown/root/interop:CIM_IndicationFilter.CreationClassName="CIM_IndicationFilter",Name="lmiscript_journald_watch-7E9109R8-filter",SystemCreationClassName="CIM_ComputerSystem",SystemName="kvm-rawhide-lmi.virbr0" is not valid for property Filter.')

Note the ``//unknown/root/interop`` part. Once it's replaced with correct
hostname, the subscription works.