How to use drivers method in molecule

Best Python code snippet using molecule_python

opts.py

Source:opts.py Github

copy

Full Screen

1# Licensed under the Apache License, Version 2.0 (the "License");2# you may not use this file except in compliance with the License.3# You may obtain a copy of the License at4#5# http://www.apache.org/licenses/LICENSE-2.06#7# Unless required by applicable law or agreed to in writing, software8# distributed under the License is distributed on an "AS IS" BASIS,9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or10# implied.11# See the License for the specific language governing permissions and12# limitations under the License.13import itertools14from waterfall.api import common as waterfall_api_common15from waterfall.api.middleware import auth as waterfall_api_middleware_auth16from waterfall.api.middleware import sizelimit as waterfall_api_middleware_sizelimit17from waterfall.api.views import versions as waterfall_api_views_versions18from waterfall.backup import api as waterfall_backup_api19from waterfall.backup import chunkeddriver as waterfall_backup_chunkeddriver20from waterfall.backup import driver as waterfall_backup_driver21from waterfall.backup.drivers import ceph as waterfall_backup_drivers_ceph22from waterfall.backup.drivers import glusterfs as waterfall_backup_drivers_glusterfs23from waterfall.backup.drivers import google as waterfall_backup_drivers_google24from waterfall.backup.drivers import nfs as waterfall_backup_drivers_nfs25from waterfall.backup.drivers import posix as waterfall_backup_drivers_posix26from waterfall.backup.drivers import swift as waterfall_backup_drivers_swift27from waterfall.backup.drivers import tsm as waterfall_backup_drivers_tsm28from waterfall.backup import manager as waterfall_backup_manager29from waterfall.cmd import all as waterfall_cmd_all30from waterfall.cmd import workflow as waterfall_cmd_workflow31from waterfall.common import config as waterfall_common_config32import waterfall.compute33from waterfall.compute import nova as waterfall_compute_nova34from waterfall import context as waterfall_context35from waterfall import coordination as waterfall_coordination36from waterfall.db import api as waterfall_db_api37from waterfall.db import base as waterfall_db_base38from waterfall import exception as waterfall_exception39from waterfall.image import glance as waterfall_image_glance40from waterfall.image import image_utils as waterfall_image_imageutils41import waterfall.keymgr42from waterfall.keymgr import conf_key_mgr as waterfall_keymgr_confkeymgr43from waterfall.keymgr import key_mgr as waterfall_keymgr_keymgr44from waterfall import quota as waterfall_quota45from waterfall.scheduler import driver as waterfall_scheduler_driver46from waterfall.scheduler import host_manager as waterfall_scheduler_hostmanager47from waterfall.scheduler import manager as waterfall_scheduler_manager48from waterfall.scheduler import scheduler_options as \49 waterfall_scheduler_scheduleroptions50from waterfall.scheduler.weights import capacity as \51 waterfall_scheduler_weights_capacity52from waterfall.scheduler.weights import workflow_number as \53 waterfall_scheduler_weights_workflownumber54from waterfall import service as waterfall_service55from waterfall import ssh_utils as waterfall_sshutils56from waterfall.transfer import api as waterfall_transfer_api57from waterfall.workflow import api as waterfall_workflow_api58from waterfall.workflow import driver as waterfall_workflow_driver59from waterfall.workflow.drivers import block_device as \60 waterfall_workflow_drivers_blockdevice61from waterfall.workflow.drivers import blockbridge as \62 waterfall_workflow_drivers_blockbridge63from waterfall.workflow.drivers.cloudbyte import options as \64 waterfall_workflow_drivers_cloudbyte_options65from waterfall.workflow.drivers import coho as waterfall_workflow_drivers_coho66from waterfall.workflow.drivers import datera as waterfall_workflow_drivers_datera67from waterfall.workflow.drivers.dell import dell_storagecenter_common as \68 waterfall_workflow_drivers_dell_dellstoragecentercommon69from waterfall.workflow.drivers.disco import disco as \70 waterfall_workflow_drivers_disco_disco71from waterfall.workflow.drivers.dothill import dothill_common as \72 waterfall_workflow_drivers_dothill_dothillcommon73from waterfall.workflow.drivers import drbdmanagedrv as \74 waterfall_workflow_drivers_drbdmanagedrv75from waterfall.workflow.drivers.emc import emc_vmax_common as \76 waterfall_workflow_drivers_emc_emcvmaxcommon77from waterfall.workflow.drivers.emc import emc_vnx_cli as \78 waterfall_workflow_drivers_emc_emcvnxcli79from waterfall.workflow.drivers.emc import scaleio as \80 waterfall_workflow_drivers_emc_scaleio81from waterfall.workflow.drivers.emc import xtremio as \82 waterfall_workflow_drivers_emc_xtremio83from waterfall.workflow.drivers import eqlx as waterfall_workflow_drivers_eqlx84from waterfall.workflow.drivers.fujitsu import eternus_dx_common as \85 waterfall_workflow_drivers_fujitsu_eternusdxcommon86from waterfall.workflow.drivers import glusterfs as waterfall_workflow_drivers_glusterfs87from waterfall.workflow.drivers import hgst as waterfall_workflow_drivers_hgst88from waterfall.workflow.drivers.hitachi import hbsd_common as \89 waterfall_workflow_drivers_hitachi_hbsdcommon90from waterfall.workflow.drivers.hitachi import hbsd_fc as \91 waterfall_workflow_drivers_hitachi_hbsdfc92from waterfall.workflow.drivers.hitachi import hbsd_horcm as \93 waterfall_workflow_drivers_hitachi_hbsdhorcm94from waterfall.workflow.drivers.hitachi import hbsd_iscsi as \95 waterfall_workflow_drivers_hitachi_hbsdiscsi96from waterfall.workflow.drivers.hitachi import hnas_iscsi as \97 waterfall_workflow_drivers_hitachi_hnasiscsi98from waterfall.workflow.drivers.hitachi import hnas_nfs as \99 waterfall_workflow_drivers_hitachi_hnasnfs100from waterfall.workflow.drivers.hpe import hpe_3par_common as \101 waterfall_workflow_drivers_hpe_hpe3parcommon102from waterfall.workflow.drivers.hpe import hpe_lefthand_iscsi as \103 waterfall_workflow_drivers_hpe_hpelefthandiscsi104from waterfall.workflow.drivers.hpe import hpe_xp_opts as \105 waterfall_workflow_drivers_hpe_hpexpopts106from waterfall.workflow.drivers.huawei import huawei_driver as \107 waterfall_workflow_drivers_huawei_huaweidriver108from waterfall.workflow.drivers.ibm import flashsystem_common as \109 waterfall_workflow_drivers_ibm_flashsystemcommon110from waterfall.workflow.drivers.ibm import flashsystem_fc as \111 waterfall_workflow_drivers_ibm_flashsystemfc112from waterfall.workflow.drivers.ibm import flashsystem_iscsi as \113 waterfall_workflow_drivers_ibm_flashsystemiscsi114from waterfall.workflow.drivers.ibm import gpfs as waterfall_workflow_drivers_ibm_gpfs115from waterfall.workflow.drivers.ibm.storwize_svc import storwize_svc_common as \116 waterfall_workflow_drivers_ibm_storwize_svc_storwizesvccommon117from waterfall.workflow.drivers.ibm.storwize_svc import storwize_svc_fc as \118 waterfall_workflow_drivers_ibm_storwize_svc_storwizesvcfc119from waterfall.workflow.drivers.ibm.storwize_svc import storwize_svc_iscsi as \120 waterfall_workflow_drivers_ibm_storwize_svc_storwizesvciscsi121from waterfall.workflow.drivers.ibm import xiv_ds8k as \122 waterfall_workflow_drivers_ibm_xivds8k123from waterfall.workflow.drivers.infortrend.eonstor_ds_cli import common_cli as \124 waterfall_workflow_drivers_infortrend_eonstor_ds_cli_commoncli125from waterfall.workflow.drivers.lenovo import lenovo_common as \126 waterfall_workflow_drivers_lenovo_lenovocommon127from waterfall.workflow.drivers import lvm as waterfall_workflow_drivers_lvm128from waterfall.workflow.drivers.netapp import options as \129 waterfall_workflow_drivers_netapp_options130from waterfall.workflow.drivers.nexenta import options as \131 waterfall_workflow_drivers_nexenta_options132from waterfall.workflow.drivers import nfs as waterfall_workflow_drivers_nfs133from waterfall.workflow.drivers import nimble as waterfall_workflow_drivers_nimble134from waterfall.workflow.drivers.prophetstor import options as \135 waterfall_workflow_drivers_prophetstor_options136from waterfall.workflow.drivers import pure as waterfall_workflow_drivers_pure137from waterfall.workflow.drivers import quobyte as waterfall_workflow_drivers_quobyte138from waterfall.workflow.drivers import rbd as waterfall_workflow_drivers_rbd139from waterfall.workflow.drivers import remotefs as waterfall_workflow_drivers_remotefs140from waterfall.workflow.drivers.san.hp import hpmsa_common as \141 waterfall_workflow_drivers_san_hp_hpmsacommon142from waterfall.workflow.drivers.san import san as waterfall_workflow_drivers_san_san143from waterfall.workflow.drivers import scality as waterfall_workflow_drivers_scality144from waterfall.workflow.drivers import sheepdog as waterfall_workflow_drivers_sheepdog145from waterfall.workflow.drivers import smbfs as waterfall_workflow_drivers_smbfs146from waterfall.workflow.drivers import solidfire as waterfall_workflow_drivers_solidfire147from waterfall.workflow.drivers import tegile as waterfall_workflow_drivers_tegile148from waterfall.workflow.drivers import tintri as waterfall_workflow_drivers_tintri149from waterfall.workflow.drivers.violin import v7000_common as \150 waterfall_workflow_drivers_violin_v7000common151from waterfall.workflow.drivers.vmware import vmdk as \152 waterfall_workflow_drivers_vmware_vmdk153from waterfall.workflow.drivers import vzstorage as waterfall_workflow_drivers_vzstorage154from waterfall.workflow.drivers.windows import windows as \155 waterfall_workflow_drivers_windows_windows156from waterfall.workflow.drivers import xio as waterfall_workflow_drivers_xio157from waterfall.workflow.drivers.zfssa import zfssaiscsi as \158 waterfall_workflow_drivers_zfssa_zfssaiscsi159from waterfall.workflow.drivers.zfssa import zfssanfs as \160 waterfall_workflow_drivers_zfssa_zfssanfs161from waterfall.workflow import manager as waterfall_workflow_manager162from waterfall.wsgi import eventlet_server as waterfall_wsgi_eventletserver163from waterfall.zonemanager.drivers.brocade import brcd_fabric_opts as \164 waterfall_zonemanager_drivers_brocade_brcdfabricopts165from waterfall.zonemanager.drivers.brocade import brcd_fc_zone_driver as \166 waterfall_zonemanager_drivers_brocade_brcdfczonedriver167from waterfall.zonemanager.drivers.cisco import cisco_fabric_opts as \168 waterfall_zonemanager_drivers_cisco_ciscofabricopts169from waterfall.zonemanager.drivers.cisco import cisco_fc_zone_driver as \170 waterfall_zonemanager_drivers_cisco_ciscofczonedriver171from waterfall.zonemanager import fc_zone_manager as \172 waterfall_zonemanager_fczonemanager173def list_opts():174 return [175 ('FC-ZONE-MANAGER',176 itertools.chain(177 waterfall_zonemanager_fczonemanager.zone_manager_opts,178 waterfall_zonemanager_drivers_brocade_brcdfczonedriver.brcd_opts,179 waterfall_zonemanager_drivers_cisco_ciscofczonedriver.cisco_opts,180 )),181 ('KEYMGR',182 itertools.chain(183 waterfall_keymgr_keymgr.encryption_opts,184 waterfall.keymgr.keymgr_opts,185 waterfall_keymgr_confkeymgr.key_mgr_opts,186 )),187 ('DEFAULT',188 itertools.chain(189 waterfall_backup_driver.service_opts,190 waterfall_api_common.api_common_opts,191 waterfall_backup_drivers_ceph.service_opts,192 waterfall_workflow_drivers_smbfs.workflow_opts,193 waterfall_backup_chunkeddriver.chunkedbackup_service_opts,194 waterfall_workflow_drivers_san_san.san_opts,195 waterfall_workflow_drivers_hitachi_hnasnfs.NFS_OPTS,196 waterfall_wsgi_eventletserver.socket_opts,197 waterfall_sshutils.ssh_opts,198 waterfall_workflow_drivers_netapp_options.netapp_proxy_opts,199 waterfall_workflow_drivers_netapp_options.netapp_connection_opts,200 waterfall_workflow_drivers_netapp_options.netapp_transport_opts,201 waterfall_workflow_drivers_netapp_options.netapp_basicauth_opts,202 waterfall_workflow_drivers_netapp_options.netapp_cluster_opts,203 waterfall_workflow_drivers_netapp_options.netapp_7mode_opts,204 waterfall_workflow_drivers_netapp_options.netapp_provisioning_opts,205 waterfall_workflow_drivers_netapp_options.netapp_img_cache_opts,206 waterfall_workflow_drivers_netapp_options.netapp_eseries_opts,207 waterfall_workflow_drivers_netapp_options.netapp_nfs_extra_opts,208 waterfall_workflow_drivers_netapp_options.netapp_san_opts,209 waterfall_workflow_drivers_ibm_storwize_svc_storwizesvciscsi.210 storwize_svc_iscsi_opts,211 waterfall_backup_drivers_glusterfs.glusterfsbackup_service_opts,212 waterfall_backup_drivers_tsm.tsm_opts,213 waterfall_workflow_drivers_fujitsu_eternusdxcommon.214 FJ_ETERNUS_DX_OPT_opts,215 waterfall_workflow_drivers_ibm_gpfs.gpfs_opts,216 waterfall_workflow_drivers_violin_v7000common.violin_opts,217 waterfall_workflow_drivers_nexenta_options.NEXENTA_CONNECTION_OPTS,218 waterfall_workflow_drivers_nexenta_options.NEXENTA_ISCSI_OPTS,219 waterfall_workflow_drivers_nexenta_options.NEXENTA_DATASET_OPTS,220 waterfall_workflow_drivers_nexenta_options.NEXENTA_NFS_OPTS,221 waterfall_workflow_drivers_nexenta_options.NEXENTA_RRMGR_OPTS,222 waterfall_workflow_drivers_nexenta_options.NEXENTA_EDGE_OPTS,223 waterfall_exception.exc_log_opts,224 waterfall_common_config.global_opts,225 waterfall_scheduler_weights_capacity.capacity_weight_opts,226 waterfall_workflow_drivers_sheepdog.sheepdog_opts,227 [waterfall_api_middleware_sizelimit.max_request_body_size_opt],228 waterfall_workflow_drivers_solidfire.sf_opts,229 waterfall_backup_drivers_swift.swiftbackup_service_opts,230 waterfall_workflow_drivers_cloudbyte_options.231 cloudbyte_add_qosgroup_opts,232 waterfall_workflow_drivers_cloudbyte_options.233 cloudbyte_create_workflow_opts,234 waterfall_workflow_drivers_cloudbyte_options.235 cloudbyte_connection_opts,236 waterfall_workflow_drivers_cloudbyte_options.237 cloudbyte_update_workflow_opts,238 waterfall_service.service_opts,239 waterfall.compute.compute_opts,240 waterfall_workflow_drivers_drbdmanagedrv.drbd_opts,241 waterfall_workflow_drivers_dothill_dothillcommon.common_opts,242 waterfall_workflow_drivers_dothill_dothillcommon.iscsi_opts,243 waterfall_workflow_drivers_glusterfs.workflow_opts,244 waterfall_workflow_drivers_pure.PURE_OPTS,245 waterfall_context.context_opts,246 waterfall_scheduler_driver.scheduler_driver_opts,247 waterfall_workflow_drivers_scality.workflow_opts,248 waterfall_workflow_drivers_emc_emcvnxcli.loc_opts,249 waterfall_workflow_drivers_vmware_vmdk.vmdk_opts,250 waterfall_workflow_drivers_lenovo_lenovocommon.common_opts,251 waterfall_workflow_drivers_lenovo_lenovocommon.iscsi_opts,252 waterfall_backup_drivers_posix.posixbackup_service_opts,253 waterfall_workflow_drivers_emc_scaleio.scaleio_opts,254 [waterfall_db_base.db_driver_opt],255 waterfall_workflow_drivers_eqlx.eqlx_opts,256 waterfall_transfer_api.workflow_transfer_opts,257 waterfall_db_api.db_opts,258 waterfall_scheduler_weights_workflownumber.259 workflow_number_weight_opts,260 waterfall_workflow_drivers_coho.coho_opts,261 waterfall_workflow_drivers_xio.XIO_OPTS,262 waterfall_workflow_drivers_ibm_storwize_svc_storwizesvcfc.263 storwize_svc_fc_opts,264 waterfall_workflow_drivers_zfssa_zfssaiscsi.ZFSSA_OPTS,265 waterfall_workflow_driver.workflow_opts,266 waterfall_workflow_driver.iser_opts,267 waterfall_api_views_versions.versions_opts,268 waterfall_workflow_drivers_nimble.nimble_opts,269 waterfall_workflow_drivers_windows_windows.windows_opts,270 waterfall_workflow_drivers_san_hp_hpmsacommon.common_opts,271 waterfall_workflow_drivers_san_hp_hpmsacommon.iscsi_opts,272 waterfall_image_glance.glance_opts,273 waterfall_image_glance.glance_core_properties_opts,274 waterfall_workflow_drivers_hpe_hpelefthandiscsi.hpelefthand_opts,275 waterfall_workflow_drivers_lvm.workflow_opts,276 waterfall_workflow_drivers_emc_emcvmaxcommon.emc_opts,277 waterfall_workflow_drivers_remotefs.nas_opts,278 waterfall_workflow_drivers_remotefs.workflow_opts,279 waterfall_workflow_drivers_emc_xtremio.XTREMIO_OPTS,280 waterfall_backup_drivers_google.gcsbackup_service_opts,281 [waterfall_api_middleware_auth.use_forwarded_for_opt],282 waterfall_workflow_drivers_hitachi_hbsdcommon.workflow_opts,283 waterfall_workflow_drivers_infortrend_eonstor_ds_cli_commoncli.284 infortrend_esds_opts,285 waterfall_workflow_drivers_infortrend_eonstor_ds_cli_commoncli.286 infortrend_esds_extra_opts,287 waterfall_workflow_drivers_hitachi_hnasiscsi.iSCSI_OPTS,288 waterfall_workflow_drivers_rbd.rbd_opts,289 waterfall_workflow_drivers_tintri.tintri_opts,290 waterfall_backup_api.backup_api_opts,291 waterfall_workflow_drivers_hitachi_hbsdhorcm.workflow_opts,292 waterfall_backup_manager.backup_manager_opts,293 waterfall_workflow_drivers_ibm_storwize_svc_storwizesvccommon.294 storwize_svc_opts,295 waterfall_workflow_drivers_hitachi_hbsdfc.workflow_opts,296 waterfall_quota.quota_opts,297 waterfall_workflow_drivers_huawei_huaweidriver.huawei_opts,298 waterfall_workflow_drivers_dell_dellstoragecentercommon.299 common_opts,300 waterfall_scheduler_hostmanager.host_manager_opts,301 [waterfall_scheduler_manager.scheduler_driver_opt],302 waterfall_backup_drivers_nfs.nfsbackup_service_opts,303 waterfall_workflow_drivers_blockbridge.blockbridge_opts,304 [waterfall_scheduler_scheduleroptions.305 scheduler_json_config_location_opt],306 waterfall_workflow_drivers_zfssa_zfssanfs.ZFSSA_OPTS,307 waterfall_workflow_drivers_disco_disco.disco_opts,308 waterfall_workflow_drivers_hgst.hgst_opts,309 waterfall_image_imageutils.image_helper_opts,310 waterfall_compute_nova.nova_opts,311 waterfall_workflow_drivers_ibm_flashsystemfc.flashsystem_fc_opts,312 waterfall_workflow_drivers_prophetstor_options.DPL_OPTS,313 waterfall_workflow_drivers_hpe_hpexpopts.FC_WORKFLOW_OPTS,314 waterfall_workflow_drivers_hpe_hpexpopts.COMMON_WORKFLOW_OPTS,315 waterfall_workflow_drivers_hpe_hpexpopts.HORCM_WORKFLOW_OPTS,316 waterfall_workflow_drivers_hitachi_hbsdiscsi.workflow_opts,317 waterfall_workflow_manager.workflow_manager_opts,318 waterfall_workflow_drivers_ibm_flashsystemiscsi.319 flashsystem_iscsi_opts,320 waterfall_workflow_drivers_tegile.tegile_opts,321 waterfall_workflow_drivers_ibm_flashsystemcommon.flashsystem_opts,322 [waterfall_workflow_api.allow_force_upload_opt],323 [waterfall_workflow_api.workflow_host_opt],324 [waterfall_workflow_api.workflow_same_az_opt],325 [waterfall_workflow_api.az_cache_time_opt],326 waterfall_workflow_drivers_ibm_xivds8k.xiv_ds8k_opts,327 waterfall_workflow_drivers_hpe_hpe3parcommon.hpe3par_opts,328 waterfall_workflow_drivers_datera.d_opts,329 waterfall_workflow_drivers_blockdevice.workflow_opts,330 waterfall_workflow_drivers_quobyte.workflow_opts,331 waterfall_workflow_drivers_vzstorage.vzstorage_opts,332 waterfall_workflow_drivers_nfs.nfs_opts,333 )),334 ('CISCO_FABRIC_EXAMPLE',335 itertools.chain(336 waterfall_zonemanager_drivers_cisco_ciscofabricopts.337 cisco_zone_opts,338 )),339 ('BRCD_FABRIC_EXAMPLE',340 itertools.chain(341 waterfall_zonemanager_drivers_brocade_brcdfabricopts.342 brcd_zone_opts,343 )),344 ('COORDINATION',345 itertools.chain(346 waterfall_coordination.coordination_opts,347 )),348 ('BACKEND',349 itertools.chain(350 [waterfall_cmd_workflow.host_opt],351 [waterfall_cmd_all.workflow_cmd.host_opt],352 )),...

