Function: Add a Host Record using the Infoblox Plugin

by Simon Sparks · 29 January 2026

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 Host record using the Infoblox plugin

Function: AddRecordHost

public AddRecordHost(objIpamConnection: IpamConnection, strIpSubnet: string, intCIDR: number, strFQDN: string, strMacAddress: string = "00:00:00:00:00:00", blnEnableDns: boolean = true, strDnsView: string = "default", strNetworkView: string = "default"): void {
    let strIPAddress: string = this.IpamNetworkGetNextAvailableIP(objIpamConnection, strIpSubnet, intCIDR, strDnsView);

    let objIpamHostInfo: IpamHostInfo = new IpamHostInfo(strFQDN);
    objIpamHostInfo.enableDns = blnEnableDns;
    objIpamHostInfo.comment = "DNS - A Record Deployed by Orchestrator";
    objIpamHostInfo.fqdn = strFQDN;

    let objIpamHostAddress: IpamHostAddress = new IpamHostAddress();
    objIpamHostAddress.mac = strMacAddress;
    objIpamHostAddress.ip = strIPAddress;

    try {
        objIpamConnection.reconnect();
        objIpamConnection.configDefaultNetworkView = strNetworkView;
        objIpamConnection.configDefaultDnsView = strDnsView;

        let objIpamHostManager: IpamHostManager = objIpamConnection.getHostManager();

        objIpamHostManager.addHost(objIpamHostInfo, objIpamHostAddress);
    }
    catch (objException) {
        this.objLogger.info(objException);
    }
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like