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
public IpamNetworkAdd(objIpamConnection: IpamConnection, strIpAddress: string, intCIDR: number, strTemplate: string = "", strDnsView: string = "default", strNetworkView: string = "default"): void {
let objIpamNetwork: IpamNetwork = new IpamNetwork(strIpAddress, intCIDR);
let arrIpAddress: string[] = [];
let objIpamMembers: IpamMembers = new IpamMembers(IpamMemberType.INFOBLOX, arrIpAddress);
try {
objIpamConnection.reconnect();
objIpamConnection.configDefaultNetworkView = strNetworkView;
objIpamConnection.configDefaultDnsView = strDnsView;
let objIpamNetworkManager: 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.
