To use this function add it to the class library file named InfobloxService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: InfobloxService.ts
Description: Orchestrator Function to Add a new IpamNetwork.
Function: IpamNetworkAdd
publicIpamNetworkAdd(objIpamConnection:IpamConnection,strIpAddress:string,intCIDR:number,strTemplate:string="",strDnsView:string="default",strNetworkView:string="default"):void{
letobjIpamNetwork:IpamNetwork=newIpamNetwork(strIpAddress,intCIDR);
letarrIpAddress:string[]= [];
letobjIpamMembers:IpamMembers=newIpamMembers(IpamMemberType.INFOBLOX,arrIpAddress);
try{
objIpamConnection.reconnect();
objIpamConnection.configDefaultNetworkView=strNetworkView;
objIpamConnection.configDefaultDnsView=strDnsView;
letobjIpamNetworkManager:IpamNetworkManager=objIpamConnection.getNetworkManager();
objIpamNetworkManager.addNetwork(objIpamNetwork,strTemplate,objIpamMembers);
}
catch (objException){
this.objLogger.info(objException);
}
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
