Plugins Updates API

class cloudify_rest_client.plugins_update.PluginsUpdate(update)[source]

Bases: dict

property id
property state
property blueprint_id
property temp_blueprint_id
property execution_id
property deployments_to_update
property deployments_per_tenant
property created_at
property forced
property tenant_name
class cloudify_rest_client.plugins_update.PluginsUpdateClient(api)[source]

Bases: object

Cloudify’s plugins update management client.

get(plugins_update_id, _include=None, **kwargs)[source]

Gets a plugins update by its id.

Parameters:
  • plugins_update_id – PluginsUpdate’s id to get.

  • _include – List of fields to include in response.

Returns:

The plugins update details.

list(_include=None, sort=None, is_descending=False, **kwargs)[source]

Returns a list of available plugins updates.

Parameters:
  • _include – List of fields to include in response.

  • sort – Key for sorting the list.

  • is_descending – True for descending order, False for ascending.

  • kwargs – Optional filter fields. For a list of available fields see the REST service’s models.PluginsUpdate.fields

Returns:

Plugins list.

inject(blueprint_id, force=False, created_by=None, created_at=None, execution_id=None, state=None, update_id=None, affected_deployments=None, deployments_per_tenant=None, all_tenants=None, temp_blueprint_id=None)[source]
update_plugins(blueprint_id, force=False, plugin_names=None, to_latest=None, all_to_latest=True, to_minor=None, all_to_minor=False, mapping=None, auto_correct_types=False, reevaluate_active_statuses=False, all_tenants=False)[source]

Updates the plugins in all the deployments that use the given blueprint.

Parameters:
  • blueprint_id – blueprint ID to perform the update with.

  • force – if to forcefully update when other non-active plugins updates exists associated with this blueprint.

  • plugin_names – list of plugin names to update (only those).

  • to_latest – list of plugin names to be upgraded to the latest installed version.

  • all_to_latest – update all (selected) plugins to the latest installed version of a plugin.

  • to_minor – list of plugin names to be upgraded to the latest installed minor version (i.e. major versions of the plugin in use and the upgraded one will match)

  • all_to_minor – update all (selected) plugins to the latest installed minor version

  • mapping – detailed information on required plugin update (overrides all other arguments/settings concerning version constraints)

  • auto_correct_types – auto_correct_types flag to run deployments update with

  • reevaluate_active_statuses – reevaluate active plugin-updates’ and deployment-updates’ states based on relevant executions statuses.

  • all_tenants – defines if plugin update process should update any deployments based on blueprint_id (owned by any tenant)

Returns:

a PluginUpdate object.

finalize_plugins_update(plugins_update_id)[source]

Finalize the plugins update (for internal use).

Returns:

a PluginUpdate object.

dump(plugins_update_ids=None)[source]

Generate plugins updates’ attributes for a snapshot.

Parameters:

plugins_update_ids – A list of plugins updates’ identifiers, if not empty, used to select specific plugins updates to be dumped.

Returns:

A generator of dictionaries, which describe plugins updates’ attributes.

restore(entities, logger)[source]

Restore plugins updates from a snapshot.

Parameters:
  • entities – An iterable (e.g. a list) of dictionaries describing plugins updates to be restored.

  • logger – A logger instance.