Description of problem: Please add new methods attach_log() and detach_log() to the TestCaseRun class so that we are able to include links to relevant job logs in scripts. Also provide a way to get all linked logs, perhaps TestCaseRun.get_logs(). Thanks.
add attach_log(), detach_log() and get_logs in TestCaseRun class. please verify after deploy in stage server.
Verify 3.8.1-1 on tcms-test -->PASS Verify steps: 1. >>> TestCaseRun.attach_log(1595145, 'log_name2', 'https://tcms-test.app.eng.nay.redhat.com') 2. >>> TestCaseRun.get_logs(1595145) ============= [{'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:24:33', 'id': 129, 'name': 'log_name2', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'http://ciqe.englab.nay.redhat.com/'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:23:48', 'id': 128, 'name': 'log_name2', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'https://tcms-test.app.eng.nay.redhat.com'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:22:30', 'id': 127, 'name': 'log_name', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'www.redhat.com'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:25:08', 'id': 130, 'name': 'log_name2', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'ciqe.englab.nay.redhat.com/'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:25:40', 'id': 131, 'name': 'log_name2', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'ciqe.englab.nay.redhat.com'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:26:31', 'id': 132, 'name': 'log_name2', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'http://www.baidu.com/'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:27:08', 'id': 133, 'name': 'log_name3', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'http://www.baidu.com/'}] ============= 3. >>> TestCaseRun.detach_log(1595145, 133) ============= [{'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:24:33', 'id': 129, 'name': 'log_name2', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'http://ciqe.englab.nay.redhat.com/'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:23:48', 'id': 128, 'name': 'log_name2', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'https://tcms-test.app.eng.nay.redhat.com'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:22:30', 'id': 127, 'name': 'log_name', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'www.redhat.com'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:25:08', 'id': 130, 'name': 'log_name2', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'ciqe.englab.nay.redhat.com/'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:25:40', 'id': 131, 'name': 'log_name2', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'ciqe.englab.nay.redhat.com'}, {'content_type': 'test case run', 'content_type_id': 57, 'created_on': '2012-10-16 12:26:31', 'id': 132, 'name': 'log_name2', 'object_pk': '1595145', 'site': 'tcms.engineering.redhat.com', 'site_id': 1, 'url': 'http://www.baidu.com/'}] ============= Actual result: these three new methods work well.