Topic
6 replies Latest Post - ‏2013-03-20T12:06:35Z by SystemAdmin
SystemAdmin
SystemAdmin
172 Posts
ACCEPTED ANSWER

Pinned topic Unable to do autopopulation of services in TBSM using ESDA rule

‏2013-03-12T06:26:43Z |
Hi,

I want to autopopulate the service tree in TBSM when I provide value for a particular MSC.
The Service tree is like this: (grandparent)MSC->(parent)BSC->(child)BTS
Under MSC there can be many BSCs and under each BSC there can be many BTSs.

I am able to create instance of BSC and BTSes and first level of autopopulation(MSC->BSC) is created, but I want to access instance of BSC just created in the service tree and attach its children to it.
So is there any method in TBSM using which I can get reference of BSC service just created and attach child services to it or any other method to do the second level of autopopulation?

Regards.
Updated on 2013-03-20T12:06:35Z at 2013-03-20T12:06:35Z by SystemAdmin
  • IsaacGraf
    IsaacGraf
    34 Posts
    ACCEPTED ANSWER

    Re: Unable to do autopopulation of services in TBSM using ESDA rule

    ‏2013-03-12T20:19:49Z  in response to SystemAdmin
    I'm not sure that I follow.
    If you want to add more children to a parent that was autopopulated (which will only have a single child- the one that was just autopopulated), the best way is probably to configure an ESDA child rule on the parent (BSC) template. This way when the BSC parent next tries to get its children, the ESDA rule will run and the children will get imported.
    • SystemAdmin
      SystemAdmin
      172 Posts
      ACCEPTED ANSWER

      Re: Unable to do autopopulation of services in TBSM using ESDA rule

      ‏2013-03-18T05:24:04Z  in response to IsaacGraf
      Yes,I had configured the ESDA rule on parent (BSC template also).Still facing the same issue....

      can you please review the code and help us in fixing this issue
      Sample Code:

      //BSC Names
      BSCval={"bsc1","bsc2"};

      //BTS Names
      BTS={"bts1","bts2","bts3","bts4","bts5","bts6","bts7"};

      //Number of BTS to the corresponding BSC
      NoBTS={'3','4'};

      p=0;

      q=0;

      r=0;

      //check the length of BSC
      while(p<length(BSCval))
      {
      r=0;

      //check the count BTS
      while(r<NoBTS[p])
      {

      //creates BTS
      BTS[r]=newobject();

      BTS[r].MyInstanceName=BTStempr+q;

      BTS[r].MyDisplayName=BTStempr+q;

      BTS[r].MyDescription="Test";

      NextLevelOrgNodes=BTS[r];
      if(NextLevelOrgNodes[r]NULL)
      {
      Attributes =newObject();
      //Adding to created BTS to the BTS template
      Attributes._TagList="BTStest";
      }
      r=r+1;

      }
      q=q+NoBTS[p];

      p=p+1;

      }
      • IsaacGraf
        IsaacGraf
        34 Posts
        ACCEPTED ANSWER

        Re: Unable to do autopopulation of services in TBSM using ESDA rule

        ‏2013-03-18T20:27:49Z  in response to SystemAdmin
        Hi, it's a little hard for me to get the full picture from the policy, but I'll make a couple of comments...

        one is to keep in mind that in order to get children of the BSC instance the esda rule and policy must be configured for the BSC template, not the one above it.
        Also, when you do
        NextLevelOrgNodes=BTS[r]; I think you might mean to do
        NextLevelOrgNodes = NextLevelOrgNodes + BTS[r]; (otherwise there will never be more than one child).

        Also I would suggest to put in log statements in many places in the policy and then trigger it manually be invalidating the BSC parent, refreshing the tree and then expanding the BSC parent- that should trigger this ESDA child rule to run. By putting in logging you can make sure you're getting what you expect at each step of the policy.

        Thanks,
        Isaac
        • SystemAdmin
          SystemAdmin
          172 Posts
          ACCEPTED ANSWER

          Re: Unable to do autopopulation of services in TBSM using ESDA rule

          ‏2013-03-19T05:57:24Z  in response to IsaacGraf
          Thanks for your valuable responses.

          By the above mentioned code we are already getting output as:

          from while condition

          first loop run it will give : bts1,bts2,bt3(children)
          second loop run it will give : bts4,bts5,bts6,bts7(children)

          Now problem is here:
          1)the first loop generated children has to be attached for BSC1(auto populated Parent)
          2)the second loop generated children has to be attached for BSC2(auto populated Parent)

          We need to access the autopopulated Parent from Service tree in code to attach the corresponding children.
          Please guide us how can we achieve the above scenario.

          Thanks
          • IsaacGraf
            IsaacGraf
            34 Posts
            ACCEPTED ANSWER

            Re: Unable to do autopopulation of services in TBSM using ESDA rule

            ‏2013-03-19T20:29:45Z  in response to SystemAdmin
            The esda policy has access to the parent that invokes the policy via the SeedInstance variable.
            So you should be able to do something like:

            if (SeedInstance.displayname = "BCS1") {
            // do logic for first loop
            }

            if (SeedInstance.displayname = "BSC2") {
            // do logic for second loop
            }
            • SystemAdmin
              SystemAdmin
              172 Posts
              ACCEPTED ANSWER

              Re: Unable to do autopopulation of services in TBSM using ESDA rule

              ‏2013-03-20T12:06:35Z  in response to IsaacGraf
              Thanks alot..It's working fine with this.