History log of /external/autotest/frontend/afe/rdb_model_extensions.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
53cc141a0b2ba102f773127184c67dcdf3dce523 08-Oct-2015 MK Ryu <mkryu@google.com> [autotest] Make explicit that lock_reason of AbstractHostModel can be NULL.

lock_reason of AbstractHostModel didn't specify null property explicitly.
The effect of it is MySQL has NULL property for lock_reason column, but
Sqlite doesn't have NULL property for the column.
simple_heartbeat_client.py uses in-memory sqlite, and it produces error
like below.

django.db.utils.IntegrityError: NOT NULL constraint failed: afe_hosts.lock_reason

This means a host entry got from prod database has NULL lock_reason,
and it violates integrity for sqlite DB.
We should make it explicit that lock_reason column can be NULL.

BUG=None
TEST=Run simple_heartbeat_client.py in local machine.

Change-Id: Ic2bdb35cff17cf8c1789db78c7166a404610827b
Reviewed-on: https://chromium-review.googlesource.com/304577
Commit-Ready: Mungyung Ryu <mkryu@google.com>
Tested-by: Mungyung Ryu <mkryu@google.com>
Reviewed-by: Matthew Sartori <msartori@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/frontend/afe/rdb_model_extensions.py
6818633834ad52c3de153235639ea9299a6e9a6d 28-Apr-2015 Matthew Sartori <msartori@chromium.org> [autotest] Require lock reason to lock device

When locking a device, a locking reason now must be provided.
This applies to both adding a new device, and modifying an
existing device from both the web frontend and the atest
command-line tool.

BUG=chromium:336805
DEPLOY=migrate
TEST=Tested adding locked/unlocked devices and locking/unlocking devices
from both the web frontend and using the 'atest host ...' command-line tools.

Change-Id: I3a8cd8891a2999f026dd709ae8a79e2b8cbc251a
Reviewed-on: https://chromium-review.googlesource.com/267595
Tested-by: Matthew Sartori <msartori@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Matthew Sartori <msartori@chromium.org>
/external/autotest/frontend/afe/rdb_model_extensions.py
042c1479b8df4f2d87586815d7ad0646cc39abeb 23-Oct-2014 Fang Deng <fdeng@chromium.org> [autotest] record autoserv run time in metadata db.

Measure autoserv run time and send it to metadata db.
The job id (or special task id) is extracted from the
result directory path using regular expression.

TEST=1)locally run autoserv. 2) Run run_suite.
Made sure that all the special tasks have been excercised.
3) run test_that
BUG=chromium:426105,chromium:422581

Change-Id: I16b119dbcf9b163967abed09a303d86568ea1394
Reviewed-on: https://chromium-review.googlesource.com/225236
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
/external/autotest/frontend/afe/rdb_model_extensions.py
489b91d72cd225e902081dbd3f9e47448fe867f6 15-Mar-2014 Prashanth B <beeps@google.com> [autotest] Establish a common interface for host representation.

This cl has the work needed to ensure that schema changes made on
the server trickled down into the client. If the same changes don't
reflect on the client, creating or saving a client host wrapper for
a given host will fail deterministically on the client side until
modules using the rdb_host are modified to reflect the changes.

1. rdb_hosts: A module containing the host heirarchy needed to
establish a dependence between the creation of the RDBServerHostWrapper
(which is serialized and returned to the client, which converts it
into an RDBClientHostWrapper) and the saving of the RDBClientHostWrapper
through and rdb update request.
2. rdb_requests: Contains the requests/request managers that were in
rdb_utils, because I plan to expand them in subsequent cls.
3. rdb_model_extensions: Contains model classes common
to both server and client that help in establishing
the common host model interface.
4. rdb integration tests.

TEST=Ran suites, unittests
BUG=chromium: 348176
DEPLOY=scheduler

Change-Id: I0bbab1dd184e505b1130ee73714e45ceb7bf4189
Reviewed-on: https://chromium-review.googlesource.com/191357
Commit-Queue: Prashanth B <beeps@chromium.org>
Tested-by: Prashanth B <beeps@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/frontend/afe/rdb_model_extensions.py