Full Screen

Full Screen

routes.py

Source:routes.py Github

copy

Full Screen

1import os2from flask import Blueprint,render_template,redirect,url_for,request,flash3from flask import current_app as app4from .. import login_manager5from werkzeug.utils import secure_filename6from ..models import Driver,db,Vehicle7from sqlalchemy import or_8import uuid9from ..utils import role_required 10from flask_login import login_required, logout_user, current_user, login_user, logout_user11# Blueprint Configuration12drivers_bp = Blueprint(13 'drivers_bp', __name__,url_prefix='/drivers')14@drivers_bp.before_request15@login_required16def before_request():17 18 if (current_user.role.name=='admin' or current_user.role.name=='personal'):19 pass20 else:21 flash('No está autorizado para acceder a esta sección','error')22 return redirect(url_for('home_bp.dashboard')) 23 24@drivers_bp.route('/')25def home():26 rows_per_page = 1527 page = request.args.get('page', 1, type=int)28 query = request.args.get('query')29 if query: 30 drivers = Driver.query.filter(or_(Driver.dni.like('%'+query+'%'),Driver.name.like('%'+query+'%'),Driver.lastname.like('%'+query+'%'))).order_by(Driver.created_at.desc()).paginate(page=page,per_page=rows_per_page) 31 else: 32 drivers = Driver.query.order_by(Driver.created_at.desc()).paginate(page=page,per_page=rows_per_page) 33 34 return render_template(35 'drivers/index.html', 36 segment = 'drivers',37 drivers = drivers,38 current_user=current_user, 39 )40@drivers_bp.route('/<id>')41def profile(id):42 driver = Driver.query.get(id)43 return render_template(44 'drivers/profile.html', 45 segment = 'drivers',46 driver = driver,47 current_user=current_user, 48 )49@drivers_bp.route('add',methods=['GET','POST'])50def add():51 if (request.method=='POST'):52 newDriver = Driver(dni=request.values.get('dni'),53 name=request.values.get('name'),54 lastname=request.values.get('lastname'),55 address=request.values.get('address'),56 phone=request.values.get('phone'),57 email=request.values.get('email'))58 59 file = request.files['photo']60 if file:61 filename = secure_filename(file.filename)62 file.save(os.path.join(app.config['UPLOAD_FOLDER']+'/drivers', filename))63 newDriver.photo = filename 64 if(request.values.get('vehicle_id')): 65 vehicle = Vehicle.query.get(request.values.get('vehicle_id'))66 newDriver.vehicles.append(vehicle)67 68 newDriver.create()69 flash('Nuevo conductor registrado','success')70 return redirect(url_for('drivers_bp.home')) 71 #except:72 #flash('Ha ocurrido un error','danger')73 #return redirect(url_for('drivers_bp.home')) 74 else: 75 vehicles = Vehicle.query.filter_by(driver_id=None).all()76 return render_template(77 'drivers/add-form.html', 78 segment = 'drivers', 79 vehicles = vehicles,80 current_user = current_user81 ) 82@drivers_bp.route('/edit/<id>',methods=['GET','POST'])83def edit(id):84 if request.method=='POST' : 85 driver= Driver.query.get(request.values.get('driver_id'))86 driver.name=request.values.get('name')87 driver.lastname=request.values.get('lastname')88 driver.phone=request.values.get('phone') or None89 driver.email=request.values.get('email') or None90 driver.address=request.values.get('address') or None 91 driver.vehicles=[]92 if(request.values.get('vehicle_id')): 93 vehicle = Vehicle.query.get(request.values.get('vehicle_id'))94 vehicle.driver=driver 95 96 driver.update()97 flash('Datos modificados','success')98 return redirect(url_for('drivers_bp.home')) 99 else:100 driver = Driver.query.get(id)101 vehicles = Vehicle.query.filter(or_(Vehicle.driver_id==None, Vehicle.driver_id==id)).all() 102 return render_template(103 'drivers/edit-form.html', 104 segment = 'drivers', 105 driver = driver,106 vehicles = vehicles,107 current_user = current_user108 ) 109@drivers_bp.route('/delete/<id>')110def delete(id): 111 driver = Driver.query.get(id)112 if driver:113 driver.delete()114 flash('Conductor eliminado','success')115 else:116 flash('Conductor no encontrado','error')...

