create works from a filename
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
6944de6d85
commit
f45dacfcaf
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue