Esempio n. 1
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """

        LabMobilityBase.__init__(self, tc_name, global_config)

        # Read the xml Template for LTE Cell Configuration
        # Read LTE_MIMO from test case xml file
        self._ns_lte_mimo_temp = self._tc_parameters.get_param_value(
            "LTE_MIMO")
        if self._ns_lte_mimo_temp not in (None, ''):
            self._ns_lte_mimo = (str(self._ns_lte_mimo_temp).lower() == "true")
        # Read LTE_SIGNAL_MODE from test case xml file
        self._ns_lte_signal_mode = str(
            self._tc_parameters.get_param_value("LTE_SIGNAL_MODE"))

        # Read LTE_PHYSICAL_CELL_ID from test case xml file
        self._ns_lte_physical_cell_id = str(
            self._tc_parameters.get_param_value("LTE_PHYSICAL_CELL_ID"))
        # Read LTE_CELL_ID from test case xml file
        self._ns_lte_cell_id = str(
            self._tc_parameters.get_param_value("LTE_CELL_ID"))
        # Read LTE_CELL_POWER_RFO1 from test case xml file
        self._ns_lte_cell_power_rf1 = float(
            self._tc_parameters.get_param_value("LTE_CELL_POWER_RFO1"))
        # Read LTE_CELL_POWER_RFO2 from test case xml file
        self._ns_lte_cell_power_rf2 = float(
            self._tc_parameters.get_param_value("LTE_CELL_POWER_RFO2"))

        # Read NS1 Mobile Country Code (MCC) from test case xml file
        self._ns_lte_mcc = int(self._tc_parameters.get_param_value("LTE_MCC"))

        # Read NS1 Mobile Network Code (MNC) from test case xml file
        self._ns_lte_mnc = int(self._tc_parameters.get_param_value("LTE_MNC"))

        # Read NS2 Mobile Country Code (MCC) from test case xml file
        self._ns_3gsm_mcc = int(
            self._tc_parameters.get_param_value("3GSM_MCC", "1"))

        # Read NS2 Mobile Network Code (MNC) from test case xml file
        self._ns_3gsm_mnc = int(
            self._tc_parameters.get_param_value("3GSM_MNC", "1"))
        # Read LTE_CELL_BAND from test case xml file
        self._ns_lte_cell_band = int(
            self._tc_parameters.get_param_value("LTE_CELL_BAND"))
        # Read LTE_DL_EARFCN from test case xml file
        self._ns_lte_dl_earfcn = int(
            self._tc_parameters.get_param_value("LTE_DL_EARFCN"))

        # Read Duplex type (Frequency Division Duplex (FDD) or Time Division Duplex (TDD)) from test case xml file
        self._ns_lte_duplex_type = self._tc_parameters.get_param_value(
            "DUPLEX_TYPE", "FDD")
        # Read ANTENNAS NUMBER from test case xml file
        self._antennas_number = self._tc_parameters.get_param_value(
            "ANTENNAS_NUMBER", '')

        # Read LTE_SCENARIO_PATH from test case xml file
        self._ns_lte_scenario_path = str(
            self._tc_parameters.get_param_value("LTE_SCENARIO_PATH"))

        # Read the xml Template for 3GSM Cell Configuration
        # Read 3GSM_CELL_TECH from test case xml file
        self._ns_3gsm_cell_tech = str(
            self._tc_parameters.get_param_value("3GSM_CELL_TECH"))

        # Read 3GSM_CELL_BAND from test case xml file
        self._ns_3gsm_cell_band = str(
            self._tc_parameters.get_param_value("3GSM_CELL_BAND"))

        # NS1_CELL_REL
        self._ns_3gsm_cell_rel = 8

        # Read 3GSM_DL_EARFCN from test case xml file
        self._ns_3gsm_dl_arfcn = int(
            self._tc_parameters.get_param_value("3GSM_DL_ARFCN"))

        # Read 3GSM_CELL_SERVICE from test case xml file
        self._ns_3gsm_cell_service = str(
            self._tc_parameters.get_param_value("3GSM_CELL_SERVICE"))

        # Read 3GSM_CELL_POWER from test case xml file
        self._ns_3gsm_cell_power = float(
            self._tc_parameters.get_param_value("3GSM_CELL_POWER"))

        # Read 3GSM_LAC_VALUE from test case xml file
        self._ns_3gsm_lac = int(
            self._tc_parameters.get_param_value("3GSM_LAC"))

        # Read 3GSM_RAC_VALUE from test case xml file
        self._ns_3gsm_rac = int(
            self._tc_parameters.get_param_value("3GSM_RAC"))
Esempio n. 2
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        # Added Messaging management
        LabMobilityBase.__init__(self, tc_name, global_config)

        # Read NS1_CELL_TECH from test case xml file (In str)
        self._ns1_cell_tech = \
            str(self._tc_parameters.get_param_value("NS1_CELL_TECH"))

        # Read NS2_CELL_TECH from test case xml file (In str)
        self._ns2_cell_tech = \
            str(self._tc_parameters.get_param_value("NS2_CELL_TECH"))

        # Read NS1_CELL_BAND from test case xml file (In str)
        self._ns1_cell_band = str(self._tc_parameters.get_param_value("NS1_CELL_BAND"))

        # Read NS2_CELL_BAND from test case xml file (In str)
        self._ns2_cell_band = str(self._tc_parameters.get_param_value("NS2_CELL_BAND"))

        # NS1_CELL_REL
        self._ns1_cell_rel = 7

        # NS2_CELL_REL
        self._ns2_cell_rel = 7

        # Set APIs instances for NS1
        if self._ns1_cell_tech == "2G":
            self._ns1_cell = self._ns1.get_cell_2g()
            self._ns1_vc = self._ns1_cell.get_voice_call()
            self._ns1_data = self._ns1_cell.get_data()
            self._ns1_messaging = self._ns1_cell.get_messaging()
        elif self._ns1_cell_tech == "3G":
            self._ns1_cell = self._ns1.get_cell_3g()
            self._ns1_vc = self._ns1_cell.get_voice_call()
            self._ns1_data = self._ns1_cell.get_data()
            self._ns1_messaging = self._ns1_cell.get_messaging()
        else:
            self._error.Msg = "Unknown Cell Radio Access Technology"
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER, self._error.Msg)

        # Set APIs instances for NS2
        if self._ns2_cell_tech == "2G":
            self._ns2_cell = self._ns2.get_cell_2g()
            self._ns2_vc = self._ns2_cell.get_voice_call()
            self._ns2_data = self._ns2_cell.get_data()
            self._ns2_messaging = self._ns2_cell.get_messaging()
        elif self._ns2_cell_tech == "3G":
            self._ns2_cell = self._ns2.get_cell_3g()
            self._ns2_vc = self._ns2_cell.get_voice_call()
            self._ns2_data = self._ns2_cell.get_data()
            self._ns2_messaging = self._ns2_cell.get_messaging()
        else:
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER,
                                     "Unknown Cell Radio Access Technology")

        # Read CATEGORY from testcase xml parameters
        self._category = \
            str(self._tc_parameters.get_param_value("CATEGORY", "WCDMA"))
        # Read fast dormancy parameter
        self._ns1_fast_dormancy = \
            self._ns1_node.get_param_value("Fast_Dormancy", "disable")
        self._ns2_fast_dormancy = \
            self._ns2_node.get_param_value("Fast_Dormancy", "disable")
Esempio n. 3
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """

        LabMobilityBase.__init__(self, tc_name, global_config)

        # Read the xml Template for NS1 Configuration
        # Read NS1_MIMO from test case xml file
        self._ns1_mimo_temp = self._tc_parameters.get_param_value("NS1_MIMO")
        if self._ns1_mimo_temp not in (None, ''):
            self._ns1_mimo = (str(self._ns1_mimo_temp).lower() == "true")
        # Read NS1_SIGNAL_MODE from test case xml file
        self._ns1_signal_mode = \
            str(self._tc_parameters.get_param_value("NS1_SIGNAL_MODE"))

        # Read NS1_PHYSICAL_CELL_ID from test case xml file
        self._ns1_physical_cell_id = \
            str(self._tc_parameters.get_param_value("NS1_PHYSICAL_CELL_ID"))
        # Read NS1_CELL_ID from test case xml file
        self._ns1_cell_id = \
            str(self._tc_parameters.get_param_value("NS1_CELL_ID"))
        # Read NS1_CELL_POWER_RFO1 from test case xml file
        self._ns1_cell_power_rf1 = \
            str(self._tc_parameters.get_param_value("NS1_CELL_POWER_RFO1"))
        # Read NS1_CELL_POWER_RFO2 from test case xml file
        self._ns1_cell_power_rf2 = \
            str(self._tc_parameters.get_param_value("NS1_CELL_POWER_RFO2"))

        # Read NS1 Mobile Country Code (MCC) from test case xml file
        self._ns1_mcc = \
            int(self._tc_parameters.get_param_value("NS1_MCC"))

        # Read NS1 Mobile Network Code (MNC) from test case xml file
        self._ns1_mnc = \
            int(self._tc_parameters.get_param_value("NS1_MNC"))
        # Read NS1_CELL_BAND from test case xml file
        self._ns1_cell_band = \
            int(self._tc_parameters.get_param_value("NS1_CELL_BAND"))
        # Read NS1_DL_EARFCN from test case xml file
        self._ns1_lte_dl_earfcn = \
            int(self._tc_parameters.get_param_value("NS1_DL_EARFCN"))
        # Read NS1_SCENARIO_PATH from test case xml file
        self._ns1_scenario_path = \
            str(self._tc_parameters.get_param_value("NS1_SCENARIO_PATH"))

        # Read the xml Template for NS2 Configuration
        # Read NS2_MIMO from test case xml file
        self._ns2_mimo_temp = self._tc_parameters.get_param_value("NS2_MIMO")
        if self._ns2_mimo_temp not in (None, ''):
            self._ns2_mimo = (str(self._ns2_mimo_temp).lower() == "true")
        # Read NS2_SIGNAL_MODE from test case xml file
        self._ns2_signal_mode = \
            str(self._tc_parameters.get_param_value("NS2_SIGNAL_MODE"))

        # Read NS2_PHYSICAL_CELL_ID from test case xml file
        self._ns2_physical_cell_id = \
            str(self._tc_parameters.get_param_value("NS2_PHYSICAL_CELL_ID"))
        # Read NS2_CELL_ID from test case xml file
        self._ns2_cell_id = \
            str(self._tc_parameters.get_param_value("NS2_CELL_ID"))
        # Read NS2_CELL_POWER_RFO1 from test case xml file
        self._ns2_cell_power_rf1 = \
            str(self._tc_parameters.get_param_value("NS2_CELL_POWER_RFO1"))
        # Read NS2_CELL_POWER_RFO2 from test case xml file
        self._ns2_cell_power_rf2 = \
            str(self._tc_parameters.get_param_value("NS2_CELL_POWER_RFO2"))

        # Read NS2 Mobile Country Code (MCC) from test case xml file
        self._ns2_mcc = \
            int(self._tc_parameters.get_param_value("NS2_MCC"))

        # Read NS2 Mobile Network Code (MNC) from test case xml file
        self._ns2_mnc = \
            int(self._tc_parameters.get_param_value("NS2_MNC"))
        # Read NS2_CELL_BAND from test case xml file
        self._ns2_cell_band = \
            int(self._tc_parameters.get_param_value("NS2_CELL_BAND"))
        # Read NS2_DL_EARFCN from test case xml file
        self._ns2_lte_dl_earfcn = \
            int(self._tc_parameters.get_param_value("NS2_DL_EARFCN"))
        # Read NS2_SCENARIO_PATH from test case xml file
        self._ns2_scenario_path = \
            str(self._tc_parameters.get_param_value("NS2_SCENARIO_PATH"))

        if self._ns1_model == "AGILENT_E6621A" and self._ns2_model == "AGILENT_E6621A":
            self._logger.debug(
                "Bench configuration is supported by the Usecase using %s as NS1 \
                                and %s as NS2" % self._ns1_model,
                self._ns2_model)

        else:
            # Set NS1 APIs instance
            self._ns1_cell = self._ns1.get_cell_4g()
            self._ns1_data = self._ns1_cell.get_data()

            # Set the equipment application format depending on ACTIVE_CELL_TECH.
            # For 4G switch to ""LTE FDD""
            self._ns1.switch_app_format("LTE FDD")

            # Set NS2 APIs instance
            self._ns2_cell = self._ns2.get_cell_4g()
            self._ns2_data = self._ns2_cell.get_data()

            # Set the equipment application format depending on IDLE_CELL_TECH.
            # For 4G switch to ""LTE FDD""
            self._ns2.switch_app_format("LTE FDD")

            self._error.Msg = "Bench configuration is not supported by the Usecase"
            raise AcsConfigException(AcsConfigException.INVALID_BENCH_CONFIG,
                                     self._error.Msg)