cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
cFSPlib.cFSP Namespace Reference

Functions

def check_credentials (CFGFILE)
 
def main (args)
 

Variables

string version_path = os.path.dirname(os.path.abspath(__file__))+"/version.txt"
 
bool is_script = False
 
 args = docopt(__doc__, version=__version__)
 

Function Documentation

◆ check_credentials()

def cFSPlib.cFSP.check_credentials (   CFGFILE)

Definition at line 117 of file cFSP.py.

117 def check_credentials(CFGFILE):
118  #if os.path.isfile(cfsp_globals.__cfsp_session_file__):
119  # dill.load_session(cfsp_globals.__cfsp_session_file__)
120  #else:
121  args = docopt(__doc__, version=__version__)
122  args['<args>'] = ['load']
123  cfsp_user.main(args)
124 
def check_credentials(CFGFILE)
Definition: cFSP.py:117
Here is the caller graph for this function:

◆ main()

def cFSPlib.cFSP.main (   args)

Definition at line 125 of file cFSP.py.

125 def main(args):
126 
127  argv = [args['<command>']] + args['<args>']
128  #print(args['<args>'])
129  #print([args['<command>']] + args['<args>'])
130 
131  for repeat_id in tqdm(range(0,int(args['--repeat']))):
132  cfrm_response = ''
133  print("INFO: Repeat #"+str(repeat_id))
134  if args['<command>'] == 'user':
135  cfsp_user.main(args)
136  elif args['<command>'] == 'cluster':
137  check_credentials(args['--config'])
138  cfrm_response=cfsp_cluster.main(args)
139  elif args['<command>'] == 'image':
140  check_credentials(args['--config'])
141  cfrm_response=cfsp_image.main(args)
142  elif args['<command>'] == 'instance':
143  check_credentials(args['--config'])
144  cfrm_response=cfsp_instance.main(args)
145  elif args['<command>'] == 'debug':
146  check_credentials(args['--config'])
147  cfrm_response=cfsp_debug.main(args)
148  elif args['<command>'] in ['help', None]:
149  if args['<args>'] == ['user']:
150  print("docopt user")
151  print(docopt(cfsp_user.__doc__, argv=argv))
152  elif args['<args>'] == ['cluster']:
153  print(docopt(cfsp_cluster.__doc__, argv=argv))
154  elif args['<args>'] == ['image']:
155  print(docopt(cfsp_image.__doc__, argv=argv))
156  elif args['<args>'] == ['instance']:
157  print(docopt(cfsp_instance.__doc__, argv=argv))
158  elif args['<args>'] == ['debug']:
159  print(docopt(cfsp_debug.__doc__, argv=argv))
160  else:
161  print(docopt(__doc__, version=__version__))
162  else:
163  print("ERROR: unknown command. Aborting...")
164  exit(print(docopt(__doc__, version=__version__)))
165 
166  if (is_script):
167  pprint(cfrm_response)
168  else:
169  return(cfrm_response)
170 
171 
def main(args)
Definition: cFSP.py:125
Here is the call graph for this function:

Variable Documentation

◆ args

cFSPlib.cFSP.args = docopt(__doc__, version=__version__)

Definition at line 178 of file cFSP.py.

◆ is_script

bool cFSPlib.cFSP.is_script = False

Definition at line 115 of file cFSP.py.

◆ version_path

string cFSPlib.cFSP.version_path = os.path.dirname(os.path.abspath(__file__))+"/version.txt"

Definition at line 107 of file cFSP.py.