Service Operations Insight

 View Only
  • 1.  Universal Connector Creating a Sub Service

    Posted Nov 12, 2014 03:59 AM

    Hi,

     

    I am trying to use the Universal Connector in a programatic way to create a number of sub services. I am using the following XML.

     

    <?xml version="1.0" encoding="ISO-8859-1"?>

    <Services>

      <Service>

      <property tag="eventType" value="AddService" />

      <property tag="MdrElementID" value="Sub_Service" />

      <property tag="className" value="SA_Service" />

      <property tag="Description" value="Sub_Service" />

      <property tag="deviceID" value="Sub_Service" />

      <property tag="severity" value="0" />

      <property tag="Tags" value="0001" />

      <property tag="Description" value="Adding a new Service" />

      </Service>

      <CI>

      <property tag="eventType" value="AddCI" />

      <property tag="MdrElementID" value="Group_A" />

      <property tag="className" value="SA_Group" />

      <property tag="deviceID" value="Group_A" />

      <property tag="GroupName" value="Group_A" />

      <property tag="Tags" value="0001" />

      <property tag="severity" value="0" />

      <property tag="Description" value="Group A" />

      </CI>

      <CI>

      <property tag="eventType" value="AddCI" />

      <property tag="MdrElementID" value="Group_B" />

      <property tag="className" value="SA_Group" />

      <property tag="deviceID" value="Group_B" />

      <property tag="GroupName" value="Group_B" />

      <property tag="Tags" value="0001" />

      <property tag="severity" value="0" />

      <property tag="Description" value="Group B" />

      </CI>

      <Relationship>

      <property tag="eventType" value="AddRelationship" />

      <property tag="SourceMdrElementID" value="Sub_Service" />

      <property tag="TargetMdrElementID" value="Group_A" />

      <property tag="ScopeMdrElementID" value="Sub_Service" />

      <property tag="Semantic" value="Requires" />

      <property tag="className" value="Relationship" />

      </Relationship>

      <Relationship>

      <property tag="eventType" value="AddRelationship" />

      <property tag="SourceMdrElementID" value="Sub_Service" />

      <property tag="TargetMdrElementID" value="Group_B" />

      <property tag="ScopeMdrElementID" value="Sub_Service" />

      <property tag="Semantic" value="Requires" />

      <property tag="className" value="Relationship" />

      </Relationship>

      <Relationship>

      <property tag="eventType" value="AddRelationship" />

      <property tag="SourceMdrElementID" value="Super_Service" />

      <property tag="TargetMdrElementID" value="Sub_Service" />

      <property tag="ScopeMdrElementID" value="Super_Service" />

      <property tag="Semantic" value="Aggregate" />

      <property tag="className" value="Relationship" />

      </Relationship>

    </Services>

     

    Everything gets created correctly except the Sub Service is added directly under the Services service instead of becoming a sub service to 'Super_Service'.

     

    i.e.

     

    This is the structure that is created.

    Services

        >Sub_Service

     

    Instead of.

     

    Services

        >Super_Service

             >Sub_Service

     

    Hopefully that all makes sense. Any and all advice on sorting this is greatly appreciated, also some logging or more verbose output on what the Universal Connector is doing when used in this way would be very useful.

     

    Cheers,

     

    Simon



  • 2.  Re: Universal Connector Creating a Sub Service
    Best Answer

    Posted Nov 12, 2014 04:38 AM

    Hi Simon,

    in the <Services> block you have to add all objects that are mentioned for the complete structure, even if they exist already.

    When you add another block for the Super_Service, your file works as expected.

      <Service>

      <property tag="eventType" value="AddService" />

      <property tag="MdrElementID" value="Super_Service" />

      <property tag="className" value="SA_Service" />

      <property tag="Description" value="Super_Service" />

      <property tag="deviceID" value="Super_Service" />

      <property tag="severity" value="0" />

      <property tag="Tags" value="0001" />

      <property tag="Description" value="Adding a new Super_Service" />

      </Service>

     

    I cannot explain though from a tecnnical background why this has to be done (you should assume that when a Service is existing already, you can just reference it).  But when I tested this it worked fine.



  • 3.  Re: Universal Connector Creating a Sub Service

    Posted Nov 12, 2014 05:48 AM

    Hi Michael,

     

    That is very strange behaviour indeed and is not documented anywhere. Can you tell me if my 'Super_Service' is nested in another service will I have to reference the whole service tree to get my 'Sub_Service' in the correct position?

     

    Many thanks,

     

    Simon



  • 4.  Re: Universal Connector Creating a Sub Service

    Posted Nov 12, 2014 05:57 AM

    Hi Michael,

     

    I just tried this out in a VM and I only need to reference the immediate parent service for the 'Sub_Service' to nest correctly.

     

    Thanks very much for your help.

     

    Simon



  • 5.  Re: Universal Connector Creating a Sub Service

    Broadcom Employee
    Posted Nov 13, 2014 08:16 AM

    Simon, you are importing a service with a <Services>...</Services> block. This is not not just publishing items and relationships. Because of this you need to provide a complete service definition and cannot publish any relationships to items not included explicitly in the service.



  • 6.  Re: Universal Connector Creating a Sub Service

    Posted Nov 13, 2014 02:21 PM

    Hi Ralf,

     

    I am not sure what you're saying there, can you clarify?

     

    Regards,

     

    Simon



  • 7.  Re: Universal Connector Creating a Sub Service

    Broadcom Employee
    Posted Nov 13, 2014 02:48 PM

    Simon,

    A service consists of an item of type service as the root, a number of items that are part of the service, and relationships between these items in the context of this service. In your example you are publishing a service called Sub_Service. All relationships in the service definition have to belong to this service (ScopeMdrElementID has to be the MdrElementID of this service). Any relationship where this service is the child belongs to the parent service and has to be published as part of the parent service.

     

    Ralf



  • 8.  Re: Universal Connector Creating a Sub Service

    Posted Nov 14, 2014 10:11 AM

    Hi Ralf,

     

    I understand what you are saying now, thanks.

     

    Kind regards,

     

    Simon