Ejemplo n.º 1
0
def my_test_suite():

    # Initialize logging
    init_logging()
    # Initialize parameter dictionary - may be a better approach to loading parameters
    params = cafe.Param({})

    if not cafe.executing_in_runner():
        # Get runner config file
        cafe.load_config_file("config/config.ini")

        # Test suite parameter file
        params.load_ini("params/ts_demo_e7_connection.ini")

        # Test bed topology information imported here - may be a better approach to loading topology
        topology = cafe.get_topology()
        topology.load(params.topology.file)

    # Open Sessions Needed for Test Suite
    open_sessions(params, topology)

    # Test cases must be registered with Cafe prior to execution
    cafe.register_test_case(tc_demo.tc_123_e7_command_test, args=[params])

    # Execute all registered test cases
    cafe.run_test_cases()

    # Close Sessions Needed for Test Suite
    close_sessions(params, topology)
Ejemplo n.º 2
0
def xconn_demo_test_suite():

    # Initialize logging
    init_logging()

    # Start session manager
    # sm = cafe.get_session_manager()

    # Obtain test suite parameter file information
    # params = cafe.get_test_param()
    # params.reset()
    # cafe.load_ts_config(cafe.get_cfs().abspath("params/ts_xconn_demo_parms.ini"))

    params = cafe.Param({})
    # TODO Modify to take filename directly from cafe config file
    params.load_ini("params/ts_xconn_demo_parms.ini")
    print("params : ", params)

    # Test bed topology information imported here
    topology = cafe.get_topology()
    # print("topo file : ",params['Topology'])
    topology.load(params.topology.file)

    # Start session manager
    params.session_mgr = session_mgr = cafe.get_session_manager()

    # Open Sessions Needed for Test Suite
    open_sessions(params, topology)

    # Register Test cases
    # cafe.register_test_case(e7gui_test_case, args=[params])
    cafe.register_test_case(e7guifailure_test_case, args=[params])
    # cafe.register_test_case(ixveriwave_test_case, args=[params])
    # cafe.register_test_case(ixveriwave_buildfile, args=[params])
    # cafe.register_test_case(e7_test_case, args=[dut2])

    # Execute test cases
    cafe.run_test_cases()

    # Close Sessions Needed for Test Suite
    close_sessions(params, topology)
