1 Reply Latest reply on Aug 28, 2014 6:01 AM by juniordev

    Add Interfaces On Node

    juniordev

      Hi,

      I try to add interfaces to a node. I use "DiscoverInterfacesOnNode" and "AddInterfacesOnNode" methods. I get every interfaces and passed to XDocument object. I looked up "NPM.DiscoverAndAddInterfacesOnNode.ps1" example file and writing below code block. But I didn't understand how to convert my XDocument object to SolarWinds.NPM.Common.Models.Discovery.InterfaceDiscovery.DiscoveredLiteInterface[] array type. I have done something at another projects like that code but I can't do convert to this array type. I don't know I exactly describe my problem but the screenshot may help this.

       

      ss.png

      swql.png

        • Re: Add Interfaces On Node
          juniordev

          I got the solution. I created an empty DiscoveredLiteInterface[] array. I processed every XElement array in XDoc (not as XDocument) as a DiscoveredLiteInterface. I can show schema like below.

           

          DiscoveredLiteInterface[] {

          XElement array at XDocument -> DiscoveredLiteInterface

          }