ARC SDK
|
User configuration class More...
#include <arc/UserConfig.h>
Public Member Functions | |
UserConfig (initializeCredentialsType initializeCredentials=initializeCredentialsType()) | |
Create a UserConfig object. More... | |
UserConfig (const std::string &conffile, initializeCredentialsType initializeCredentials=initializeCredentialsType(), bool loadSysConfig=true) | |
Create a UserConfig object. More... | |
UserConfig (const std::string &conffile, const std::string &jfile, initializeCredentialsType initializeCredentials=initializeCredentialsType(), bool loadSysConfig=true) | |
Create a UserConfig object. More... | |
UserConfig (const long int &ptraddr) | |
Language binding constructor. More... | |
bool | InitializeCredentials (initializeCredentialsType initializeCredentials) |
Initialize user credentials. More... | |
bool | CredentialsFound () const |
Validate credential location. More... | |
bool | LoadConfigurationFile (const std::string &conffile, bool ignoreJobListFile=true) |
Load specified configuration file. More... | |
bool | SaveToFile (const std::string &filename) const |
Save to INI file. More... | |
void | ApplyToConfig (BaseConfig &ccfg) const |
Apply credentials to BaseConfig. More... | |
operator bool () const | |
Check for validity. More... | |
bool | operator! () const |
Check for non-validity. More... | |
bool | JobListFile (const std::string &path) |
Set path to job list file. More... | |
const std::string & | JobListFile () const |
Get a reference to the path of the job list file. More... | |
bool | JobListType (const std::string &type) |
Set type of job storage. More... | |
const std::string & | JobListType () const |
Get type of job storage. More... | |
bool | Timeout (int newTimeout) |
Set timeout. More... | |
int | Timeout () const |
Get timeout. More... | |
bool | Verbosity (const std::string &newVerbosity) |
Set verbosity. More... | |
const std::string & | Verbosity () const |
Get the user selected level of verbosity. More... | |
bool | Broker (const std::string &name) |
Set broker to use in target matching. More... | |
bool | Broker (const std::string &name, const std::string &argument) |
Set broker to use in target matching. More... | |
const std::pair< std::string, std::string > & | Broker () const |
Get the broker and corresponding arguments. More... | |
bool | VOMSESPath (const std::string &path) |
Set path to file containing VOMS configuration. More... | |
const std::string & | VOMSESPath () |
Get path to file containing VOMS configuration. More... | |
const std::list< std::string > & | DefaultVOMSes () const |
Get the list of VOMS VOs to be used by default while creating proxy credentials. More... | |
bool | UserName (const std::string &name) |
Set user-name for SLCS. More... | |
const std::string & | UserName () const |
Get user-name. More... | |
bool | Password (const std::string &newPassword) |
Set password. More... | |
const std::string & | Password () const |
Get password. More... | |
void | CredentialString (const std::string &cred) |
Set credentials. More... | |
const std::string & | CredentialString () const |
Get credentials. More... | |
void | OToken (const std::string &token) |
Set authentication token. More... | |
const std::string & | OToken () const |
Get authentication token. More... | |
bool | ProxyPath (const std::string &newProxyPath) |
Set path to user proxy. More... | |
const std::string & | ProxyPath () const |
Get path to user proxy. More... | |
bool | CertificatePath (const std::string &newCertificatePath) |
Set path to certificate. More... | |
const std::string & | CertificatePath () const |
Get path to certificate. More... | |
bool | KeyPath (const std::string &newKeyPath) |
Set path to key. More... | |
const std::string & | KeyPath () const |
Get path to key. More... | |
bool | KeyPassword (const std::string &newKeyPassword) |
Set password for generated key. More... | |
const std::string & | KeyPassword () const |
Get password for generated key. More... | |
bool | KeySize (int newKeySize) |
Set key size. More... | |
int | KeySize () const |
Get key size. More... | |
bool | CACertificatePath (const std::string &newCACertificatePath) |
Set CA-certificate path. More... | |
const std::string & | CACertificatePath () const |
Get path to CA-certificate. More... | |
bool | CACertificatesDirectory (const std::string &newCACertificatesDirectory) |
Set path to CA-certificate directory. More... | |
const std::string & | CACertificatesDirectory () const |
Get path to CA-certificate directory. More... | |
bool | CertificateLifeTime (const Period &newCertificateLifeTime) |
Set certificate life time. More... | |
const Period & | CertificateLifeTime () const |
Get certificate life time. More... | |
bool | SLCS (const URL &newSLCS) |
Set the URL to the Short Lived Certificate Service (SLCS). More... | |
const URL & | SLCS () const |
Get the URL to the Short Lived Certificate Service (SLCS). More... | |
bool | IsSameIdentity (UserConfig const &other) const |
Check if configuration represents same user identity (false negatives are likely) More... | |
bool | StoreDirectory (const std::string &newStoreDirectory) |
Set store directory. More... | |
const std::string & | StoreDirectory () const |
Get store diretory. More... | |
bool | JobDownloadDirectory (const std::string &newDownloadDirectory) |
Set download directory. More... | |
const std::string & | JobDownloadDirectory () const |
Get download directory. More... | |
bool | IdPName (const std::string &name) |
Set IdP name. More... | |
const std::string & | IdPName () const |
Get IdP name. More... | |
bool | OverlayFile (const std::string &path) |
Set path to configuration overlay file. More... | |
const std::string & | OverlayFile () const |
Get path to configuration overlay file. More... | |
bool | UtilsDirPath (const std::string &dir) |
Set path to directory storing utility files for DataPoints. More... | |
const std::string & | UtilsDirPath () const |
Get path to directory storing utility files for DataPoints. More... | |
void | SetUser (const User &u) |
Set User for filesystem access. More... | |
const User & | GetUser () const |
Get User for filesystem access. More... | |
bool | InfoInterface (const std::string &infointerface_) |
Set the default local information system interface. More... | |
const std::string & | InfoInterface () const |
Get the default local information system interface. More... | |
bool | SubmissionInterface (const std::string &submissioninterface_) |
Set the default submission interface. More... | |
const std::string & | SubmissionInterface () const |
Get the default submission interface. More... | |
const std::list< std::string > & | RejectDiscoveryURLs () const |
Get the list of rejected service discovery URLs. More... | |
void | AddRejectDiscoveryURLs (const std::list< std::string > &urls) |
Add list of URLs to ignored at service discovery. More... | |
void | ClearRejectDiscoveryURLs () |
Clear the rejected service discovery URLs. More... | |
const std::list< std::string > & | RejectManagementURLs () const |
Get the list of rejected job managmenet URLs. More... | |
ConfigEndpoint | GetService (const std::string &alias) |
Get the ConfigEndpoint for the service with the given alias. More... | |
std::list< ConfigEndpoint > | GetServicesInGroup (const std::string &group, ConfigEndpoint::Type type=ConfigEndpoint::ANY) |
Get the services in a given group filtered by type. More... | |
std::list< ConfigEndpoint > | GetDefaultServices (ConfigEndpoint::Type type=ConfigEndpoint::ANY) |
Get the services flagged as default filtered by type. More... | |
std::list< ConfigEndpoint > | GetServices (const std::string &groupOrAlias, ConfigEndpoint::Type type=ConfigEndpoint::ANY) |
Get one or more service with the given alias or in the given group filtered by type. More... | |
std::map< std::string, ConfigEndpoint > | GetAllConfiguredServices () |
Get all services. More... | |
Static Public Member Functions | |
static std::string | ARCUSERDIRECTORY () |
Path to ARC user home directory. More... | |
static std::string | SYSCONFIG () |
Path to system configuration. More... | |
static std::string | SYSCONFIGARCLOC () |
Path to system configuration at ARC location. More... | |
static std::string | DEFAULTCONFIG () |
Path to default configuration file. More... | |
static std::string | EXAMPLECONFIG () |
Path to example configuration. More... | |
static std::string | JOBLISTFILE () |
Path to default job list file. More... | |
static std::string | DEFAULT_BROKER () |
Default broker. More... | |
Static Public Attributes | |
static const int | DEFAULT_TIMEOUT = 20 |
Default timeout in seconds. More... | |
User configuration class
This class provides a container for a selection of various attributes/parameters which can be configured to needs of the user, and can be read by implementing instances or programs. The class can be used in two ways. One can create a object from a configuration file, or simply set the desired attributes by using the setter method, associated with every setable attribute. The list of attributes which can be configured in this class are:
where the first term is the name of the attribute used in the configuration file, and the second term is the associated setter method (for more information about a given attribute see the description of the setter method).
The configuration file should have a INI-style format and the IniConfig class will thus be used to parse the file. The above mentioned attributes should be placed in the common section.
Besides the options above, the configuration file can contain information about services (service registries and computing elements). Each service has to be put in its on section. Each service has an alias, which is a short name. The name of the section consists of the word registry
for service registries and computing
for computing elements, then contains a slash and the alias of the service. e.g. [registry/index1]
or [computing/testce]
In a service section the possible options are the following:
For computing elements the following additional options exist:
For a service registry the following additional option exist:
These services can be accessed by the GetService, GetServices, GetDefaultServices, GetServicesInGroup methods, which return ConfigEndpoint object(s). The ConfigEndpoint objects contain the URL and the InterfaceNames of the services.
The UserConfig class also provides a method InitializeCredentials() for locating user credentials by searching in different standard locations. The CredentialsFound() method can be used to test if locating the credentials succeeded.
Arc::UserConfig::UserConfig | ( | initializeCredentialsType | initializeCredentials = initializeCredentialsType() | ) |
Create a UserConfig object.
The UserConfig object created by this constructor initializes only default values, and if specified by the initializeCredentials boolean credentials will be tried initialized using the InitializeCredentials() method. The object is only non-valid if initialization of credentials fails which can be checked with the operator bool() method.
initializeCredentials | is a optional boolean indicating if the InitializeCredentials() method should be invoked, the default is true . |
Arc::UserConfig::UserConfig | ( | const std::string & | conffile, |
initializeCredentialsType | initializeCredentials = initializeCredentialsType() , |
||
bool | loadSysConfig = true |
||
) |
Create a UserConfig object.
The UserConfig object created by this constructor will, if specified by the loadSysConfig boolean, first try to load the system configuration file by invoking the LoadConfigurationFile() method, and if this fails a WARNING is reported. Then the configuration file passed will be tried loaded using the before mentioned method, and if this fails an ERROR is reported, and the created object will be non-valid. Note that if the passed file path is empty the example configuration will be tried copied to the default configuration file path specified by DEFAULTCONFIG. If the example file cannot be copied one or more WARNING messages will be reported and no configration will be loaded. If loading the configurations file succeeded and if initializeCredentials is true
then credentials will be initialized using the InitializeCredentials() method, and if no valid credentials are found the created object will be non-valid.
conffile | is the path to a INI-configuration file. |
initializeCredentials | is a boolean indicating if credentials should be initialized, the default is true . |
loadSysConfig | is a boolean indicating if the system configuration file should be loaded aswell, the default is true . |
Arc::UserConfig::UserConfig | ( | const std::string & | conffile, |
const std::string & | jfile, | ||
initializeCredentialsType | initializeCredentials = initializeCredentialsType() , |
||
bool | loadSysConfig = true |
||
) |
Create a UserConfig object.
The UserConfig object created by this constructor does only differ from the UserConfig(const std::string&, bool, bool) constructor in that it is possible to pass the path of the job list file directly to this constructor. If the job list file joblistfile is empty, the behaviour of this constructor is exactly the same as the before mentioned, otherwise the job list file will be initilized by invoking the setter method JobListFile(const std::string&). If it fails the created object will be non-valid, otherwise the specified configuration file conffile will be loaded with the ignoreJobListFile argument set to true
.
conffile | is the path to a INI-configuration file |
jfile | is the path to a (non-)existing job list file. |
initializeCredentials | is a boolean indicating if credentials should be initialized, the default is true . |
loadSysConfig | is a boolean indicating if the system configuration file should be loaded aswell, the default is true . |
Arc::UserConfig::UserConfig | ( | const long int & | ptraddr | ) |
Language binding constructor.
The passed long int should be a pointer address to a UserConfig object, and this address is then casted into this UserConfig object.
ptraddr | is an memory address to a UserConfig object. |
|
inline |
Add list of URLs to ignored at service discovery.
The passed list of strings will be added to the internal reject list and they should represent URLs which should be ignored when doing service discovery.
urls | list of string representing URLs to ignore at service discovery |
void Arc::UserConfig::ApplyToConfig | ( | BaseConfig & | ccfg | ) | const |
Apply credentials to BaseConfig.
This methods sets the BaseConfig credentials to the credentials contained in this object. It also passes user defined configuration overlay if any.
ccfg | a BaseConfig object which will configured with the credentials of this object. |
|
static |
Path to ARC user home directory.
The ARCUSERDIRECTORY variable is the path to the ARC home directory of the current user. This path is created using the User::Home() method.
bool Arc::UserConfig::Broker | ( | const std::string & | name | ) |
Set broker to use in target matching.
The string passed to this method should be in the format:
where the <name> is the name of the broker and cannot contain any ':', and the optional <argument> should contain arguments which should be passed to the broker.
Two attributes are associated with this setter method 'brokername' and 'brokerarguments'.
name | the broker name and argument specified in the format given above. |
true
.
|
inline |
Set broker to use in target matching.
As opposed to the Broker(const std::string&) method this method sets broker name and arguments directly from the passed two arguments.
Two attributes are associated with this setter method 'brokername' and 'brokerarguments'.
name | is the name of the broker. |
argument | is the arguments of the broker. |
true
.
|
inline |
Get the broker and corresponding arguments.
The returned pair contains the broker name as the first component and the argument as the second.
|
inline |
Set CA-certificate path.
The path to the file containing CA-certificate will be set when calling this method. This configuration parameter is deprecated - use CACertificatesDirectory instead. Only arcslcs uses it.
The attribute associated with this setter method is 'cacertificatepath'.
newCACertificatePath | is the path to the CA-certificate. |
true
.
|
inline |
Get path to CA-certificate.
Retrieve the path to the file containing CA-certificate. This configuration parameter is deprecated.
|
inline |
Set path to CA-certificate directory.
The path to the directory containing CA-certificates will be set when calling this method. Note that the InitializeCredentials() method will also try to set this path, by searching in different locations.
The attribute associated with this setter method is 'cacertificatesdirectory'.
newCACertificatesDirectory | is the path to the CA-certificate directory. |
true
.
|
inline |
Get path to CA-certificate directory.
Retrieve the path to the CA-certificate directory.
|
inline |
Set certificate life time.
Sets lifetime of user certificate which will be obtained from Short Lived Credentials Service.
The attribute associated with this setter method is 'certificatelifetime'.
newCertificateLifeTime | is the life time of a certificate, as a Period object. |
true
.
|
inline |
Get certificate life time.
Gets lifetime of user certificate which will be obtained from Short Lived Credentials Service.
|
inline |
Set path to certificate.
The path to user certificate will be set by this method. The path to the correcsponding key can be set with the KeyPath(const std::string&) method. Note that the InitializeCredentials() method will also try to set this path, by searching in different locations.
The attribute associated with this setter method is 'certificatepath'.
newCertificatePath | is the path to the new certificate. |
true
.
|
inline |
Get path to certificate.
The path to the cerficate is returned when invoking this method.
|
inline |
Clear the rejected service discovery URLs.
Clears the list of strings representing URLs which should be ignored during service discovery.
|
inline |
Validate credential location.
Valid credentials consists of a combination of a path to existing CA-certificate directory and either a path to existing proxy or a path to existing user key/certificate pair. If valid credentials are found this method returns true
, otherwise false
is returned.
true
if valid credentials are found, otherwise false
.
|
inline |
Set credentials.
For code which does not need credentials stored in files, this method can be used to set the credential as a string stored in memory.
cred | The credential represented as a string |
|
inline |
Get credentials.
Returns the string representation of credentials previously set by CredentialString(const std::string&).
|
static |
Default broker.
The DEFAULT_BROKER specifies the name of the broker which should be used in case no broker is explicitly chosen.
|
static |
Path to default configuration file.
The DEFAULTCONFIG variable is the path to the default configuration file used in case no configuration file have been specified. The path is created from the ARCUSERDIRECTORY object.
|
inline |
Get the list of VOMS VOs to be used by default while creating proxy credentials.
This list is populated by the (possibly multiple) defaultvoms
configuration options.
|
static |
Path to example configuration.
The EXAMPLECONFIG variable is the path to the example configuration file.
|
inline |
Get all services.
std::list<ConfigEndpoint> Arc::UserConfig::GetDefaultServices | ( | ConfigEndpoint::Type | type = ConfigEndpoint::ANY | ) |
Get the services flagged as default filtered by type.
Return all the services which had default=yes
in their configuration, if they have the given type.
[in] | type | is REGISTRY or COMPUTING if only those services are needed, or ANY if all |
ConfigEndpoint Arc::UserConfig::GetService | ( | const std::string & | alias | ) |
Get the ConfigEndpoint for the service with the given alias.
Each service in the configuration file has its own section, and the name of the section contains the type of the service (registry
or computing
), and the alias of the service (separated by a slash).
[in] | alias | is the alias of the service |
std::list<ConfigEndpoint> Arc::UserConfig::GetServices | ( | const std::string & | groupOrAlias, |
ConfigEndpoint::Type | type = ConfigEndpoint::ANY |
||
) |
Get one or more service with the given alias or in the given group filtered by type.
This is a convenience method for querying the configured services by both the name of a group or an alias of a service. If the name is a name of a group then all the services in the group will be returned (filtered by type). If there is no such group, then a service with the given alias is returned in a single item list (but only if it matches the filter).
[in] | groupOrAlias | is either a name of a group or an alias of a service |
[in] | type | is REGISTRY or COMPUTING if only those services are needed, or ANY if all |
std::list<ConfigEndpoint> Arc::UserConfig::GetServicesInGroup | ( | const std::string & | group, |
ConfigEndpoint::Type | type = ConfigEndpoint::ANY |
||
) |
Get the services in a given group filtered by type.
All services of the given group are returned if they match the type filter.
[in] | group | is the name of the group |
[in] | type | is REGISTRY or COMPUTING if only those services are needed, or ANY if all |
|
inline |
Get User for filesystem access.
|
inline |
Set IdP name.
Sets Identity Provider name (Shibboleth) to which user belongs. It is used for contacting Short Lived Certificate Service.
The attribute associated with this setter method is 'idpname'.
name | is the new IdP name. |
true
.
|
inline |
Get IdP name.
Gets Identity Provider name (Shibboleth) to which user belongs.
|
inline |
Set the default local information system interface.
For services which does not specify a local information system interface, this default will be used.
If a local information system interface is given, the computing element will be only queried using this interface.
infointerface_ | is a string specifying a GLUE2 InterfaceName |
true
.
|
inline |
Get the default local information system interface.
bool Arc::UserConfig::InitializeCredentials | ( | initializeCredentialsType | initializeCredentials | ) |
Initialize user credentials.
The location of the user credentials will be tried located when calling this method and stored internally when found. The method searches in different locations. Depending on value of initializeCredentials this method behaves differently. Following is an explanation for RequireCredentials. For less strict values see information below. First the user proxy or the user key/certificate pair is tried located in the following order:
Along with the proxy and key/certificate pair, the path of the directory containing CA certificates is also located. The presence of directory will be checked in the following order and first found is accepted:
It is an error if none of the directories above exist.
In case of initializeCredentials == TryCredentials method behaves same way like in case RequireCredentials except it does not report errors through its Logger object and does not return false.
If NotTryCredentials is used method does not check for presence of credentials. It behaves like if corresponding files are always present.
And in case of SkipCredentials method does nothing.
All options with SkipCA* prefix behaves similar to those without prefix except the path of the directory containing CA certificates is completely ignored.
|
inline |
Check if configuration represents same user identity (false negatives are likely)
Compare identity represented by this object to one provided.
other | configuration object to compare to |
|
inline |
Set download directory.
Sets directory which will be used to download the job directory using arcget command.
The attribute associated with this setter method is 'jobdownloaddirectory'.
newDownloadDirectory | is the path to the download directory. |
true
.
|
inline |
Get download directory.
returns directory which will be used to download the job directory using arcget command.
The attribute associated with the method is 'jobdownloaddirectory'.
bool Arc::UserConfig::JobListFile | ( | const std::string & | path | ) |
Set path to job list file.
The method takes a path to a file which will be used as the job list file for storing and reading job information. This method always return true.
The attribute associated with this setter method is 'joblist'.
path | the path to the job list file. |
|
inline |
Get a reference to the path of the job list file.
The job list file is used to store and fetch information about submitted computing jobs to computing services. This method will return the path to the specified job list file.
|
static |
Path to default job list file.
The JOBLISTFILE variable specifies the default path to the job list file used by the ARC job management tools. The job list file is located in the directory specified by the ARCUSERDIRECTORY variable with name 'jobs.dat'.
bool Arc::UserConfig::JobListType | ( | const std::string & | type | ) |
Set type of job storage.
Possible storage types are BDB and XML. This method always return true.
The attribute associated with this setter method is 'joblisttype'.
type | of job storage |
|
inline |
Get type of job storage.
|
inline |
Set password for generated key.
Set password to be used to encode private key of credentials obtained from Short Lived Credentials Service.
The attribute associated with this setter method is 'keypassword'.
newKeyPassword | is the new password to the key. |
true
.
|
inline |
Get password for generated key.
Get password to be used to encode private key of credentials obtained from Short Lived Credentials Service.
|
inline |
Set path to key.
The path to user key will be set by this method. The path to the corresponding certificate can be set with the CertificatePath(const std::string&) method. Note that the InitializeCredentials() method will also try to set this path, by searching in different locations.
The attribute associated with this setter method is 'keypath'.
newKeyPath | is the path to the new key. |
true
.
|
inline |
Get path to key.
The path to the key is returned when invoking this method.
|
inline |
Set key size.
Set size/strengt of private key of credentials obtained from Short Lived Credentials Service.
The attribute associated with this setter method is 'keysize'.
newKeySize | is the size, an an integer, of the key. |
true
.
|
inline |
Get key size.
Get size/strengt of private key of credentials obtained from Short Lived Credentials Service.
bool Arc::UserConfig::LoadConfigurationFile | ( | const std::string & | conffile, |
bool | ignoreJobListFile = true |
||
) |
Load specified configuration file.
The configuration file passed is parsed by this method by using the IniConfig class. If the parsing is unsuccessful a WARNING is reported.
The format of the configuration file should follow that of INI, and every attribute present in the file is only allowed once (except the rejectmanagement
and rejectdiscovery
attributes), otherwise a WARNING will be reported. For the list of allowed attributes see the detailed description of UserConfig.
conffile | is the path to the configuration file. |
ignoreJobListFile | is a optional boolean which indicates whether the joblistfile attribute in the configuration file should be ignored. Default is to ignored it (true ). |
true
is returned, otherwise false
is returned.
|
inline |
Check for validity.
The validity of an object created from this class can be checked using this casting operator. An object is valid if the constructor did not encounter any errors.
|
inline |
Check for non-validity.
See operator bool() for a description.
|
inline |
Set authentication token.
Assigns OToken (authenticatio and sometimes authorizzation token) to be used in HTTP communication.
cred | The credential represented as a string |
|
inline |
Get authentication token.
Returns the authentication token previously set by OToken(const std::string&).
|
inline |
Set path to configuration overlay file.
Content of specified file is a backdoor to configuration XML generated from information stored in this class. The content of file is passed to BaseConfig class in ApplyToConfig(BaseConfig&) then merged with internal configuration XML representation. This feature is meant for quick prototyping/testing/tuning of functionality without rewriting code. It is meant for developers and most users won't need it.
The attribute associated with this setter method is 'overlayfile'.
path | is the new overlay file path. |
true
.
|
inline |
Get path to configuration overlay file.
|
inline |
Set password.
Set password which is used for requesting credentials from Short Lived Credentials Service.
The attribute associated with this setter method is 'password'.
newPassword | is the new password to set. |
|
inline |
Get password.
Get password which is used for requesting credentials from Short Lived Credentials Service.
|
inline |
Set path to user proxy.
This method will set the path of the user proxy. Note that the InitializeCredentials() method will also try to set this path, by searching in different locations.
The attribute associated with this setter method is 'proxypath'
newProxyPath | is the path to a user proxy. |
true
.
|
inline |
Get path to user proxy.
Retrieve path to user proxy.
|
inline |
Get the list of rejected service discovery URLs.
This list is populated by the (possibly multiple) rejectdiscovery
configuration options. A service registry should not be queried if its URL matches any string in this list.
|
inline |
Get the list of rejected job managmenet URLs.
This list is populated by the (possibly multiple) rejectmanagement
configuration options. Those jobs should not be managed, that reside on a computing element with a matching URL.
bool Arc::UserConfig::SaveToFile | ( | const std::string & | filename | ) | const |
Save to INI file.
This method will save the object data as a INI file. The saved file can be loaded with the LoadConfigurationFile method.
filename | the name of the file which the data will be saved to. |
false
if unable to get handle on file, otherwise true
is returned.
|
inline |
|
inline |
Set the URL to the Short Lived Certificate Service (SLCS).
The attribute associated with this setter method is 'slcs'.
newSLCS | is the URL to the SLCS |
true
.
|
inline |
Get the URL to the Short Lived Certificate Service (SLCS).
|
inline |
Set store directory.
Sets directory which will be used to store credentials obtained from Short Lived Credential Servide.
The attribute associated with this setter method is 'storedirectory'.
newStoreDirectory | is the path to the store directory. |
true
.
|
inline |
Get store diretory.
Sets directory which is used to store credentials obtained from Short Lived Credential Servide.
|
inline |
Set the default submission interface.
For services which does not specify a submission interface this default submission interface will be used.
If a submission interface is given, then all the jobs will be submitted to this interface, no other job submission interfaces of the computing element will be tried.
submissioninterface_ | is a string specifying a GLUE2 InterfaceName |
true
.
|
inline |
Get the default submission interface.
|
static |
Path to system configuration.
The SYSCONFIG variable is the path to the system configuration file. This variable is only equal to SYSCONFIGARCLOC if ARC is installed in the root (highly unlikely).
|
static |
Path to system configuration at ARC location.
The SYSCONFIGARCLOC variable is the path to the system configuration file which reside at the ARC installation location.
bool Arc::UserConfig::Timeout | ( | int | newTimeout | ) |
Set timeout.
When communicating with a service the timeout specifies how long, in seconds, the communicating instance should wait for a response. If the response have not been received before this period in time, the connection is typically dropped, and an error will be reported.
This method will set the timeout to the specified integer. If the passed integer is less than or equal to 0 then false
is returned and the timeout will not be set, otherwise true
is returned and the timeout will be set to the new value.
The attribute associated with this setter method is 'timeout'.
newTimeout | the new timeout value in seconds. |
false
in case newTimeout <= 0, otherwise true
.
|
inline |
Get timeout.
Returns the timeout in seconds.
|
inline |
Set user-name for SLCS.
Set username which is used for requesting credentials from Short Lived Credentials Service.
The attribute associated with this setter method is 'username'.
name | is the name of the user. |
|
inline |
Get user-name.
Get username which is used for requesting credentials from Short Lived Credentials Service.
bool Arc::UserConfig::UtilsDirPath | ( | const std::string & | dir | ) |
Set path to directory storing utility files for DataPoints.
Some DataPoints can store information on remote services in local files. This method sets the path to the directory containing these files. For example arc* tools set it to ARCUSERDIRECTORY and A-REX sets it to the control directory. The directory is created if it does not exist.
dir | is the new utils dir path. |
true
.
|
inline |
Get path to directory storing utility files for DataPoints.
bool Arc::UserConfig::Verbosity | ( | const std::string & | newVerbosity | ) |
Set verbosity.
The verbosity will be set when invoking this method. If the string passed cannot be parsed into a corresponding LogLevel, using the function a WARNING is reported and false
is returned, otherwise true
is returned.
The attribute associated with this setter method is 'verbosity'.
true
in case the verbosity could be set to a allowed LogLevel, otherwise false
.
|
inline |
Get the user selected level of verbosity.
The string representation of the verbosity level specified by the user is returned when calling this method. If the user have not specified the verbosity level the empty string will be referenced.
|
inline |
Set path to file containing VOMS configuration.
Set path to file which contians list of VOMS services and associated configuration parameters needed to contact those services. It is used by arcproxy.
The attribute associated with this setter method is 'vomsserverpath'.
path | the path to VOMS configuration file |
const std::string& Arc::UserConfig::VOMSESPath | ( | ) |
Get path to file containing VOMS configuration.
Get path to file which contians list of VOMS services and associated configuration parameters.
|
static |
Default timeout in seconds.
The DEFAULT_TIMEOUT specifies interval which will be used in case no timeout interval have been explicitly specified. For a description about timeout see Timeout(int).