20 Replies Latest reply on Aug 22, 2017 8:51 AM by clarv02

    Trigger NCM configuration download from SDK

    ed_gpc

      Is there any way with the SDK to start a configuration download?

       

      For some reason my nightly backup of configs runs into some issues, but when I manually download from node details, it always works fine.

       

      So, I take my email report, put it in a text box in vb, parse it and get the few that had errors.  Would like to be able to take that and click 'try again on all' kind of thing.

        • Re: Trigger NCM configuration download from SDK
          Denys.Pavlov

          In C# you may use the following snippet:

           

          void DL(InfoServiceProxy proxy)
                  {
                      XmlDocument doc = new XmlDocument();
          
                      doc.LoadXml(
          @"<?xml version=""1.0"" encoding=""utf-8""?>
          <params>
            <ArrayOfguid xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""
            xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays"">
              <guid>2e5b5574-7dcd-4b5f-a9f9-982ae773cedc</guid>
              <guid>99f11cbd-849b-4786-b45e-35cd2dd55017</guid>
              <guid>d4b6f228-53f2-493b-b406-e657ef7e090e</guid>
              <guid>17693dd7-5104-4778-bd2f-8689ee5b8bcf</guid>
              <guid>088fc2a0-7434-418a-b311-3e82d5b984ff</guid>
              <guid>8dbe44f2-5707-482e-a216-c9167768256c</guid>
            </ArrayOfguid>
            <string xmlns=""http://schemas.microsoft.com/2003/10/Serialization/"">Running</string>
            <string xmlns=""http://schemas.microsoft.com/2003/10/Serialization/"">admin</string>
          </params>
          ");
          
                      XmlElement[] xmlElements = doc.DocumentElement.ChildNodes.Cast<XmlElement>().ToArray();
                      proxy.Invoke("Cirrus.ConfigArchive", "Download", xmlElements);
                  }
          

           

          This post may give you idea on how to instantiate the InfoServiceProxy object which comes as parameter to this method.

          As you can see we pass array of Guids (element Arrayofguid) - they are NCM node ids. You would have to provide your Node IDs.

          To find which Node Id corresponds to IP address you may use SWQL studio and query:

          SELECT NodeID, AgentIP, AgentIPv6
          FROM Cirrus.Nodes
          

           

          The next parameter is config type, in his sample it is Running.

          The last parameter specifies the Orion user name whos account is used to download configs, in this sample it is admin.

           

          After you call the Download verb the statuses of download will be reflected in the Cirrus.TransferQueue entity and obviously you can follow them on NCM web.