From fdffa2502805c12d9b6258808358e5ce15030da9 Mon Sep 17 00:00:00 2001 From: jasminSPC Date: Fri, 8 Jul 2016 19:40:36 +0200 Subject: [PATCH] godep fix --- Godeps/Godeps.json | 369 +++++++++++++++++- .../profitbricks-sdk-go/.gitignore | 9 + .../profitbricks-sdk-go/README.md | 57 +++ .../profitbricks-sdk-go/datacenter.go | 11 +- .../model/AttachedVolumes.go | 11 + .../profitbricks-sdk-go/model/BalancedNics.go | 11 + .../profitbricks-sdk-go/model/Cdroms.go | 11 + .../profitbricks-sdk-go/model/Datacenter.go | 14 + .../model/DatacenterElementMetadata.go | 15 + .../model/DatacenterEntities.go | 11 + .../model/DatacenterProperties.go | 11 + .../profitbricks-sdk-go/model/Datacenters.go | 11 + .../profitbricks-sdk-go/model/FirewallRule.go | 12 + .../model/FirewallRules.go | 11 + .../model/FirewallruleProperties.go | 16 + .../profitbricks-sdk-go/model/Image.go | 12 + .../model/ImageProperties.go | 24 ++ .../profitbricks-sdk-go/model/Images.go | 11 + .../profitbricks-sdk-go/model/Lan.go | 13 + .../profitbricks-sdk-go/model/LanEntities.go | 8 + .../profitbricks-sdk-go/model/LanNics.go | 11 + .../model/LanProperties.go | 9 + .../profitbricks-sdk-go/model/Lans.go | 11 + .../profitbricks-sdk-go/model/Loadbalancer.go | 13 + .../model/LoadbalancerEntities.go | 8 + .../model/LoadbalancerProperties.go | 10 + .../model/Loadbalancers.go | 11 + .../profitbricks-sdk-go/model/Nic.go | 10 + .../profitbricks-sdk-go/model/NicEntities.go | 5 + .../model/NicProperties.go | 13 + .../profitbricks-sdk-go/model/Nics.go | 8 + .../profitbricks-sdk-go/model/Properties.go | 5 + .../model/ResourceReference.go | 7 + .../profitbricks-sdk-go/model/Server.go | 10 + .../model/ServerEntities.go | 7 + .../model/ServerProperties.go | 9 + .../profitbricks-sdk-go/model/Servers.go | 8 + .../profitbricks-sdk-go/model/Volume.go | 8 + .../model/VolumeProperties.go | 23 ++ .../profitbricks-sdk-go/model/Volumes.go | 8 + .../profitbricks/profitbricks-sdk-go/req.go | 8 + .../profitbricks-sdk-go/request.go | 2 +- .../profitbricks/profitbricks-sdk-go/resp.go | 14 +- .../profitbricks-sdk-go/volume.go | 4 +- 44 files changed, 863 insertions(+), 7 deletions(-) create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/AttachedVolumes.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/BalancedNics.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Cdroms.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Datacenter.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterElementMetadata.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterEntities.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterProperties.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Datacenters.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallRule.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallRules.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallruleProperties.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Image.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/ImageProperties.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Images.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Lan.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanEntities.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanNics.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanProperties.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Lans.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Loadbalancer.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/LoadbalancerEntities.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/LoadbalancerProperties.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Loadbalancers.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Nic.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/NicEntities.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/NicProperties.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Nics.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Properties.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/ResourceReference.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Server.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/ServerEntities.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/ServerProperties.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Servers.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Volume.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/VolumeProperties.go create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/model/Volumes.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 53302b36e..61a8688e2 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,5 +1,5 @@ { - "ImportPath": "github.com/mitchellh/packer", + "ImportPath": "github.com/StackPointCloud/packer", "GoVersion": "go1.6", "GodepVersion": "v74", "Deps": [ @@ -379,6 +379,371 @@ "ImportPath": "github.com/mitchellh/multistep", "Rev": "162146fc57112954184d90266f4733e900ed05a5" }, + { + "ImportPath": "github.com/mitchellh/packer/builder/amazon/chroot", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/amazon/common", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/amazon/ebs", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/amazon/instance", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/azure/arm", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/azure/common", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/azure/common/constants", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/azure/common/lin", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/azure/common/logutil", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/azure/common/template", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/azure/pkcs12", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/azure/pkcs12/rc2", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/digitalocean", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/docker", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/file", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/googlecompute", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/null", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/openstack", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/parallels/common", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/parallels/iso", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/parallels/pvm", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/qemu", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/virtualbox/common", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/virtualbox/iso", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/virtualbox/ovf", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/vmware/common", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/vmware/iso", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/builder/vmware/vmx", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/command", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/common", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/common/ssh", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/common/uuid", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/communicator/none", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/communicator/ssh", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/communicator/winrm", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/fix", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/helper/communicator", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/helper/config", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/helper/flag-kv", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/helper/flag-slice", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/packer", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/packer/plugin", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/packer/rpc", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/amazon-import", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/artifice", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/atlas", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/checksum", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/compress", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/docker-import", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/docker-push", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/docker-save", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/docker-tag", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/shell-local", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/vagrant", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/vagrant-cloud", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/post-processor/vsphere", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/ansible", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/ansible-local", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/chef-client", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/chef-solo", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/file", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/powershell", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/puppet-masterless", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/puppet-server", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/salt-masterless", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/shell", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/shell-local", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/windows-restart", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/provisioner/windows-shell", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/template", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/template/interpolate", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, + { + "ImportPath": "github.com/mitchellh/packer/version", + "Comment": "v0.10.1-120-gc8f68af", + "Rev": "c8f68afa5c3b39259fd7ec74877ab80640358e0f" + }, { "ImportPath": "github.com/mitchellh/panicwrap", "Rev": "a1e50bc201f387747a45ffff020f1af2d8759e88" @@ -635,7 +1000,7 @@ }, { "ImportPath": "github.com/profitbricks/profitbricks-sdk-go", - "Rev": "04e83add0882eb67a163231899300f97b91f248d" + "Rev": "9dea2c24a0dc0740d93fd621ce845a1faede6826" } ] } diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore b/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore index daf913b1b..75eab1e65 100644 --- a/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore @@ -22,3 +22,12 @@ _testmain.go *.exe *.test *.prof +/.idea/ +.idea/compiler.xml +.idea/copyright/ +.idea/encodings.xml +.idea/misc.xml +.idea/modules.xml +.idea/profitbricks-sdk-go.iml +.idea/vcs.xml +.idea/workspace.xml diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md b/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md index f63bfe513..055c63096 100644 --- a/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md @@ -109,6 +109,63 @@ request := profitbricks.CreateDatacenterRequest{ response := profitbricks.CreateDatacenter(request) ``` +## How To: Create Data Center with Multiple Resources + +To create a complex Data Center you would do this. As you can see, you can create quite a few of the objects you will need later all in one request.: + +```go +datacenter := model.Datacenter{ + Properties: model.DatacenterProperties{ + Name: "composite test", + Location:location, + }, + Entities:model.DatacenterEntities{ + Servers: &model.Servers{ + Items:[]model.Server{ + model.Server{ + Properties: model.ServerProperties{ + Name : "server1", + Ram: 2048, + Cores: 1, + }, + Entities:model.ServerEntities{ + Volumes: &model.AttachedVolumes{ + Items:[]model.Volume{ + model.Volume{ + Properties: model.VolumeProperties{ + Type_:"HDD", + Size:10, + Name:"volume1", + Image:"1f46a4a3-3f47-11e6-91c6-52540005ab80", + Bus:"VIRTIO", + ImagePassword:"test1234", + SshKeys: []string{"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoLVLHON4BSK3D8L4H79aFo+0cj7VM2NiRR/K9wrfkK/XiTc7FlEU4Bs8WLZcsIOxbCGWn2zKZmrLaxYlY+/3aJrxDxXYCy8lRUMnqcQ2JCFY6tpZt/DylPhS9L6qYNpJ0F4FlqRsWxsjpF8TDdJi64k2JFJ8TkvX36P2/kqyFfI+N0/axgjhqV3BgNgApvMt9jxWB5gi8LgDpw9b+bHeMS7TrAVDE7bzT86dmfbTugtiME8cIday8YcRb4xAFgRH8XJVOcE3cs390V/dhgCKy1P5+TjQMjKbFIy2LJoxb7bd38kAl1yafZUIhI7F77i7eoRidKV71BpOZsaPEbWUP jasmin@Jasmins-MBP"}, + }, + }, + }, + }, + Nics: &model.Nics{ + Items: []model.Nic{ + model.Nic{ + Properties: model.NicProperties{ + Name : "nic", + Lan : "1", + }, + }, + }, + }, + }, + }, + }, + }, + }, + } + +dc := CompositeCreateDatacenter(datacenter) + +``` + + ## How To: Delete Data Center You will want to exercise a bit of caution here. Removing a data center will destroy all objects contained within that data center -- servers, volumes, snapshots, and so on. diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go index 0d14a4c01..b9c5ba69c 100644 --- a/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go @@ -1,6 +1,9 @@ package profitbricks -import "encoding/json" +import ( + "encoding/json" + "github.com/profitbricks/profitbricks-sdk-go/model" +) type CreateDatacenterRequest struct { DCProperties `json:"properties"` @@ -25,6 +28,12 @@ func CreateDatacenter(dc CreateDatacenterRequest) Instance { return is_post(path, obj) } +func CompositeCreateDatacenter(datacenter model.Datacenter) model.Datacenter { + obj, _ := json.Marshal(datacenter) + path := dc_col_path() + return is_composite_post(path, obj) +} + // GetDatacenter returns a Instance struct where id == dcid func GetDatacenter(dcid string) Instance { path := dc_path(dcid) diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/AttachedVolumes.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/AttachedVolumes.go new file mode 100644 index 000000000..bd48f0575 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/AttachedVolumes.go @@ -0,0 +1,11 @@ +package model + + + +type AttachedVolumes struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Volume `json:"items,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/BalancedNics.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/BalancedNics.go new file mode 100644 index 000000000..d8b08f476 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/BalancedNics.go @@ -0,0 +1,11 @@ +package model + + + +type BalancedNics struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Nic `json:"items,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Cdroms.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Cdroms.go new file mode 100644 index 000000000..afe2715a3 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Cdroms.go @@ -0,0 +1,11 @@ +package model + + + +type Cdroms struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Image `json:"items,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Datacenter.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Datacenter.go new file mode 100644 index 000000000..e43c07de5 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Datacenter.go @@ -0,0 +1,14 @@ +package model + +import "net/http" + +type Datacenter struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Properties DatacenterProperties `json:"properties,omitempty"` + Entities DatacenterEntities `json:"entities,omitempty"` + Response string `json:"Response,omitempty"` + Headers *http.Header `json:"headers,omitempty"` + StatusCode int `json:"headers,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterElementMetadata.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterElementMetadata.go new file mode 100644 index 000000000..a45261492 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterElementMetadata.go @@ -0,0 +1,15 @@ +package model + +import ( + "time" +) + +type DatacenterElementMetadata struct { + CreatedDate time.Time `json:"createdDate,omitempty"` + CreatedBy string `json:"createdBy,omitempty"` + Etag string `json:"etag,omitempty"` + LastModifiedDate time.Time `json:"lastModifiedDate,omitempty"` + LastModifiedBy string `json:"lastModifiedBy,omitempty"` + State string `json:"state,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterEntities.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterEntities.go new file mode 100644 index 000000000..b5bc3e092 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterEntities.go @@ -0,0 +1,11 @@ +package model + + + +type DatacenterEntities struct { + Servers *Servers `json:"servers,omitempty"` + Volumes *Volumes `json:"volumes,omitempty"` + Loadbalancers *Loadbalancers `json:"loadbalancers,omitempty"` + Lans *Lans `json:"lans,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterProperties.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterProperties.go new file mode 100644 index 000000000..6f61a9d85 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/DatacenterProperties.go @@ -0,0 +1,11 @@ +package model + + + +type DatacenterProperties struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Location string `json:"location,omitempty"` + Version int32 `json:"version,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Datacenters.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Datacenters.go new file mode 100644 index 000000000..5e17b817a --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Datacenters.go @@ -0,0 +1,11 @@ +package model + + + +type Datacenters struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Datacenter `json:"items,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallRule.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallRule.go new file mode 100644 index 000000000..6442d32f3 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallRule.go @@ -0,0 +1,12 @@ +package model + + + +type FirewallRule struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Metadata DatacenterElementMetadata `json:"metadata,omitempty"` + Properties FirewallruleProperties `json:"properties,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallRules.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallRules.go new file mode 100644 index 000000000..a52737d28 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallRules.go @@ -0,0 +1,11 @@ +package model + + + +type FirewallRules struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []FirewallRule `json:"items,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallruleProperties.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallruleProperties.go new file mode 100644 index 000000000..a559cc388 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/FirewallruleProperties.go @@ -0,0 +1,16 @@ +package model + + + +type FirewallruleProperties struct { + Name string `json:"name,omitempty"` + Protocol string `json:"protocol,omitempty"` + SourceMac string `json:"sourceMac,omitempty"` + SourceIp string `json:"sourceIp,omitempty"` + TargetIp string `json:"targetIp,omitempty"` + IcmpCode int32 `json:"icmpCode,omitempty"` + IcmpType int32 `json:"icmpType,omitempty"` + PortRangeStart int32 `json:"portRangeStart,omitempty"` + PortRangeEnd int32 `json:"portRangeEnd,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Image.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Image.go new file mode 100644 index 000000000..3a98b1a69 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Image.go @@ -0,0 +1,12 @@ +package model + + + +type Image struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Metadata DatacenterElementMetadata `json:"metadata,omitempty"` + Properties ImageProperties `json:"properties,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ImageProperties.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ImageProperties.go new file mode 100644 index 000000000..a632df6be --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ImageProperties.go @@ -0,0 +1,24 @@ +package model + + + +type ImageProperties struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Location string `json:"location,omitempty"` + Size int `json:"size,omitempty"` + CpuHotPlug bool `json:"cpuHotPlug,omitempty"` + CpuHotUnplug bool `json:"cpuHotUnplug,omitempty"` + RamHotPlug bool `json:"ramHotPlug,omitempty"` + RamHotUnplug bool `json:"ramHotUnplug,omitempty"` + NicHotPlug bool `json:"nicHotPlug,omitempty"` + NicHotUnplug bool `json:"nicHotUnplug,omitempty"` + DiscVirtioHotPlug bool `json:"discVirtioHotPlug,omitempty"` + DiscVirtioHotUnplug bool `json:"discVirtioHotUnplug,omitempty"` + DiscScsiHotPlug bool `json:"discScsiHotPlug,omitempty"` + DiscScsiHotUnplug bool `json:"discScsiHotUnplug,omitempty"` + LicenceType string `json:"licenceType,omitempty"` + ImageType string `json:"imageType,omitempty"` + Public bool `json:"public,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Images.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Images.go new file mode 100644 index 000000000..ff933aec6 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Images.go @@ -0,0 +1,11 @@ +package model + + + +type Images struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Image `json:"items,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Lan.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Lan.go new file mode 100644 index 000000000..e8bd6834c --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Lan.go @@ -0,0 +1,13 @@ +package model + + + +type Lan struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Metadata DatacenterElementMetadata `json:"metadata,omitempty"` + Properties LanProperties `json:"properties,omitempty"` + Entities LanEntities `json:"entities,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanEntities.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanEntities.go new file mode 100644 index 000000000..fa57ff6e0 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanEntities.go @@ -0,0 +1,8 @@ +package model + + + +type LanEntities struct { + Nics *LanNics `json:"nics,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanNics.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanNics.go new file mode 100644 index 000000000..8ff9805a4 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanNics.go @@ -0,0 +1,11 @@ +package model + + + +type LanNics struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Nic `json:"items,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanProperties.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanProperties.go new file mode 100644 index 000000000..aa3ad3e08 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LanProperties.go @@ -0,0 +1,9 @@ +package model + + + +type LanProperties struct { + Name string `json:"name,omitempty"` + Public bool `json:"public,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Lans.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Lans.go new file mode 100644 index 000000000..d76f4cb4a --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Lans.go @@ -0,0 +1,11 @@ +package model + + + +type Lans struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Lan `json:"items,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Loadbalancer.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Loadbalancer.go new file mode 100644 index 000000000..f7d277439 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Loadbalancer.go @@ -0,0 +1,13 @@ +package model + + + +type Loadbalancer struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Metadata DatacenterElementMetadata `json:"metadata,omitempty"` + Properties LoadbalancerProperties `json:"properties,omitempty"` + Entities LoadbalancerEntities `json:"entities,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LoadbalancerEntities.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LoadbalancerEntities.go new file mode 100644 index 000000000..206b26e0e --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LoadbalancerEntities.go @@ -0,0 +1,8 @@ +package model + + + +type LoadbalancerEntities struct { + Balancednics *BalancedNics `json:"balancednics,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LoadbalancerProperties.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LoadbalancerProperties.go new file mode 100644 index 000000000..0d3bc46e7 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/LoadbalancerProperties.go @@ -0,0 +1,10 @@ +package model + + + +type LoadbalancerProperties struct { + Name string `json:"name,omitempty"` + Ip string `json:"ip,omitempty"` + Dhcp bool `json:"dhcp,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Loadbalancers.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Loadbalancers.go new file mode 100644 index 000000000..bddd7bd12 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Loadbalancers.go @@ -0,0 +1,11 @@ +package model + + + +type Loadbalancers struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Loadbalancer `json:"items,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Nic.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Nic.go new file mode 100644 index 000000000..784aeddce --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Nic.go @@ -0,0 +1,10 @@ +package model + +type Nic struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + // Metadata DatacenterElementMetadata `json:"metadata,omitempty"` + Properties NicProperties `json:"properties,omitempty"` + Entities *NicEntities `json:"entities,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/NicEntities.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/NicEntities.go new file mode 100644 index 000000000..fa9a4d4b2 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/NicEntities.go @@ -0,0 +1,5 @@ +package model + +type NicEntities struct { + Firewallrules *FirewallRules `json:"firewallrules,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/NicProperties.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/NicProperties.go new file mode 100644 index 000000000..5235e6c78 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/NicProperties.go @@ -0,0 +1,13 @@ +package model + + + +type NicProperties struct { + Name string `json:"name,omitempty"` + Mac string `json:"mac,omitempty"` + Ips []string `json:"ips,omitempty"` + Dhcp bool `json:"dhcp,omitempty"` + Lan string `json:"lan,omitempty"` + FirewallActive bool `json:"firewallActive,omitempty"` + +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Nics.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Nics.go new file mode 100644 index 000000000..0988304b7 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Nics.go @@ -0,0 +1,8 @@ +package model + +type Nics struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Nic `json:"items,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Properties.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Properties.go new file mode 100644 index 000000000..1aa485cc6 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Properties.go @@ -0,0 +1,5 @@ +package model + +type Properties struct { + Name string `json:"name,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ResourceReference.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ResourceReference.go new file mode 100644 index 000000000..52cc50d53 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ResourceReference.go @@ -0,0 +1,7 @@ +package model + +type ResourceReference struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Server.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Server.go new file mode 100644 index 000000000..6fe9ce436 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Server.go @@ -0,0 +1,10 @@ +package model + +type Server struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + //Metadata DatacenterElementMetadata `json:"metadata,omitempty"` + Properties ServerProperties `json:"properties,omitempty"` + Entities ServerEntities `json:"entities,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ServerEntities.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ServerEntities.go new file mode 100644 index 000000000..ddb7eb811 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ServerEntities.go @@ -0,0 +1,7 @@ +package model + +type ServerEntities struct { + Cdroms *Cdroms `json:"cdroms,omitempty"` + Volumes *AttachedVolumes `json:"volumes,omitempty"` + Nics *Nics `json:"nics,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ServerProperties.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ServerProperties.go new file mode 100644 index 000000000..0a0bf16f8 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/ServerProperties.go @@ -0,0 +1,9 @@ +package model + +type ServerProperties struct { + Name string `json:"name,omitempty"` + Cores int `json:"cores,omitempty"` + Ram int `json:"ram,omitempty"` + AvailabilityZone string `json:"availabilityZone,omitempty"` + VmState string `json:"vmState,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Servers.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Servers.go new file mode 100644 index 000000000..779ef8d4b --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Servers.go @@ -0,0 +1,8 @@ +package model + +type Servers struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Server `json:"items,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Volume.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Volume.go new file mode 100644 index 000000000..2ad7c52cf --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Volume.go @@ -0,0 +1,8 @@ +package model + +type Volume struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Properties VolumeProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/VolumeProperties.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/VolumeProperties.go new file mode 100644 index 000000000..a25d614f8 --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/VolumeProperties.go @@ -0,0 +1,23 @@ +package model + +type VolumeProperties struct { + Name string `json:"name,omitempty"` + Type_ string `json:"type,omitempty"` + Size int `json:"size,omitempty"` + Image string `json:"image,omitempty"` + ImagePassword string `json:"imagePassword,omitempty"` + SshKeys []string `json:"sshKeys,omitempty"` + Bus string `json:"bus,omitempty"` + LicenceType string `json:"licenceType,omitempty"` + CpuHotPlug bool `json:"cpuHotPlug,omitempty"` + CpuHotUnplug bool `json:"cpuHotUnplug,omitempty"` + RamHotPlug bool `json:"ramHotPlug,omitempty"` + RamHotUnplug bool `json:"ramHotUnplug,omitempty"` + NicHotPlug bool `json:"nicHotPlug,omitempty"` + NicHotUnplug bool `json:"nicHotUnplug,omitempty"` + DiscVirtioHotPlug bool `json:"discVirtioHotPlug,omitempty"` + DiscVirtioHotUnplug bool `json:"discVirtioHotUnplug,omitempty"` + DiscScsiHotPlug bool `json:"discScsiHotPlug,omitempty"` + DiscScsiHotUnplug bool `json:"discScsiHotUnplug,omitempty"` + DeviceNumber int64 `json:"deviceNumber,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Volumes.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Volumes.go new file mode 100644 index 000000000..a83faf2ca --- /dev/null +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/model/Volumes.go @@ -0,0 +1,8 @@ +package model + +type Volumes struct { + Id string `json:"id,omitempty"` + Type_ string `json:"type,omitempty"` + Href string `json:"href,omitempty"` + Items []Volume `json:"items,omitempty"` +} diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go index d1414f7df..8a91511a1 100644 --- a/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "net/http" "strings" + "github.com/profitbricks/profitbricks-sdk-go/model" ) //FullHeader is the standard header to include with all http requests except is_patch and is_command @@ -110,6 +111,13 @@ func is_post(path string, jason []byte) Instance { return toInstance(do(req)) } +func is_composite_post(path string, jason []byte) model.Datacenter { + url := mk_url(path)+ `?depth=` + Depth + req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jason)) + req.Header.Add("Content-Type", FullHeader) + return toDataCenter(do(req)) +} + // is_command performs an http.NewRequest POST and returns a Resp struct func is_command(path string, jason string) Resp { url := mk_url(path) diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go index f3feb4463..c73d1c618 100644 --- a/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go @@ -1,5 +1,5 @@ package profitbricks -func GetRequestStatus(path string) Instance { +func GetRequestStatus(path string)Instance{ return is_get(path) } diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go index 4685d7ad3..d35f57a8c 100644 --- a/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go @@ -2,7 +2,10 @@ package profitbricks import "net/http" import "fmt" -import "encoding/json" +import ( + "encoding/json" + "github.com/profitbricks/profitbricks-sdk-go/model" +) func MkJson(i interface{}) string { jason, err := json.MarshalIndent(&i, "", " ") @@ -52,6 +55,15 @@ func toInstance(resp Resp) Instance { return ins } +func toDataCenter(resp Resp) model.Datacenter { + var dc model.Datacenter + json.Unmarshal(resp.Body, &dc) + dc.Response = string(resp.Body) + dc.Headers = &resp.Headers + dc.StatusCode = resp.StatusCode + return dc +} + type Instance struct { Id_Type_Href MetaData StringMap `json:"metaData,omitempty"` diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go index 73713ba04..fe3d6529e 100644 --- a/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go +++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go @@ -49,12 +49,12 @@ func CreateSnapshot(dcid string, volid string, name string) Resp { var path = volume_path(dcid, volid) path = path + "/create-snapshot" - return is_command(path, "name="+name) + return is_command(path, "name=" + name) } func RestoreSnapshot(dcid string, volid string, snapshotId string) Resp { var path = volume_path(dcid, volid) path = path + "/restore-snapshot" - return is_command(path, "snapshotId="+snapshotId) + return is_command(path, "snapshotId=" + snapshotId) }