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

Fix remove error, add flags #26

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cmd/docker-machine-driver-proxmoxve/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
ifndef
DRIVER_NAME = proxmoxve
endif

all:
GOOS=linux GOARCH=amd64 go build -o docker-machine-driver-proxmoxve.linux-amd64
GOOS=darwin GOARCH=amd64 go build -o docker-machine-driver-proxmoxve.macos-amd64
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/lnxbil/docker-machine-driver-proxmox-ve.dName=$DRIVER_NAME'" -o docker-machine-driver-$DRIVER_NAME.linux-amd64
GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'github.com/lnxbil/docker-machine-driver-proxmox-ve.dName=$DRIVER_NAME'" -o docker-machine-driver-$DRIVER_NAME.macos-amd64

12 changes: 12 additions & 0 deletions proxmox.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ type NodesNodeQemuPostParameter struct {
Pool string // optional, Add the VM to the specified pool.
Cores string // optional, The number of cores per socket.
Cdrom string // optional, This is an alias for option -ide2
CPU string // optional, This is cpu settings
NUMA string // Enable/disable NUMA
OnBoot string // Enable/disable OnBoot
SCSIHw string // set controller
}

type nNodesNodeQemuPostParameter struct {
Expand Down Expand Up @@ -429,6 +433,14 @@ func (p ProxmoxVE) NodesNodeQemuVMIDStatusStopPost(node string, vmid string) err
return err
}

//NodesNodeQemuVMIDConfigGet access the API
func (p ProxmoxVE) NodesNodeQemuVMIDConfigGet(node string, vmid string) (output map[string]interface{}, err error) {

path := fmt.Sprintf("/nodes/%s/qemu/%s/config", node, vmid)
err = p.get(nil, &output, path)
return output, err
}

func unmarshallString(data string, value string) (string, error) {
var f map[string]interface{}
err := json.Unmarshal([]byte(data), &f)
Expand Down
Loading