'Checks if the alert policy exists for the server
:param server: the clc server object
:param alert_policy_id: the alert policy
:return: True: if the given alert policy id associated to the server, False otherwise'

@staticmethod
def _alert_policy_exists(server, alert_policy_id):

    result = False
    alert_policies = server.alertPolicies
    if alert_policies:
        for alert_policy in alert_policies:
            if (alert_policy.get('id') == alert_policy_id):
                result = True
    return result
