Ejemplo n.º 1
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        # Set the default number of pings to do
        self._nb_pings = 10

        # Set the default data size of a packet
        self._packet_size = 32

        # Call LAB_HSPA_BASE Init function
        LabHspaBase.__init__(self, tc_name, global_config)

        # Getting the parameter WITH_PING from the testcase.
        # Default value is FALSE.
        self._do_ping = str(
            self._tc_parameters.get_param_value("WITH_PING", "FALSE"))
        # Getting the TARGET_PACKET_LOSS_RATE from the testcase.
        self._target_ping_packet_loss_rate = \
            self._tc_parameters.get_param_value("TARGET_PACKET_LOSS_RATE")

        # Getting the RRC_STATE parameter from testcase. Default value
        # is NONE.
        self._rrc_state = str(
            self._tc_parameters.get_param_value("RRC_STATE", "NONE"))

        self._msg = ""
Ejemplo n.º 2
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        # Call LAB_HSPA_BASE Init function
        LabHspaBase.__init__(self, tc_name, global_config)

        # Read the DL_FILE value from UseCase xml Parameter
        self._dlfilename = os.path.join(
            self._ftp_path,
            self._tc_parameters.get_param_value("DL_FILENAME", ""))

        # Read the UL_FILE value from UseCase xml Parameter
        self._filename = os.path.join(
            self._ftp_path,
            self._tc_parameters.get_param_value("UL_FILENAME", ""))

        # Read the XFER_TIMEOUT from UseCase xml Parameter
        self._xfer_timeout = \
            int(self._tc_parameters.get_param_value("XFER_TIMEOUT"))

        self._failure_targets = \
            str(self._tc_parameters.get_param_value("FAILURE_TARGETS", "FUTE"))

        # Update the failure targets
        self._throughput_targets.set_failure_throughput_from_config(self._dut_config,
                                                                    self._failure_targets)

        # Log Throughput targets for HSPA
        self._logger.info(throughput_targets_string(self._throughput_targets))
        self._ftp_api = self._device.get_uecmd("Ftp")
Ejemplo n.º 3
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        # Call LAB_HSPA_BASE Init function
        LabHspaBase.__init__(self, tc_name, global_config)

        self._check_data_transfer_state_timeout = 10
        self._timeout_between_commands = 2

        # Read the DL_FILE value from UseCase xml Parameter
        self._cpc_deact_type = self._tc_parameters.get_param_value("CPC_DEACT_TYPE")

        # Read the DL_FILE value from UseCase xml Parameter
        self._dlfilename = os.path.join(
            self._ftp_path,
            self._tc_parameters.get_param_value("DL_FILENAME", ""))

        # Read the UL_FILE value from UseCase xml Parameter
        self._ulfilename = os.path.join(
            self._ftp_path,
            self._tc_parameters.get_param_value("UL_FILENAME", ""))

        # Read the XFER_TIMEOUT from UseCase xml Parameter
        self._xfer_timeout = \
            int(self._tc_parameters.get_param_value("XFER_TIMEOUT"))

        self._ftp_api = self._device.get_uecmd("Ftp")
        self._ftp_task_id = 0

        if self._direction == "DL":
            # Read the DL_FILE value from UseCase xml Parameter
            self._ftp_filename = os.path.join(
                self._ftp_path,
                self._tc_parameters.get_param_value("DL_FILENAME"))
            self._direction = UECmdTypes.XFER_DIRECTIONS.DL
        elif self._direction == "UL":
            # Read the UL_FILE value from UseCase xml Parameter
            self._ftp_filename = os.path.join(
                self._ftp_path,
                self._tc_parameters.get_param_value("UL_FILENAME"))
            self._direction = UECmdTypes.XFER_DIRECTIONS.UL
        else:
            self._error.Msg = "%s is not a known xfer direction" % \
                self._direction
            raise TestEquipmentException(
                TestEquipmentException.INVALID_PARAMETER,
                self._error.Msg)
