Added extra data to autotest jobs and tasks. am: 1a179a3ade
am: 26742c5945

Change-Id: Id798b57449e8bad425a44d097f5777273573b890
diff --git a/site_utils/sponge_lib/autotest_job_info.py b/site_utils/sponge_lib/autotest_job_info.py
index 111b03f..797217f 100644
--- a/site_utils/sponge_lib/autotest_job_info.py
+++ b/site_utils/sponge_lib/autotest_job_info.py
@@ -26,6 +26,9 @@
     # Tell the uploader what type of info this object holds.
     tags=['autotest']
 
+    # Version of the data stored.
+    version = 2
+
     def __init__(self, job):
         self._job = job
         self._tasks = list(
@@ -41,6 +44,11 @@
         return job_directories.get_job_id_or_task_id(self._job.dir)
 
     @property
+    def label(self):
+        """The label of the autotest job."""
+        return self._job.label
+
+    @property
     def user(self):
         """The user who launched the autotest job."""
         return self._job.user
@@ -66,6 +74,11 @@
         return self._job.keyval_dict.get('drone', socket.gethostname())
 
     @property
+    def keyvals(self):
+        """Keyval dict for this job."""
+        return self._job.keyval_dict
+
+    @property
     def tasks(self):
         """All tests that this job ran."""
         return self._tasks
@@ -106,6 +119,9 @@
     # A list of logs to upload for this task.
     logs = ['debug', 'status.log', 'crash', 'keyval']
 
+    # Version of the data stored.
+    version = 2
+
     def __init__(self, test, job):
         """
         @param test: The autotest test to create this task from.
@@ -143,6 +159,11 @@
         return self._test.subdir
 
     @property
+    def attributes(self):
+        """Attributes of this task."""
+        return getattr(self._test, 'attributes', {})
+
+    @property
     def results_dir(self):
         """The full directory where results are stored for this test."""
         if self.subdir == '----' or not self.subdir: