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

Functions

def main (args)
 

Variables

string python_api_client_path = os.getcwd()+"/cFSPlib/python_api_client/"
 

Function Documentation

◆ main()

def cFSPlib.cfsp_debug.main (   args)

Definition at line 40 of file cfsp_debug.py.

40 def main(args):
41  conf = Configuration()
42  conf.host = cfsp_globals.__cf_manager_url__
43  api_client = ApiClient(conf)
44  api_instance = swagger_client.DebugApi(api_client=api_client)
45 
46  if (len(args['<args>']) != 4):
47  print("ERROR: invalid arguments provided in 'cfsp debug' command. Aborting...")
48  exit(print(__doc__))
49 
50  username = cfsp_globals.__cfsp_username__
51  password = cfsp_globals.__cfsp_password__
52  project_name = cfsp_globals.__cfsp_project__
53 
54  if args['<args>'][0] == 'get':
55  if (args['<args>'][1] == "flight_recorder_data"):
56  if args['<args>'][2] == 'cluster':
57  try:
58  api_response = api_instance.cf_manager_rest_api_get_flight_recorder_cluster(username, password, args['<args>'][3])
59  except ApiException as e:
60  print("Exception when calling DebugApi->cf_manager_rest_api_get_flight_recorder_cluster: %s\n" % e)
61  exit(-1)
62  elif args['<args>'][2] == 'instance':
63  try:
64  api_response = api_instance.cf_manager_rest_api_get_flight_recorder_instance(username, password, args['<args>'][3])
65  except ApiException as e:
66  print("Exception when calling DebugApi->cf_manager_rest_api_get_flight_recorder_instance: %s\n" % e)
67  exit(-1)
68  else:
69  exit(print("ERROR: invalid arguments provided in cfsp debug get flight_recorder_data. Choose between 'cluster' or 'instance'. Aborting..."))
70  else:
71  exit(print("ERROR: invalid arguments provided in cfsp debug get. Aborting..."))
72  return(api_response)
73  else:
74  exit(print("ERROR: invalid command provided in cfsp debug. Type 'cfsp help debug' to get a list of supported commands. Aborting..."))
def main(args)
Definition: cfsp_debug.py:40

Variable Documentation

◆ python_api_client_path

string cFSPlib.cfsp_debug.python_api_client_path = os.getcwd()+"/cFSPlib/python_api_client/"

Definition at line 30 of file cfsp_debug.py.