0% found this document useful (0 votes)
14 views

UserGuide Linux64

This document provides instructions for downloading and using the NetApp Authenticated File Upload Linux executable. It describes downloading the executable from the NetApp support site, generating an authentication token through a web application, and executing the file upload with required command line arguments specified in a configuration file. Version 2.2 included changes to remove the user ID parameter and implement new public APIs for token generation and management.

Uploaded by

hima bindu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

UserGuide Linux64

This document provides instructions for downloading and using the NetApp Authenticated File Upload Linux executable. It describes downloading the executable from the NetApp support site, generating an authentication token through a web application, and executing the file upload with required command line arguments specified in a configuration file. Version 2.2 included changes to remove the user ID parameter and implement new public APIs for token generation and management.

Uploaded by

hima bindu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

NetApp Authenticated File Upload

(Linux Executable User Guide)


Version: 2.2

DOCUMENT VERSION HISTORY

Date Version Description Authors

03/08/2021 2.1 Linux Executable Release VenkatNaveen Bandyala


• Added Linux Executable Specific details Chandram Magadum

08/25/2021 2.2 User Token Related Changes VenkatNaveen Bandyala


• Removed user id parameter for CLI execution Karun Suresh-Raj
• New Public APIs for token generation Saurabh Kumar
• Service Flow Changes to implement access token Chandram Magadum
and refresh token Yogendra Pandhigunda
• Enhanced CLI script with new security implementation Sandhya Ratakonda
• Enhanced Windows & Linux executables

1 NAFU Linux Executable – User Guide © 2021 NetApp, Inc. All Rights Reserved.
Table of Contents
1 PURPOSE OF THIS DOCUMENT ......................................................................................................................................... 3
2 SYSTEM REQUIREMENTS.................................................................................................................................................. 3
3 STEPS TO DOWNLOAD THE LINUX EXECUTABLE FILE ........................................................................................................ 3
3.1 SHORT AND LONG VERSION COMMAND LINE ARGUMENTS ........................................................................................... 3
4 STEPS TO GENERATE THE AUTHENTICATION TOKEN ........................................................................................................ 4
5 UPLOAD A FILE USING LINUX EXECUTABLE ...................................................................................................................... 5
6 ERROR MESSAGES ............................................................................................................................................................ 7
7 TROUBLESHOOTING STEPS ............................................................................................................................................ 10

2 NAFU Linux Executable – User Guide © 2021 NetApp, Inc. All Rights Reserved.
1 PURPOSE OF THIS DOCUMENT
This document covers steps that are required to upload a file using Linux executable and the steps
required to generate authentication token (that is required to run the script).

2 SYSTEM REQUIREMENTS
Current version of Linux executable supports Red Hat Linux 7.x.

3 STEPS TO DOWNLOAD THE LINUX EXECUTABLE FILE


Below are the steps to download the NetApp Authenticated File Upload CLI script from the NetApp Support Site.
i) Navigate to NetApp Support Site, and sign-in using your SSO.
ii) Search for ‘NetApp Authenticated File Upload CLI Script’ and click on ‘Download App’. The NetApp
Authenticated File Upload CLI Script description page will be displayed.
iii) Read and accept the license agreement, and then click ACCEPT & CONTINUE to download the product.
iv) Select the required version of the product you want to download from Client Downloads.

3.1 SHORT AND LONG VERSION COMMAND LINE ARGUMENTS


User can use either short or long version command line arguments from below table. Some of the arguments are
mandatory while others are optional. Please refer to the below table for mandatory and optional argument list.

For example --token is a mandatory argument, whereas --casenumber is an optional argument. For optional
arguments, upload will take default values as provided in the table below.

Argument name Short Form Long Form Mandatory Default value


(Y /N)
casenumber -c --casenumber N “”
upload -u --upload Y NA
bugcheck -b --bugcheck N “Y”
token -t --token Y NA
log -l --log N Current
directory/logs/YYYYMMDD
region -r --region N “North America (East)”
debug -d --debug N “info”
override -o --override N Depends on bug check response.
noresume -p --noresume N False
batchsize -b --batchsize N 6
apihelp -a --apihelp N NA
proxyserver -g --proxyserver N NA
proxyport -k --proxyport N NA
proxyuser -x --proxyuser N NA
proxypassword -y --proxypassword N NA

Below are the regions that are currently supported by the tool:
"North America (West)"
"North America (East)"
"Canada"
"Europe"

3 NAFU Linux Executable – User Guide © 2021 NetApp, Inc. All Rights Reserved.
"Mumbai"
“Singapore”
“Bahrain”
“Hong Kong”
“Japan”
“Australia”
“São Paulo”
Here are the different debug options supported (default is “info”):
Debug option Example
DEBUG -d debug / --debug debug
INFO -d info (default) / --debug info
WARNING -d warning / --debug warning
ERROR -d error / --debug error
CRITICAL -d critical / --debug critical

4 STEPS TO GENERATE THE AUTHENTICATION TOKEN


