Esempio n. 1
0
class DispatcherSchema(schema.Schema):
    lava_cachedir = schema.StringOption()
    lava_cookies = schema.StringOption()
    lava_image_tmpdir = schema.StringOption()
    lava_image_url = schema.StringOption()
    lava_proxy = schema.StringOption()
    lava_result_dir = schema.StringOption()
    lava_server_ip = schema.StringOption()
    lava_network_iface = schema.ListOption()
    lava_test_deb = schema.StringOption()
    lava_test_url = schema.StringOption()
    logging_level = schema.IntOption()
    host_command_retries = schema.IntOption(default=5)
Esempio n. 2
0
class MySchema(schema.Schema):

    server = schema.StringOption(
        default='localhost',
        help='Host where the database engine is listening on')
    port = schema.IntOption(
        default=8069, help='Port where the database engine is listening on')
    timeout = schema.IntOption(default=4000, help='Time out for connection')
    database = schema.StringOption(fatal=True,
                                   help='Name of the database to connect to')
    user = schema.StringOption(fatal=True,
                               help='Username to use for the connection')
    passwd = schema.StringOption(fatal=True,
                                 help='Password to use fot the connection')
    csv = schema.ListOption(item=schema.StringOption(),
                            help='CSV File to read')
Esempio n. 3
0
class EventBuilder(schema.Section):
    chunksize = schema.IntOption(default=CHUNKSIZE,
                                 help='How many samples to search at once')

    padding = schema.IntOption(help='Padding to overlap processing windows [10 ns step]',
                               default=PADDING)

    chunks = schema.IntOption(help='Limit the numbers of chunks to analyze (-1 means no limit)',
                              default=-1)

    threshold = schema.IntOption(help='Threshold [adc counts]',
                                 default=THRESHOLD)

    dataset = schema.StringOption(help='Analyze only a single dataset',
                                  default=None)

    profile = schema.BoolOption(help='run profiler', default=False)
    celery = schema.BoolOption(help='use celery for parallelism', default=False)
Esempio n. 4
0
class VxConfigServers(VxConfig):
    '''
    This class is to instanciate the `configglue`_ options to manage the
    configuration file and optparsers toghether. You will be able to load the
    configuration option from the command line and some of this 3 paths.::

        /etc/xdg/vauxootools/vauxootools.cfg
        /home/<user>/.config/vauxootools/vauxootools.cfg
        ./local.cfg

    The objective of this class is give a generic way to create all the config
    options you need almost always to interact openerp with.

    So as this is a normal python class you can always inherit it from your own
    script/tool and extend what you need.

    See vauxootools --help to read the configuration options available, you can
    create this files as any normal text file with the ini syntax.

    You can see below some options.

    .. _configglue: http://pythonhosted.org/configglue/
    '''

    sh = schema.StringOption(short_name='-sh',
                             default='localhost',
                             help='Hostname of your secondary OpenERP server.')
    sd = schema.StringOption(
        short_name='-sd',
        default='development',
        help='Secondary data base name where your secondary OpenERP '
        'has the information you need.')
    su = schema.StringOption(
        short_name='-su',
        default='demo',
        help='Secondary user name to connect to the database')
    sp = schema.StringOption(
        short_name='-sp',
        default='demo',
        help='Password of the secondary username provided.')
    spo = schema.IntOption(
        short_name='-spo',
        default=8069,
        help='Secondary port where your secondary openerp is serving '
        'the web-service.')
    il = schema.ListOption(
        short_name='-il',
        default=[0],
        remove_duplicates=True,
        help='List of id or ids separate by comma without spaces of the '
        'leads that generated the task of create the instance to extract '
        'data of it')