Ejemplo n.º 4
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        # Call LAB_HSPA_BASE Init function
        LabHspaBase.__init__(self, tc_name, global_config)

        # Read the number of pings to do
        self._nb_pings = self._tc_parameters.get_param_value("PACKET_COUNT")

        # Read the data size of a packet
        self._packet_size = self._tc_parameters.get_param_value("PACKET_SIZE")

        # Get target % of received packet for ping
        self._target_ping_packet_loss_rate = \
            float(self._tc_parameters.get_param_value("TARGET_PACKET_LOSS_RATE"))
Ejemplo n.º 5
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        # Call LAB_HSPA_BASE Init function
        LabHspaBase.__init__(self, tc_name, global_config)

        self._ns_fast_dormancy = "enable"
        self._timeout_between_commands = 5

        # Read the ftp file name from UseCase xml Parameter
        if self._direction == "DL":
            self._ftp_filename = os.path.join(
                self._ftp_path,
                self._tc_parameters.get_param_value("DL_FILENAME"))
        elif self._direction == "UL":
            # Read the UL_FILE value from UseCase xml Parameter
            self._ftp_filename = os.path.join(
                self._ftp_path,
                self._tc_parameters.get_param_value("UL_FILENAME"))

        # Read the XFER_TIMEOUT from UseCase xml Parameter
        self._xfer_timeout = \
            self._tc_parameters.get_param_value("XFER_TIMEOUT")
        if self._xfer_timeout is not None and \
                str(self._xfer_timeout).isdigit():
            self._xfer_timeout = int(self._xfer_timeout)
        else:
            self._xfer_timeout = None
        # Timeout to wait for RRC switch from RRC_DCH to Idle
        self._rrc_idle_timeout = \
            self._tc_parameters.get_param_value("RRC_IDLE_TIMEOUT")
        if self._rrc_idle_timeout is not None and \
                str(self._rrc_idle_timeout).isdigit():
            self._rrc_idle_timeout = int(self._rrc_idle_timeout)
        else:
            self._rrc_idle_timeout = None
        # inactivity timer for RRC state change
        self._rrc_inactivity_timer = \
            self._tc_parameters.get_param_value("RRC_INACTIVITY_TIMER")
        if self._rrc_inactivity_timer is not None and \
                str(self._rrc_inactivity_timer).isdigit():
            self._rrc_inactivity_timer = int(self._rrc_inactivity_timer)
        else:
            self._rrc_inactivity_timer = None
Ejemplo n.º 6
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        # Call LAB_HSPA_BASE Init function
        LabHspaBase.__init__(self, tc_name, global_config)

        # Read the DL_FILE value from UseCase xml Parameter
        self._dlfilename = os.path.join(
            self._ftp_path,
            self._tc_parameters.get_param_value("DL_FILENAME", ""))

        # Read the UL_FILE value from UseCase xml Parameter
        self._ulfilename = os.path.join(
            self._ftp_path,
            self._tc_parameters.get_param_value("UL_FILENAME", ""))

        # Read the XFER_TIMEOUT from UseCase xml Parameter
        self._xfer_timeout = \
            int(self._tc_parameters.get_param_value("XFER_TIMEOUT"))

        # Initializing the variable which will contain the IP address to use.
        self._check_data_transfer_state_timeout = 20
        self._ip_address_list = []
        self._ftp_task_id = 0
        self._timeout = None
        self._ftp_api = self._device.get_uecmd("Ftp")

        # IF DIRECTION is DL prepare for download FTP
        if self._direction == "DL":
            self._ftp_filename = self._dlfilename
            self._direction = UECmdTypes.XFER_DIRECTIONS.DL
        # IF DIRECTION is UL prepare for upload FTP
        elif self._direction == "UL":
            self._ftp_filename = self._ulfilename
            self._direction = UECmdTypes.XFER_DIRECTIONS.UL
        # ELSE raise an error
        else:
            # Raise an error in case the direction is not known
            msg = "Unknown ftp direction (%s)" % self._ftp_direction
            self._logger.error(msg)
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER, msg)
Ejemplo n.º 7
0
    def __init__(self, tc_name, global_config):
        """
        Constructor
        """
        # Call LAB_HSPA_BASE Init function
        LabHspaBase.__init__(self, tc_name, global_config)

        self._measure_cell_power_list = self._tc_parameters.\
                    get_param_value("MEASURE_CELL_POWER_LIST").split(",")
        # Read the ftp file name from UseCase xml Parameter
        if self._direction == "DL":
            self._ftp_filename = os.path.join(
                self._ftp_path,
                self._tc_parameters.get_param_value("DL_FILENAME"))
        elif self._direction == "UL":
            # Read the UL_FILE value from UseCase xml Parameter
            self._ftp_filename = os.path.join(
                self._ftp_path,
                self._tc_parameters.get_param_value("UL_FILENAME"))

        self._cqi_result_dico = {}
        self._ftp_data_transfer_state_timeout = 2
