- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
IPAM Plug-in for VMWare - CNAME Creation
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-20-2014 04:08 AM
Hello-- I'm trying to get a CNAME created for a new host record being created using vCO 5.1 and the Infoblox plug-in. I thought by adding just a "CNAME" to the action script addHost would be sufficient. I am learning to write some code through examples. The script below is the snippet from the Infoblox provided script addHost. When I execute the workflow I get the following error: Unable to create object : IpamHost : com.infoblox.ipam.model.IpamHost. Any guidance is appreciated. Thank you.
var network = new IpamNetwork(netaddr, netmask, null);
System.log("IPAM network is: " + network.address + "/"+ network.cidr);
var host = new IpamHost(ipAddress, macAddress, hostName.toLowerCase(), comment, cname);
System.log("IPAM host to add is: " + host.fqdn + "with ip " + host.ip + "and Mac Address " + host.mac);
var ea = null;
if (vcd_vm != "" & vcd_vapp != "" & vcd_vdc != "" & vcd_vorg != "" ) {
ea = new IpamExtensibleAttribute(vcd_vm, vcd_vapp, vcd_vdc, vcd_vorg);
System.log(" EA object is: " + ea.vm + ":"+ ea.vapp + ":" + ea.vdc + ":"+ ea.vorg);
}
var result = ipamConnection.addHost(network, host, ea);
System.log("Added the host to IPAM NIOS:" + hostName.toLowerCase() + ":" + result.ip + ":" + macAddress);
return result;
Solved! Go to Solution.
Re: IPAM Plug-in for VMWare - CNAME Creation
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-14-2015 01:23 PM - edited 09-14-2015 01:29 PM
Hi BDyer, the plug-in includes vCO workflows which already support the "aliases" field, which is the field in a host record that needs to be populated for DNS to create a CNAME.
To follow your example, if your host is called "host.fqdn", giving it an alias of "host.mac" will essentially create a DNS CNAME record in the zone "mac" (which would need to exist and be managed by the Grid), which points from host.mac to host.fqdn.
So resolution would look like this:
NAME TYPE DATA
host.mac CNAME host.fqdn
host.fqdn A 1.2.3.4
I hope this helps!