Esempio n. 5
0
    class MySchema(schema.Schema):
		host = schema.StringOption(
		    default='192.168.110.31',
		    help='Host where the database engine is listening on')
		database = schema.StringOption(
		    default='Cubx',
		    help='The name of the Database')
		user = schema.StringOption(
		    default='BormUser',
		    help='User name to connect to the database')
		password = schema.StringOption(
		    default='mydirtylittlesecret',
		    help='Password to connecto to the database')
		serialport = schema.StringOption(
		    default='/dev/ttyS0',
		    help='The serial port where the RFID reader is connected')
		userid = schema.StringOption(
		    help='If you pass a userid, the script handles it and exits. Otherwise it listens for RFID tags.')
		userconfig = schema.StringOption(
		    default='/etc/rfidtime.cfg',
		    help='The configuration file where the mapping from rfid tags to user id resides.')
		writetodb = schema.BoolOption(
		    default=False,
		    help='Activate only after the script was approved by Mr. Schwindl.')
		useBlinkM = schema.BoolOption(
			default=False,
			help='Activate visual feedback with a BlinkM connected to I2C bus 0.')
		useBeep = schema.BoolOption(
			default=False,
			help='Activate audio feedback from the beeper.')
		useSpeech = schema.BoolOption(
			default=False,
			help='Activate spoken feedback with the festival text to speech engine.')
		useNokiaDisplay = schema.BoolOption(
			default=False,
			help='Display text on a nokia display connected to an AtMega8 over i2c.')
		NokiaDisplayBus = schema.IntOption(
			default=0,
			help='The i2c bus that the nokia display is connected. 0 on the alix or 1 on the raspberry pi.')
		BambooURL = schema.StringOption(
			default='dev.cubx-software.com:8446',
			help='The URL where bamboo can be reached')
		BambooUser = schema.StringOption(
			default='ulr',
			help='The bamboo or jira user name')
		BambooPassword = schema.StringOption(
			default='mydirtylittlesecret',
			help='The password for the bamboo or jira login')
