3.5.4.7.1.21 IpamIPAddressByManagedByAndManagedByEntityEnumerationParameters
This is the processing done when the EnumInputParameters contains data of type IpamIPAddressByManagedByAndManagedByEntityEnumerationParameters. The ObjectType MUST be EnumerationObjectType.IPAddress. This is used to enumerate addresses mapped to the specified address block given by IpamIPAddressByBlockIdEnumerationParameters.BlockId. The IpamIPAddressByBlockIdEnumerationParameters.AddressFamily is used to determine the simple table within the ADM_IPAddressTable on which the processing has to be done. If the AddressFamily is Internet, the EnumOutputData will be a collection of IpamIPv4Address and if it is InternetV6, the EnumOutputData will be a collection of IpamIPv6Address.
The following are the steps involved in identifying the rows to be returned as a part of the enumeration:
Enumerate the row in ADM_CustomFieldValuesTable where CustomFieldValueDetails.Value is equal to IpamIPAddressByManagedByAndManagedByEntityEnumerationParameters.ManagedByValue. Store the RecordId of the row in requiredManagedByCustomFieldValueId.
Enumerate the row in ADM_CustomFieldValuesTable where CustomFieldValueDetails.Value is equal to IpamIPAddressByManagedByAndManagedByEntityEnumerationParameters.ManagedByEntityValue. Store the RecordId of the row in requiredManagedByEntityCustomFieldValueId.
Enumerate the rows in ADM_CustomFieldValuesAssociationTable which meet the following criteria.
ObjectType is EnumerationObjectType.IPAddress
Af is IpamIPAddressByManagedByAndManagedByEntityEnumerationParameters.AddressFamily
CustomFieldId is equal to ADM_ManagedByCustomFieldId.
CustomFieldValueId is equal to requiredManagedByCustomFieldValueId.
The rows enumerated in 3 will provide the list of IP addresses which have the specified value for ManagedBy custom field. For each of these rows, perform the following steps to filter out the rows which have the specified custom field value as well.
Enumerate the row in ADM_CustomFieldValuesAssociationTable which meet the following criteria.
Param_ObjectType is EnumerationObjectType.IPAddress
Af is IpamIPAddressByManagedByAndManagedByEntityEnumerationParameters.AddressFamily
CustomFieldId is equal to ADM_ManagedByEntityCustomFieldId
CustomFieldValueId is equal to requiredManagedByEntityCustomFieldValueId.
UsedById is equal to row.RecordId.
If there is a row which is meeting the above mentioned criteria, the address with RecordId equal to row.RecordId meets the required condition. Call the procedure GetIPAddressFromTable passing row.RecordId as Param_Id and IpamIPAddressByManagedByAndManagedByEntityEnumerationParameters.AddressFamily as Param_addressfamily. Add result to EnumOutputData.