heat.common.identifier module

heat.common.identifier module

class heat.common.identifier.EventIdentifier(tenant, stack_name, stack_id, path, event_id=None)[source]

Bases: heat.common.identifier.HeatIdentifier

An identifier for an event.

EVENT_ID = 'event_id'
RESOURCE_NAME = 'resource_name'
resource()[source]

Return a HeatIdentifier for the owning resource.

stack()[source]

Return a HeatIdentifier for the owning stack.

class heat.common.identifier.HeatIdentifier(tenant, stack_name, stack_id, path='')[source]

Bases: _abcoll.Mapping

FIELDS = ('tenant', 'stack_name', 'stack_id', 'path')
PATH = 'path'
STACK_ID = 'stack_id'
STACK_NAME = 'stack_name'
TENANT = 'tenant'
arn()[source]

Return as an ARN.

Returned in the form:
arn:openstack:heat::<tenant>:stacks/<stack_name>/<stack_id><path>
arn_url_path()[source]

Return an ARN quoted correctly for use in a URL.

classmethod from_arn(arn)[source]

Generate a new HeatIdentifier by parsing the supplied ARN.

classmethod from_arn_url(url)[source]

Generate a new HeatIdentifier by parsing the supplied URL.

The URL is expected to contain a valid arn as part of the path.

path_re = <_sre.SRE_Pattern object>
stack_path()[source]

Return a URL-encoded path segment of a URL without a tenant.

Returned in the form:
<stack_name>/<stack_id>
url_path()[source]

Return a URL-encoded path segment of a URL.

Returned in the form:
<tenant>/stacks/<stack_name>/<stack_id><path>
class heat.common.identifier.ResourceIdentifier(tenant, stack_name, stack_id, path, resource_name=None)[source]

Bases: heat.common.identifier.HeatIdentifier

An identifier for a resource.

RESOURCE_NAME = 'resource_name'
stack()[source]

Return a HeatIdentifier for the owning stack.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.