#NEWLINE# def export( self , category = None , from_name = None , to_name = None , pcapid = None , search_time = None , serialno = None , extra_qs = None ) : #NEWLINE# #INDENT# self . __set_api_key ( ) #NEWLINE# self . __clear_response ( ) #NEWLINE# query = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# query [ 'type' ] = 'export' #NEWLINE# query [ 'key' ] = self . api_key #NEWLINE# if ( category is not None ) : #NEWLINE# #INDENT# query [ 'category' ] = category #NEWLINE# #UNINDENT# if ( from_name is not None ) : #NEWLINE# #INDENT# query [ 'from' ] = from_name #NEWLINE# #UNINDENT# if ( to_name is not None ) : #NEWLINE# #INDENT# query [ 'to' ] = to_name #NEWLINE# #UNINDENT# if ( pcapid is not None ) : #NEWLINE# #INDENT# query [ 'pcapid' ] = pcapid #NEWLINE# #UNINDENT# if ( search_time is not None ) : #NEWLINE# #INDENT# query [ 'search-time' ] = search_time #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( pcapid is not None ) : #NEWLINE# #INDENT# if isinstance ( pcapid , str ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# n = int ( pcapid ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# raise PanXapiError ( ( 'Invalid pcapid: %s' % pcapid ) ) #NEWLINE# #UNINDENT# #UNINDENT# pcap_time = self . pcapid_time ( n ) #NEWLINE# panos_time = self . panos_time ( pcap_time ) #NEWLINE# query [ 'search-time' ] = panos_time #NEWLINE# self . _log ( DEBUG1 , 'pcapid time: %s %s' , pcap_time , panos_time ) #NEWLINE# #UNINDENT# #UNINDENT# if ( serialno is not None ) : #NEWLINE# #INDENT# query [ 'serialno' ] = serialno #NEWLINE# #UNINDENT# if ( extra_qs is not None ) : #NEWLINE# #INDENT# query = self . __merge_extra_qs ( query , extra_qs ) #NEWLINE# #UNINDENT# response = self . __api_request ( query ) #NEWLINE# if ( not response ) : #NEWLINE# #INDENT# raise PanXapiError ( self . status_detail ) #NEWLINE# #UNINDENT# if ( not self . __set_response ( response ) ) : #NEWLINE# #INDENT# raise PanXapiError ( self . status_detail ) #NEWLINE# #UNINDENT# if self . export_result : #NEWLINE# #INDENT# self . export_result [ 'category' ] = search_time