Package cm_api :: Package endpoints :: Module parcels :: Class ApiParcel
[hide private]
[frames] | no frames]

Class ApiParcel

source code

         object --+        
                  |        
types.BaseApiObject --+    
                      |    
  types.BaseApiResource --+
                          |
                         ApiParcel

An object that represents a parcel and allows administrative operations.


Since: API v3

Instance Methods [hide private]
 
__init__(self, resource_root)
Initializes internal state and sets all known writable properties of the object to None.
source code
 
__str__(self)
Default implementation of __str__.
source code
 
_api_version(self)
Returns the minimum API version for this resource.
source code
 
_path(self)
Return the API path for this service.
source code
 
_get_cluster_name(self) source code
 
start_download(self)
Start the download of the parcel
source code
 
cancel_download(self)
Cancels the parcel download.
source code
 
remove_download(self)
Removes the downloaded parcel
source code
 
start_distribution(self)
Start the distribution of the parcel to all hosts in the cluster.
source code
 
cancel_distribution(self)
Cancels the parcel distrubution.
source code
 
start_removal_of_distribution(self)
Start the removal of the distribution of the parcel from all the hosts in the cluster.
source code
 
activate(self)
Activate the parcel on all the hosts in the cluster.
source code
 
deactivate(self)
Deactivates the parcel on all the hosts in the cluster.
source code

Inherited from types.BaseApiObject: __setattr__, to_json_dict

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from types.BaseApiObject: from_json_dict

Inherited from types.BaseApiObject (private): _get_attributes

Static Methods [hide private]

Inherited from types.BaseApiObject: init

Class Variables [hide private]
  _ATTRIBUTES = {'product': ROAttr(), 'version': ROAttr(), 'stag...

Inherited from types.BaseApiObject (private): _WHITELIST

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, resource_root)
(Constructor)

source code 

Initializes internal state and sets all known writable properties of the object to None. Then initializes the properties given in the provided attributes dictionary.

Parameters:
  • resource_root - API resource object.
  • attrs - optional dictionary of attributes to set. This should only contain r/w attributes.
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

Default implementation of __str__. Uses the type name and the first attribute retrieved from the attribute map to create the string.

Overrides: object.__str__
(inherited documentation)

_api_version(self)

source code 

Returns the minimum API version for this resource. Defaults to 1.

Overrides: types.BaseApiResource._api_version
(inherited documentation)

_path(self)

source code 

Return the API path for this service.

Overrides: types.BaseApiResource._path

start_download(self)

source code 

Start the download of the parcel

Returns:
Reference to the completed command.

cancel_download(self)

source code 

Cancels the parcel download. If the parcel is not currently downloading an exception is raised.

Returns:
Reference to the completed command.

remove_download(self)

source code 

Removes the downloaded parcel

Returns:
Reference to the completed command.

start_distribution(self)

source code 

Start the distribution of the parcel to all hosts in the cluster.

Returns:
Reference to the completed command.

cancel_distribution(self)

source code 

Cancels the parcel distrubution. If the parcel is not currently distributing an exception is raised.

Returns:
Reference to the completed command

start_removal_of_distribution(self)

source code 

Start the removal of the distribution of the parcel from all the hosts in the cluster.

Returns:
Reference to the completed command.

activate(self)

source code 

Activate the parcel on all the hosts in the cluster.

Returns:
Reference to the completed command.

deactivate(self)

source code 

Deactivates the parcel on all the hosts in the cluster.

Returns:
Reference to the completed command.

Class Variable Details [hide private]

_ATTRIBUTES

Value:
{'product': ROAttr(), 'version': ROAttr(), 'stage': ROAttr(), 'state':\
 ROAttr(ApiParcelState), 'clusterRef': ROAttr(ApiClusterRef),}