pcf.particle.azure.blob package

Submodules

pcf.particle.azure.blob.blob_container module

class pcf.particle.azure.blob.blob_container.BlobContainer(particle_definition, blob_service=None)

Bases: pcf.core.azure_resource.AzureResource

This is the implementation of Azure’s blob container service. https://azure-storage.readthedocs.io/ref/azure.storage.blob.html

UNIQUE_KEYS = ['azure_resource.name']
_set_unique_keys()

Logic that sets keys from state definition that are used to uniquely identify the storage bucket

_start()

Creates the blob container

Returns:response of create_container
_stop()

blob container does not have stopped states. Calls _terminate()

_terminate()

Deletes the blob container

Returns:response of delete_container
_update()

Not Implemented

equivalent_states = {<State.running: 1>: 1, <State.stopped: 2>: 0, <State.terminated: 3>: 0}
flavor = 'blob'
get_status()

Determines if the container exists

Returns:exists (bool)
is_state_definition_equivalent()

Since there is no update available, always return True

Returns:True
Return type:bool
is_state_equivalent(state1, state2)

Determines if states are equivalent. Uses equivalent_states defined in the class.

Parameters:
  • state1 (State) –
  • state1
Returns:

bool

sync_state()

Calls get status and then sets the current state.

Module contents