Ejemplo n.º 8
0
    def __init__(self, tc_name, global_config):

        # Call LAB_HSPA_BASE Init function
        LabHspaBase.__init__(self, tc_name, global_config)

        # Read Iperf PORT
        self._port = self._tc_parameters.get_param_value("PORT")

        if self._port in (None, "", "None"):
            # If no port are specified use a randomly generated port
            self._random_port = True
        else:
            self._port = int(self._port)
            self._random_port = False

        # Read Iperf measurement duration
        self._duration = \
            int(self._tc_parameters.get_param_value("DURATION"))

        # Read Iperf protocol
        self._iperf_protocol = \
            self._tc_parameters.get_param_value("IPERF_PROTOCOL", "TCP").lower()

        # Get TCP window size
        # window size > tput_to_reach * round_trip_time (200ms for HSPA)
        # Iperf compute automatically the windows size.
        # It is better to not set a window size as result with iperf default size are pretty good
        self._iperf_uldl_parameters = retrieve_parameters_from_tc_params(
            self._tc_parameters)

        # Get computer type
        self._computer_temp = self._tc_parameters.get_param_value(
            "COMPUTER", "IPERF_SERVER")

        # Detect if it is a KPI test or not
        if self._kpi_test:
            self._logger.info("It is a KPI test")
            self._kpi_data = None
            self._current_iteration = 0

        # Read Iperf TUNE OPTIONS
        self._tune_options = self._tc_parameters.get_param_value(
            "IPERF_TUNE_OPTIONS", "0")
        if self._tune_options in (None, "", 0, '0', 'off', 'OFF'):
            self._tune_options = 0
        else:
            self._tune_options = 1

        # Load computer equipment
        if self._computer_temp is not None:
            self._computer = self._em.get_computer(self._computer_temp)

        self._computer_type = \
            global_config.benchConfig.get_parameters(self._computer_temp)

        # Get server IP address
        self._server_ip_address = self._computer_type.get_param_value("IP")

        # Set Iperf direction
        if self._direction in ("UL", "up", None):
            self._iperf_direction = "up"
        elif self._direction in ("DL", "down"):
            self._iperf_direction = "down"
        else:
            self._iperf_direction = "both"

        self._iperf_settings = {
            "server_ip_address": self._server_ip_address,
            "port_number": self._port,
            "duration": self._duration,
            "protocol": self._iperf_protocol,
            "computer": self._computer
        }

        # Get customized failure Targets
        self._failure_targets = \
            str(self._tc_parameters.get_param_value("FAILURE_TARGETS", ""))

        # Update the failure targets
        self._throughput_targets.set_failure_throughput_from_config(
            self._dut_config, self._failure_targets, self._kpi_test,
            tc_name._name)

        # Log Throughput targets for HSPA
        self._logger.info(throughput_targets_string(self._throughput_targets))