Assign IPv4 Address - BlueCat Address Manager - 8.3.1

Address Manager API Guide

prodname
BlueCat Address Manager
version_custom
8.3.1

Assigns a MAC address and other properties to an IPv4 address.

Output / Response

Returns the object ID for the newly assigned IPv4 address.

API call:

long assignIP4Address ( long configurationId, String ip4Address, String macAddress, String hostInfo, String action, String properties)
Parameter Description
configurationId The object ID of the configuration in which the IPv4 address is located.
ip4Address The IPv4 address.
macAddress The MAC address to assign to the IPv4 address. The MAC address can be specified in the format nnnnnnnnnnnn, nn-nn-nn-nn-nn-nn or nn:nn:nn:nn:nn:nn, where nn is a hexadecimal value.
hostInfo A string containing host information for the address in the following format:
hostname,viewId,reverseFlag,sameAsZoneFlag[,
hostname,viewId,reverseFlag,sameAsZoneFlag,...]
Where:
  • hostname - The Fully Qualified Domain Name (FQDN) for the host record to be added.
  • viewId - The object ID of the view under which this host should be created.
  • reverseFlag - The flag indicating if a reverse record should be created. The possible values are true or false.
  • sameAsZoneFlag - The flag indicating if record should be created as same as zone record. The possible values are true or false.

The comma-separated parameters may be repeated in the order shown above. The string must not end with a comma.

action This parameter must be set to one of the constants shown in IP Assignment Action Values.
properties A string containing the following property, including user-defined fields:
  • ptrs—a string containing the list of unmanaged external host records to be associated with the IPv4 address in the following format:
    viewId,exHostFQDN[, viewId,exHostFQDN,...]
    You can assign External Host records to an IPv4 address using the following method:
    EntityProperties props = new EntityProperties();
           props.addProperty( ObjectProperties.ptrs,  "123,exHostFQDN.com,456,exHostFQDN.net" )
            long addressId = service.assignIP4Address( configurationId, IPv4Address, macAddressStr, hostInfo, IPAssignmentActionValues.MAKE_STATIC, props.getPropertiesString() );
  • name—name of the IPv4 address.
  • locationCode—the hierarchical location code consists of a set of 1 to 3 alpha-numeric strings separated by a space. The first two characters indicate a country, followed by next three characters which indicate a city in UN/LOCODE. New custom locations created under a UN/LOCODE city are appended to the end of the hierarchy. For example, CA TOR OF1 indicates: CA= Canada TOR=Toronto OF1=Office 1.
    Note: The code is case-sensitive. It must be all UPPER CASE letters. The country code and child location code should be alphanumeric strings.