Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing cachePath property of FileSSLCertConfig, or how to enable hidden options #47

Open
nickmhankins opened this issue Oct 24, 2023 · 1 comment
Labels
area/sys Issues related to the sys subpackage. kind/support

Comments

@nickmhankins
Copy link

nickmhankins commented Oct 24, 2023

My question is based on this kb article and api doc:
https://my.f5.com/manage/s/article/K67050204
https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_sys_file_ssl-cert.html

I expected there to be cachePath property on FileSSLCertConfig based on the KB above.

Is there another type I'm not seeing that exposes this property or is there a way to add that 'hidden' query parameter option?

@gilliek
Copy link
Member

gilliek commented Nov 15, 2023

To retrieve the cachePath, the parameter ?options=-hidden must be passed in the request, which is not currently supported. I opened an issue (#48) for that.

In the meantime, you can workaround with something like that:

package main

import (
	"encoding/json"
	"fmt"
	"log"

	"github.com/e-XpertSolutions/f5-rest-client/f5"
	"github.com/e-XpertSolutions/f5-rest-client/f5/sys"
)

type FileSSLCertConfig struct {
	sys.FileSSLCertConfig
	CachePath string `json:"cachePath"`
}

func main() {
	f5Client, err := f5.NewBasicClient("https://<some-ip-address>", "admin", "admin")
	if err != nil {
		log.Fatal(err)
	}
	f5Client.DisableCertCheck()

    var data FileSSLCertConfig
   
	if err := f5.ReadQuery("/mgmt/tm/sys/file/ssl-cert?options=-hidden", &data); err != nil {
		log.Fatal(err)
    }
}

@gilliek gilliek added kind/support area/sys Issues related to the sys subpackage. labels Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sys Issues related to the sys subpackage. kind/support
Projects
None yet
Development

No branches or pull requests

2 participants