Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Add position of the disk when attaching it to a VM #114

Closed
aegiap opened this issue Mar 24, 2015 · 1 comment
Closed

Add position of the disk when attaching it to a VM #114

aegiap opened this issue Mar 24, 2015 · 1 comment
Assignees

Comments

@aegiap
Copy link
Contributor

aegiap commented Mar 24, 2015

TL;DR: add a param position in gandi disk attach which could be used in the hosting.vm.disk_attach API method.

The public API documentation for the option of the hosting.vm.disk_attach optional dict:
http://doc.rpc.gandi.net/hosting/reference_vm.html#VMDiskAttachOptions

Use case:
As a IaaS user, I am using a virtual machine and need to use another system disk (aka virtual disk with an associated kernel). I need to detach the current system disk and then attach the new disk to the VM. The new disk need to be attached in position 0 or I will need to rewrite the kernel boot param.

On my computer, the current help is:

$ gandi disk attach --help
Usage: gandi disk [OPTIONS] DISK VM

  Attach disk to vm.

  disk can be a disk name, or ID vm can be a vm name, or ID

Options:
  --bg, --background  Run command in background mode (default=False).
  -f, --force         This is a dangerous option that will cause CLI to
                      continue without prompting. (default=False).
  --help              Show this message and exit.

We could add a -p --position value : On which position do you want to attach the disk to the VM.

Bonus point if we could have the access method as a parameter of gandi disk attach also. Something like : -a --access ro|rw : Access method to the disk, ro is for read-only, rw is for read and write.

Context:

$ gandi --version
Gandi CLI 0.12
$ cat /etc/debian_version 
8.0
$ dpkg -l gandicli
||/ Name                   Version          Architecture
ii  gandicli               0.12             all
@kalou kalou self-assigned this Mar 27, 2015
@soulshake soulshake mentioned this issue Mar 28, 2015
@sayoun
Copy link
Contributor

sayoun commented Mar 31, 2015

I'm closing this as it's available in release 0.13

@sayoun sayoun closed this as completed Mar 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants