2 Replies Latest reply on Jun 16, 2016 8:43 AM by Argyris Spinos

    Compare each entry of an EO with every entry of another EO

    Argyris Spinos

      Good day,

       

      BSA v. = 8.7.00.263

       

      Is the below a legal operation in rule definition?

       

      foreach "Extended Object Entry:sendmail//**"

         "Name" 'is one of' "Extended Object Entry:IPv4address".Name

       

      Currently I get 'The type on the right does not match the required type'.

       

      Both EOs are remote execution, single_val.gm that return a list of IP addresses under 'Name'.

       

      edit: if I change the operator to 'is equal' from 'is one of' it goes through, but is not what I need in this case.

       

      Many thanks

        • 1. Re: Compare each entry of an EO with every entry of another EO
          suresh Balla

          We can achieve it by 2 ways, can you provide EO script details I can provide more appropriate way

          VAR_MYSERVER is local string property

          Using EO:

           

          Command way:

          VAR_MY_LIST is local LIST property

          VAR_YOUR_LIST is local LIST property

          • 2. Re: Compare each entry of an EO with every entry of another EO
            Argyris Spinos

            Good day Suresh,

             

            Actually what I am comparing are IP addresses so I thought that this might be related with the EO Entry property "Name" which might expect string value and not integer.

             

            So I changed both rule and EO to below (with same results):

             

            foreach "Extended Object Entry:sendmail_access"

               @"Value1 as Integer (All OS)"@ 'is one of' "Extended Object Entry:Allipv4addresses"."Value1 as Integer (All OS)"

            end

             

            EO: sendmail_access

            Script: grep -v '^#' /etc/mail/access | grep '^Connect:' | awk '{print $1}' | sed 's/:/,/g'

            remote execution

            csv.gm

             

            ------------------------------------------------------------------------------------------------------------

             

            EO: Allipv4addresses

            Script: ip addr show | grep inet | grep -v 'inet6' | awk '{print $1","$2}' | sed 's/\/[0-9]*$//g'

            Remote execution

            csv.gm

             

             

            As far as I can see, List local property is only of type [String]. Is there an equivalent for integer, to be used with IP addresses?