cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
658
Views
0
Helpful
0
Replies

Executing file copy on juniper

neeramis@cisco.com
Cisco Employee
Cisco Employee

Hello,

I am executing copy command on juniper device using rpc available for it as follows.

 

devices device juniper_neeraj rpc rpc-file-copy file-copy source ftp://ftpuserid:ftp-pwd'@*.*.*.*/abc.tgz destination /var/tmp

 

It is copying the file successfully in var/tmp location.

If need to know how can I execute it through json rpc. I can execute it or not that also I am not sure.

 

Using below json rpc to execute it through nso

{
"jsonrpc":"2.0",
"id":1,
"method":"run_action",
"params":{
"path":"/ncs:devices/device/juniper_neeraj/rpc/jrpc:rpc-file-copy/file-copy",
"th":1,
"params":{
"source":"ftp://*:*'@*.*.*.*abc.tgz"
"destination":"/var/tmp",
"source-address":""
}
}
}

It is saying as below

{
"jsonrpc": "2.0",
"error": {
"type": "rpc.method.invalid_params",
"code": -32602,
"message": "Invalid parameters",
"data": {
"param": "path"
},
"internal": "webui_util607"
},
"id": 1
}

 

actually through my java code I will form the json rpc structure and will execute to get the results.

any help is appreciated

0 Replies 0