Forum Discussion

Roberto_GB_2613's avatar
Roberto_GB_2613
Icon for Altostratus rankAltostratus
May 03, 2017

Edit internal datagroup via iRule

Hi,

First of all, thanks to this community for so many articles. I'm trying to edit a string internal datagroup via iRule as it can be done via cli with the commands:

tmsh modify ltm data-group internal auth_keys records add { myUserName { data someString } }

also I need to delete some entries:

tmsh modify ltm data-group internal auth_keys records delete { myUserName }

As far as I could reach is to perform a lookup in my iRule:

set ga_key [class lookup $username $static::ga_key_dg]

Where $static::ga_key_dg is the name of the datagroup, $username the string I'm using in the lookup and ga_key the returned value.

Any idea how can a datagroup be edited?

Best Regards,

  • I finally figured it out in the LAB. I followed the steps of the previous link but instead a pool I used an iRule to use the localhost IP:

     

    when CLIENT_ACCEPTED { node 127.0.0.1 443 }