3 Replies Latest reply on Oct 13, 2018 11:28 PM by donrobert5

    IPAM update subnet range through SWIS?

    savithru

      Is there a way we can update subnet range through SWIS? I have a lot of subnets which don't have range populated & would be helpful to do it via an API.

        • Re: IPAM update subnet range through SWIS?
          mesverrum

          You can't enter a subnet into IPAM without it having a range, so I'm not 100% sure what you are looking for.  So far I haven't found anything you can't do in IPAM via the API as far as creating any kind of object, or setting any properties on those objects.  Figuring out the syntax can be a bit of a process but you should probably start here

           

          Home · solarwinds/OrionSDK Wiki · GitHub

            • Re: IPAM update subnet range through SWIS?
              savithru

              If we create the subnet through API, yes subnet range is automatically populated. But not if we import through a template. So we need to update the range on all subnets imported through a template which is quite annoying.

               

              The other thing is how do we enable neighbor-scanning by setting a gateway IP address through the API?? I don't see an option to set this.

               

              >> swis.read("swis://hello.com/Orion/IPAM.Subnet/SubnetId=100,ParentId=11")

              {u'ReservedCount': 0, u'VLAN': u'990', u'AllocSize': 256, u'Comments': u'Voice', u'StatusRanking': 500, u'Role': u'SiteAdmin', u'Location': u'USA', u'StatusName': u'Up', u'ParentId': 12061, u'AccountID': u'admin', u'Status': 1, u'Description': None, u'StatusIconPostfix': u'up', u'Address': u'10.192.1.0', u'SubnetId': 12115, u'StatusShortDescription': u'Up', u'GroupIconPrefix': u'subnet', u'HasLicenceOverflow': False, u'AllocSizeN': 99.21875, u'Uri': u'swis://hello.com/Orion/IPAM.Subnet/SubnetId=100,ParentId=11', u'AvailableCount': 254, u'AddressMask': u'255.255.255.0', u'AddressN': None, u'PercentUsed': 0.0, u'FriendlyName': u'10.192.1.0/24', u'CIDR': 24, u'LastDiscovery': u'2018-09-27T18:39:20.283', u'GroupType': 10, u'TransientCount': 0, u'InstanceSiteId': 0, u'InstanceType': u'IPAM.Subnet', u'ScanInterval': None, u'TotalCount': 254, u'DisplayName': u'10.192.1.0/24', u'UsedCount': 0, u'GroupTypeText': u'Subnet'}