def clone_pool_group(self, pg_name, cloned_for, avi_config, tenant_name, cloud_name, userprefix=None):
    '\n        Used for cloning shared pool group.\n        :param pg_name: pool group name\n        :param cloned_for: clone for\n        :param avi_config: avi config dict\n        :param tenant_name:\n        :param cloud_name:\n        :param userprefix: prefix for objects\n        :return: None\n        '
    pool_groups = [pg for pg in avi_config['PoolGroup'] if (pg['name'] == pg_name)]
    if pool_groups:
        pool_group = copy.deepcopy(pool_groups[0])
        pool_group_name = re.sub('[:]', '-', ('%s-%s' % (pg_name, cloned_for)))
        pool_group['name'] = pool_group_name
        for member in pool_group.get('members', []):
            pool_ref = self.get_name(member['pool_ref'])
            pool_ref = self.clone_pool(pool_ref, cloned_for, avi_config, userprefix=userprefix)
            if pool_ref:
                updated_pool_ref = self.get_object_ref(pool_ref, OBJECT_TYPE_POOL, tenant_name, cloud_name)
                member['pool_ref'] = updated_pool_ref
        avi_config['PoolGroup'].append(pool_group)
        LOG.info(('Same pool group reference to other object. Clone Pool group %s for %s' % (pg_name, cloned_for)))
        return pool_group['name']
    return None
Used for cloning shared pool group.
:param pg_name: pool group name
:param cloned_for: clone for
:param avi_config: avi config dict
:param tenant_name:
:param cloud_name:
:param userprefix: prefix for objects
:return: None
def clone_pool_group(self, pg_name, cloned_for, avi_config, tenant_name, cloud_name, userprefix=None):
    '\n        Used for cloning shared pool group.\n        :param pg_name: pool group name\n        :param cloned_for: clone for\n        :param avi_config: avi config dict\n        :param tenant_name:\n        :param cloud_name:\n        :param userprefix: prefix for objects\n        :return: None\n        '
    pool_groups = [pg for pg in avi_config['PoolGroup'] if (pg['name'] == pg_name)]
    if pool_groups:
        pool_group = copy.deepcopy(pool_groups[0])
        pool_group_name = re.sub('[:]', '-', ('%s-%s' % (pg_name, cloned_for)))
        pool_group['name'] = pool_group_name
        for member in pool_group.get('members', []):
            pool_ref = self.get_name(member['pool_ref'])
            pool_ref = self.clone_pool(pool_ref, cloned_for, avi_config, userprefix=userprefix)
            if pool_ref:
                updated_pool_ref = self.get_object_ref(pool_ref, OBJECT_TYPE_POOL, tenant_name, cloud_name)
                member['pool_ref'] = updated_pool_ref
        avi_config['PoolGroup'].append(pool_group)
        LOG.info(('Same pool group reference to other object. Clone Pool group %s for %s' % (pg_name, cloned_for)))
        return pool_group['name']
    return None