Transfer Class - HP 10500 Series Configuration Manual

Hide thumbs Also See for 10500 Series:
Table of Contents

Advertisement

Transfer class

Transfer
Use Transfer to download a file from a server.
Syntax
Transfer(protocol='', host='', source='', dest='', vrf='',login_timeout=10, user='', password='')
Parameters
protocol: Specifies the protocol used to download a file:
ftp—Uses FTP.
tftp—Uses TFTP.
http—Uses HTTP.
host: Specifies the IP address of the remote server.
source: Specifies the name of the file to be downloaded from the remote server.
dest: Specifies a name for the downloaded file.
vrf: Specifies the VPN instance to which the remote server belongs. This argument is a case-sensitive
string of 1 to 31 characters. If the server belongs to the public network, do not specify this argument.
login_timeout: Specifies the timeout for the operation, in seconds. The default is 10.
user: Specifies the username for logging in to the server.
password: Specifies the login password.
Returns
Transfer object
Examples
# Download file test.cfg from TFTP server 192.168.1.26.
<Sysname> python
Python 2.7.3 (default, May 24 2013, 14:37:26)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import comware
>>> comware.Transfer('tftp', '192.168.1.26', 'test.cfg', 'flash:/test.cfg', user='',
password='')
Sample output
<comware.Transfer object at
get_error
Use get_error to get the error information from the download operation.
Syntax
Transfer.get_error()
Returns
Error information (if there is no error information, None is returned)
>
0x555580a0f0
295

Advertisement

Table of Contents
loading

Table of Contents