Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all articles
Browse latest Browse all 2677

Adding new IPAM subnets via SWIS to existing groups

$
0
0

I am working on an application that allows users to automatically add subnets into IPAM by simply putting in some basic site details. It works with a basic Django based front-end and using Netmiko to jump on the kit. It's nearly done, I just need to export all the data I have into SWIS.

 

I am using the OrionSDK library for Python, and am a bit confused as to how I build out the command in SWIS, so far I have this:

 

swis.invoke('CreateSubnetForGroup', SWIS_Dict[str(i)]['address'], SWIS_Dict[str(i)]['cidr'], SWIS_Dict[str(i)]['code'])

 

Where;

 

`SWIS_Dict` is a nested dictionary of processed parameters, i.e. subnet address, cidr and site-code

`i` is an index as this is part of a loop, for adding multiple subnets

 

Using this as a reference, there is an outline as to how to do this for a 'Hierarchy Group', but all of our sites exist as groups under a single hierarchy group simply called "IP Networks" .

 

I am assuming I will also need to run CRUD operations on the subnets once they are added, for things such as the VLAN ID, display name and descriptions.


Viewing all articles
Browse latest Browse all 2677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>