Open jniltinho opened 8 years ago
Hi @jniltinho, we've not got any formal examples yet, but please check out these projects which use the library: https://github.com/xenserver/docker-machine-driver-xenserver & https://github.com/rdobson/packer-builder-xenserver which should help you see how to create a session and make various calls etc.
Hi @rdobson , very nice !!! :-) I'm reading the code of the projects.
Thank's
Hi @rdobson , Is there any example like this in Python? https://github.com/xapi-project/xen-api/tree/master/scripts/examples/python
func (client *XenAPIClient) GetVMAll() (vms []*VM, err error) {
vms = make([]*VM, 0)
result := APIResult{}
err = client.APICall(&result, "VM.get_all")
if err != nil {
return vms, err
}
for _, elem := range result.Value.([]interface{}) {
vm := new(VM)
vm.Ref = elem.(string)
vm.Client = client
vms = append(vms, vm)
}
return vms, nil
}
https://github.com/xapi-project/xen-api/blob/master/scripts/examples/python/powercycle.py#L25
Hi @rdobson I like XenServer and Golang. Please howto use go-xenserver-client
I'm thinking of using your lib to develop a web interface to manage XenServer golang
Thanks