summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--create.go9
-rw-r--r--main.go2
-rw-r--r--structs.go2
3 files changed, 8 insertions, 5 deletions
diff --git a/create.go b/create.go
index 0846b1d..878a140 100644
--- a/create.go
+++ b/create.go
@@ -25,14 +25,17 @@ func createFilename(dir string, filename string) error {
hostname := strings.TrimSuffix(filename, filetype)
log.Info("hostname ==", hostname)
- var newDroplet *pb.Droplet
- newDroplet = new(pb.Droplet)
- newDroplet.Hostname = hostname
+ newDroplet := pb.NewDefaultDroplet(hostname)
newDisk := new(pb.Disk)
newDisk.Filename = filename
newDisk.Filepath = dir
newDroplet.Disks = append(newDroplet.Disks, newDisk)
+ var eth *pb.Network
+ eth = new(pb.Network)
+ eth.Name = "worldbr"
+ newDroplet.Networks = append(newDroplet.Networks, eth)
+
url := urlbase + "/create"
// body, err := postDropletJSON(url, newDroplet)
diff --git a/main.go b/main.go
index 456e67b..8d4cd68 100644
--- a/main.go
+++ b/main.go
@@ -77,7 +77,7 @@ func main() {
}
log.Info("\n\nshould import here", argv.Start, "\n")
log.Info("import", argv.Import.Host, argv.Import.DomainName)
- url := "/import?domainName=" + argv.Import.DomainName
+ url := "/import?domainName=" + argv.Import.DomainName
if argv.Import.Force {
url += "&force=true"
}
diff --git a/structs.go b/structs.go
index ebd0c73..edd304b 100644
--- a/structs.go
+++ b/structs.go
@@ -20,7 +20,7 @@ func (b *virtigoT) Enable() {
// this app's variables
type virtigoT struct {
- cluster *pb.Cluster // basic cluster settings
+ cluster *pb.Cluster // basic cluster settings
hmap map[*pb.Hypervisor]*HyperT // map to the local struct
names []string
hypers []*HyperT