Esempio n. 6
0
class DeviceSchema(schema.Schema):
    master_testboot_dir = schema.StringOption()
    master_testboot_label = schema.StringOption()
    master_testrootfs_dir = schema.StringOption()
    master_testrootfs_label = schema.StringOption()
    master_sdcard_dir = schema.StringOption()
    master_sdcard_label = schema.StringOption()
    master_userdata_dir = schema.StringOption()
    master_userdata_label = schema.StringOption()
    android_binary_drivers = schema.StringOption(default=None)
    android_ramdisk_files = schema.ListOption(
        default=["uInitrd", "ramdisk.img"])
    android_init_files = schema.ListOption(
        default=["init.rc", "init.environ.rc"])
    boot_cmds = schema.StringOption(fatal=True)  # Can do better here
    boot_cmds_android = schema.StringOption(fatal=True)  # And here
    boot_cmds_oe = schema.StringOption(fatal=True)  # And here?
    read_boot_cmds_from_image = schema.BoolOption(default=True)
    boot_options = schema.ListOption()
    boot_linaro_timeout = schema.IntOption(default=300)
    boot_part = schema.IntOption(fatal=True)
    boot_part_android_org = schema.IntOption()
    boot_retries = schema.IntOption(default=3)
    bootloader_prompt = schema.StringOption()
    send_char = schema.BoolOption(default=True)
    test_image_prompts = schema.ListOption(default=[
        "\(initramfs\)", "linaro-test", "/ #", "root@android", "root@linaro",
        "root@master", "root@linaro-nano:~#", "root@linaro-developer:~#",
        "root@linaro-server:~#", "root@genericarmv7a:~#",
        "root@genericarmv8:~#"
    ])
    busybox_http_port = schema.IntOption(default=80)
    cache_part_android_org = schema.IntOption()
    client_type = schema.StringOption()
    connection_command = schema.StringOption(fatal=True)
    connection_command_pattern = schema.StringOption(default="Connected\.\r")
    data_part_android = schema.IntOption()
    data_part_android_org = schema.IntOption()
    default_network_interface = schema.StringOption()
    disablesuspend_timeout = schema.IntOption(default=240)
    device_type = schema.StringOption(fatal=True)
    enable_network_after_boot_android = schema.BoolOption(default=True)
    git_url_disablesuspend_sh = schema.StringOption()
    hard_reset_command = schema.StringOption()
    hostname = schema.StringOption()
    image_boot_msg = schema.StringOption()
    interrupt_boot_command = schema.StringOption()
    interrupt_boot_prompt = schema.StringOption()
    interrupt_boot_control_character = schema.StringOption()
    bootloader_serial_delay_ms = schema.IntOption(default=0)
    test_shell_serial_delay_ms = schema.IntOption(default=0)
    lmc_dev_arg = schema.StringOption()
    master_str = schema.StringOption(default="root@master")
    pre_connect_command = schema.StringOption()
    qemu_binary = schema.StringOption(default="qemu-system-arm")
    qemu_options = schema.StringOption()
    qemu_drive_interface = schema.StringOption()
    qemu_machine_type = schema.StringOption()
    power_on_cmd = schema.StringOption()  # for sdmux
    power_off_cmd = schema.StringOption()  # for sdmux
    reset_port_command = schema.StringOption()
    root_part = schema.IntOption()
    sata_block_device = schema.StringOption(default="sda")
    sdcard_part_android = schema.IntOption()
    sdcard_part_android_org = schema.IntOption()
    soft_boot_cmd = schema.StringOption(default="reboot")
    sys_part_android = schema.IntOption()
    sys_part_android_org = schema.IntOption()
    tester_ps1 = schema.StringOption(null=True)
    tester_ps1_pattern = schema.StringOption(null=True)
    ve_uefi_flash_msg = schema.StringOption(default="Erasing Flash image uefi")

    # tester_ps1_includes_rc is a string so we can decode it later as yes/no/
    # not set. If it isn't set, we stick with the device default. We can't do
    # the tri-state logic as a BoolOption.
    tester_ps1_includes_rc = schema.StringOption(null=True)

    tester_rc_cmd = schema.StringOption(null=True)
    lava_test_dir = schema.StringOption(null=True)
    lava_test_results_dir = schema.StringOption(null=True)
    lava_test_dir_backup = schema.StringOption(default=None)
    lava_test_results_dir_backup = schema.StringOption(default=None)
    val = schema.StringOption()
    sdcard_mountpoint_path = schema.StringOption(default="/storage/sdcard0")
    possible_partitions_files = schema.ListOption(
        default=["init.partitions.rc", "fstab.partitions", "init.rc"])
    boot_files = schema.ListOption(default=['boot.txt', 'uEnv.txt'])
    boot_device = schema.IntOption(fatal=True)
    testboot_offset = schema.IntOption(fatal=True)
    testboot_partition = schema.StringOption(default=None)
    # see doc/sdmux.rst for details

    lmp_default_id = schema.StringOption(default="13060000")
    lmp_default_name = schema.StringOption(default="default")

    sdmux_id = schema.StringOption()
    sdmux_usb_id = schema.StringOption()
    sdmux_mount_retry_seconds = schema.IntOption(default=20)
    sdmux_mount_wait_seconds = schema.IntOption(default=10)
    sdmux_version = schema.StringOption(default="unknown")

    # for the HDMI module of LMP
    lmp_hdmi_id = schema.DictOption()
    lmp_hdmi_defconf = schema.DictOption(default=None)
    lmp_hdmi_version = schema.StringOption(default="unknown")

    # for the SATA module of LMP
    lmp_sata_id = schema.DictOption()
    lmp_sata_defconf = schema.DictOption(default=None)
    lmp_sata_version = schema.StringOption(default="unknown")

    # for the ETH module of LMP
    lmp_eth_id = schema.DictOption()
    lmp_eth_defconf = schema.DictOption(default=None)
    lmp_eth_version = schema.StringOption(default="unknown")

    # for the LSGPIO module of LMP
    lmp_lsgpio_id = schema.DictOption()
    lmp_lsgpio_defconf = schema.DictOption(default=None)
    lmp_audio_defconf = schema.DictOption(default=None)
    lmp_lsgpio_version = schema.StringOption(default="unknown")

    # for the USB module of LMP
    lmp_usb_id = schema.DictOption()
    lmp_usb_defconf = schema.DictOption(default=None)
    lmp_usb_version = schema.StringOption(default="unknown")

    # auto image login
    login_prompt = schema.StringOption(default=None)
    password_prompt = schema.StringOption(default=None)
    username = schema.StringOption(default=None)
    password = schema.StringOption(default=None)
    login_commands = schema.ListOption(default=None)

    android_disable_suspend = schema.BoolOption(default=True)
    android_adb_over_usb = schema.BoolOption(default=False)
    android_adb_over_tcp = schema.BoolOption(default=True)
    android_adb_port = schema.StringOption(default="5555")
    android_wait_for_home_screen = schema.BoolOption(default=True)
    android_wait_for_home_screen_activity = schema.StringOption(
        default="Displayed com.android.launcher/com.android.launcher2.Launcher:"
    )
    android_home_screen_timeout = schema.IntOption(default=1800)
    android_boot_prompt_timeout = schema.IntOption(default=1200)
    android_orig_block_device = schema.StringOption(default="mmcblk0")
    android_lava_block_device = schema.StringOption(default="mmcblk0")
    partition_padding_string_org = schema.StringOption(default="p")
    partition_padding_string_android = schema.StringOption(default="p")
    android_serialno_patterns = schema.ListOption(default=['[0-9A-Fa-f]{16}'])

    arm_probe_binary = schema.StringOption(default='/usr/local/bin/arm-probe')
    arm_probe_config = schema.StringOption(
        default='/usr/local/etc/arm-probe-config')
    arm_probe_channels = schema.ListOption(default=['VDD_VCORE1'])

    customize = schema.DictOption(default=None)

    ecmeip = schema.StringOption()
    ipmi_power_sleep = schema.IntOption(default=1)
    ipmi_power_retries = schema.IntOption(default=10)

    # for master devices
    boot_cmds_master = schema.StringOption()
    master_kernel = schema.StringOption()
    master_ramdisk = schema.StringOption()
    master_dtb = schema.StringOption()
    master_firmware = schema.StringOption()
    master_nfsrootfs = schema.StringOption()
    # for master auto login
    master_login_prompt = schema.StringOption(default=None)
    master_password_prompt = schema.StringOption(default=None)
    master_username = schema.StringOption(default=None)
    master_password = schema.StringOption(default=None)
    master_login_commands = schema.ListOption(default=None)

    # for fastmodel devices
    simulator_version_command = schema.StringOption()
    simulator_command = schema.StringOption()
    simulator_command_flag = schema.StringOption(default=" -C ")
    simulator_axf_files = schema.ListOption()
    simulator_kernel_files = schema.ListOption(default=None)
    simulator_kernel = schema.StringOption(default=None)
    simulator_initrd_files = schema.ListOption(default=None)
    simulator_initrd = schema.StringOption(default=None)
    simulator_dtb_files = schema.ListOption(default=None)
    simulator_dtb = schema.StringOption(default=None)
    simulator_uefi_files = schema.ListOption(default=None)
    simulator_uefi_vars = schema.StringOption(default="uefi-vars.fd")
    simulator_bl1_files = schema.ListOption(default=None)
    simulator_bl1 = schema.StringOption(default=None)
    simulator_bl2_files = schema.ListOption(default=None)
    simulator_bl2 = schema.StringOption(default=None)
    simulator_bl31_files = schema.ListOption(default=None)
    simulator_bl31 = schema.StringOption(default=None)
    simulator_boot_wrapper = schema.StringOption(default=None)

    # for dummy devices
    dummy_driver = schema.StringOption(default=None)
    dummy_schroot_chroot = schema.StringOption(default="default")
    dummy_ssh_host = schema.StringOption(default=None)
    dummy_ssh_port = schema.IntOption(default=22)
    dummy_ssh_username = schema.StringOption(default='root')
    dummy_ssh_identity_file = schema.StringOption(default=None)

    # for jtag devices
    jtag_driver = schema.StringOption(default=None)
    jtag_hard_reset_command = schema.StringOption(default=None)
    # for stmc devices
    jtag_stmcconfig = schema.StringOption(default=None)
    jtag_stmc_ip = schema.StringOption(default=None)
    jtag_stmc_boot_script = schema.StringOption(default=None)
    jtag_stmc_boot_options = schema.StringOption(default=None)
    jtag_stmc_kernel_command = schema.StringOption(default=None)
    jtag_stmc_ramdisk_command = schema.StringOption(default=None)
    jtag_stmc_dtb_command = schema.StringOption(default=None)

    # for fastboot devices
    fastboot_driver = schema.StringOption(default=None)
    adb_command = schema.StringOption()
    fastboot_command = schema.StringOption()
    fastboot_kernel_load_addr = schema.StringOption()
    rootfs_partition = schema.StringOption(default='userdata')
    start_fastboot_command = schema.StringOption(default='fastboot')
    shared_working_directory = schema.StringOption(default=None)

    # for bootloader devices
    pre_boot_cmd = schema.StringOption()
    use_lava_tmpdir = schema.BoolOption(default=True)
    alternative_create_tmpdir = schema.BoolOption(default=True)
    alternative_dir = schema.StringOption(default=None)
    u_load_addrs = schema.ListOption(default=None)
    z_load_addrs = schema.ListOption(default=None)
    uimage_only = schema.BoolOption(default=False)
    uimage_xip = schema.BoolOption(default=False)
    append_dtb = schema.BoolOption(default=False)

    # for dynamic_vm devices
    dynamic_vm_backend_device_type = schema.StringOption(default='kvm')
    dynamic_vm_host = schema.StringOption(default=None)

    # for nexell
    adb_serialno = schema.StringOption(default=None)

    # for vexpress devices
    vexpress_uefi_default = schema.StringOption(default=None)
    vexpress_bl1_default = schema.StringOption(default=None)
    vexpress_uefi_path = schema.StringOption(default=None)
    vexpress_uefi_image_files = schema.ListOption(default=None)
    vexpress_uefi_image_filename = schema.StringOption(default="fip.bin")
    vexpress_uefi_backup_path = schema.StringOption(default=None)
    vexpress_bl1_path = schema.StringOption(default=None)
    vexpress_bl1_image_files = schema.ListOption(default=None)
    vexpress_bl1_image_filename = schema.StringOption(default="bl1.bin")
    vexpress_bl1_backup_path = schema.StringOption(default=None)
    vexpress_stop_autoboot_prompt = schema.StringOption(
        default='Press Enter to stop auto boot...')
    vexpress_usb_mass_storage_device = schema.StringOption(default=None)
    vexpress_requires_trusted_firmware = schema.BoolOption(default=False)
