Bug 1037878
Summary: | CSV system import validation | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Beaker | Reporter: | Amit Saha <asaha> | ||||
Component: | general | Assignee: | Amit Saha <asaha> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | develop | CC: | aigao, asaha, dcallagh, ebaak, llim, qwan, rmancy, xjia | ||||
Target Milestone: | 0.15.3 | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-02-03 04:51:40 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1021738 | ||||||
Attachments: |
|
Description
Amit Saha
2013-12-04 01:25:25 UTC
This suggests we're currently doing the data validation in the wrong place (in the view code rather than the model code). Rather than duplicating the existing validation logic in the CSV import, we should move the validation lower in the stack and use the bkr.server.flask_util.convert_internal_exceptions helper to translate from ValueError back to the appropriate HTTP error code. On gerrit: http://gerrit.beaker-project.org/#/c/2617/2 *** Bug 1021738 has been marked as a duplicate of this bug. *** Verify: 1. invalid FQDNs Import CSV file: csv_type,fqdn,deleted,lender,location,mac_address,memory,model,serial,vendor,arch,lab_controller,owner,secret,status,type,cc system,,False,,Nay,00:21:9B:4F:DB:68,7742,OptiPlex 780,,Red Hat,"i386,x86_64",beaker,beaker,False,Broken,Machine, Error Log Error importing system on line 2: System must have an associated FQDN 2. invalid Lab-controller. Import CSV file: csv_type,fqdn,deleted,lender,location,mac_address,memory,model,serial,vendor,arch,lab_controller,owner,secret,status,type,cc system,hss,False,,Nay,,7742,OptiPlex 780,,Red Hat,"i386,x86_64",beaker,beaker,False,Broken,Machine, Error Log hss: Invalid lab controller beaker To help me assess the significance of this: can a new system still be uploaded using a CSV that has *no* system column at all? Created attachment 856341 [details]
keyvalue
Fresh install beaker environment, and upload this file
Well, seems #comment 8 is a different bug, so open a bug for it.https://bugzilla.redhat.com/show_bug.cgi?id=1058549 And move this bug to "VERIFIED" This change is included in the Beaker 0.15.3 maintenance release: http://beaker-project.org/docs/whats-new/release-0.15.html#beaker-0-15-3 |