| InternalTftp | Internally serves files using the Trivial File Transfer Protocol. |
| ExternalTftp | Defines a ExternalTftp object, which is actually TFTP client. |
| InternalTftp.get_address | Returns the ipv4 address of this server. |
| InternalTftp.get_file | Download a file from the tftp server to local_path. |
| InternalTftp.kill | Kills the InternalTftpServer. |
| InternalTftp.put_file | Upload a file from src to dest on the tftp server (path). |
| ExternalTftp.get_address | Return the ip address of the ExternalTftp server. |
| ExternalTftp.get_file | Download a file from the ExternalTftp Server. |
| ExternalTftp.put_file | Uploads a file to the tftp server. |
Bases: object
Internally serves files using the Trivial File Transfer Protocol.
>>> # Typical instantiation ...
>>> from cxmanage_api.tftp import InternalTftp
>>> i_tftp = InternalTftp()
>>> # Alternatively, you can specify an address or hostname ...
>>> i_tftp = InternalTftp(ip_address='localhost')
| Parameters: |
|
|---|
Returns the ipv4 address of this server. If a relative_host is specified, then we discover our address to them.
>>> i_tftp.get_address(relative_host='10.10.14.150')
'localhost'
| Parameters: | relative_host (string) – Ip address to the relative host. |
|---|---|
| Returns: | The ipv4 address of this InternalTftpServer. |
| Return type: | string |
Bases: object
Defines a ExternalTftp object, which is actually TFTP client.
>>> from cxmanage_api.tftp import ExternalTftp
>>> e_tftp = ExternalTftp(ip_address='1.2.3.4')
| Parameters: |
|
|---|
Return the ip address of the ExternalTftp server.
>>> e_tftp.get_address()
'1.2.3.4'
| Parameters: | relative_host (None) – Unused parameter present only for function signature. |
|---|---|
| Returns: | The ip address of the external TFTP server. |
| Return type: | string |
Download a file from the ExternalTftp Server.
Note
>>> e_tftp.get_file(src='remote_file_i_want.txt', dest='/local/path')
| Parameters: |
|
|---|---|
| Raises: |
|
Uploads a file to the tftp server.
Note
>>> e_tftp.put_file(src='local_file.txt', dest='remote_name.txt')
| Parameters: |
|
|---|---|
| Raises: |
|