Full Screen

Full Screen

SConscript

Source:SConscript Github

copy

Full Screen

1Import('env')2# 3# Auxiliary modules4#5SConscript('auxiliary/SConscript')6#7# Drivers8#9# These are common and work across all platforms10SConscript([11 'drivers/galahad/SConscript',12 'drivers/identity/SConscript',13 'drivers/llvmpipe/SConscript',14 'drivers/rbug/SConscript',15 'drivers/softpipe/SConscript',16 'drivers/svga/SConscript',17 'drivers/trace/SConscript',18])19if not env['msvc']:20 # These drivers do not build on MSVC compilers21 SConscript([22 'drivers/i915/SConscript',23 ])24if env['drm']:25 # These drivers depend on drm headers26 if env['drm_radeon']:27 SConscript([28 'drivers/r300/SConscript',29 'drivers/r600/SConscript',30 ])31 if env['llvm']:32 SConscript([33 'drivers/radeonsi/SConscript',34 ])35 # XXX: nouveau drivers have a tight dependency on libdrm, so to enable36 # we need some version logic before we enable them. Also, ATM there is37 # no nouveau target in scons38 # if env['drm_nouveau']:39 # SConscript([40 # 'drivers/nouveau/SConscript', 41 # 'drivers/nv50/SConscript', 42 # 'drivers/nvc0/SConscript', 43 # 'drivers/nvfx/SConscript',44 # ])45#46# State trackers47#48# Needed by some state trackers49SConscript('winsys/sw/null/SConscript')50if not env['embedded']:51 SConscript('state_trackers/vega/SConscript')52 if env['platform'] not in ('cygwin', 'darwin', 'haiku', 'sunos'):53 SConscript('state_trackers/egl/SConscript')54 if env['x11']:55 SConscript('state_trackers/glx/xlib/SConscript')56 if env['dri']:57 SConscript('state_trackers/dri/SConscript')58 if env['dri'] and env['xorg']:59 SConscript('state_trackers/xorg/SConscript')60 if env['platform'] == 'windows':61 SConscript('state_trackers/wgl/SConscript')62#63# Winsys64# 65SConscript([66 'winsys/sw/wrapper/SConscript',67])68 69if env['x11']:70 SConscript([71 'winsys/sw/xlib/SConscript',72 ])73if env['platform'] == 'windows':74 SConscript([75 'winsys/sw/gdi/SConscript',76 ])77if not env['msvc']:78 SConscript([79 'winsys/i915/sw/SConscript',80 ])81if env['dri']:82 SConscript([83 'winsys/sw/dri/SConscript',84 ])85 SConscript([86 'winsys/svga/drm/SConscript',87 ])88 if env['drm_intel']:89 SConscript([90 'winsys/i915/drm/SConscript',91 ])92 if env['drm_radeon']:93 SConscript([94 'winsys/radeon/drm/SConscript',95 ])96#97# Targets98#99SConscript([100 'targets/graw-null/SConscript',101])102if not env['embedded']:103 if env['platform'] not in ('cygwin', 'darwin', 'freebsd', 'haiku', 'sunos'):104 SConscript([105 'targets/egl-static/SConscript'106 ])107 if env['x11']:108 SConscript([109 'targets/graw-xlib/SConscript',110 'targets/libgl-xlib/SConscript',111 ])112 if env['platform'] == 'windows':113 SConscript([114 'targets/graw-gdi/SConscript',115 'targets/libgl-gdi/SConscript',116 ])117 if env['dri']:118 SConscript([119 'targets/SConscript.dri',120 'targets/dri-swrast/SConscript',121 'targets/dri-vmwgfx/SConscript',122 #'targets/dri-nouveau/SConscript',123 ])124 if env['drm_intel']:125 SConscript([126 'targets/dri-i915/SConscript',127 ])128 if env['drm_radeon']:129 SConscript([130 'targets/dri-r300/SConscript',131 'targets/dri-r600/SConscript',132 ])133 if env['llvm']:134 SConscript([135 'targets/dri-radeonsi/SConscript',136 ])137 if env['xorg'] and env['drm']:138 SConscript([139 #'targets/xorg-i915/SConscript',140 #'targets/xorg-nouveau/SConscript',141 #'targets/xorg-radeon/SConscript',142 ])143#144# Unit tests & tools145#146if not env['embedded']:147 SConscript('tests/unit/SConscript')...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run molecule automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful