Merge lp://qastaging/~cypressyew/hwcert-tools/location-tool into lp://qastaging/~hardware-certification/hwcert-tools/reporting-tools
Proposed by
Po-Hsu Lin
Status: | Merged |
---|---|
Approved by: | Daniel Manrique |
Approved revision: | no longer in the source branch. |
Merged at revision: | 152 |
Proposed branch: | lp://qastaging/~cypressyew/hwcert-tools/location-tool |
Merge into: | lp://qastaging/~hardware-certification/hwcert-tools/reporting-tools |
Diff against target: |
191 lines (+187/-0) 1 file modified
certification_reports/hw_location.py (+187/-0) |
To merge this branch: | bzr merge lp://qastaging/~cypressyew/hwcert-tools/location-tool |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Manrique (community) | Approve | ||
Review via email:
|
Description of the change
A new script added - hw_location.py, a tool for changing hardware location.
It includes two predefined jobs, --enabled and --oem
--enabled: change the location of all enabled system to "Unknown", as long as it's empty (output will looks like https:/
--oem: search for "return" in hardware comment, and ask you if you want to change it into OEM
Also, if you want to do some single system modification, just use
--cid CID -l location_id
I just found out that we have an API script: "api_utils.py" available.
The next step for this will be using it in this location script.
To post a comment you must log in.
Looks ok, thanks!
As a comment, we have probably 3 or 4 implementations of an abstraction or library for the C3 API: there's one in checkbox- message- get, another that (I think) Sylvain wrote, another in c3_results_ notify. py (on lauma), and another one (called apiutils) in reporting- tools/certifica tion_reports. You have another one, since I notice you're using requests directly. This is OK for now, but we really need to come up with a standard way of doing this, since if you look at the code you'll realize they all do mostly the same thing; having to reinvent batched queries every time is tiresome :)