def setup_rules(self, dut, acl_table, ip_version):
    'Setup ACL rules for testing.\n\n        Args:\n            dut: The DUT having ACLs applied.\n            acl_table: Configuration info for the ACL table.\n\n        '
    table_name = acl_table['table_name']
    dut.host.options['variable_manager'].extra_vars.update({'acl_table_name': table_name})
    logger.info('Generating incremental ACL rules config for ACL table "{}"'.format(table_name))
    for (part, config_file) in enumerate(ACL_RULES_PART_TEMPLATES[ip_version]):
        dut_conf_file_path = os.path.join(DUT_TMP_DIR, 'acl_rules_{}_part_{}.json'.format(table_name, part))
        dut.template(src=os.path.join(TEMPLATE_DIR, config_file), dest=dut_conf_file_path)
        logger.info('Applying ACL rules config "{}"'.format(dut_conf_file_path))
        dut.command('config acl update incremental {}'.format(dut_conf_file_path))
Setup ACL rules for testing.

Args:
    dut: The DUT having ACLs applied.
    acl_table: Configuration info for the ACL table.
def setup_rules(self, dut, acl_table, ip_version):
    'Setup ACL rules for testing.\n\n        Args:\n            dut: The DUT having ACLs applied.\n            acl_table: Configuration info for the ACL table.\n\n        '
    table_name = acl_table['table_name']
    dut.host.options['variable_manager'].extra_vars.update({'acl_table_name': table_name})
    logger.info('Generating incremental ACL rules config for ACL table "{}"'.format(table_name))
    for (part, config_file) in enumerate(ACL_RULES_PART_TEMPLATES[ip_version]):
        dut_conf_file_path = os.path.join(DUT_TMP_DIR, 'acl_rules_{}_part_{}.json'.format(table_name, part))
        dut.template(src=os.path.join(TEMPLATE_DIR, config_file), dest=dut_conf_file_path)
        logger.info('Applying ACL rules config "{}"'.format(dut_conf_file_path))
        dut.command('config acl update incremental {}'.format(dut_conf_file_path))