pulpcore.client.pulpcore.RepairApi

All URIs are relative to http://pulp

Method HTTP request Description
post POST /pulp/api/v3/repair/ Repair Artifact Storage

post

AsyncOperationResponse post(repair)

Repair Artifact Storage

Trigger an asynchronous task that checks for missing or corrupted artifacts, and attempts to redownload them.

Example

  • Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulpcore
from pulpcore.client.pulpcore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://pulp"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulpcore.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://pulp",
    api_key = {
        'sessionid': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'

# Enter a context with an instance of the API client
with pulpcore.client.pulpcore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulpcore.RepairApi(api_client)
    repair = pulpcore.client.pulpcore.Repair() # Repair | 

    try:
        # Repair Artifact Storage
        api_response = api_instance.post(repair)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling RepairApi->post: %s\n" % e)
  • Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulpcore
from pulpcore.client.pulpcore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://pulp"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulpcore.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://pulp",
    api_key = {
        'sessionid': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'

# Enter a context with an instance of the API client
with pulpcore.client.pulpcore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulpcore.RepairApi(api_client)
    repair = pulpcore.client.pulpcore.Repair() # Repair | 

    try:
        # Repair Artifact Storage
        api_response = api_instance.post(repair)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling RepairApi->post: %s\n" % e)

Parameters

Name Type Description Notes
repair Repair

Return type

AsyncOperationResponse

Authorization

basicAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 -

[Back to top] [Back to API list] [Back to Model list] [Back to HOME]