Repository :
http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
---------------------------------------------------------------
commit e78bb828d4abff0764af2f21f17d2af0da295738
Author: Peter Hatina <phatina(a)redhat.com>
Date: Tue Feb 12 13:15:01 2013 +0100
introduce _LmiInstance::first_associator()
---------------------------------------------------------------
cli-tools/lmi/lmi_client_shell.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/cli-tools/lmi/lmi_client_shell.py b/cli-tools/lmi/lmi_client_shell.py
index 30931f6..38c9d5d 100644
--- a/cli-tools/lmi/lmi_client_shell.py
+++ b/cli-tools/lmi/lmi_client_shell.py
@@ -656,6 +656,15 @@ class _LmiInstance(BaseObject):
return result
@possibly_deleted
+ def first_associator(self, AssocClass = None, ResultClass = None, Role = None, \
+ ResultRole = None, Props = None):
+ result = self.associators(AssocClass = AssocClass, ResultClass = ResultClass,
+ Role = Role, ResultRole = ResultRole, Props = Props)
+ if not result:
+ return None
+ return result[0]
+
+ @possibly_deleted
def references(self, ResultClass = None, Role = None, Props = None):
result = []
references_args = {}