cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
cFSPlib.cfsp_user.cFuser Class Reference

User functions. More...

Public Member Functions

def __init__ (self, CFGFILE)
 
def get_auth_string (self, with_project=False)
 
def set_project (self, new_project)
 
def print_credentials (self)
 

Public Attributes

 project
 
 username
 
 password
 
 CFGFILE
 

Detailed Description

User functions.

A user in the cloudFPGA world

Definition at line 39 of file cfsp_user.py.

Constructor & Destructor Documentation

◆ __init__()

def cFSPlib.cfsp_user.cFuser.__init__ (   self,
  CFGFILE 
)

Definition at line 42 of file cfsp_user.py.

42  def __init__(self, CFGFILE):
43  username, password, project = load_user_credentials(CFGFILE)
44  self.project = project
45  self.username = username
46  self.password = password
47  self.CFGFILE = CFGFILE
48 
49 
def load_user_credentials(json_file)
Definition: cfsp_user.py:108
Here is the call graph for this function:

Member Function Documentation

◆ get_auth_string()

def cFSPlib.cfsp_user.cFuser.get_auth_string (   self,
  with_project = False 
)

Definition at line 50 of file cfsp_user.py.

50  def get_auth_string(self, with_project=False):
51  if with_project:
52  s = "username={0}&password={1}&project_name={2}".format(self.username, self.password, self.project)
53  return requests.utils.requote_uri(s)
54  else:
55  s = "username={0}&password={1}".format(self.username, self.password)
56  return requests.utils.requote_uri(s)
57 

◆ print_credentials()

def cFSPlib.cfsp_user.cFuser.print_credentials (   self)

Definition at line 67 of file cfsp_user.py.

67  def print_credentials(self):
68  print("File : " + self.CFGFILE)
69  print("User : " + self.username)
70  print("Password : " + self.password)
71  print("Project : " + self.project)
72 
73 
74 

◆ set_project()

def cFSPlib.cfsp_user.cFuser.set_project (   self,
  new_project 
)
This method should be used if the cloudFPGA quota name that should be used for this handle is different from the
default or credentials file
:param new_project:
:return: nothing

Definition at line 58 of file cfsp_user.py.

58  def set_project(self, new_project):
59  """
60  This method should be used if the cloudFPGA quota name that should be used for this handle is different from the
61  default or credentials file
62  :param new_project:
63  :return: nothing
64  """
65  self.project = new_project
66 

Member Data Documentation

◆ CFGFILE

cFSPlib.cfsp_user.cFuser.CFGFILE

Definition at line 47 of file cfsp_user.py.

◆ password

cFSPlib.cfsp_user.cFuser.password

Definition at line 46 of file cfsp_user.py.

◆ project

cFSPlib.cfsp_user.cFuser.project

Definition at line 44 of file cfsp_user.py.

◆ username

cFSPlib.cfsp_user.cFuser.username

Definition at line 45 of file cfsp_user.py.


The documentation for this class was generated from the following file: