DX NetOps

  • 1.  How to populate Global Collections with the Modeling Gateway

    Posted 08-17-2014 10:42 PM

    I have used the Modeling Gateway for automating the modeling of information in Spectrum.  So, now I would like to update Global Collection membership via the Modeling Gateway; however, I've been having problems getting this to work.  Does anyone have any example of modeling gateway import files where they have been able to add devices to a static global collection?



  • 2.  Re: How to populate Global Collections with the Modeling Gateway
    Best Answer

    Posted 08-26-2014 09:36 AM

    We do the exact same thing, and here's our template for adding a single model to a static global collection.

     

     

    <?xml version="1.0" standalone="no"?>

    <!DOCTYPE Import SYSTEM ".modelinggateway.dtd">

     

    <Import>

     

    <!-- **************************** -->

    <!-- Template for adding a device to a global collection -->

    <!-- %(batch_id)s for locking/unlocking purposes -->

    <!-- **************************** -->

     

    <Global_Collection>

        <GlobalCollection name="%(GlobalCollection)s" Security_String="ADMIN" >

            <Device ip_dnsname="%(IP)s"

            model_name="%(DomainName)s"

            %(Credentials)s />

        </GlobalCollection>

    </Global_Collection>

     

    </Import>



  • 3.  Re: How to populate Global Collections with the Modeling Gateway

    Posted 08-26-2014 12:04 PM

    I know you specifically asked about Modelling gateway, but this is also possible using REST.

     

    It's a bit more complex, but each server has it's own model for a specific Global Collection, so you have to process these for each primary landscape server in the domain:

     

    1. Find the model handles of the Global Collections (all models with name '<Name of Global Collection>' and Model Type Handle of '0x10474'). You can do this with 1 RESTful query.

     

    2. If they don't exist create them. (Create a model with mth='0x10474' and name '<Name of Global Collection>')

     

    3. Create a relationship between the device you want added and the Global collection (dynamicGlobalCollects) and the Global collection itself.

     

    Note, You might have some landscapes that don't have a global collection defined on it. If none of the devices on that landscape belong to that GC, this would be why!