You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi simanchou, as far as I can tell, there is no API available to upload a file to the ADC.
If you run developer tools in the web GUI, you will see they call an internal /rapi endpoint instead of the normal /api.
It seems that one is only callable through the GUI, unfortunately.
(I've been looking for this for ages myself, and the only way so far is through SSH).
You can download files however, but that is not of much use when you want to update a certificate file.
sfb, err := ioutil.ReadFile("mydomain.com.cer")
sslFile := &system.Systemfile{
Filename: "mydomain.com.20220315.cer",
Filecontent: base64.StdEncoding.EncodeToString(sfb),
Filelocation: "/nsconfig/ssl/",
Fileencoding: "BASE64",
}
addResp, err := client.AddResource(service.Systemfile.Type(), "mydomain.com.20220315.cer", sslFile)
upload file successful, and i can find the file in web GUI.
sslUpdateReq := &ssl.Sslcertkey{
Certkey: "mydomain.com",
// Cert: "/nsconfig/ssl/mydomain.com.20220315.cer", still fail
Cert: "mydomain.com.20220315.cer",
Nodomaincheck: true,
}
updateResp, err := client.UpdateResource(service.Sslcertkey.Type(), "mydomain.com", sslUpdateReq)
2022/03/15 10:41:35 [ERROR] nitro-go: Failed to update resource of type sslcertkey, name=mydomain.com err=failed: 599 Netscaler specific error ({ "errorcode": 278, "message": "Invalid argument [cert]", "severity": "ERROR" })
update ssl fail, how can i define the cert argument?
BTW, i can update the ssl with the file upload above in web GUI, just fail by the SDK.
The text was updated successfully, but these errors were encountered: