Table of Contents

Class: OperationAttr ./pyGlobus/ftpClient.py

A class to wrap the ftp client operation attr functions.

It provides get and set methods for all of the various operation specific attributes, and hides the underlying memory management.

Methods   
__del__
__init__
copy
get_append
get_authorization
get_control_protection
get_data_protection
get_dcau
get_handle
get_layout
get_mode
get_parallelism
get_tcp_buffer
get_type
set_append
set_authorization
set_control_protection
set_data_protection
set_dcau
set_layout
set_mode
set_parallelism
set_tcp_buffer
set_type
  __del__ 
__del__ ( self )

Destroy an instance.

Deletes the underlying handle, and deactivates the underlying module.

Raises:

A OperationAttrException is thrown if unable to delete the handle or destroy the module.

Exceptions   
ex
  __init__ 
__init__ ( self,  handle=None )

Constructs an instance.

Activates the globus ftp client module and creates the underlying handle.

Raises:

A OperationAttrException is thrown if unable to initialize the module or create the handle.

Exceptions   
ex
  copy 
copy ( self )

Creates a deep copy of itself.

Raises:

A OperationAttrException is thrown if unable to make the copy.

Returns:

A new OperationAttr object with the same properties as the original is returned.

Exceptions   
ex
  get_append 
get_append ( self )

Returns the value of the append attribute.

Raises:

A OperationAttrException is thrown if unable to return the append attribute.

Returns:

A boolean value is returned.

Exceptions   
ex
  get_authorization 
get_authorization ( self )

Returns the authorization attributes.

Raises:

A OperationAttrException is thrown if unable to get the authorization attributes.

Returns:

  • A SWIG'ized pointer to a gss_ctx_id_t object.

  • A string containg the user name.

  • A string containing the password.

  • A string containing the account name.

  • A string containing the subject name of the server.

Exceptions   
ex
  get_control_protection 
get_control_protection ( self )

Returns the protection attribute for the control channel.

Raises:

A OperationAttrException is thrown if unable to get the attribute.

Returnes:

One of the attributes defined in the ftpControl module is returned.

Exceptions   
ex
  get_data_protection 
get_data_protection ( self )

Returns the protection attribute for the data channel.

Raises:

A OperationAttrException is thrown if unable to get the attribute.

Returnes:

One of the attributes defined in the ftpControl module is returned.

Exceptions   
ex
  get_dcau 
get_dcau ( self )

Exceptions   
ex
  get_handle 
get_handle ( self )

Return the underlying ftp client operation attr handle.

XXX This handle is only valid as long as this object exists. When the object is destroyed, the memory this handle points to is freed.

Returns:

A string containing the pointer.

  get_layout 
get_layout ( self )

Returns the layout attribute for this operation.

Raises:

A OperationAttrException is thrown if unable to get the layout attribute.

Returns:

A ftpControl.Layout object is returned.

Exceptions   
ex
  get_mode 
get_mode ( self )

Returns the mode for this transfer.

Raises:

A OperationAttrException is thrown if unable to get the mode.

Returnes:

One of the modes defined in the ftpControl module is returned.

Exceptions   
ex
  get_parallelism 
get_parallelism ( self )

Returns the parallelism attribute.

Raises:

A OperationAttrException is thrown if unable to get the parallelism attribute.

Returns:

A ftpContol.Parallelism object is returned.

Exceptions   
ex
  get_tcp_buffer 
get_tcp_buffer ( self )

Return the tcp buffer attribute.

Raises:

A OperationAttrException is thrown if unable to get the tcp buffer attribute.

Returns:

A ftpContol.TcpBuffer object is returned.

Exceptions   
ex
  get_type 
get_type ( self )

Returns the type attribute for the operation.

Raises:

A OperationAttrException is thrown if unable to get the type attribute.

Returns:

One of the types defined in the ftpControl module is returned.

Exceptions   
ex
  set_append 
set_append ( self,  append )

Set the append mode for the operation.

Allows a file to be appended to when performing a put to a server instead of replacing the file. This attribute is incompatible with the extended block mode, the partial file attribute, and the restart attribute.

Arguments:

  • append A boolean value.

Raises:

A OperationAttrException is thrown if unable to set the append attribute.

Exceptions   
ex
  set_authorization 
set_authorization (
        self,
        credential,
        user=None,
        passwd="",
        account="",
        subject="",
        )

Set the authorization attributes.

Arguments:

  • user The user name to send to the server.

  • credential A SWIG'ized pointer to a gss_cred_id_t object. To use the default credential, use GSS_C_NO_CREDENTIAL. This can be returned from the gsi module.

  • passwd A string containing the password to send to the server.

  • account The account to use for the data transfer. Most ftp servers do not require this.

  • subject The subject name of the ftp server. This is only needed for a gsiftp transfer when the security subject name does not match the subject name of the server.

Raises:

A OperationAttrException is thrown if uanbe to set the authorization attributes.

Exceptions   
ex
  set_control_protection 
set_control_protection ( self,  protection )

Sets the protection attribute for the control channel.

The supported protection attributes are defined in the ftpControl module.

Arguments:

  • protection One of the possible attributes defined in the ftpControl module.

Raises:

A OperationAttrException is thrown if unable to set the control protection attribute.

Exceptions   
ex
  set_data_protection 
set_data_protection ( self,  protection )

Sets the protection attribute for the data channel.

The supported protection attributes are defined in the ftpControl module.

Arguments:

  • protection One of the possible attributes defined in the ftpControl module.

Raises:

A OperationAttrException is thrown if unable to set the data protection attribute.

Exceptions   
ex
  set_dcau 
set_dcau ( self,  dcau )

Exceptions   
ex
  set_layout 
set_layout ( self,  layout )

Sets the layout attribute for the transfer.

This attribute allows the user to control the layout of a file being transfered to a striped Grid-FTP server. The striping layout defines what regions of a file will be stored on each stripe of a multiple-striped ftp server.

The layout attribute is used only when the data is being stored on the server (on a put or 3rd party transfer). This attribute is ignored for stream mode data transfers.

Arguments:

  • layout A ftpControl.Layout object.

Raises:

A OperationAttrException is thrown if unable to set the layout attribute.

Exceptions   
ex
  set_mode 
set_mode ( self,  mode )

Sets the mode for the transfer.

The supported modes are defined in the ftpControl module.

Arguments:

  • mode One of the possible modes defined in the ftpControl module.

Raises:

A OperationAttrException is thrown if unable to set the mode.

Exceptions   
ex
  set_parallelism 
set_parallelism ( self,  parallelism )

Set the parallelism attribute.

Used to control the level of parallelism used for the operation.

Arguements:

  • parallelism A ftpContol.Parallelism object.

Raises:

A OperationAttrException is thrown if unable to set the parallelism attribute.

Exceptions   
ex
  set_tcp_buffer 
set_tcp_buffer ( self,  tcpbuffer )

Set the tcp buffer attribute.

Used to control the tcp buffer size for the operation.

Arguments:

  • tcpbuffer A ftpContol.TcpBuffer object with the proper buffer size set.

Raises:

A OperationAttrException is thrown if unable to set the tcp buffer attribute.

Exceptions   
ex
  set_type 
set_type ( self,  type )

Sets the type attribute for the operation.

Controls the type used for the transfer. The types are defined in the ftpControl module. The default type is binary.

Arguments:

  • type One of the types defined in the ftpControl module.

Raises:

A OperationAttrException is thrown if unable to set the type.

Exceptions   
ex

Table of Contents

This document was automatically generated on Tue Feb 4 16:47:03 2003 by HappyDoc version 2.1