예제 #1
0
def qos_fast_reboot_module_hooks(request):
    # add things at the start of this module
    global vars
    vars = st.ensure_min_topology("D1T1:1")

    st.log("Configuring supported QoS features")
    wred_data = wred_config.init_vars(vars)
    st.log('Creating WRED and ECN table')
    putils.exec_all(True, [
        putils.ExecAllFunc(apply_wred_ecn_config, vars.D1,
                           wred_data['wred_ecn_json_config'])
    ])
    st.log("Checking for wred config before save and fast-reboot")
    wred_verify()
    st.log("checking for ecn config before save and fast-reboot")
    ecn_verify()
    st.log("Configuring IPV4 ACL with rule")
    ipv4_acl_config()
    st.log("Configuring IPV6 ACL with rule")
    ipv6_acl_config()
    st.log("Checking for IPV4 ACL config before save and fast-reboot")
    ipv4_acl_verify()
    st.log("Checking for IPV6 ACL config before save and fast-reboot")
    ipv6_acl_verify()
    st.log("Configuring COS")
    cos_config()
    st.log("Checking for COS config before save and fast-reboot")
    cos_config_verify()

    yield
    # add things at the end of this module"
    #Below step will clear COS, WRED and ECN config from the device.
    qos_obj.clear_qos_config(vars.D1)
    #Below step will clear all ACL config from the device.
    acl_obj.clear_acl_config(vars.D1)
예제 #2
0
def config_mgmt_module_hooks(request):
    # add things at the start of this module
    yield
    # add things at the end of this module"
    #Setting the MTU value to default
    intf_obj.interface_properties_set(vars.D1, data.eth, data.property,
                                      data.mtu_default)
    #Below step will clear all CRM config from the device.
    crm_obj.set_crm_clear_config(vars.D1)
    #Below step will clear COS, WRED and ECN config from the device.
    qos_obj.clear_qos_config(vars.D1)
    #Below step will clear all ACL config from the device.
    acl_obj.clear_acl_config(vars.D1)
    st.log("Deleting the vlan-{}".format(data.vlan))
    rv = vlan_obj.clear_vlan_configuration(st.get_dut_names())
    if not rv:
        st.report_fail("vlan_delete_fail", data.vlan)
예제 #3
0
def qos_warm_reboot_module_hooks(request):
    # add things at the start of this module
    init_vars()
    initialize_variables()
    get_parms()

    st.log("Checking whether the platform supports warm-reboot")
    if not data.platform.lower(
    ) in data.constants['WARM_REBOOT_SUPPORTED_PLATFORMS']:
        st.report_unsupported('test_case_unsupported')

    st.log("Configuring supported QoS features")
    wred_data = wred_config.init_vars(vars)
    st.log('Creating WRED and ECN table')
    putils.exec_all(True, [
        putils.ExecAllFunc(apply_wred_ecn_config, vars.D1,
                           wred_data['wred_ecn_json_config'])
    ])
    st.log("Checking for wred config before save and warm-reboot")
    wred_verify()
    st.log("checking for ecn config before save and warm-reboot")
    ecn_verify()
    st.log("Configuring IPV4 ACL with rule")
    ipv4_acl_config()
    st.log("Configuring IPV6 ACL with rule")
    ipv6_acl_config()
    st.log("Checking for IPV4 ACL config before save and warm-reboot")
    ipv4_acl_verify()
    st.log("Checking for IPV6 ACL config before save and warm-reboot")
    ipv6_acl_verify()
    st.log("Configuring COS")
    cos_config()
    st.log("Checking for COS config before save and warm-reboot")
    cos_config_verify()

    yield
    # add things at the end of this module"
    #Below step will clear COS, WRED and ECN config from the device.
    qos_obj.clear_qos_config(vars.D1)
    #Below step will clear all ACL config from the device.
    acl_obj.clear_acl_config(vars.D1)