}
// Add the policy to information model and persist.
public boolean deployAutoscalePolicy(AutoscalePolicy policy) throws InvalidPolicyException {
if(StringUtils.isEmpty(policy.getId())){
throw new AutoScalerException("AutoScaling policy id can not be empty");
}
this.addASPolicyToInformationModel(policy);
RegistryManager.getInstance().persistAutoscalerPolicy(policy);
if (log.isInfoEnabled()) {
log.info(String.format("AutoScaling policy is deployed successfully: [id] %s", policy.getId()));