Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-11197

Amster not usable inside groovy functions or not scriptable with loops

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 14.0.0
    • Fix Version/s: 14.5.0
    • Component/s: Amster
    • Labels:
    • Target Version/s:
    • Support Ticket IDs:

      Description

      Currently Amsters API seems to be execute linear sequence. Now we can sometimes access the result to the groovy script variable and perform some operation and later use Amster command.

      Take for example you can run

       

      query Realms --global
      realms = _
      realms.each() {
      print it
      }
      ...
      update .... --id .... --body ....

       

      However, it is quite problematic to run thru loop to say process some realms stuff and then repeated apply some amster command

      // These are not possible:
      
      lists = ["/", "/realm1"]
      lists.each() {
         // amster command is not possible
         // inside the groovy object
      }
      
      // It is also awkward to perform condition statement 
      (toRun?): { // amster command } : ()

       

      RFE Request

      It would help maybe we expose a "readonly" variable that can be used inside the groovy expression (although if the amster DSL was first class inside the groovy.  Somehow it would be best to do something like exposing amster as "object" or the shell

       

      // In amster
      this.with {
         amstershell.execute("read Authentication --realm ${realm}")
      }

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                chee-weng.chea C-Weng C
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: