pyntc.utils.models
¶
Data Models for Pyntc.
pyntc.utils.models.FileCopyModel
dataclass
¶
Data class to represent the specification for pulling a file from a URL to a network device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
download_url
|
str
|
The URL to download the file from. Can include credentials, but it's recommended to use the username and token fields instead for security reasons. |
required |
checksum
|
str
|
The expected checksum of the file. |
required |
file_name
|
str
|
The name of the file to be saved on the device. |
required |
file_size
|
int
|
The expected size of the file. When supplied, |
None
|
file_size_unit
|
str
|
Unit that |
'bytes'
|
hashing_algorithm
|
str
|
The hashing algorithm to use for checksum verification. Defaults to "md5". |
'md5'
|
timeout
|
int
|
The timeout for the download operation in seconds. Defaults to 900. |
900
|
username
|
str
|
The username for authentication if required by the URL. Optional if credentials are included in the URL. |
None
|
token
|
str
|
The password or token for authentication if required by the URL. Optional if credentials are included in the URL. |
None
|
vrf
|
str
|
The VRF to use for the download if the device supports VRFs. Optional. |
None
|
ftp_passive
|
bool
|
Whether to use passive mode for FTP downloads. Defaults to True. |
True
|