Release Automation

 View Only
  • 1.  Manipulate INI Files

    Posted Jun 15, 2016 12:15 PM

    HI,

    If I have to edit some section in a file with a new key value pair or if I want to update the new key value pair in a file, I guess I am supposed to use "Manipulate INI Files" action, But I think it doesn't work the way it has to.

    I am trying to update the below section:

    <ump_common>

       ace = ace

       automated_deployment_engine = automated_deployment_engine

       dap = dap

       discovery_server = discovery_server

       event_management = event_management

       nas = nas

       service_host = service_host

       sla_engine = sla_engine

       ugs = ugs

       stack_traces_log_only = false

    </ump_common>

     

    My new value for ace should be something else, Any help on this??

    It doesn't work with this action



  • 2.  Re: Manipulate INI Files

    Posted Jun 16, 2016 01:12 AM

    Are you sure the section format is valid for ini files?

    As I know , the section should look like [ump_common] and not <ump_common>

    If you modify your section structure to [ump_common] the manipulate ini file will work

    If you can't modify the section structure you can use other actions such as replace text in file (depends if key name is unique)

    Hope this help

    Jacky



  • 3.  Re: Manipulate INI Files

    Posted Jun 16, 2016 05:18 AM

    I tried to do the same but it just edit the file , I have to update it with new key value pair.

    If you see below screenshot it just edit the content but I want to update this key in a specific section.

    I tried using the replace action as well but that gives me escape character issue as it cannot search the exact section which is copied to "search text" parameter of the action.

     



  • 4.  Re: Manipulate INI Files

    Posted Jun 16, 2016 05:47 AM

    Can you paste the part of the ini file , including the section and explain how the file should be look after running the action

    In my example above i update ace value in ump_common section

    Before ace = ace

    After ace = newvalue



  • 5.  Re: Manipulate INI Files

    Posted Jun 16, 2016 05:59 AM

    I am using RA version 5.5, Please find below the screenshot.

     



  • 6.  Re: Manipulate INI Files
    Best Answer

    Posted Jun 16, 2016 06:06 AM

    Please try again after removing the brackets from the INI section field leave the value as ump_common

    Also you might not need to have space between the key/value to the equal sign



  • 7.  Re: Manipulate INI Files

    Posted Jun 16, 2016 06:25 AM

    I tried that but it never updated the section and it always edit the file with a new line of that key/value pair.

    Do you think I have to upgrade to newer version of RA to get those options which you showed above??



  • 8.  Re: Manipulate INI Files

    Posted Jun 16, 2016 06:52 AM

    Can you share the file you trying to modify and the exact RA version you currently running?



  • 9.  Re: Manipulate INI Files

    Posted Jun 16, 2016 07:25 AM

    The current version I am using is

     

       

         

                                             

                Version:
             
                5.5.1.1312
             

       

    And I sent you the file via email.

     

    Thank you so much for your help.



  • 10.  Re: Manipulate INI Files

    Posted Jun 16, 2016 08:36 AM

    Quick update

    The file doesn't have INI structure which cause the action to add new section.with key/value pair

    Another approach to update the file will be by using replace text in a file action