i) Go to URL https://upload.netapp.com/sg/getToken
ii) Enter NetApp email address in the email address field as shown in the below screenshot.
iii) Click on the ‘Generate Token’ button.
iv) An alphanumeric Token will be generated and listed in the table below.
v) Pick a line item with a valid token and click the ‘Copy’ button.
vi) The token value is now copied into the clipboard.
vii) Paste the value on to a notepad or pass the value to the above script line for the --token parameter.

4 NAFU Linux Executable – User Guide © 2021 NetApp, Inc. All Rights Reserved.
5 UPLOAD A FILE USING LINUX EXECUTABLE
User can use Linux executable to upload the files from Linux (RHEL) machines.

If script is downloaded and extracted to /home/netapp_auth_file_upload_linux_executable, then it will have


below file structure:

To upload the file using Linux executable, change directory as below and execute the file with specific parameter
values in the netapp_upload_cli_input.txt
cd ‘netapp_auth_file_upload_linux_executable’
./nafu_auth_file_upload_2.2_Linux64

netapp_upload_cli_input.txt needs to be updated with all the required parameters as shown in the below
screenshot.

--casenumber “<input value>” --upload “<input value>”


--bugcheck “<y/n>” --token “<input value>” --log “<input value>” --region “<input value>” --
debug “<input value>” --override “<input value>” --noresume “<True/False>” --batchsize “<0 to
100>”

Where:
casenumber – An Active Technical Case Number.
upload – Full path to input file
bugcheck – To check for known bugs (applicable to core files)
token – Authentication Token (generated from NAFU Web Application)
log – File path to save logs generated during script execution
region – Nearest server name where you want to upload the file
debug – Logging level for log file
override – PMBTA password to proceed with upload after a bug is identified
noresume – To resume from a previous upload
batchsize – Batch size to upload files
apihelp – API help

5 NAFU Linux Executable – User Guide © 2021 NetApp, Inc. All Rights Reserved.
User can use either short or long version arguments in netapp_upload_cli_input.txt from below table.

Argument Short Form Long Form Mandatory Default value


name (Y /N)
casenumber -c --casenumber N “”
Upload -u --upload Y NA
bugcheck -b --bugcheck N “Y”
Token -t --token Y NA
Log -l --log N Current directory/logs/YYYYMMDD
Region -r --region N “North America (East)”
Debug -d --debug N “info”
override -o --override N Depends on bug check response.
noresume -p --noresume N False
batchsize -b --batchsize N 6
apihelp -a --apihelp N NA
proxyserver -g --proxyserver N NA
proxyport -k --proxyport N NA
proxyuser -x --proxyuser N NA
proxypassword -y --proxypassword N NA

6 NAFU Linux Executable – User Guide © 2021 NetApp, Inc. All Rights Reserved.
6 ERROR MESSAGES
Below are the CLI error messages and description of the error.

Error Message Description


Un-recognized arguments Invalid arguments provided while executing the script.
Token is missing. -t (or) --token is missing while executing the script.
Upload file name is missing. -u (or) --upload is missing while executing the script.
Mandatory arguments (token and upload file) are
Upload file name, Token is missing. missing
Invalid case number, please provide valid case
number! Invalid case number.

Given upload file does not exist! Provide complete file path for -u (or) --upload
Either your access token is expired or is associated
with an invalid user id.
Get the new token from
Access token is expired. https://upload.netapp.com/sg/getToken

Invalid input for debug, please enter the value


from ["INFO", "WARNING", "ERROR", "CRITICAL",
"DEBUG"]! Invalid value provided for -d (or) --debug.
Input value for bugcheck option is invalid, please
enter the values from [Y, y, N, n]! Invalid value provided for -b (or) --bugcheck
Invalid override password. Please provide valid
override password! Invalid value provided for -o (or) --override

Unable to execute the script due to invalid


batchsize. Please enter the value between 1 to
100! Invalid batch size provided for -s (or) --batchsize

Invalid value provided for -p (or) --noresume.


