Automic Workload Automation

 View Only
Expand all | Collapse all

Promptset password value inside interpreter

  • 1.  Promptset password value inside interpreter

    Posted Jul 04, 2019 09:29 AM
    Hi guys, 
    I tried following this and this
    But I was not able to get it to work in my environment

    I just want to log in a vcenter, getting the credentials from a promptset (Side note, why can't I use a Login object for that?!)
    This is my latest attempt, from the posts I believe that I need to get the promptset variable, as a script variable, but it still not working.
    :set &VC_PWD=&VSPHERE_PWD#
    :BEGIN_EXT_INT POWERSHELL
    connect-VIServer -Server &VCENTER# -Username &VSPHERE_USR# -Password &VC_PWD
    :END_EXT_INT POWERSHELL
    ​

    What am I doing wrong?



  • 2.  RE: Promptset password value inside interpreter

    Broadcom Employee
    Posted Jul 04, 2019 01:41 PM

    Hi Marcel,

    I guess you define the PW field as a password-fields, so the value is encrypted.

    A :print &VSPHERE_PWD# will give you a string like --10xxxxxxxxxxxx

    So you decrypt it upfront or use "Job-Melder" like this

    &UC_JOBMD CMD="connect-VIServer -Server &VCENTER# -Username &VSPHERE_USR# -Password &VC_PWD"


    Docu will show more details

    ------------------------------
    Engineering Program Manager
    Broadcom
    ------------------------------



  • 3.  RE: Promptset password value inside interpreter

    Posted Jul 04, 2019 02:10 PM
    Hi Michael!

    Now I got this report



    ------------------------------
    Services Consultant
    HCL
    ------------------------------



  • 4.  RE: Promptset password value inside interpreter

    Posted Jul 04, 2019 04:55 PM
    Edited by Marcel de Assis Jul 04, 2019 05:08 PM
    My Job Melder was empty as it was here (https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=782234#bme7582918-7b03-4519-8c12-c3fdd2382d80)
    But as this is an old solution, I was not able to make this work
    $SecurePassword = (&UC_JOBMD CMD="echo &VSPHERE_PWD#")
    I get access denied





  • 5.  RE: Promptset password value inside interpreter

    Posted Jul 05, 2019 08:00 AM
    Hi Marcel,
    Yes, you can create a LOGIN object to store passwords for any kind of ext app you like. You have to edit client 0's variable UC_LOGIN_TYPES adding a new key (for example VCENTER). After that, you can insert passwords for this VCENTER option (this option will appear on the column Platform of your login objects).
    You can get the user and password from the login with the function GET_LOGIN(..).
    Keep in mind that this password can only be interpreted by Automic using the job messenger, i.e., running the commands inside the structure:

    &UC_JOBMD CMD="define command"

    Hope this helps.


    ------------------------------
    Automic Services Delivery Manager
    MVR Informática
    ------------------------------



  • 6.  RE: Promptset password value inside interpreter

    Posted Jul 05, 2019 08:26 AM
    Edited by Carsten Schmitz Jul 05, 2019 08:27 AM
    ​Word of advice. If you create a custom UC_LOGIN_TYPES entry and can't seem to select that type in your LOGIN object, because you can't get a TYPE drop-down menu to show up:

    You need to enter an asterisk (*) into the agent field and press "enter" to get the dropdown to show.

    Took me a while to figure that out.

    (edit: this applies to AWI. With the fat client in 11.2 and below, the asterisk was there by default IIRC)





  • 7.  RE: Promptset password value inside interpreter

    Posted Jul 05, 2019 08:33 AM
    Edited by Simone Martineschen Jul 05, 2019 08:33 AM
    Yes Carsten! You're absolutely right. I forget to mention that. It'll only work this way (with a "*" on the agent field), since there's no agent to that external Login type. ​​

    ------------------------------
    Automic Services Delivery Manager
    MVR Informática
    ------------------------------



  • 8.  RE: Promptset password value inside interpreter
    Best Answer

    Posted Jul 05, 2019 09:25 AM
    Thanks for the Help guys,
    My background in automation is more on a web based engine so I'm struggling with the simplest of things.
    I was able to make it work by using the same method automic action packages uses to decrypt password fields.

    When I said I want to use a login object, I meant in a intuitive way, again with no script involved.
    I have a promptset with fields User and password
    like a vara that I can do {VARA.NAME.CONSTANT}
    I'd like to do something like:
    {LOGIN.VCENTER.USER}
    {LOGIN.VCENTER.PASSWORD}








    ------------------------------
    Services Consultant
    HCL
    ------------------------------



  • 9.  RE: Promptset password value inside interpreter

    Posted Jul 25, 2019 04:28 PM
    @Marcel de Assis,

    See also following thread it may give you some idea about additional options
    https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?MessageKey=278f42c9-4b8e-448a-819e-ad6f9c57ea9c&CommunityKey=2e1b01c9-f310-4635-829f-aead2f6587c4&tab=digestviewer#bm278f42c9-4b8e-448a-819e-ad6f9c57ea9c



  • 10.  RE: Promptset password value inside interpreter

    Posted Jul 25, 2019 04:33 PM
    Hi Vlad,

    That's how I'm decrypting! I copied from the vmware action pack.
    Thanks for your help!

    ------------------------------
    Services Consultant
    HCL
    ------------------------------