Esempio n. 7
0
class VxConfig(schema.Schema):
    '''
    This class is to instanciate the `configglue`_ options to manage the
    configuration file and optparsers toghether. You will be able to load the
    configuration option from the command line and some of this 3 paths.::

        /etc/xdg/vauxootools/vauxootools.cfg
        /home/<user>/.config/vauxootools/vauxootools.cfg
        ./local.cfg

    The objective of this class is give a generic way to create all the config
    options you need almost always to interact openerp with.

    So as this is a normal python class you can always inherit it from your own
    script/tool and extend what you need.

    See vauxootools --help to read the configuration options available, you can
    create this files as any normal text file with the ini syntax.

    You can see below some options.

    .. _configglue: http://pythonhosted.org/configglue/
    '''

    hostname = schema.StringOption(short_name='H',
                                   default='localhost',
                                   help='Hostname of your OpenERP server.')
    dbname = schema.StringOption(
        short_name='D',
        default='development',
        help='Data base name where OpenERP has the information you need.')
    username = schema.StringOption(short_name='u',
                                   default='demo',
                                   help='User name to connect to the database')
    password = schema.StringOption(short_name='p',
                                   default='demo',
                                   help='Password of the username provided.')
    sadminpwd = schema.StringOption(
        short_name='S',
        default='demo',
        help='Super Admin Password to create data base.')
    port = schema.IntOption(
        short_name='P',
        default=8069,
        help='Port where your openerp is serving the web-service.')
    logfile = schema.StringOption(
        short_name='l',
        default='vauxootools.log',
        help='Where do you want the log of this configuration.')
    loglevel = schema.StringOption(
        short_name='L',
        default='DEBUG',
        help='Where do you want the log of this configuration.')
    serverpath = schema.StringOption(
        short_name='-serverpath',
        default='/tmp',
        help='Absolute Path of folder that contain OpenERP server')
    addonspath = schema.StringOption(
        short_name='-addonspath',
        default='/tmp',
        help='Path of addons necessary to run server')
    configpath = schema.StringOption(
        short_name='-configpath',
        default='/tmp',
        help='Absolute Path of folder that contain the config files')