Release Automation

 View Only
  • 1.  Nolio Action:  Emulate multiple steps for HTTP POST

    Posted Jul 14, 2015 11:36 AM

    Team,

     

    I have a CA Express package for the CA Identity Manager solution, that will deploy the solution's binaries & configuration.

     

    The next step is to convert a post-installation manual task to automated process with predefined business logic.

     

    The challenge, I am not aware of a Nolio action that can emulate the multiple steps required to submit a file to the IM web service.

     

    I currently have this process in the command line tool of CuRL.

     

    I am interest in any recommendations or thoughts to emulate the same behavior in a pre-built Nolio action, versus calling out to the CLI of CURL.

     

    ****

     

    Below is an example of using the command line tool “Curl” (win os or linux) to post HTTP updates.

    Since we know the URL for the IM management console, we have the ability to push updates to it.

     

    The process below first stores a “cookie” that contains the session information to connect to a secure IM management console & ensure the IME are listed.

    The next steps, act as a user does, by clicking each link (as we found we could not jump ahead with a direct URI).

    The final step does the HTTP POST of an individual xml files.   In this case, one PX rule was pushed.

     

     

    *** ***

     

    #!/bin/sh

    HOST=idm.lab.co:8080

    IME=labco

    OID=1

    ROLE_FILE=px100.xml

    username=etaadmin

    password=Password01

     

     

    # Upload Roles

    curl -c cookies --trace-ascii 01_debugdump_audit_listenv.txt   --data-urlencode "username=$username" --data-urlencode "password=$password"  "http://$HOST/iam/immanage/env.do?method=listEnvs"   > /dev/null

    curl -b cookies --trace-ascii 02_debugdump_audit_editenv.txt   "http://$HOST/iam/immanage/env.do?method=editEnv&envoid=$OID" > /dev/null

    curl -b cookies --trace-ascii 03_debugdump_audit_editRole.txt  "http://$HOST/iam/immanage/env.do?method=editRoles&envoid=$OID&envname=$IME" > /dev/null

    curl -b cookies --trace-ascii 04_debugdump_audit_roleImport.txt -F overwrite=true -F environmentName=$IME -F "file=@$ROLE_FILE;type=text/xml" -F submit=Finish http://$HOST/iam/immanage/roles.do > /dev/null

     

     

     

    Cheers,

     

    A.



  • 2.  Re: Nolio Action:  Emulate multiple steps for HTTP POST

    Broadcom Employee
    Posted Jul 14, 2015 01:44 PM

    I don't think cURL is a bad choice. You can see what it is doing very easily. But one alternative might be to use the Selenium script action. Or, if you can find powershell functions that would do the same thing curl does then there are powershell actions too. In my opinion I think cURL and Selenium are going to be your best bet. I recently did some testing with Selenium though and getting the selenium standalone running on RHEL and successfully execute the script I recorded was problematic. I finally gave up and got it running on Windows. But that took some work too because it involved HTTPS sites which I then needed a firefox plugin for, etc, etc...

     

    If I knew that the curl commands could do exactly what I needed then I probably would have just gone that route.

     

    Regards,

    Gregg