True /true will treat the upload as new.
False / false will check for existing file, if any file found
Invalid input for noresume, please enter the for same casenumber, filename and file size then,
value from ['True'', 'False', 'true', 'false']! upload will resume from the last uploaded part.
Unable to get a (API name) response from a
server, retry after 5 minutes! Timeout during API call.

There is already an active upload session for the


file you are trying to upload. Close the terminal
with the upload in progress to continue with this
upload. If you have already done so, retry the If a file upload is already in progress from a different
upload after 5 minutes! terminal.
Network proxy server/port is required. You can update
Proxy user or port is missing! p_config.py file under conf directory.
Network proxy port is required. You can update
Proxy port is missing! p_config.py file under conf directory.

7 NAFU Linux Executable – User Guide © 2021 NetApp, Inc. All Rights Reserved.
Network proxy URL/host/IP is required. You can
Proxy url is missing! update p_config.py file under conf directory.
Unable to delete the chunk file! Unable to delete the temporary chunk file.

Below are the error messages returned from the API calls:

Error Code Error Message Description


EIU001 File attachment is empty or invalid. File attachment is empty or invalid.
EIU002 Access token is missing. If token is not specified.
EIU003 File name is missing. If file name is not specified.
EIU005 File size is missing. if file size is not specified.
EIU006 Upload server name is missing. If upload server is not specified.
EIU007 Invalid case number! Please enter a valid 10 If caser number is not having 10 numeric
digit case number. digits.
EIU008 Invalid file name. Please remove special If file name contains [#$%&*@! ] special
characters [#$%&*@! ] if any. characters.
EIU009 Access token is expired. If access token is expired.

EIU010 Error occurred while validating access token. If we get any error while validating access
token.
EIU011 Invalid case number! Please enter a valid 10- If case number is invalid.
digit case number.
EIU012 Invalid PMBTA override password. If invalid PMBTA override password is
provided.
EIU013 Internal server error while executing PMBTA If any error while executing PMBTA
command. command.
EGP001 Upload ID is missing. If upload id is not specified.
EGP002 File type is missing. If file type is not specified.
EGP003 Mask file name is missing. If mask file name is not specified.
EGP004 Batch size is missing. If batch size is not specified.
EGP005 Part size is missing. If part size is not specified.
EGP006 Part numbers are missing. If part numbers are not specified.
EGP007 Part numbers are empty. If part numbers are empty.
EGP008 File name is missing. If file name is not specified.
EGP009 Invalid part numbers. If invalid part numbers specified.
EGP010 Invalid upload ID is found. If upload id is invalid.
EGP011 Access token is missing. If token is not specified.
EGP013 Access token is expired. If Access token is expired.

EGP014 Error occurred while validating access token. If any error while validating access token.

ECU001 Upload ID is missing. If upload id is not specified.


ECU002 File name is missing. If file name is not specified.
ECU003 Upload server name is missing. If upload server is not specified.

8 NAFU Linux Executable – User Guide © 2021 NetApp, Inc. All Rights Reserved.
ECU004 File type is missing. If file type is not specified.
ECU005 Mask file name is missing. If masked file name is not specified.
ECU006 ETag list is missing. If ETag list is not specified.
ECU007 File merge is failed due to invalid Etags. If any error while completing upload.
ECU009 Access token is missing. If token is not specified.
ECU010 Access token is expired. If access token is expired.

ECU011 Error occurred while validating access token. If we get any error while validating token.
EFS001 Upload ID is missing. If upload id is not specified.
EFS002 Upload status operation is missing. If upload status operation is not specified.

EFS003 No file found for the given uploadId. If upload id is invalid.


EFS004 Parts completed number is missing. If parts completed is not specified.
EFS005 UploadId is not found. Failed to update Invalid upload id is identified while
upload progress status. updating status.
EFS006 Invalid request payload. If invalid request payload.
EFS008 Access token is expired. If access token is expired.

EFS009 Error occurred while validating access token. If we get any error while validating token.
EFS010 Total parts number is missing. If total parts number are not specified.
EFS011 Access token is missing. If token is not specified.
EGS001 Access token is missing. If token is not specified.
EGS003 Access token is expired. If access token is expired.
EGS004 Error occurred while validating access token. If we get any error while validating access
token.
EGT001 Missing user token, please provide one. If user token is not specified.
EGT002 Error while fetching token. If database connection error.
EGT003 Error while saving token. If database connection error.
EGT004 Error while generating token. If any error occurs while generating token.
EGT005 Token is not matching the user id, please The token provided does not match the
generate a new token and re-upload. user profile.
EGT006 Token is not matching any of the active user The token provided is not associated with
id, please generate a new token and re- any active user profile.
upload.
ERT001 Error while updating new token. If any error occurs while updating new
token to database.
ERT002 Refresh token update failed. The user token The user token and the expired access
and the expired access token are mis- token are mis-matched for the provided
matched for the given user id. Please check user profile.
both the tokens and retry the command to
generate a new access token.
ERT003 Either user token or expired access token is Either the user token or the expired
missing, please provide both. access token is missing.
ERT004 Error while generating token. If any error while generating token.

9 NAFU Linux Executable – User Guide © 2021 NetApp, Inc. All Rights Reserved.
ERT005 Token is not matching any of the active user If provided token is invalid.
id, please generate a new token and re-
upload.

7 TROUBLESHOOTING STEPS
Note: For questions associated with NetApp Authenticated File Upload CLI Script, contact ng-nafu-cli-
[email protected]. Support for SDK is limited to API reference implementation. Questions will be addressed on
a ‘Best Effort’ basis.

i) If “MemoryError()” is encountered, ensure you have enough memory space on your system before running
again.
ii) In case you get ‘No such file or directory’ error, make sure that you are in the right directory and the correct
script file path.
iii) Please refer to README.txt or UserGuide.pdf for the list of valid arguments if any “Invalid arguments”
related errors are encountered.
iv) If the below error is encountered, try running the same script after 5 minutes.
“Unable to get a (API name) response from a server, retry after 5 minutes!”
v) To troubleshoot script execution with more details, please use -d (or) --debug parameter.

10 NAFU Linux Executable – User Guide © 2021 NetApp, Inc. All Rights Reserved.

You might also like