Table 7: Command Details
Description
Command Detail
Determine support for Chunky Download feature (see <LINK>).
If not supported, revert to use the legacy CDT upload command.
For more information, see
Legacy CDT Upload Command, on page
15
.
mkdir split_cdt_files_path
cd split_cdt_files_path
cp cdt_files_path/cdt_file_name .
split
–
d
–
b 10485760 cdt_file_name
result will be files x00, x01, x02, and so on.
$src_file-size=size of cdt_file_name contents (in bytes)
$start_offset=0
for each file x## in split_cdt_files_path
{
$end_offset=$start(size of x## file in bytes
–
1)
$compensated_content_length=182 +
($end_ 1)
–
$start_offset
POST
-H "Content-Range: [start_offset]-[end_offset]/[src_file_size]"
-H "Content-Length: [compensated-content-length]
-F cdt file=@"split_cdt_files_path/current_chunk_file_name"
"https://192.168.0.1/ws/v1/cdt_upload.html"
where a new POST command is formatted and called for each file
chunk.
$start_offset=$end1
}
If using chunky method from command line (requires bash script),
contact D9800 Technical support for a working bash script example.
Cisco Engineering or Test personnel may use internal downloader
tools employing one or more high level languages that do not have
the same restrictions as the command line syntax requirements
described here. Those languages support source file streaming into
a buffer, and the contents of the buffer is an input to the client
application specific HTTP(S) POST API implementation.
Algorithm and Commands
This description uses pseudo code to
illustrate logic requirements. A working
bash script will be available from
D9800 Engineering, prior to Version
2.75.
Upload a CDT file to the device using Chunky algorithm.
Command Information
POST
HTTP Method
Cisco D9800 Network Transport Receiver Version 2.75 RESTful Web Services API Reference Guide
18
API Definitions
Legacy CDT Upload Command