7 Replies Latest reply on Oct 28, 2015 1:25 PM by james.w.troy

    SAM 6.2 problem - add a node via SDK but no custom properties

    james.w.troy

      Dear Sir or Madam -

       

      For years, we have been creating our nodes via a Powershell script.   Also, we have custom properties defined for our nodes.  We recently upgraded our test Orion environment to SAM 6.2, while our production environment still runs SAM 6.1.1.

       

      Under SAM 6.1.1, when a node is created via "New-SwisObject", Orion creates a record in "Orion.Nodes" and "Orion.NodesCustomProperties" for the new node. 

       

      Under SAM 6.2, the record in "Orion.NodesCustomProperties"  is not created.   The code which attempts to set the property values runs without error, but it does nothing as there is no record to update.

       

      Under SAM 6.2, are we now required to create the record in "Orion.NodesCustomProperties"  ourselves ?   How do we create it ?

      If not, this appears to be a defect.

       

      Here is a simple example that can be run under SAM 6.1.1 and 6.2 to illustrate the different results -

       

      $node_props                     = @{}

      $node_props.EntityType          = "Orion.Nodes"

      $node_props.IPAddress           = "10.1.2.3"

      $node_props.IPAddressGUID       = "90000000-0000-0000-0000-010001002003"

      $node_props.Caption             = "host-name"

      $node_props.DynamicIP           = $False

      $node_props.Status              = 1

      $node_props.UnManaged           = $False

      $node_props.Allow64BitCounters  = $False

      $node_props.SysObjectID         = ""

      $node_props.MachineType         = ""

      $node_props.VendorIcon          = ""

      $node_props.PollInterval        =   60

      $node_props.RediscoveryInterval = 1440

      $node_props.StatCollection      =   5

      $node_props.CPULoad             = -2

      $node_props.MemoryUsed          = -2

      $node_props.PercentMemoryUsed   = -2

      $node_props.ObjectSubType       = "ICMP"

      $node_props.SNMPVersion         = 0

      $node_props.Community           = ""

      $node_props.EngineID            = 1

       

      $node_uri = New-SwisObject $swis  –EntityType "Orion.Nodes"  –Properties $node_props

       

      $cp_uri = $node_uri + "/CustomProperties"

       

      $node_props                   = @{}

      $node_props.a_custom_property = "some data"

       

      Set-SwisObject $swis  -uri $cp_uri  -properties $node_props

       

       

      Thank you.

       

      James Troy