Repository Group Distributors¶
List Repository Group Distributors¶
Retrieves all distributors associated with a given group
- 200 - if the group exists
Sample 200 Response Body: :
[
{
"scratchpad": null,
"repo_group_id": "test_group",
"_ns": "repo_group_distributors",
"last_publish": "2014-06-12T14:38:05Z",
"distributor_type_id": "group_test_distributor",
"_id": {
"$oid": "5399f38b7bc8f60c78d856bf"
},
"config": {
"config_value1": false,
"config_value2": true
},
"id": "2a146bdf-384b-4951-987e-8d42c7c4317f",
"_href": "2a146bdf-384b-4951-987e-8d42c7c4317f"
}
]
Add a Distributor to a Repository Group¶
Configures a distributor for a previously created Pulp repository group. Each repository group maintains its own configuration for the distributor which is used to dictate how the distributor will function when it publishes content. The possible configuration values are contingent on the type of distributor being added; each distributor type will support a different set of values relevant to how it functions.
Multiple distributors may be associated with a repository group at a given time. There may be more than one distributor with the same type. The only restriction is that the distributor ID must be unique across all distributors for a given repository group.
Adding a distributor performs the following validation steps before confirming the addition:
- If provided, the distributor ID is checked for uniqueness in the context of the repository. If not provided, a unique ID is generated.
- The distributor plugin is contacted and asked to validate the supplied configuration for the distributor. If the distributor indicates its configuration is invalid, the distributor is not added to the repository.
- The distributor’s distributor_added method is invoked to allow the distributor to do any initialization required for that repository. If the plugin raises an exception during this call, the distributor is not added to the repository.
- The Pulp database is updated to store the distributor’s configuration and the knowledge that the repository is associated with the distributor.
The details of the added distributor are returned from the call.
- distributor_type_id (string) - indicates the type of distributor being associated with the repository group; there must be a distributor installed in the Pulp server with this ID
- distributor_config (object) - configuration the repository will use to drive the behavior of the distributor
- distributor_id (string) - (optional) if specified, this value will be used to refer to the distributor; if not specified, one will be generated
- 201 - if the distributor was successfully added
- 400 - if one or more of the required parameters is missing, the distributor type ID refers to a non-existent distributor, or the distributor indicates the supplied configuration is invalid
- 404 - if there is no repository with the given ID
Sample 201 Response Body: :
{
"scratchpad": null,
"repo_group_id": "test_group",
"_ns": "repo_group_distributors",
"last_publish": null,
"distributor_type_id": "group_test_distributor",
"_id": {
"$oid": "5399fb527bc8f60c77d7c82a"
},
"config": {
"config_value1": false,
"config_value2": true
},
"id": "test_id",
"_href": "/pulp/api/v2/repo_groups/test_group/distributors/unique_distributor_id/"
}
Retrieve a Repository Group Distributor¶
Retrieve a specific distributor that is associated with a group.
- 200 - containing an object representing the distributor
- 404 - if either the group_id or the distributor_id do not exist on the server
Sample 200 Response Body: :
{
"scratchpad": null,
"repo_group_id": "test_group",
"_ns": "repo_group_distributors",
"last_publish": null,
"distributor_type_id": "group_test_distributor",
"_id": {
"$oid": "5399fb527bc8f60c77d7c82a"
},
"config": {
"config_value1": false,
"config_value2": true
},
"id": "test_id",
"_href": "/pulp/api/v2/repo_groups/test_group/distributors/test_id/"
}
Update a Repository Group Distributor¶
Update the configuration for a distributor that has already been associated with a repository group.
Any distributor configuration value that is not specified remains unchanged.
- distributor_config (object) - configuration values to change for the distributor
- 200 - if the configuration was successfully updated
- 404 - if there is no repository group or distributor with the specified IDs
Sample Request: :
{
'distributor_config': {
"config_value2": false
}
}
Sample 200 Response Body: :
{
"scratchpad": null,
"repo_group_id": "test_group",
"_ns": "repo_group_distributors",
"last_publish": null,
"distributor_type_id": "group_test_distributor",
"_id": {
"$oid": "5399fb527bc8f60c77d7c82a"
},
"config": {
"config_value1": false,
"config_value2": false
},
"id": "test_id",
"_href": "/pulp/api/v2/repo_groups/test_group/distributors/test_id/"
}
Disassociate a Repository Group Distributor¶
Remove a repository group distributor from a repository group
- 200 - if the distributor was successfully disassociated from the repository group
- 404 - if the given group does not have a distributor with the given distributor id, or if the given group does not exist