<s> from rally import consts <EOL> class Credential ( object ) : <EOL> def __init__ ( self , auth_url , username , password , tenant_name = None , <EOL> permission = consts . EndpointPermission . USER , <EOL> region_name = None , endpoint_type = consts . EndpointType . PUBLIC , <EOL> domain_name = None , endpoint = None , <EOL> user_domain_name = "<STR_LIT>" , admin_domain_name = "<STR_LIT>" , <EOL> project_domain_name = "<STR_LIT>" , <EOL> https_insecure = False , https_cacert = None ) : <EOL> self . auth_url = auth_url <EOL> self . username = username <EOL> self . password = password <EOL> self . tenant_name = tenant_name <EOL> self . permission = permission <EOL> self . region_name = region_name <EOL> self . endpoint_type = endpoint_type <EOL> self . domain_name = domain_name <EOL> self . user_domain_name = user_domain_name <EOL> self . admin_domain_name = admin_domain_name <EOL> self . project_domain_name = project_domain_name <EOL> self . endpoint = endpoint <EOL> self . insecure = https_insecure <EOL> self . cacert = https_cacert <EOL> def to_dict ( self , include_permission = False ) : <EOL> dct = { "<STR_LIT>" : self . auth_url , "<STR_LIT:username>" : self . username , <EOL> "<STR_LIT:password>" : self . password , "<STR_LIT>" : self . tenant_name , <EOL> "<STR_LIT>" : self . region_name , <EOL> "<STR_LIT>" : self . endpoint_type , <EOL> "<STR_LIT>" : self . domain_name , <EOL> "<STR_LIT>" : self . endpoint , <EOL> "<STR_LIT>" : self . insecure , <EOL> "<STR_LIT>" : self . cacert , <EOL> "<STR_LIT>" : self . user_domain_name , <EOL> "<STR_LIT>" : self . admin_domain_name , <EOL> "<STR_LIT>" : self . project_domain_name } <EOL> if include_permission : <EOL> dct [ "<STR_LIT>" ] = self . permission <EOL> return dct </s>
