#NEWLINE# @ cliutils . arg ( 'node' , metavar = '<node>' , help = 'Name or UUID of the node.' ) #NEWLINE# @ cliutils . arg ( 'method' , metavar = '<method>' , help = 'Vendor-passthru method to be called.' ) #NEWLINE# @ cliutils . arg ( 'arguments' , metavar = '<arg=value>' , nargs = '*' , action = 'append' , default = [ ] , help = 'Argument to be passed to the vendor-passthru method. Can be specified multiple times.' ) #NEWLINE# @ cliutils . arg ( '--http-method' , metavar = '<http-method>' , choices = [ 'POST' , 'PUT' , 'GET' , 'DELETE' , 'PATCH' ] , help = "The HTTP method to use in the request. Valid HTTP methods are: 'POST', 'PUT', 'GET', 'DELETE', and 'PATCH'. Defaults to 'POST'." ) #NEWLINE# @ cliutils . arg ( '--http_method' , help = argparse . SUPPRESS ) #NEWLINE# def do_node_vendor_passthru( cc , args ) : #NEWLINE# #INDENT# 'Call a vendor-passthru extension for a node.' #NEWLINE# arguments = utils . args_array_to_dict ( { #NEWLINE# #INDENT# 'args' : args . arguments [ 0 ] , #NEWLINE# #UNINDENT# } , 'args' ) [ 'args' ] #NEWLINE# if ( not arguments ) : #NEWLINE# #INDENT# arguments = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# resp = cc . node . vendor_passthru ( args . node , args . method , http_method = arguments . http_method , args = arguments ) #NEWLINE# if resp : #NEWLINE# #INDENT# print ( str ( resp . to_dict ( ) ) )