def add_policy(self, policy, updated_vs_name, avi_config, tmp_policy_ref, vs_obj, tenant_name, cloud_name, prefix, used_poolgrp_ref):
    '\n        This method is used to add policy objects to AVI and also add\n        reference in VS\n        :param policy: policy object\n        :param updated_vs_name: vs name\n        :param avi_config: avi config dict\n        :param tmp_policy_ref: list of policy ref which are already used\n        :param vs_obj: vs object\n        :param tenant_name: name of tenant\n        :param cloud_name: name of cloud\n        :param prefix: prefix\n        :param used_poolgrp_ref: list of used pool group ref\n        :return:\n        '
    if (policy['name'] in tmp_policy_ref):
        policy = self.clone_http_policy_set(policy, updated_vs_name, avi_config, tenant_name, cloud_name, used_poolgrp_ref, userprefix=prefix)
    updated_http_policy_ref = self.get_object_ref(policy['name'], OBJECT_TYPE_HTTP_POLICY_SET, tenant_name)
    tmp_policy_ref.append(policy['name'])
    http_policies = {'index': 11, 'http_policy_set_ref': updated_http_policy_ref}
    if (not vs_obj.get('http_policies')):
        vs_obj['http_policies'] = []
    else:
        ind = max([policies['index'] for policies in vs_obj['http_policies']])
        http_policies['index'] = (ind + 1)
    vs_obj['http_policies'].append(http_policies)
    avi_config['HTTPPolicySet'].append(policy)
This method is used to add policy objects to AVI and also add
reference in VS
:param policy: policy object
:param updated_vs_name: vs name
:param avi_config: avi config dict
:param tmp_policy_ref: list of policy ref which are already used
:param vs_obj: vs object
:param tenant_name: name of tenant
:param cloud_name: name of cloud
:param prefix: prefix
:param used_poolgrp_ref: list of used pool group ref
:return:
def add_policy(self, policy, updated_vs_name, avi_config, tmp_policy_ref, vs_obj, tenant_name, cloud_name, prefix, used_poolgrp_ref):
    '\n        This method is used to add policy objects to AVI and also add\n        reference in VS\n        :param policy: policy object\n        :param updated_vs_name: vs name\n        :param avi_config: avi config dict\n        :param tmp_policy_ref: list of policy ref which are already used\n        :param vs_obj: vs object\n        :param tenant_name: name of tenant\n        :param cloud_name: name of cloud\n        :param prefix: prefix\n        :param used_poolgrp_ref: list of used pool group ref\n        :return:\n        '
    if (policy['name'] in tmp_policy_ref):
        policy = self.clone_http_policy_set(policy, updated_vs_name, avi_config, tenant_name, cloud_name, used_poolgrp_ref, userprefix=prefix)
    updated_http_policy_ref = self.get_object_ref(policy['name'], OBJECT_TYPE_HTTP_POLICY_SET, tenant_name)
    tmp_policy_ref.append(policy['name'])
    http_policies = {'index': 11, 'http_policy_set_ref': updated_http_policy_ref}
    if (not vs_obj.get('http_policies')):
        vs_obj['http_policies'] = []
    else:
        ind = max([policies['index'] for policies in vs_obj['http_policies']])
        http_policies['index'] = (ind + 1)
    vs_obj['http_policies'].append(http_policies)
    avi_config['HTTPPolicySet'].append(policy)