File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -4901,6 +4901,26 @@ def _commit(
49014901 if exception :
49024902 raise err .PanCommitNotNeeded ("Commit not needed" , pan_device = self )
49034903 else :
4904+ # By getting here, there was no "./result/job" in the commit response,
4905+ # and there was no exception raised either, so capture the response message
4906+ commit_response_msg = commit_response .find ("./msg/line" ).text
4907+ self ._logger .debug ("No job id. Msg: " + commit_response_msg )
4908+
4909+ # One scenario for arriving here in the the code is pushing to Log Collector Groups (LCG),
4910+ # they don't have a job ID, so test for the relevant message to see if this is the case
4911+ if (
4912+ "Generated config and committed to connected collectors in group"
4913+ in commit_response_msg
4914+ ):
4915+ # With no real job ID to return, construct a reasonable response.
4916+ # There is currently no way to check the push to LCG was a success, so assume it was
4917+ log_collector_group_push_result = {
4918+ "success" : True ,
4919+ "result" : "Ok" ,
4920+ "jobid" : "0" ,
4921+ "messages" : [commit_response_msg ],
4922+ }
4923+ return log_collector_group_push_result
49044924 return
49054925 if not sync :
49064926 # Don't synchronize, just return
You can’t perform that action at this time.
0 commit comments