DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
send-restcmd Namespace Reference

Variables

 parser = argparse.ArgumentParser(description='POST command object from file to commanded endpoint.')
 
 type
 
 str
 
 default
 
 help
 
 int
 
 required
 
 True
 
 dest
 
 action
 
 interactive
 
 args = parser.parse_args()
 
str url = 'http://'+args.host+':'+str(args.port)+'/'+args.route
 
dict headers = {'content-type': 'application/json', 'X-Answer-Port': str(args.answer_port)}
 
 cmdstr = None
 
 response = requests.post(url, data=json.dumps(cmdstr), headers=headers)
 
list avacmds = [cdict['id'] for cdict in cmdstr if cdict["id"]]
 
 nextcmd = input('Press enter a command to send next: ')
 
list cmdobj = [cdict for cdict in cmdstr if cdict["id"] == nextcmd]
 

Variable Documentation

◆ action

send-restcmd.action

Definition at line 16 of file send-restcmd.py.

◆ args

send-restcmd.args = parser.parse_args()

Definition at line 20 of file send-restcmd.py.

◆ avacmds

list send-restcmd.avacmds = [cdict['id'] for cdict in cmdstr if cdict["id"]]

Definition at line 43 of file send-restcmd.py.

◆ cmdobj

list send-restcmd.cmdobj = [cdict for cdict in cmdstr if cdict["id"] == nextcmd]

Definition at line 60 of file send-restcmd.py.

◆ cmdstr

send-restcmd.cmdstr = None

Definition at line 26 of file send-restcmd.py.

◆ default

send-restcmd.default

Definition at line 10 of file send-restcmd.py.

◆ dest

send-restcmd.dest

Definition at line 16 of file send-restcmd.py.

◆ headers

dict send-restcmd.headers = {'content-type': 'application/json', 'X-Answer-Port': str(args.answer_port)}

Definition at line 24 of file send-restcmd.py.

◆ help

send-restcmd.help

Definition at line 10 of file send-restcmd.py.

◆ int

send-restcmd.int

Definition at line 11 of file send-restcmd.py.

◆ interactive

send-restcmd.interactive

Definition at line 18 of file send-restcmd.py.

◆ nextcmd

send-restcmd.nextcmd = input('Press enter a command to send next: ')

Definition at line 57 of file send-restcmd.py.

◆ parser

send-restcmd.parser = argparse.ArgumentParser(description='POST command object from file to commanded endpoint.')

Definition at line 9 of file send-restcmd.py.

◆ required

send-restcmd.required

Definition at line 14 of file send-restcmd.py.

◆ response

send-restcmd.response = requests.post(url, data=json.dumps(cmdstr), headers=headers)

Definition at line 37 of file send-restcmd.py.

◆ str

send-restcmd.str

Definition at line 10 of file send-restcmd.py.

◆ True

send-restcmd.True

Definition at line 14 of file send-restcmd.py.

◆ type

send-restcmd.type

Definition at line 10 of file send-restcmd.py.

◆ url

str send-restcmd.url = 'http://'+args.host+':'+str(args.port)+'/'+args.route

Definition at line 22 of file send-restcmd.py.