diff options
author | Duncan Mac-Vicar P <dmacvicar@suse.de> | 2017-11-16 13:50:06 +0100 |
---|---|---|
committer | Duncan Mac-Vicar P <dmacvicar@suse.de> | 2017-11-19 16:52:33 +0100 |
commit | 5ea094a4686747eba27dd1ced6b380300424f88f (patch) | |
tree | 23632d9b7fb7d02c95795cf0119d44f3a4319b5f /libvirt | |
parent | bb8be0df22f5635a6d2efc70d4372d2321dfc0f2 (diff) | |
download | terraform-provider-libvirt-5ea094a4686747eba27dd1ced6b380300424f88f.tar terraform-provider-libvirt-5ea094a4686747eba27dd1ced6b380300424f88f.tar.gz |
Document disks from url
Diffstat (limited to 'libvirt')
-rw-r--r-- | libvirt/disk_def.go | 2 | ||||
-rw-r--r-- | libvirt/disk_def_test.go | 2 | ||||
-rw-r--r-- | libvirt/resource_libvirt_domain.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/libvirt/disk_def.go b/libvirt/disk_def.go index 785542b6..f4e4e86a 100644 --- a/libvirt/disk_def.go +++ b/libvirt/disk_def.go @@ -9,7 +9,7 @@ import ( const oui = "05abcd" -func newDefDisk() libvirtxml.DomainDisk { +func newDefDisk(i int) libvirtxml.DomainDisk { return libvirtxml.DomainDisk{ Type: "file", Device: "disk", diff --git a/libvirt/disk_def_test.go b/libvirt/disk_def_test.go index 1e3141d5..a6184cc6 100644 --- a/libvirt/disk_def_test.go +++ b/libvirt/disk_def_test.go @@ -13,7 +13,7 @@ func init() { } func TestDefaultDiskMarshall(t *testing.T) { - b := newDefDisk() + b := newDefDisk(0) buf := new(bytes.Buffer) enc := xml.NewEncoder(buf) enc.Indent(" ", " ") diff --git a/libvirt/resource_libvirt_domain.go b/libvirt/resource_libvirt_domain.go index dfb9d2f9..e5034352 100644 --- a/libvirt/resource_libvirt_domain.go +++ b/libvirt/resource_libvirt_domain.go @@ -368,7 +368,7 @@ func resourceLibvirtDomainCreate(d *schema.ResourceData, meta interface{}) error var disks []libvirtxml.DomainDisk var scsiDisk = false for i := 0; i < disksCount; i++ { - disk := newDefDisk() + disk := newDefDisk(i) diskKey := fmt.Sprintf("disk.%d", i) diskMap := d.Get(diskKey).(map[string]interface{}) |