Symantec Access Management

Expand all | Collapse all

Perl Array not able to store all realms

  • 1.  Perl Array not able to store all realms

    Posted 08-09-2018 11:16 AM

    Hi, I am working on a perl script to fetch all the realms and store it inside a perl array. The Domain has 272 realms. However, when I store the elements inside the array and try to write them inside a text file, it only shows 82 realms. We are using Netegrity::PolicyMgtAPI package to create the session. Here is my script:

     

     

    @realms=$domain->GetAllRealms();

    $i=0;
    $realmSize=@realms;
    print fileWrite "\nSize of the Realm array is " . $realmSize;          #Shows the size 82, where originial size should be 272

    foreach $realm(@realms)
    {
    print fileWrite "\nRealm Name is" . $realm->Name();           #Shows 82 entries only
    }

     

    Also, if you think this might be a memory issue, could you please let me know how do I overcome it? 



  • 2.  Re: Perl Array not able to store all realms

    Broadcom Employee
    Posted 08-09-2018 03:55 PM

    Hi Rajesh, 

     

    I'm actually wondering, since you used GetAllRealms, are the 82 domains you are seeing all top level domains? And, are the 82 always the same 82 Realm names?

     

    There is another method you may need to use, GetAllChildRealms, if you have nested Realms.

     

    Hope this helps!



  • 3.  Re: Perl Array not able to store all realms

    Posted 08-10-2018 05:34 AM

    Hi David,
      Actually, there is only one Domain. $domain holds the value for that domain and once we are storing the realms into the @realms array. Yes, it's prints the same 82 realms everytime. Also, I have used the GetAllChildRealms method for nested realms. The issue is what I am facing, the perl array is not able to store all the realm objects. If I print the realms using a for loop, it only shows me 82 results where the actual result should be 272.



  • 4.  Re: Perl Array not able to store all realms

    Broadcom Employee
    Posted 08-10-2018 04:29 PM

    Hi Rajesh, 

     

    Just to confirm, when you used the GetAllChildRealms, how many did it display as the count?

     

    I don't think the issue would be a memory limitation as Perl will use pretty much whatever memory is available that it needs. It is possible there is a problem with the method. At this point, I would suggest opening a Support ticket regarding this use case, and if possible provide us a copy of your Policy Store for testing in the same ticket.

     

    Thanks!