Hello all,
I’m trying to get the user’s account. I found the name ($evm.root[‘user’].name) and the email ($evm.root[‘user’].email), but the user’s account
Where can you find all this information in the documentation?
Thank you for your help.
Hello all,
I’m trying to get the user’s account. I found the name ($evm.root[‘user’].name) and the email ($evm.root[‘user’].email), but the user’s account
Where can you find all this information in the documentation?
Thank you for your help.
I think your looking for userid:
$evm.root['user'].userid
Thk
Merci Fabien
Documentation:
http://manageiq.org/docs/reference/latest/doc-Methods_Available_for_Automation/miq/index.html#_sect_user_user
Just a small remark: these kind of questions would fit better in the Automate-Category, since Developers is meant for discussions on ManageIQ itself (Plugins, Provider, …). Just for the next time
Unfortunately the documentation only mentions some of the properties. Here is a full object dump for a typical user object:
$evm.root['user'] => #<MiqAeMethodService::MiqAeServiceUser:0x000000001b455108> (type: DRb::DRbObject, URI: drbunix:///tmp/automation_engine20181012-5583-aovcs3)
| --- attributes follow ---
| $evm.root['user'].created_on = 2017-07-17 20:26:04 UTC (type: ActiveSupport::TimeWithZone)
| $evm.root['user'].current_group_id = 1000000000002 (type: Fixnum)
| $evm.root['user'].email = pemcg@redhat.com (type: String)
| $evm.root['user'].first_name = nil
| $evm.root['user'].icon = nil
| $evm.root['user'].id = 1000000000005 (type: Fixnum)
| $evm.root['user'].last_name = nil
| $evm.root['user'].lastlogoff = 2018-10-10 11:20:47 UTC (type: ActiveSupport::TimeWithZone)
| $evm.root['user'].lastlogon = 2018-10-12 13:59:17 UTC (type: ActiveSupport::TimeWithZone)
| $evm.root['user'].name = Peter McGowan (type: String)
| $evm.root['user']['password_digest'] = $2a$10$wnLx5yUgw2NiOpvJSo50beyMt4mlY...... (type: String)
| $evm.root['user'].settings = {} (type: Hash)
| $evm.root['user'].updated_on = 2018-10-12 13:59:17 UTC (type: ActiveSupport::TimeWithZone)
| $evm.root['user'].userid = pemcg (type: String)
| --- end of attributes ---
| --- virtual columns follow ---
| $evm.root['user'].allocated_memory = 148176371712 (type: Fixnum)
| $evm.root['user'].allocated_storage = 2201170739200 (type: Fixnum)
| $evm.root['user'].allocated_vcpu = 25 (type: Fixnum)
| $evm.root['user'].custom_1 = nil
| $evm.root['user'].custom_2 = nil
| $evm.root['user'].custom_3 = nil
| $evm.root['user'].custom_4 = nil
| $evm.root['user'].custom_5 = nil
| $evm.root['user'].custom_6 = nil
| $evm.root['user'].custom_7 = nil
| $evm.root['user'].custom_8 = nil
| $evm.root['user'].custom_9 = nil
| $evm.root['user'].href_slug = users/1000000000005 (type: String)
| $evm.root['user'].ldap_group = EvmGroup-super_administrator (type: String)
| $evm.root['user'].miq_group_description = EvmGroup-super_administrator (type: String)
| $evm.root['user'].miq_user_role_name = EvmRole-super_administrator (type: String)
| $evm.root['user'].provisioned_storage = 2349347110912 (type: Fixnum)
| $evm.root['user'].region_description = Region 1 (type: String)
| $evm.root['user'].region_number = 1 (type: Fixnum)
| --- end of virtual columns ---
| --- associations follow ---
| $evm.root['user'].current_group (type: Association)
| $evm.root['user'].current_tenant (type: Association)
| $evm.root['user'].miq_groups (type: Association)
| $evm.root['user'].miq_requests (type: Association)
| $evm.root['user'].vms (type: Association)
| --- end of associations ---
| --- methods follow ---
| $evm.root['user'].custom_get
| $evm.root['user'].custom_keys
| $evm.root['user'].custom_set
| $evm.root['user'].get_ldap_attribute
| $evm.root['user'].get_ldap_attribute_names
| $evm.root['user'].inspect
| $evm.root['user'].inspect_all
| $evm.root['user'].miq_group
| $evm.root['user'].model_suffix
| $evm.root['user'].reload
| $evm.root['user'].role
| $evm.root['user'].tag_assign
| $evm.root['user'].tag_unassign
| $evm.root['user'].tagged_with?
| $evm.root['user'].tags
| --- end of methods ---
Thank you for you answers.
@buc, I will take into consideration your comments. Sorry for not posting where it should have been.
no big deal