Inter-Deployment Dependencies API¶
- class cloudify_rest_client.inter_deployment_dependencies.InterDeploymentDependency(dependency)[source]¶
Bases:
dict
- property id¶
- property target_deployment_func¶
- property dependency_creator¶
- property source_deployment_id¶
- property target_deployment_id¶
- property created_at¶
- class cloudify_rest_client.inter_deployment_dependencies.InterDeploymentDependencyClient(api)[source]¶
Bases:
object
Cloudify’s plugins update management client.
- create(dependency_creator, source_deployment, target_deployment=None, external_source=None, external_target=None, target_deployment_func=None, _id=None, _visibility=None, _created_at=None, _created_by=None)[source]¶
Creates an inter-deployment dependency.
- Parameters:
dependency_creator – a string representing the entity that is responsible for this dependency (e.g. an intrinsic function blueprint path, ‘node_instances.some_node_instance’, etc.).
source_deployment – source deployment that depends on the target deployment.
target_deployment – the deployment that the source deployment depends on.
external_source – if the source deployment uses an external
resource as target, pass here a JSON containing the source deployment metadata, i.e. deployment name, tenant name, and the manager host(s). :param external_target: if the source deployment uses an external resource as target, pass here a JSON containing the target deployment metadata, i.e. deployment name, tenant name, and the manager host(s). :param target_deployment_func: a function used to determine the target deployment. :param _id: Override the identifier. Internal use only. :param _visibility: Override the visibility. Internal use only. :param _created_at: Override the creation timestamp. Internal use only. :param _created_by: Override the creator. Internal use only. :return: an InterDeploymentDependency object.
- create_many(source_deployment_id, inter_deployment_dependencies)[source]¶
Creates a number of inter-deployment dependencies.
- Parameters:
source_deployment_id – ID of the source deployment (the one which depends on the target deployment).
inter_deployment_dependencies – a list of inter-deployment dependencies descriptions, but without a source_deployment(_id).
- Returns:
a list of created InterDeploymentDependencies IDs.
- update_all(source_deployment_id, inter_deployment_dependencies)[source]¶
Update (i.e. rewrite all) inter-deployment dependencies for a given deployment.
- Parameters:
source_deployment_id – ID of the source deployment (the one which depends on the target deployment).
inter_deployment_dependencies – a list of inter-deployment dependencies descriptions, but without a source_deployment(_id).
- Returns:
a list of created InterDeploymentDependencies IDs.
- delete(dependency_creator, source_deployment, target_deployment=None, is_component_deletion=False, external_source=None, external_target=None)[source]¶
Deletes an inter-deployment dependency.
- Parameters:
dependency_creator – a string representing the entity that is responsible for this dependency (e.g. an intrinsic function blueprint path, ‘node_instances.some_node_instance’, etc.).
source_deployment – source deployment that depends on the target deployment.
target_deployment – the deployment that the source deployment depends on.
is_component_deletion – a special flag for allowing the deletion of a Component inter-deployment dependency when the target deployment is already deleted.
external_source – if the source deployment uses an external
resource as target, pass here a JSON containing the source deployment metadata, i.e. deployment name, tenant name, and the manager host(s). :param external_target: if the source deployment uses an external resource as target, pass here a JSON containing the target deployment metadata, i.e. deployment name, tenant name, and the manager host(s). :return: an InterDeploymentDependency object.
- list(_include=None, sort=None, is_descending=False, **kwargs)[source]¶
Returns a list of available inter-deployment dependencies.
- 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.InterDeploymentDependencies.fields
- Returns:
InterDeploymentDependencies list.
- legacy_restore(deployment_id, update_service_composition)[source]¶
Updating the inter deployment dependencies table from the specified deployment during an upgrade
- dump(inter_deployment_dependency_ids=None)[source]¶
Generate inter-deployment dependencies’ attributes for a snapshot.
- Parameters:
inter_deployment_dependency_ids – A list of inter-deployment dependencies’ identifiers, if not empty, used to select specific inter-deployment dependencies to be dumped.
- Returns:
A generator of dictionaries, which describe inter-deployment dependencies’ attributes.