Transfer Class - HPE FlexFabric 5940 Series Configuration Manual

Fundamentals configuration guide
Hide thumbs Also See for FlexFabric 5940 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 MPLS L3VPN instance to which the remote server belongs. This argument
represents the VPN instance name, 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)
[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 0xb7f700e0>
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)
Examples
# Download file test.cfg from TFTP server 1.1.1.1 and get the error information from the operation.
165

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flexfabric 5950 series

Table of Contents