Closed prologic closed 8 years ago
I'm trying to use your library to write a docker-machine proxmox driver and wrote a very simple test to see if the basics work:
package main import ( "fmt" "github.com/joernott/go-proxmox" "log" ) func main() { proxmox, err := proxmox.NewProxMox("192.168.0.100", "root", "xxx") if err != nil { log.Fatal(err) } nodes, err := proxmox.Nodes() if err != nil { log.Print("Error listing nodes") log.Fatal(err) } for node := range nodes { fmt.Println(node) } }
This doesn't work against Proxmox VE 4.1:
$ ./nodes 2016/07/04 13:42:24 Error listing nodes 2016/07/04 13:42:24 unexpected end of JSON input```
After much debugging turned out the Hostname parameter needs to match the name of the node you are accessing! Who knew :) I kept getting 401 No ticket. Good thing I have proper DNS. Sorry for the noise!
Hostname
401 No ticket
I'm trying to use your library to write a docker-machine proxmox driver and wrote a very simple test to see if the basics work:
This doesn't work against Proxmox VE 4.1: