summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libvirt/cloudinit_def.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libvirt/cloudinit_def.go b/libvirt/cloudinit_def.go
index 2c08c2be..ef43ba2c 100644
--- a/libvirt/cloudinit_def.go
+++ b/libvirt/cloudinit_def.go
@@ -24,6 +24,7 @@ const USERDATA string = "user-data"
// METADATA is the name of file expected by cloud-init
const METADATA string = "meta-data"
+// CloudInitUserData struct
type CloudInitUserData struct {
SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys"`
}
@@ -96,13 +97,13 @@ func (ci *defCloudInit) CreateAndUpload(virConn *libvirt.Connect) (string, error
volumeDef.Capacity.Value = size
volumeDef.Target.Format.Type = "raw"
- volumeDefXml, err := xml.Marshal(volumeDef)
+ volumeDefXML, err := xml.Marshal(volumeDef)
if err != nil {
return "", fmt.Errorf("Error serializing libvirt volume: %s", err)
}
// create the volume
- volume, err := pool.StorageVolCreateXML(string(volumeDefXml), 0)
+ volume, err := pool.StorageVolCreateXML(string(volumeDefXML), 0)
if err != nil {
return "", fmt.Errorf("Error creating libvirt volume for cloudinit device %s: %s", ci.Name, err)
}