@@ -36,6 +36,7 @@ def delete_comment(self, comment_id):
3636 self .api .call_function ('delete_comment' , {'comment_id' : comment_id })
3737
3838 def report_session_start (self , logical_id = NOTHING ,
39+ parent_logical_id = NOTHING ,
3940 hostname = NOTHING ,
4041 total_num_tests = NOTHING ,
4142 user_email = NOTHING ,
@@ -48,7 +49,7 @@ def report_session_start(self, logical_id=NOTHING,
4849
4950 :rtype: A session object representing the reported session
5051 """
51- returned = self . api . call_function ( 'report_session_start' , {
52+ params = {
5253 'hostname' : hostname ,
5354 'logical_id' : logical_id ,
5455 'total_num_tests' : total_num_tests ,
@@ -57,7 +58,14 @@ def report_session_start(self, logical_id=NOTHING,
5758 'keepalive_interval' : keepalive_interval ,
5859 'subjects' : subjects ,
5960 'infrastructure' : infrastructure ,
60- })
61+ }
62+ if parent_logical_id is not None :
63+ supports_parent_logical_id = (self .api .info ().endpoints .report_session_start .version >= 2 )
64+
65+ if supports_parent_logical_id :
66+ params ['parent_logical_id' ] = parent_logical_id
67+
68+ returned = self .api .call_function ('report_session_start' , params )
6169 return returned
6270
6371 def query_sessions (self ):
0 commit comments