Repository :
http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
---------------------------------------------------------------
commit 221fd120862203d30b268d78fbe86206e0a38b86
Author: Peter Hatina <phatina(a)redhat.com>
Date: Wed Jul 31 13:52:58 2013 +0200
fix default namespace for indications in LMIMethod to root/interop
---------------------------------------------------------------
cli/lmi/shell/LMIMethod.py | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/cli/lmi/shell/LMIMethod.py b/cli/lmi/shell/LMIMethod.py
index 98eff31..8067d5a 100644
--- a/cli/lmi/shell/LMIMethod.py
+++ b/cli/lmi/shell/LMIMethod.py
@@ -62,6 +62,9 @@ class LMIMethod(LMIBaseObject):
"LMI_SoftwareInstallationJob",
"LMI_NetworkJob"
)
+ # Default namespace where the indication subscriptions, used for synchronous
+ # method calls, will be registered.
+ _INDICATION_NAMESPACE = "root/interop"
# When performing a synchronous method call and using the polling method to
# get a job object status, the sleep time between 2 polls doubles if it is
# less than _POLLING_ADAPT_MAX_WAITING_TIME.
@@ -164,8 +167,8 @@ class LMIMethod(LMIBaseObject):
# Search for necessary static filter
filter_name = "LMI:%s:Changed" % job_inst.classname
- (cim_filters, _, err) =
self._client._get_instances("CIM_IndicationFilter",
"root/PG_InterOp",
- {"Name" : filter_name})
+ (cim_filters, _, err) =
self._client._get_instances("CIM_IndicationFilter",
+ LMIMethod._INDICATION_NAMESPACE, {"Name" : filter_name})
if not cim_filters:
listener.stop()
errorstr = "Can not find proper CIM_IndicationFilter for this method
call"
@@ -198,7 +201,7 @@ class LMIMethod(LMIBaseObject):
LMIMethod._INDICATION_DESTINATION_PORT, indication_name),
}
(cim_handler, _, err) =
self._client._create_instance("CIM_IndicationHandlerCIMXML",
- "root/PG_InterOp", cim_handler_props)
+ LMIMethod._INDICATION_NAMESPACE, cim_handler_props)
if not cim_handler:
listener.stop()
errorstr = "Can not create CIM_IndicationHandlerCIMXML object"
@@ -210,7 +213,7 @@ class LMIMethod(LMIBaseObject):
"Handler" : cim_handler.path
}
(cim_subscription, _, err) =
self._client._create_instance("CIM_IndicationSubscription",
- "root/PG_InterOp", cim_subscription_props)
+ LMIMethod._INDICATION_NAMESPACE, cim_subscription_props)
if not cim_subscription:
self._client._delete_instance(cim_handler)
listener.stop()