Configuring a disambiguation rule to handle multiple placement advisors
If multiple placement providers are registered as targets, you can configure disambiguation rules that identify the placement provider that handles the call. You can use platform-specific or provider-specific data used in PlacementAdvice calls to determine the placement provider. The provider Registry returns the GUID of the provider, and the call is dispatched to that provider.
In BMC Cloud Lifecycle Management, multiple placement providers support the same operation. When multiple Placement Providers are registered and they provide PlacementAdvice operation for the same objects, BMC Cloud Lifecycle Management cannot forward the request because multiple Placement Providers support the requested PlacementAdvice operation.
Multiple Placement Providers are present in BMC Cloud Lifecycle Management setups that have a heterogeneous infrastructure. During provisioning, depending on the type of target infrastructure (or certain disambiguation criteria), the requested Placement Advice operation is handled by a specific Placement Provider.
Disambiguation Engine uses disambiguation rules as criteria for selecting among multiple providers. Disambiguation rules are configured in advice-provider-mapping.json.
Before you begin
To trigger Placement Advice Disambiguation,ensure that the following conditions are met:
- The Placement Advice requested is provided by two Providers (Provider Instances) that are registered with BMC Cloud Lifecycle Management.
- The related 'PeerHint' property is set to false in the providers.json file. This ensures that placement advice calls are not handled by the Resource Manager.
Configuring a disambiguation rule
The following example shows how to configure the disambiguation rule.
"cloudClass": "com.bmc.cloud.model.beans.ComputePoolPlacementAdvice",
"operation": "create",
"ruleId": "9c778b7e-2aca-4cc9-b15d-7ce92f590fa5",
"paramCompareOperator": "EQUALS",
"csmRequestParameterName": "installableResource",
"csmRequestParameterClass": "com.bmc.cloud.model.beans.InstallableResource",
"compareParameterName": "categorizationTier3",
"compareParameterClass": "java.lang.String",
"paramValueToProviderDefMapping": [{
"value": "BladeLogic",
"providerDefinition": "13a7582e-2143-4add-80dc-dfd08647c266"
},
{
"value": "CiscoHCS",
"providerDefinition": "446e0b35-b987-4a93-8605-63c3b3f2b986"
}]
}]
Review the following parameters and descriptions:
Parameter | Description |
---|---|
cloudClass | Fully qualified name of the Placement Advice class for which the disambiguation rules are configured The following classes are supported: |
operation | Name of the operation that is executed on the Placement Advice class. Only the create operation is supported. |
ruleID | Unique guid assigned to this disambiguation rule. Currently, this parameter is for representation purposes only and has no internal usage. |
paramCompareOperator | Operator used for rule evaluation (comparison of values):
|
csmRequestParameterName | Name of the parameter object in the csmRequest. This property will be used in the disambiguation rule. |
csmRequestParameterClass | The class of the parameter in the CSM request, property of which will be used for disambiguation. |
compareParameterName | Name of the property of the object in the csmRequest referred to by csmRequestParameterName |
compareParameterClass | The class of property or attribute in the requestParameter, which is used for disambiguation. Currently, the following types are supported:
Class of the property of the object in the csmRequest referred to by csmRequestParameterName. This class information helps invoke the right comparison operation on the property used for comparison. |
paramValueToProviderDefMapping | List of mapping entries. Each mapping includes the following properties:
|