Example #1
0
 def get_provisioning_data_path(self):
     """
     Return the path to data file used by address provisioning
     :rtype: str
     :return: provisioning data path
     """
     raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #2
0
    def get_uecmd(self, uecmd_domain, reuse_existing_object_if_possible=False):
        """
        Get uecmd layer for this phone.

        :type uecmd_domain: String
        :param uecmd_domain: Domain of UeCmd where to find it.

        :type reuse_existing_object_if_possible: boolean
        :param reuse_existing_object_if_possible: if set to True it
        will try to check if there is not already instanciated uecmd class
        instead of creating one.

        :rtype: UECmd
        :return: uecmd instance
        """
        factory_path = "%s.Factory.Factory" % self._uecmd_path
        factory = Common.get_class(factory_path)(self)

        if factory:
            # if uecmd already exist and we want to reuse it them search for it
            # from the dict
            if reuse_existing_object_if_possible and uecmd_domain.upper(
            ) in self.uecommands.keys():
                uecmd_inst = self.uecommands.get(uecmd_domain.upper())
            # else generate a new one and store it on the list
            else:
                uecmd_inst = factory.get_uecmd(uecmd_domain)
                self.uecommands[uecmd_domain.upper()] = uecmd_inst
        else:
            raise DeviceException(
                "%s %s" %
                (DeviceException.INSTANTIATION_ERROR, self._uecmd_path))

        return uecmd_inst
Example #3
0
 def config(self):
     """
     Return device configuration
     :rtype: AttributeDict
     :return: device configuration
     """
     raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #4
0
 def device_modules(self):
     """
     Return device modules
     :rtype list
     :return: List of device modules
     """
     return DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
 def _raise_device_exception(self, msg, category=DeviceException.OPERATION_FAILED):
     """
     Raises a device exception; it can be used in inheriting classes to raise device exceptions in
     a consistent manner.
     """
     self._logger.error(msg)
     raise DeviceException(category, msg)
Example #6
0
 def binaries_path(self):
     """
     Return the path to the local binaries folder
     :rtype: str
     :return: local binaries directory
     """
     raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
    def boot_device(self, device_name):
        """
        Perform boot sequence of the current device

        :return: the instance of the equipment if it exists,
        else returns None
        """
        dut_instance = self.get_device(device_name)

        if dut_instance:
            # Try a number of time to switch ON & boot CDK
            dut_instance.switch_on()
            if dut_instance.is_booted():
                # The device has booted on time
                # Reconnect the DUT
                if not dut_instance.is_available():
                    dut_instance.connect_board()
            else:
                # The board has failed to boot several
                # attempts
                msg = "Device has failed to boot, abort!"
                self.get_logger().error(msg)
                raise DeviceException(DeviceException.DUT_BOOT_ERROR, msg)
        else:
            self.get_logger().error(
                "Cannot boot device '{0}', it is not available.".format(
                    device_name))
Example #8
0
 def retrieve_os_version(self):
     """
     Retrieve all available OS version for this OS
     :rtype: list
     :return: list of available os version
     """
     return DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #9
0
 def get_ftpdir_path(self):
     """
     Return the path to the local FTP files
     :rtype: str
     :return: local FTP directory
     """
     raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #10
0
 def device_capabilities(self):
     """
     Return device capabilities
     :rtype list
     :return: List of device capabilities
     """
     return DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #11
0
 def multimedia_path(self):
     """
     Return the path to the local multimedia files
     :rtype: str
     :return: local multimedia directory
     """
     raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #12
0
 def get_usbdrive_path(self):
     """
     Return the path to the external USB drive
     :rtype: str
     :return: USB drive path
     """
     raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #13
0
 def get_provisioning_method(self):
     """
     Return the provisioning method
     :rtype: str
     :return: provisioning method
     """
     raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #14
0
 def get_sdcard_path(self):
     """
     Return the path to the external sdcard
     :rtype: str
     :return: sdcard path
     """
     raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #15
0
    def inject_device_log(self, priority, tag, message):
        """
        Logs to device log
        .. note:: This method is Android-related,
                backport to other OS should be studied

        :type priority: str
        :type tag: str
        :type message: str

        :param priority: Priority of og message, should be:
                         v: verbose
                         d: debug
                         i: info
                         w: warning
                         e: error
        .. seealso:: http://developer.android.com/guide/developing/tools/adb.html#logcat

        :param tag: Tag to be used to identify the log onto logcat
        :param message: Message to be writed on log.

        :return: command status
        :rtype: bool
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #16
0
    def get_device_os_path(self):
        """
        Get a module to manipulate path on device.

        :rtype:  path
        :return: a module to manipulate device path
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #17
0
    def get_boot_mode(self):
        """
        get the boot mode from adb

        :rtype: string
        :return: phone state : MOS, ROS, COS or UNKNOWN
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #18
0
    def get_time_before_wifi_sleep(self):
        """
        Get the time to wait for Wifi networks to be disconnected.

        :rtype: int
        :return: time in seconds to wait for Wifi disconnection
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #19
0
    def get_tc_acceptance_criteria(self):
        """
        Get the device acceptance criteria for any UC.

        :rtype: tuple (int, int)
        :return: tuple (max attempt, acceptance)
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #20
0
    def retrieve_serial_number(self):
        """
        Retrieve the serial number of the device, used when communicating with it.

        :rtype: str
        :return: serial number of the device, or None if unknown
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #21
0
    def switch_off(self):
        """
        Switch OFF the board

        :rtype: list
        :return: Output status and output log
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #22
0
    def get_device_info(self):
        """
        Get device information.

        :rtype: dict
        :return a dictionnary containing device info
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #23
0
    def retrieve_device_id(self):
        """
        Retrieve the unique id of the device.

        :rtype: str
        :return: unique id of the device, or None if unknown
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #24
0
    def min_file_install_timeout(self):
        """
        Return the minimum timeout to set when pushing files on device

        :rtype: int
        :return: minimum timeout (in sec)
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #25
0
    def get_boot_timeout(self):
        """
        Return the boot timeout set in catalog.

        :rtype: int
        :return: boot time in seconds.
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #26
0
    def get_sw_release(self):
        """
        Get the SW release of the device.

        :rtype: str
        :return: SW release
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #27
0
 def retrieve_debug_data(self, verdict=None, tc_debug_data_dir=None):
     """
     Usually call after a critical failure & reboot
     It will fetch all debug data.
     :param verdict: Verdict of the test case
     :param tc_debug_data_dir: Directory where data will be stored
     """
     raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #28
0
    def get_state(self):
        """
        Gets the device state

        :rtype: str
        :return: device state : alive, unknown, offline
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #29
0
    def get_ui_type_timeout(self):
        """
        Get the timeout for type from UI.

        :return: device type timeout from ui
        :rtype: str
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)
Example #30
0
    def get_reporting_device_info(self):
        """
        Collect all device build info on the device for reporting

        :return: device and build infos
        :rtype: dict
        """
        raise DeviceException(DeviceException.FEATURE_NOT_IMPLEMENTED)