diff options
author | Radek Novacek <rnovacek@redhat.com> | 2012-08-27 15:01:46 +0200 |
---|---|---|
committer | Radek Novacek <rnovacek@redhat.com> | 2012-08-28 14:37:33 +0200 |
commit | 4721a6cb186e7d6908ff1f361d0bc81e182473ad (patch) | |
tree | d63f8e7b8db9bdbfca8b6c85d21642ad237fc6eb /examples/test_account.py | |
parent | 3333004967971ad1720b74da4ce09949f023852e (diff) | |
download | openlmi-providers-4721a6cb186e7d6908ff1f361d0bc81e182473ad.tar.gz openlmi-providers-4721a6cb186e7d6908ff1f361d0bc81e182473ad.tar.xz openlmi-providers-4721a6cb186e7d6908ff1f361d0bc81e182473ad.zip |
Rename prefix from Cura_ to LMI_
Diffstat (limited to 'examples/test_account.py')
-rwxr-xr-x | examples/test_account.py | 28 |
1 files changed, 14 insertions, 14 deletions
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() |