diff --git a/docs/source/modules_reference.rst b/docs/source/modules_reference.rst index 772a2818..d6cce425 100644 --- a/docs/source/modules_reference.rst +++ b/docs/source/modules_reference.rst @@ -19,6 +19,7 @@ API reference to modules used by pubtools-quay. Isolated usage outside of pubtoo quay_session signature_handler signature_remover + security_manifest_pusher tag_docker utilities exceptions \ No newline at end of file diff --git a/docs/source/push_docker.rst b/docs/source/push_docker.rst index 9732407c..b6b1c36a 100644 --- a/docs/source/push_docker.rst +++ b/docs/source/push_docker.rst @@ -12,7 +12,6 @@ This is the main class for the Push Docker workflow, which is the primary workfl .. automethod:: verify_target_settings .. automethod:: get_docker_push_items .. automethod:: get_operator_push_items - .. automethod:: get_repo_metadata .. automethod:: check_repos_validity .. automethod:: generate_backup_mapping .. automethod:: _poll_tag_inconsistency diff --git a/docs/source/security_manifest_pusher.rst b/docs/source/security_manifest_pusher.rst index 8ab74352..9c1b2711 100644 --- a/docs/source/security_manifest_pusher.rst +++ b/docs/source/security_manifest_pusher.rst @@ -1,5 +1,5 @@ Security manifest pusher -====================== +======================== .. py:module:: pubtools._quay.security_manifest_pusher diff --git a/pubtools/_quay/operator_pusher.py b/pubtools/_quay/operator_pusher.py index c5b8ce95..72cb0be5 100644 --- a/pubtools/_quay/operator_pusher.py +++ b/pubtools/_quay/operator_pusher.py @@ -613,11 +613,11 @@ def build_index_images(self): Dictionary containing IIB results and signing keys for all OPM versions. Data will be used in operator signing. Dictionary structure: { - : { - "iib_result": (...) (object returned by iiblib) - "signing_keys": [...] (list of signing keys to be used for signing) - "destination_tags": [...] (list of destination tags) - } + : { + "iib_result": (...) (object returned by iiblib) + "signing_keys": [...] (list of signing keys to be used for signing) + "destination_tags": [...] (list of destination tags) + } } """ iib_results = {} diff --git a/pubtools/_quay/push_docker.py b/pubtools/_quay/push_docker.py index 2a48606b..5e274edc 100644 --- a/pubtools/_quay/push_docker.py +++ b/pubtools/_quay/push_docker.py @@ -282,9 +282,9 @@ def generate_backup_mapping(self, push_items): Specifically, create two resources: 'backup_tags' and 'rollback_tags'. - 'backup_tags' is a mapping of ImageData->manifest, and consists of images which will - be overwritten. During rollback, tag is made to re-reference the old manifest. + be overwritten. During rollback, tag is made to re-reference the old manifest. - 'rollback_tags' is a list of ImageData which don't yet exist. During rollback, they - will be removed to preserve pre-push state. + will be removed to preserve pre-push state. ImageData is a namedtuple used to assign and access parts of an image in a formatted way. @@ -388,7 +388,6 @@ def _poll_tag_inconsistency(self, full_repo, tag, poll_rate=30, timeout=120): timeout (int, optional): How many seconds to poll before giving up and assuming that the image doesn't exist. Defaults to 120. - Returns (str, None): Image digest, or None if digest doesn't exist (or timeout is reached). """ diff --git a/pubtools/_quay/quay_session.py b/pubtools/_quay/quay_session.py index 12c26378..c2836fd9 100644 --- a/pubtools/_quay/quay_session.py +++ b/pubtools/_quay/quay_session.py @@ -50,7 +50,7 @@ def get(self, endpoint, **kwargs): Args: endpoint (str): Endpoint of the request. - **kwargs: + kwargs: Additional arguments to add to the requests method. Returns: requests.Response: A response object. @@ -66,7 +66,7 @@ def post(self, endpoint, **kwargs): Args: endpoint (str): Endpoint of the request. - **kwargs: + kwargs: Additional arguments to add to the requests method. Returns: requests.Response: A response object. @@ -82,7 +82,7 @@ def put(self, endpoint, **kwargs): Args: endpoint (str): Endpoint of the request. - **kwargs: + kwargs: Additional arguments to add to the requests method. Returns: requests.Response: A response object. @@ -98,7 +98,7 @@ def delete(self, endpoint, **kwargs): Args: endpoint (str): Endpoint of the request. - **kwargs: + kwargs: Additional arguments to add to the requests method. Returns: requests.Response: A response object. @@ -116,7 +116,7 @@ def request(self, method, endpoint, **kwargs): REST API method of the request (GET, POST, PUT, DELETE). endpoint (str): Endpoint of the request. - **kwargs: + kwargs: Additional arguments to add to the requests method. Returns: requests.Response: A response object. diff --git a/pubtools/_quay/security_manifest_pusher.py b/pubtools/_quay/security_manifest_pusher.py index 4af0660d..f654004b 100644 --- a/pubtools/_quay/security_manifest_pusher.py +++ b/pubtools/_quay/security_manifest_pusher.py @@ -232,20 +232,19 @@ def security_manifest_get_products(self, security_manifest: dict) -> set[str]: Products are expected to be in format: "properties":[ - { - "name": "product", - "value": "product-1", - }, - { - "name": "product", - "value": "product-2", - }, + { + "name": "product", + "value": "product-1" + }, + { + "name": "product", + "value": "product-2" + } ] Args: security_manifest (dict): Security manifest extracted from an attestation. - Returns (set[str]): List of products. """