def ts_ssid_isolation():

    # Initialize logging
    init_logging()

    params = cafe.Param({})
    # TODO Modify to take filename directly from cafe config file
    params.load_ini("params/800E/ts_wifi_ssid_isolation_800E_24g.ini")
    # params.load_ini("params/800G/ts_wifi_ssid_isolation_800G_24g.ini")
    # params.load_ini("params/800GH/ts_wifi_ssid_isolation_800GH_24g.ini")
    # params.load_ini("params/800G/ts_wifi_ssid_isolation_854G_5g.ini")
    # params.load_ini("params/800G/ts_wifi_ssid_isolation_844G_5g.ini")
    # print "params : ", params

    # Test bed topology information imported here
    topology = cafe.get_topology()
    topology.load(params.topology.file)
    # print "topology : ", topology

    # Build XConnect
    # TODO: Complete development on building E7 XConnect

    # Open Sessions Needed for Test Suite
    open_sessions(params, topology)

    # TMS Global IDs are made up of <Contour_Global_ID><Contour_User_Interface><EUT>
    idadd = params['testaccounting']['ui'] + params['testaccounting']['eut']

    # If a GPON ONT need to configure WAN uplink through E7
    if str(params['execution']['isdutgponont']).lower() == "yes":
        cafe.register_test_case(
            tc_wifi_ssid_isolation.gpon_ont_build_e7_provisioning,
            args=[params])

    # If an Ethernet only ONT need to configure Use Case uplink through E7 for WAN connection
    if str(params['execution']['isdutgponont']).lower() == "no":
        cafe.register_test_case(
            tc_wifi_ssid_isolation.enet_ont_build_e7_provisioning,
            args=[params])

    if params['execution']['radiotype'] == "2.4GHz":
        # 2.4GHz Test Case Execution
        cafe.register_test_case(
            tc_wifi_ssid_isolation.tc_546796_24g_primary_ssid_lan_isolation,
            test_id="546796" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.tc_546797_24g_primary_ssid_wan_isolation,
            test_id="546797" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.tc_546798_24g_primary_ssid_intra_isolation,
            test_id="546798" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546799_24g_primary_ssid_nonprimary_ssid_isolation_nosubnet,
            test_id="546799" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546800_24g_primary_ssid_nonprimary_ssid_isolation_subnet,
            test_id="546800" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546801_24g_primary_ssid_nonprimary_ssid_isolation_subnetandintra,
            test_id="546801" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546803_24g_nonprimary_ssid_lan_isolationdisabled,
            test_id="546803" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546804_24g_nonprimary_ssid_lan_isolationenabled,
            test_id="546804" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546805_24g_nonprimary_ssid_wan_isolationenabled,
            test_id="546805" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546806_24g_nonprimary_ssid_wan_isolationenabled,
            test_id="546806" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546807_24g_nonprimary_ssid_intra_isolationdisabled,
            test_id="546807" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546808_24g_nonprimary_ssid_intra_isolationenabled,
            test_id="546808" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546809_24g_two_nonprimary_ssid_bothinterisolationdisabled,
            test_id="546809" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546810_24g_two_nonprimary_ssid_bothinterisolationenabled,
            test_id="546810" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546811_24g_two_nonprimary_ssid_differentinterisolation,
            test_id="546811" + idadd,
            args=[params])

    if params['execution']['radiotype'] == "5GHz":
        # 5GHz Test Case Execution
        cafe.register_test_case(
            tc_wifi_ssid_isolation.tc_546775_5g_primary_ssid_lan_isolation,
            test_id="546775" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.tc_546776_5g_primary_ssid_wan_isolation,
            test_id="546776" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.tc_546777_5g_primary_ssid_intra_isolation,
            test_id="546777" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546778_5g_primary_ssid_nonprimary_ssid_isolation_nosubnet,
            test_id="546778" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546779_5g_primary_ssid_nonprimary_ssid_isolation_subnet,
            test_id="546779" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546782_5g_nonprimary_ssid_lan_isolationdisabled,
            test_id="546782" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546783_5g_nonprimary_ssid_lan_isolationenabled,
            test_id="546783" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546784_5g_nonprimary_ssid_wan_isolationenabled,
            test_id="546784" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546785_5g_nonprimary_ssid_wan_isolationenabled,
            test_id="546785" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546786_5g_nonprimary_ssid_intra_isolationdisabled,
            test_id="546786" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546787_5g_nonprimary_ssid_intra_isolationenabled,
            test_id="546787" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546788_5g_two_nonprimary_ssid_bothinterisolationdisabled,
            test_id="546788" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546789_5g_two_nonprimary_ssid_bothinterisolationenabled,
            test_id="546789" + idadd,
            args=[params])
        cafe.register_test_case(
            tc_wifi_ssid_isolation.
            tc_546790_5g_two_nonprimary_ssid_differentinterisolation,
            test_id="546790" + idadd,
            args=[params])

    if str(params['execution']['isdutgponont']).lower() == "yes":
        cafe.register_test_case(
            tc_wifi_ssid_isolation.gpon_ont_remove_e7_provisioning,
            args=[params])

    if str(params['execution']['isdutgponont']).lower() == "no":
        cafe.register_test_case(
            tc_wifi_ssid_isolation.enet_ont_remove_e7_provisioning,
            args=[params])

    # Execute test cases
    cafe.run_test_cases()

    # Close Sessions Needed for Test Suite
    close_sessions(params, topology)
Ejemplo n.º 4
0
    Returns:
    """
    params['ont_gui'].close()


# Load config.ini file when not executing from command prompt - default location for written test suites
if not cafe.executing_in_runner():
    # Get runner config file
    cafe.load_config_file("config/config.ini")

params = cafe.Param({})
params.load_ini("params/cdrouter.ini")
# print("params : ", params)

# Test bed topology information imported here
topology = cafe.get_topology()
topology.load(params.topology.file)
#print("topology : ", topology)

params.session_mgr = session_mgr = cafe.get_session_manager()

open_session_xc(params, topology)

open_session_e7(params, topology)

open_session_cdr(params, topology)

# dev_type     ==     ONT/Location_(multi|cdr)
# eut          ==     ONT Model (813G|844G|854G|etc...)
# scenario     ==     IPv6 SVC Model/Index (ds-1|dsl-1|6rd-1)
# cdr_test     ==     IPv6 SVC Model/Index (ds-1|dsl-1|6rd-1)_subIdx