Can you share some usage examples?
cdhunt opened this issue · 4 comments
cdhunt commented
I'm testing with this code.
options := &netapp.ClientOptions{
BasicAuthUser: `user`,
BasicAuthPassword: `pass`,
SSLVerify: false,
}
client := netapp.NewClient("https://filer", "1.1", options)
voloptions := &netapp.VolumeOptions{}
vlresponse, hresponse, err := client.Volume.List(voloptions)
I get the following response.
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE netapp SYSTEM '/na_admin/netapp_filer.dtd'>
<netapp version='1.1' xmlns='http://www.netapp.com/filer/admin'>
<results status="failed" reason="Unable to find API: volume-get-iter" errno="13005"/></netapp>
pyama86 commented
Hi!
I still have implemented only the method I use, but I think that the answer to the question works with the following test code.
package main
import (
"fmt"
"github.com/pepabo/go-netapp/netapp"
)
func main() {
c := netapp.NewClient("https://your-management-ip/", "1.20", &netapp.ClientOptions{
BasicAuthUser: "user",
BasicAuthPassword: "password",
SSLVerify: false,
})
sp, _, _ := c.Volume.List(nil)
fmt.Println(sp)
}
$ DEBUG=1 go run client.go
response xml ====================================
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE netapp SYSTEM 'file:/etc/netapp_gx.dtd'>
<netapp version='1.110' xmlns='http://www.netapp.com/filer/admin'>
<results status="passed"><attributes-list><volume-attributes>
cdhunt commented
That does not work for me. I guess it's a NetApp version issue. 🙁
pyama86 commented
It may be so. It seems better to make the specification changeable in version.
https://github.com/pepabo/go-netapp/blob/master/netapp/netapp.go#L79
cdhunt commented
Confirmed 7mode API is different even though the version and xmlns are the same.