Package pilot :: Package impl :: Module pilotdata_manager :: Class PilotData

Class PilotData

source code


PilotData (PD).

This is the object that is returned by the PilotDataService when a new PilotData is created based on a PilotDataDescription. A PilotData represents a finite amount of physical space on a certain resource. It can be populated with DataUnits.

The PilotData object can be used by the application to keep track of a pilot. A PilotData has state, can be queried, can be cancelled.

Instance Methods
 
__init__(self, pilot_data_service=None, pilot_data_description=None, pd_url=None)
Initialize PilotData at given service url:
source code
 
cancel(self)
Cancel PilotData
source code
 
get_url(self)
Get URL of PilotData.
source code
 
url_for_du(self, du)
Get full URL to DataUnit within PilotData
source code
 
submit_data_unit(self, data_unit_description)
creates a data unit object and initially imports data specified in data_unit_description
source code
 
list_data_units(self)
List all data units of Pilot Data
source code
 
get_state(self)
Return current state of Pilot Data
source code
 
get_du(self, du_url)
Returns Data Unit if part of Pilot Data
source code
 
wait(self)
Wait until PD enters a final state (Done, Canceled or Failed).
source code
 
export_du(self, du, target_url)
Export Data Unit to a local directory
source code
 
put_du(self, du)
Copy Data Unit to Pilot Data
source code
 
remove_du(self, du)
Remove Data Unit from Pilot Data
source code
 
copy_du(self, du, pd_new)
Copy DataUnit to another Pilot Data
source code
 
create_du(self, du)
Create a new Data Unit within Pilot
source code
 
to_dict(self)
Internal method that returns a dict with all data contained in this Pilot Data
source code
 
__repr__(self)
Returns Pilot Data URL
source code

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

Class Methods
 
create_pilot_data_from_dict(cls, pd_dict)
Restore Pilot Data from dictionary
source code
Class Variables
  PD_ID_PREFIX = 'pd-'
Properties
  context (Inherited from pilot.api.data.api.PilotData)
  description (Inherited from pilot.api.data.api.PilotData)
  id (Inherited from pilot.api.data.api.PilotData)
  resource_url (Inherited from pilot.api.data.api.PilotData)
  state (Inherited from pilot.api.data.api.PilotData)
  state_detail (Inherited from pilot.api.data.api.PilotData)

Inherited from object: __class__

Method Details

__init__(self, pilot_data_service=None, pilot_data_description=None, pd_url=None)
(Constructor)

source code 

Initialize PilotData at given service url:

   ssh://<hostname>
   gsissh://<hostname>
   go://<hostname>
   gs://google.com
   s3://aws.amazon.com

In the future more SAGA/Bliss URL schemes/adaptors are supported.

Overrides: object.__init__

cancel(self)

source code 

Cancel PilotData

Overrides: api.data.api.PilotData.cancel

get_url(self)

source code 

Get URL of PilotData. Used for reconnecting to PilotData

get_state(self)

source code 

Return current state of Pilot Data

Overrides: api.data.api.PilotData.get_state

__repr__(self)
(Representation operator)

source code 

Returns Pilot Data URL

Overrides: object.__repr__