From 4721a6cb186e7d6908ff1f361d0bc81e182473ad Mon Sep 17 00:00:00 2001 From: Radek Novacek Date: Mon, 27 Aug 2012 15:01:46 +0200 Subject: Rename prefix from Cura_ to LMI_ --- examples/test_account.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'examples/test_account.py') diff --git a/examples/test_account.py b/examples/test_account.py index 5b88ca3..835e3d3 100755 --- a/examples/test_account.py +++ b/examples/test_account.py @@ -33,37 +33,37 @@ if len(sys.argv) > 5: cliconn = pywbem.WBEMConnection(url, (username, password)) if command == "list_user": -# Listintg users is simple, just query all instances from Cura_Account +# Listintg users is simple, just query all instances from LMI_Account # or select only by given Name if parameter == "*": - instances = cliconn.ExecQuery('WQL', 'select * from Cura_Account') + instances = cliconn.ExecQuery('WQL', 'select * from LMI_Account') else: - instances = cliconn.ExecQuery('WQL', 'select * from Cura_Account where Name = "%s"' % parameter) + instances = cliconn.ExecQuery('WQL', 'select * from LMI_Account where Name = "%s"' % parameter) for instance in instances: print instance.tomof() elif command == "list_group": -# Listintg gruops is simple, just query all instances from Cura_Group +# Listintg gruops is simple, just query all instances from LMI_Group # or select only by given Name if parameter == "*": - instances = cliconn.ExecQuery('WQL', 'select * from Cura_Group') + instances = cliconn.ExecQuery('WQL', 'select * from LMI_Group') else: - instances = cliconn.ExecQuery('WQL', 'select * from Cura_Group where Name = "%s"' % parameter) + instances = cliconn.ExecQuery('WQL', 'select * from LMI_Group where Name = "%s"' % parameter) for instance in instances: print instance.tomof() elif command == "group_members": -# Group members is a bit tricky. You need to select group (Cura_Group) -# by given Name, then you need to select identities (Cura_Identity), which -# are connected through Cura_MemberOfGroup to Cura_Group. -# And finally select all accounts (Cura_Account) which are connected through -# Cura_AssignedAccountIdentity with selected identities (this should be +# Group members is a bit tricky. You need to select group (LMI_Group) +# by given Name, then you need to select identities (LMI_Identity), which +# are connected through LMI_MemberOfGroup to LMI_Group. +# And finally select all accounts (LMI_Account) which are connected through +# LMI_AssignedAccountIdentity with selected identities (this should be # 1 to 1) - groups = cliconn.ExecQuery('WQL', 'select * from Cura_Group where Name = "%s"' % parameter) + groups = cliconn.ExecQuery('WQL', 'select * from LMI_Group where Name = "%s"' % parameter) for group in groups: - identities = cliconn.Associators(group.path, AssocClass='Cura_MemberOfGroup') + identities = cliconn.Associators(group.path, AssocClass='LMI_MemberOfGroup') for identity in identities: - accounts = cliconn.Associators(identity.path, AssocClass='Cura_AssignedAccountIdentity') + accounts = cliconn.Associators(identity.path, AssocClass='LMI_AssignedAccountIdentity') for account in accounts: print account.tomof() -- cgit