PyARCREST

PyARCREST is a python client for interacting with the ARC CE REST interface. It offers a high-level interface for managing jobs, delegations, file transfers, and certificate operations. With pyARCREST you can perform various operations such as creating, monitoring, and manipulating jobs, as well as handling errors and certificate operations.

The core functionalities of the pyARCREST include: - Creating and managing jobs within the ARC CE REST interface. - Handling job status and information retrieval. - Facilitating file transfers and delegation operations. - Offering a command-line interface for executing REST API service operations. - Providing error handling for job operations and file handling. - Supporting customizable HTTP client classes for sending requests to specified URLs. - Enabling X.509 certificate operations such as creating, signing, and parsing certificates.

STRUCTURE

├── arc.py
├── cli/
│   └── arcrest.py
├── errors.py
├── http.py
└── x509.py

MODULES

Module arc.py

Description: This module provides a high-level interface for interacting with the ARC CE REST interface, supporting automatic handling of multiple API versions.

It includes methods for

  • creating jobs

  • managing job status and info

  • file transfers,

  • delegation operations

Relations with other modules

This module interacts with other modules by making requests to the http module for HTTP operations, handling errors through the errors module, and performing certificate operations through the x509 module for signing CSR and handling PEM files. The http module handles the actual HTTP requests and responses, while the errors module deals with error handling. The x509 module is used for certificate-related operations.

Module cli/arcrest.py

This module is a command-line interface for executing various operations on a REST API service. It allows users to interact with resources such as jobs and delegations by providing commands like getting info, listing, submitting, killing, renewing, and deleting, among others.

Relations with other modules

This module interacts with the ARCRest module by calling various methods such as getJobsList, getJobsInfo, getJobsStatus, killJobs, cleanJobs, getAPIVersions, restartJobs, getCEInfo, createDelegation, getDelegation, refreshDelegation, and deleteDelegation based on the provided arguments in the main function.

Module errors.py

This module defines various error classes related to job operations and file handling within an ARC system, including parsing errors, matchmaking issues, and missing result files.

Module http.py

This module defines a customizable HTTP client class that handles sending requests with different methods, headers, and parameters to a specified URL. It also supports HTTPS connections and error handling for connection issues.

Module x509.py

This module provides functions to handle X.509 certificates, including checking if a certificate is in the old format, creating and signing proxy certificates, parsing PEM files, generating keys, and converting between different formats.

CLASSES

class Result [arc.py]:

Stores a value and an error state.

class ARCRest [arc.py]:

Handles REST API interactions for ARC middleware jobs.

class ARCRest_1_0 [arc.py]:

Handles job creation, submission, and delegation list retrieval for API.

class ARCRest_1_1 [arc.py]:

Performs actions related to creating and submitting jobs for processing.

class Transfer [arc.py]:

Manages transfer job information and cancellation event handling.

class ARCJob [arc.py]:

Maps and updates ARC job information from external sources.

class TransferQueue [arc.py]:

Synchronize access to a shared queue using barriers and locks.

class TransferQueueEmpty [arc.py]:

Custom exception raised when transfer queue is empty.

class X509Error [errors.py]:

Base error class for X.

class HTTPClientError [errors.py]:

Custom error for handling HTTP client errors.

class ARCError [errors.py]:

Base error class for arc module exceptions.

class ARCHTTPError [errors.py]:

Represents an HTTP error for job operations.

class DescriptionParseError [errors.py]:

Handles errors related to description parsing.

class DescriptionUnparseError [errors.py]:

Handles errors occurring during description unparsing.

class InputFileError [errors.py]:

Handles errors related to input file in job descriptions.

class NoValueInARCResult [errors.py]:

Custom error reprsenting a missing value in ARC result.

class MatchmakingError [errors.py]:

Handles errors related to matchmaking process within the application.

class InputUploadError [errors.py]:

Handles errors that occur during input file upload process.

class MissingResultFile [errors.py]:

Represents an error for missing job result file.

class MissingOutputFile [errors.py]:

Represents a missing job output file for error handling.

class MissingDiagnoseFile [errors.py]:

Represents a missing job diagnose file for error handling.

class HTTPClient [http.py]:

Connect and communicate with HTTP and HTTPS servers with optional proxy.

EXECUTION FLOWS

MODULES

ALT text
ALT text
ALT text

MODULE RELATIONSHIPS

ALT text