Content Management

Install Content on a Consumer Group

Install one or more content units on each consumer in the group. This operation is asynchronous.

The units to be installed are specified in an array. Each unit in the array of units is an object containing two required attributes. The first is the type_id which a string that defines the unit’s content type. The value is unrestricted by the Pulp server but must match a type mapped to a content handler in the agent. The second is the unit_key which identifies the unit or units to be installed. Both the structure and content are handler specific.

The caller can pass additional options using an options object. Both the structure and content are handler specific. The options drive how the handler performs the operation.

Method: POST
Path: /pulp/api/v2/consumer_groups/<group_id>/actions/content/install/
Permission: create
Request Body Contents:
  • units (array) - array of content units to install

  • options (object) - install options

Response Codes:
  • 202 - the install request has been accepted

  • 400 - if one or more of the parameters is invalid

  • 404 - if the consumer group does not exist

Return: a Call Report that lists each of the tasks that were spawned.

Sample Request:

{
  "units": [
    {"unit_key": {"name": "zsh", "version": "4.3.17"}, "type_id": "rpm"},
    {"unit_key": {"id": "ERRATA-123"}, "type_id": "erratum"},
    {"unit_key": {"name": "web-server"}, "type_id": "package_group"}
  ],
  "options": {
    "apply": true, "reboot": false, "importkeys": false
  }
}

Tags: Each task created to install content on a consumer will be created with the following tags: "pulp:consumer:<consumer_id>", "pulp:action:unit_install"

Update Content on a Consumer Group

Update one or more content units on each consumer in the group. This operation is asynchronous.

The units to be updated are specified in an array. Each unit in the array of units is an object containing two required attributes. The first is the type_id which a string that defines the unit’s content type. The value is unrestricted by the Pulp server but must match a type mapped to a content handler in the agent. The second is the unit_key which identifies the unit or units to be updated. Both the structure and content are handler specific.

The caller can pass additional options using an options object. Both the structure and content are handler specific. The options drive how the handler performs the operation.

Method: POST
Path: /pulp/api/v2/consumer_groups/<group_id>/actions/content/update/
Permission: create
Request Body Contents:
  • units (array) - array of content units to update

  • options (object) - update options

Response Codes:
  • 202 - the update request has been accepted

  • 400 - if one or more of the parameters is invalid

  • 404 - if the consumer group does not exist

Return: a Call Report that lists each of the tasks that were spawned.

Sample Request:

{
  "units": [
    {"unit_key": {"name": "zsh", "version": "4.3.17"}, "type_id": "rpm"},
    {"unit_key": {"id": "ERRATA-123"}, "type_id": "erratum"},
    {"unit_key": {"name": "web-server"}, "type_id": "package_group"}
  ],
  "options": {
    "apply": true, "reboot": false, "importkeys": false
  }
}

Tags: Each task created to update content on a consumer will be created with the following tags: "pulp:consumer:<consumer_id>", "pulp:action:unit_update"

Uninstall Content on a Consumer Group

Uninstall one or more content units on each consumer in the group. This operation is asynchronous. If dependencies are automatically removed, it is reflected in the uninstall report.

The units to be uninstalled are specified in an array. Each unit in the array of units is an object containing two required attributes. The first is the type_id which a string that defines the unit’s content type. The value is unrestricted by the Pulp server but must match a type mapped to a content handler in the agent. The second is the unit_key which identifies the unit or units to be uninstalled. The value is completely defined by the handler mapped to the unit’s type_id.

The caller can pass additional options using an options object. Both the structure and content are handler specific. The options drive how the handler performs the operation.

Method: POST
Path: /pulp/api/v2/consumer_groups/<group_id>/actions/content/uninstall/
Permission: create
Request Body Contents:
  • units (array) - array of content units to uninstall

  • options (object) - uninstall options

Response Codes:
  • 202 - the uninstall request has been accepted

  • 400 - if one or more of the parameters is invalid

  • 404 - if the consumer group does not exist

Return: a Call Report that lists each of the tasks that were spawned.

Sample Request:

{
  "units": [
    {"unit_key": {"name": "zsh", "version": "4.3.17"}, "type_id": "rpm"},
    {"unit_key": {"id": "ERRATA-123"}, "type_id": "erratum"},
    {"unit_key": {"name": "web-server"}, "type_id": "package_group"}
  ],
  "options": {
    "apply": true, "reboot": false
  }
}

Tags: Each task created to uninstall content on a consumer will be created with the following tags: "pulp:consumer:<consumer_id>", "pulp:action:unit_uninstall"