jcapik pushed to kubernetes (f20). "update to latest upstream after "break day" (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed Jun 10 14:32:32 UTC 2015
From 81df690e967cd152547192c135ed447d30b1c695 Mon Sep 17 00:00:00 2001
From: Eric Paris <eparis at redhat.com>
Date: Fri, 17 Oct 2014 10:58:22 -0400
Subject: update to latest upstream after "break day"
upstream commit b01126322b826a15db06f6eeefeeb56dc06db7af
kubecfg is dead.
kubectl is the new thing.
config files and systemd units totally new
enjoy your breakage
diff --git a/.gitignore b/.gitignore
index 454669b..76e5687 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/kubernetes-98ac8e1.tar.gz
/kubernetes-4452163.tar.gz
+/kubernetes-b011263.tar.gz
diff --git a/0001-remove-all-third-party-software.patch b/0001-remove-all-third-party-software.patch
index 406f2a7..1d171c3 100644
--- a/0001-remove-all-third-party-software.patch
+++ b/0001-remove-all-third-party-software.patch
@@ -1,10 +1,10 @@
-From 3387feda17f970d000de1ac704691e98d380f741 Mon Sep 17 00:00:00 2001
+From ff009f49347fbcc033d2a7a51b62c7992bc893c3 Mon Sep 17 00:00:00 2001
From: Eric Paris <eparis at redhat.com>
Date: Thu, 21 Aug 2014 13:55:27 -0400
Subject: [PATCH] remove all third party software
---
- Godeps/Godeps.json | 117 -
+ Godeps/Godeps.json | 148 -
Godeps/Readme | 5 -
Godeps/_workspace/.gitignore | 2 -
.../_workspace/src/code.google.com/p/gcfg/LICENSE | 57 -
@@ -189,23 +189,25 @@ Subject: [PATCH] remove all third party software
.../elazarl/go-bindata-assetfs/assetfs.go | 141 -
.../github.com/elazarl/go-bindata-assetfs/doc.go | 13 -
.../github.com/fsouza/go-dockerclient/.travis.yml | 13 -
- .../src/github.com/fsouza/go-dockerclient/AUTHORS | 41 -
+ .../src/github.com/fsouza/go-dockerclient/AUTHORS | 44 -
.../fsouza/go-dockerclient/DOCKER-LICENSE | 6 -
.../src/github.com/fsouza/go-dockerclient/LICENSE | 22 -
- .../fsouza/go-dockerclient/README.markdown | 43 -
+ .../fsouza/go-dockerclient/README.markdown | 42 -
.../github.com/fsouza/go-dockerclient/change.go | 36 -
.../fsouza/go-dockerclient/change_test.go | 26 -
- .../github.com/fsouza/go-dockerclient/client.go | 536 -
+ .../github.com/fsouza/go-dockerclient/client.go | 546 -
.../fsouza/go-dockerclient/client_test.go | 290 -
- .../github.com/fsouza/go-dockerclient/container.go | 693 -
- .../fsouza/go-dockerclient/container_test.go | 1416 --
+ .../github.com/fsouza/go-dockerclient/container.go | 731 -
+ .../fsouza/go-dockerclient/container_test.go | 1495 --
.../src/github.com/fsouza/go-dockerclient/env.go | 168 -
.../github.com/fsouza/go-dockerclient/env_test.go | 349 -
.../src/github.com/fsouza/go-dockerclient/event.go | 278 -
.../fsouza/go-dockerclient/event_test.go | 93 -
.../fsouza/go-dockerclient/example_test.go | 168 -
- .../src/github.com/fsouza/go-dockerclient/image.go | 351 -
- .../fsouza/go-dockerclient/image_test.go | 712 -
+ .../src/github.com/fsouza/go-dockerclient/exec.go | 126 -
+ .../github.com/fsouza/go-dockerclient/exec_test.go | 128 -
+ .../src/github.com/fsouza/go-dockerclient/image.go | 417 -
+ .../fsouza/go-dockerclient/image_test.go | 861 --
.../src/github.com/fsouza/go-dockerclient/misc.go | 59 -
.../github.com/fsouza/go-dockerclient/misc_test.go | 159 -
.../github.com/fsouza/go-dockerclient/signal.go | 49 -
@@ -214,8 +216,8 @@ Subject: [PATCH] remove all third party software
.../fsouza/go-dockerclient/testing/data/Dockerfile | 15 -
.../go-dockerclient/testing/data/container.tar | Bin 2048 -> 0 bytes
.../go-dockerclient/testing/data/dockerfile.tar | Bin 2560 -> 0 bytes
- .../fsouza/go-dockerclient/testing/server.go | 668 -
- .../fsouza/go-dockerclient/testing/server_test.go | 965 --
+ .../fsouza/go-dockerclient/testing/server.go | 692 -
+ .../fsouza/go-dockerclient/testing/server_test.go | 1017 --
.../fsouza/go-dockerclient/testing/writer.go | 43 -
.../_workspace/src/github.com/golang/glog/LICENSE | 191 -
.../_workspace/src/github.com/golang/glog/README | 44 -
@@ -238,6 +240,18 @@ Subject: [PATCH] remove all third party software
.../src/github.com/google/gofuzz/example_test.go | 225 -
.../src/github.com/google/gofuzz/fuzz.go | 366 -
.../src/github.com/google/gofuzz/fuzz_test.go | 258 -
+ Godeps/_workspace/src/github.com/kr/text/License | 19 -
+ Godeps/_workspace/src/github.com/kr/text/Readme | 3 -
+ .../src/github.com/kr/text/colwriter/Readme | 5 -
+ .../src/github.com/kr/text/colwriter/column.go | 147 -
+ .../github.com/kr/text/colwriter/column_test.go | 90 -
+ Godeps/_workspace/src/github.com/kr/text/doc.go | 3 -
+ Godeps/_workspace/src/github.com/kr/text/indent.go | 74 -
+ .../src/github.com/kr/text/indent_test.go | 119 -
+ Godeps/_workspace/src/github.com/kr/text/mc/Readme | 9 -
+ Godeps/_workspace/src/github.com/kr/text/mc/mc.go | 62 -
+ Godeps/_workspace/src/github.com/kr/text/wrap.go | 86 -
+ .../_workspace/src/github.com/kr/text/wrap_test.go | 44 -
.../src/github.com/mitchellh/goamz/aws/attempt.go | 74 -
.../github.com/mitchellh/goamz/aws/attempt_test.go | 57 -
.../src/github.com/mitchellh/goamz/aws/aws.go | 423 -
@@ -254,12 +268,108 @@ Subject: [PATCH] remove all third party software
.../mitchellh/goamz/ec2/responses_test.go | 854 --
.../src/github.com/mitchellh/goamz/ec2/sign.go | 45 -
.../github.com/mitchellh/goamz/ec2/sign_test.go | 68 -
+ .../src/github.com/mitchellh/mapstructure/LICENSE | 21 -
+ .../github.com/mitchellh/mapstructure/README.md | 46 -
+ .../mitchellh/mapstructure/decode_hooks.go | 84 -
+ .../mitchellh/mapstructure/decode_hooks_test.go | 191 -
+ .../src/github.com/mitchellh/mapstructure/error.go | 32 -
+ .../mitchellh/mapstructure/mapstructure.go | 704 -
+ .../mapstructure/mapstructure_benchmark_test.go | 243 -
+ .../mapstructure/mapstructure_bugs_test.go | 47 -
+ .../mapstructure/mapstructure_examples_test.go | 169 -
+ .../mitchellh/mapstructure/mapstructure_test.go | 828 -
+ .../src/github.com/racker/perigee/.gitignore | 2 -
+ .../src/github.com/racker/perigee/LICENSE | 202 -
+ .../src/github.com/racker/perigee/README.md | 120 -
+ .../src/github.com/racker/perigee/api.go | 269 -
+ .../src/github.com/racker/perigee/api_test.go | 226 -
+ .../github.com/rackspace/gophercloud/.editorconfig | 16 -
+ .../github.com/rackspace/gophercloud/.travis.yml | 14 -
+ .../rackspace/gophercloud/CONTRIBUTORS.md | 6 -
+ .../src/github.com/rackspace/gophercloud/LICENSE | 191 -
+ .../rackspace/gophercloud/README.asciidoc | 44 -
+ .../gophercloud/acceptance/00-authentication.go | 30 -
+ .../gophercloud/acceptance/01-authentication.go | 22 -
+ .../gophercloud/acceptance/02-list-servers.go | 62 -
+ .../acceptance/03-get-server-details.go | 134 -
+ .../gophercloud/acceptance/04-create-server.go | 47 -
+ .../gophercloud/acceptance/05-list-images.go | 32 -
+ .../gophercloud/acceptance/06-list-flavors.go | 32 -
+ .../acceptance/07-change-admin-password.go | 49 -
+ .../gophercloud/acceptance/08-reauthentication.go | 50 -
+ .../gophercloud/acceptance/09-resize-server.go | 102 -
+ .../gophercloud/acceptance/10-reboot-server.go | 45 -
+ .../acceptance/11-rescue-unrescue-server.go | 52 -
+ .../gophercloud/acceptance/12-update-server.go | 46 -
+ .../gophercloud/acceptance/13-rebuild-server.go | 46 -
+ .../gophercloud/acceptance/14-list-addresses.go | 66 -
+ .../gophercloud/acceptance/15-list-keypairs.go | 32 -
+ .../acceptance/16-create-delete-keypair.go | 45 -
+ .../acceptance/17-create-delete-image.go | 52 -
+ .../acceptance/18-osutil-authentication.go | 19 -
+ .../acceptance/19-list-addresses-0.1.go | 58 -
+ .../gophercloud/acceptance/99-delete-server.go | 48 -
+ .../rackspace/gophercloud/acceptance/libargs.go | 239 -
+ .../github.com/rackspace/gophercloud/api_fetch.go | 49 -
+ .../rackspace/gophercloud/authenticate.go | 257 -
+ .../rackspace/gophercloud/authenticate_test.go | 264 -
+ .../rackspace/gophercloud/common_types.go | 24 -
+ .../github.com/rackspace/gophercloud/context.go | 150 -
+ .../rackspace/gophercloud/context_test.go | 28 -
+ .../src/github.com/rackspace/gophercloud/errors.go | 39 -
+ .../github.com/rackspace/gophercloud/flavors.go | 55 -
+ .../rackspace/gophercloud/floating_ips.go | 88 -
+ .../rackspace/gophercloud/global_context.go | 67 -
+ .../src/github.com/rackspace/gophercloud/images.go | 106 -
+ .../github.com/rackspace/gophercloud/interfaces.go | 247 -
+ .../github.com/rackspace/gophercloud/keypairs.go | 98 -
+ .../rackspace/gophercloud/osutil/auth.go | 64 -
+ .../rackspace/gophercloud/osutil/region.go | 9 -
+ .../github.com/rackspace/gophercloud/package.go | 7 -
+ .../src/github.com/rackspace/gophercloud/reauth.go | 36 -
+ .../rackspace/gophercloud/reauth_test.go | 133 -
+ .../gophercloud/scripts/create-environment.sh | 26 -
+ .../rackspace/gophercloud/scripts/test-all.sh | 37 -
+ .../github.com/rackspace/gophercloud/servers.go | 807 -
+ .../rackspace/gophercloud/servers_test.go | 54 -
+ .../rackspace/gophercloud/service_catalog.go | 75 -
+ .../rackspace/gophercloud/service_catalog_test.go | 190 -
+ .../rackspace/gophercloud/transport_double_test.go | 103 -
.../src/github.com/skratchdot/LICENSE-MIT | 22 -
.../github.com/skratchdot/open-golang/open/exec.go | 15 -
.../skratchdot/open-golang/open/exec_darwin.go | 15 -
.../skratchdot/open-golang/open/exec_windows.go | 21 -
.../github.com/skratchdot/open-golang/open/open.go | 50 -
.../skratchdot/open-golang/open/open_test.go | 70 -
+ .../src/github.com/spf13/cobra/.gitignore | 24 -
+ .../src/github.com/spf13/cobra/.travis.yml | 6 -
+ .../src/github.com/spf13/cobra/LICENSE.txt | 174 -
+ .../src/github.com/spf13/cobra/README.md | 397 -
+ .../_workspace/src/github.com/spf13/cobra/cobra.go | 98 -
+ .../src/github.com/spf13/cobra/cobra_test.go | 507 -
+ .../src/github.com/spf13/cobra/command.go | 764 -
+ .../_workspace/src/github.com/spf13/pflag/LICENSE | 28 -
+ .../src/github.com/spf13/pflag/README.md | 155 -
+ .../_workspace/src/github.com/spf13/pflag/bool.go | 74 -
+ .../src/github.com/spf13/pflag/duration.go | 71 -
+ .../src/github.com/spf13/pflag/example_test.go | 73 -
+ .../src/github.com/spf13/pflag/export_test.go | 29 -
+ .../_workspace/src/github.com/spf13/pflag/flag.go | 621 -
+ .../src/github.com/spf13/pflag/flag_test.go | 354 -
+ .../src/github.com/spf13/pflag/float32.go | 74 -
+ .../src/github.com/spf13/pflag/float64.go | 74 -
+ .../_workspace/src/github.com/spf13/pflag/int.go | 74 -
+ .../_workspace/src/github.com/spf13/pflag/int32.go | 74 -
+ .../_workspace/src/github.com/spf13/pflag/int64.go | 74 -
+ .../_workspace/src/github.com/spf13/pflag/int8.go | 74 -
+ Godeps/_workspace/src/github.com/spf13/pflag/ip.go | 79 -
+ .../src/github.com/spf13/pflag/ipmask.go | 89 -
+ .../src/github.com/spf13/pflag/string.go | 69 -
+ .../_workspace/src/github.com/spf13/pflag/uint.go | 74 -
+ .../src/github.com/spf13/pflag/uint16.go | 76 -
+ .../src/github.com/spf13/pflag/uint32.go | 75 -
+ .../src/github.com/spf13/pflag/uint64.go | 74 -
+ .../_workspace/src/github.com/spf13/pflag/uint8.go | 74 -
.../src/github.com/stretchr/objx/.gitignore | 22 -
.../src/github.com/stretchr/objx/README.md | 3 -
.../src/github.com/stretchr/objx/accessors.go | 179 -
@@ -294,6 +404,23 @@ Subject: [PATCH] remove all third party software
.../src/github.com/stretchr/testify/mock/doc.go | 43 -
.../src/github.com/stretchr/testify/mock/mock.go | 505 -
.../github.com/stretchr/testify/mock/mock_test.go | 657 -
+ .../github.com/tonnerre/golang-pretty/.gitignore | 4 -
+ .../src/github.com/tonnerre/golang-pretty/License | 19 -
+ .../src/github.com/tonnerre/golang-pretty/Readme | 9 -
+ .../tonnerre/golang-pretty/debian/changelog | 5 -
+ .../tonnerre/golang-pretty/debian/compat | 1 -
+ .../tonnerre/golang-pretty/debian/control | 22 -
+ .../tonnerre/golang-pretty/debian/copyright | 30 -
+ .../github.com/tonnerre/golang-pretty/debian/docs | 1 -
+ .../github.com/tonnerre/golang-pretty/debian/rules | 11 -
+ .../tonnerre/golang-pretty/debian/source/format | 1 -
+ .../src/github.com/tonnerre/golang-pretty/diff.go | 148 -
+ .../github.com/tonnerre/golang-pretty/diff_test.go | 73 -
+ .../tonnerre/golang-pretty/example_test.go | 20 -
+ .../github.com/tonnerre/golang-pretty/formatter.go | 300 -
+ .../tonnerre/golang-pretty/formatter_test.go | 146 -
+ .../github.com/tonnerre/golang-pretty/pretty.go | 98 -
+ .../src/github.com/tonnerre/golang-pretty/zero.go | 41 -
.../src/github.com/vaughan0/go-ini/LICENSE | 14 -
.../src/github.com/vaughan0/go-ini/README.md | 70 -
.../src/github.com/vaughan0/go-ini/ini.go | 123 -
@@ -319,7 +446,7 @@ Subject: [PATCH] remove all third party software
Godeps/_workspace/src/gopkg.in/v1/yaml/yaml.go | 306 -
Godeps/_workspace/src/gopkg.in/v1/yaml/yamlh.go | 712 -
.../src/gopkg.in/v1/yaml/yamlprivateh.go | 173 -
- 315 files changed, 107329 deletions(-)
+ 442 files changed, 121829 deletions(-)
delete mode 100644 Godeps/Godeps.json
delete mode 100644 Godeps/Readme
delete mode 100644 Godeps/_workspace/.gitignore
@@ -520,6 +647,8 @@ Subject: [PATCH] remove all third party software
delete mode 100644 Godeps/_workspace/src/github.com/fsouza/go-dockerclient/event.go
delete mode 100644 Godeps/_workspace/src/github.com/fsouza/go-dockerclient/event_test.go
delete mode 100644 Godeps/_workspace/src/github.com/fsouza/go-dockerclient/example_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/fsouza/go-dockerclient/exec.go
+ delete mode 100644 Godeps/_workspace/src/github.com/fsouza/go-dockerclient/exec_test.go
delete mode 100644 Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image.go
delete mode 100644 Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image_test.go
delete mode 100644 Godeps/_workspace/src/github.com/fsouza/go-dockerclient/misc.go
@@ -554,6 +683,18 @@ Subject: [PATCH] remove all third party software
delete mode 100644 Godeps/_workspace/src/github.com/google/gofuzz/example_test.go
delete mode 100644 Godeps/_workspace/src/github.com/google/gofuzz/fuzz.go
delete mode 100644 Godeps/_workspace/src/github.com/google/gofuzz/fuzz_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/License
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/Readme
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/colwriter/Readme
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/colwriter/column.go
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/colwriter/column_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/doc.go
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/indent.go
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/indent_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/mc/Readme
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/mc/mc.go
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/wrap.go
+ delete mode 100644 Godeps/_workspace/src/github.com/kr/text/wrap_test.go
delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/goamz/aws/attempt.go
delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/goamz/aws/attempt_test.go
delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/goamz/aws/aws.go
@@ -570,12 +711,108 @@ Subject: [PATCH] remove all third party software
delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/goamz/ec2/responses_test.go
delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/goamz/ec2/sign.go
delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/goamz/ec2/sign_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE
+ delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/mapstructure/README.md
+ delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/mapstructure/decode_hooks.go
+ delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/mapstructure/decode_hooks_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/mapstructure/error.go
+ delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure.go
+ delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_examples_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/racker/perigee/.gitignore
+ delete mode 100644 Godeps/_workspace/src/github.com/racker/perigee/LICENSE
+ delete mode 100644 Godeps/_workspace/src/github.com/racker/perigee/README.md
+ delete mode 100644 Godeps/_workspace/src/github.com/racker/perigee/api.go
+ delete mode 100644 Godeps/_workspace/src/github.com/racker/perigee/api_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/.editorconfig
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/.travis.yml
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/CONTRIBUTORS.md
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/README.asciidoc
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/00-authentication.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/01-authentication.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/02-list-servers.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/03-get-server-details.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/04-create-server.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/05-list-images.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/06-list-flavors.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/07-change-admin-password.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/08-reauthentication.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/09-resize-server.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/10-reboot-server.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/11-rescue-unrescue-server.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/12-update-server.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/13-rebuild-server.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/14-list-addresses.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/15-list-keypairs.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/16-create-delete-keypair.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/17-create-delete-image.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/18-osutil-authentication.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/19-list-addresses-0.1.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/99-delete-server.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/libargs.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/api_fetch.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/authenticate.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/authenticate_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/common_types.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/context.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/context_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/errors.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/flavors.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/floating_ips.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/global_context.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/images.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/interfaces.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/keypairs.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/osutil/auth.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/osutil/region.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/package.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/reauth.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/reauth_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/scripts/create-environment.sh
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/scripts/test-all.sh
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/servers.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/servers_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/service_catalog.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/service_catalog_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/rackspace/gophercloud/transport_double_test.go
delete mode 100644 Godeps/_workspace/src/github.com/skratchdot/LICENSE-MIT
delete mode 100644 Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec.go
delete mode 100644 Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_darwin.go
delete mode 100644 Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_windows.go
delete mode 100644 Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open.go
delete mode 100644 Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/.gitignore
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/.travis.yml
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/README.md
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/cobra.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/cobra_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/command.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/LICENSE
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/README.md
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/bool.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/duration.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/example_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/export_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/flag.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/flag_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/float32.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/float64.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/int.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/int32.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/int64.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/int8.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/ip.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/ipmask.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/string.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/uint.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/uint16.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/uint32.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/uint64.go
+ delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/uint8.go
delete mode 100644 Godeps/_workspace/src/github.com/stretchr/objx/.gitignore
delete mode 100644 Godeps/_workspace/src/github.com/stretchr/objx/README.md
delete mode 100644 Godeps/_workspace/src/github.com/stretchr/objx/accessors.go
@@ -610,6 +847,23 @@ Subject: [PATCH] remove all third party software
delete mode 100644 Godeps/_workspace/src/github.com/stretchr/testify/mock/doc.go
delete mode 100644 Godeps/_workspace/src/github.com/stretchr/testify/mock/mock.go
delete mode 100644 Godeps/_workspace/src/github.com/stretchr/testify/mock/mock_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/.gitignore
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/License
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/Readme
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/changelog
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/compat
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/control
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/copyright
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/docs
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/rules
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/source/format
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/diff.go
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/diff_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/example_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/formatter.go
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/formatter_test.go
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/pretty.go
+ delete mode 100644 Godeps/_workspace/src/github.com/tonnerre/golang-pretty/zero.go
delete mode 100644 Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE
delete mode 100644 Godeps/_workspace/src/github.com/vaughan0/go-ini/README.md
delete mode 100644 Godeps/_workspace/src/github.com/vaughan0/go-ini/ini.go
@@ -638,13 +892,13 @@ Subject: [PATCH] remove all third party software
diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json
deleted file mode 100644
-index 71926f6..0000000
+index 90f4324..0000000
--- a/Godeps/Godeps.json
+++ /dev/null
-@@ -1,117 +0,0 @@
+@@ -1,148 +0,0 @@
-{
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes",
-- "GoVersion": "go1.3",
+- "GoVersion": "go1.3.1",
- "Packages": [
- "./..."
- ],
@@ -704,8 +958,8 @@ index 71926f6..0000000
- },
- {
- "ImportPath": "github.com/fsouza/go-dockerclient",
-- "Comment": "0.2.1-241-g0dbb508",
-- "Rev": "0dbb508e94dd899a6743d035d8f249c7634d26da"
+- "Comment": "0.2.1-267-g15d2c6e",
+- "Rev": "15d2c6e3eb670c545d0af0604d7f9aff3871af04"
- },
- {
- "ImportPath": "github.com/golang/glog",
@@ -726,6 +980,10 @@ index 71926f6..0000000
- "Rev": "aef70dacbc78771e35beb261bb3a72986adf7906"
- },
- {
+- "ImportPath": "github.com/kr/text",
+- "Rev": "6807e777504f54ad073ecef66747de158294b639"
+- },
+- {
- "ImportPath": "github.com/mitchellh/goamz/aws",
- "Rev": "9cad7da945e699385c1a3e115aa255211921c9bb"
- },
@@ -734,10 +992,32 @@ index 71926f6..0000000
- "Rev": "9cad7da945e699385c1a3e115aa255211921c9bb"
- },
- {
+- "ImportPath": "github.com/mitchellh/mapstructure",
+- "Rev": "740c764bc6149d3f1806231418adb9f52c11bcbf"
+- },
+- {
+- "ImportPath": "github.com/racker/perigee",
+- "Comment": "v0.0.0-18-g0c00cb0",
+- "Rev": "0c00cb0a026b71034ebc8205263c77dad3577db5"
+- },
+- {
+- "ImportPath": "github.com/rackspace/gophercloud",
+- "Comment": "v0.1.0-31-ge13cda2",
+- "Rev": "e13cda260ce48d63ce816f4fa72b6c6cd096596d"
+- },
+- {
- "ImportPath": "github.com/skratchdot/open-golang/open",
- "Rev": "ba570a111973b539baf23c918213059543b5bb6e"
- },
- {
+- "ImportPath": "github.com/spf13/cobra",
+- "Rev": "b1e90a7943957b51bb96a13b44b844475bcf95c0"
+- },
+- {
+- "ImportPath": "github.com/spf13/pflag",
+- "Rev": "463bdc838f2b35e9307e91d480878bda5fff7232"
+- },
+- {
- "ImportPath": "github.com/stretchr/objx",
- "Rev": "d40df0cc104c06eae2dfe03d7dddb83802d52f9a"
- },
@@ -750,6 +1030,11 @@ index 71926f6..0000000
- "Rev": "37614ac27794505bf7867ca93aac883cadb6a5f7"
- },
- {
+- "ImportPath": "github.com/tonnerre/golang-pretty",
+- "Comment": "debian/0.0_git20130613-1-1-ge7fccc0",
+- "Rev": "e7fccc03e91bad289b96c21aa3312a220689bdd7"
+- },
+- {
- "ImportPath": "github.com/vaughan0/go-ini",
- "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
- },
@@ -69573,14 +69858,14 @@ index a664249..0000000
-package assetfs
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/.travis.yml b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/.travis.yml
deleted file mode 100644
-index 24bbadb..0000000
+index ad1dff7..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-language: go
-go:
- - 1.1.2
-- - 1.2
+- - 1.2.2
- - 1.3.1
- - tip
-env:
@@ -69592,10 +69877,10 @@ index 24bbadb..0000000
- - go test ./...
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/AUTHORS b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/AUTHORS
deleted file mode 100644
-index 0f08b9c..0000000
+index bb79881..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/AUTHORS
+++ /dev/null
-@@ -1,41 +0,0 @@
+@@ -1,44 +0,0 @@
-# This is the official list of go-dockerclient authors for copyright purposes.
-
-Aldrin Leal <aldrin at leal.eng.br>
@@ -69603,9 +69888,11 @@ index 0f08b9c..0000000
-Andrews Medina <andrewsmedina at gmail.com>
-Andy Goldstein <andy.goldstein at redhat.com>
-Ben McCann <benmccann.com>
+-Carlos Diaz-Padron <cpadron at mozilla.com>
-Cezar Sa Espinola <cezar.sa at corp.globo.com>
-Cheah Chu Yeow <chuyeow at gmail.com>
-cheneydeng <cheneydeng at qq.com>
+-CMGS <ilskdw at gmail.com>
-Daniel, Dao Quang Minh <dqminh89 at gmail.com>
-David Huie <dahuie at gmail.com>
-Ed <edrocksit at gmail.com>
@@ -69627,6 +69914,7 @@ index 0f08b9c..0000000
-Peter Jihoon Kim <raingrove at gmail.com>
-Philippe Lafoucrière <philippe.lafoucriere at tech-angels.com>
-Rafe Colton <r.colton at modcloth.com>
+-Robert Williamson <williamson.robert at gmail.com>
-Salvador Gironès <salvadorgirones at gmail.com>
-Simon Eskildsen <sirup at sirupsen.com>
-Simon Menke <simon.menke at gmail.com>
@@ -69679,10 +69967,10 @@ index 7a6d8bb..0000000
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/README.markdown b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/README.markdown
deleted file mode 100644
-index 0b7e83c..0000000
+index 66cedca..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/README.markdown
+++ /dev/null
-@@ -1,43 +0,0 @@
+@@ -1,42 +0,0 @@
-#go-dockerclient
-
-[![Build Status](https://drone.io/github.com/fsouza/go-dockerclient/status.png)](https://drone.io/github.com/fsouza/go-dockerclient/latest)
@@ -69715,7 +70003,6 @@ index 0b7e83c..0000000
- fmt.Println("Size: ", img.Size)
- fmt.Println("VirtualSize: ", img.VirtualSize)
- fmt.Println("ParentId: ", img.ParentId)
-- fmt.Println("Repository: ", img.Repository)
- }
-}
-```
@@ -69728,7 +70015,7 @@ index 0b7e83c..0000000
- go test ./...
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/change.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/change.go
deleted file mode 100644
-index 7926073..0000000
+index cafffad..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/change.go
+++ /dev/null
@@ -1,36 +0,0 @@
@@ -69750,7 +70037,7 @@ index 7926073..0000000
-
-// Change represents a change in a container.
-//
--// See http://goo.gl/DpGyzK for more details.
+-// See http://goo.gl/QkW9sH for more details.
-type Change struct {
- Path string
- Kind ChangeType
@@ -69802,17 +70089,17 @@ index 7c2ec30..0000000
-}
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/client.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/client.go
deleted file mode 100644
-index 436695d..0000000
+index e68a9ef..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/client.go
+++ /dev/null
-@@ -1,536 +0,0 @@
+@@ -1,546 +0,0 @@
-// Copyright 2014 go-dockerclient authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package docker provides a client for the Docker remote API.
-//
--// See http://goo.gl/mxyql for more details on the remote API.
+-// See http://goo.gl/G3plxW for more details on the remote API.
-package docker
-
-import (
@@ -70164,20 +70451,30 @@ index 436695d..0000000
- return nil
-}
-
--func (c *Client) hijack(method, path string, success chan struct{}, setRawTerminal bool, in io.Reader, stderr, stdout io.Writer) error {
+-func (c *Client) hijack(method, path string, success chan struct{}, setRawTerminal bool, in io.Reader, stderr, stdout io.Writer, data interface{}) error {
- if path != "/version" && !c.SkipServerVersionCheck && c.expectedApiVersion == nil {
- err := c.checkApiVersion()
- if err != nil {
- return err
- }
- }
+-
+- var params io.Reader
+- if data != nil {
+- buf, err := json.Marshal(data)
+- if err != nil {
+- return err
+- }
+- params = bytes.NewBuffer(buf)
+- }
+-
- if stdout == nil {
- stdout = ioutil.Discard
- }
- if stderr == nil {
- stderr = ioutil.Discard
- }
-- req, err := http.NewRequest(method, c.getURL(path), nil)
+- req, err := http.NewRequest(method, c.getURL(path), params)
- if err != nil {
- return err
- }
@@ -70640,10 +70937,10 @@ index 9def171..0000000
-}
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container.go
deleted file mode 100644
-index 3e3556b..0000000
+index c649b5a..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container.go
+++ /dev/null
-@@ -1,693 +0,0 @@
+@@ -1,731 +0,0 @@
-// Copyright 2014 go-dockerclient authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
@@ -70664,7 +70961,7 @@ index 3e3556b..0000000
-
-// ListContainersOptions specify parameters to the ListContainers function.
-//
--// See http://goo.gl/QpCnDN for more details.
+-// See http://goo.gl/XqtcyU for more details.
-type ListContainersOptions struct {
- All bool
- Size bool
@@ -70697,7 +70994,7 @@ index 3e3556b..0000000
-
-// ListContainers returns a slice of containers matching the given criteria.
-//
--// See http://goo.gl/QpCnDN for more details.
+-// See http://goo.gl/XqtcyU for more details.
-func (c *Client) ListContainers(opts ListContainersOptions) ([]APIContainers, error) {
- path := "/containers/json?" + queryString(opts)
- body, _, err := c.do("GET", path, nil)
@@ -70807,6 +71104,7 @@ index 3e3556b..0000000
- Memory int64 `json:"Memory,omitempty" yaml:"Memory,omitempty"`
- MemorySwap int64 `json:"MemorySwap,omitempty" yaml:"MemorySwap,omitempty"`
- CpuShares int64 `json:"CpuShares,omitempty" yaml:"CpuShares,omitempty"`
+- CpuSet string `json:"CpuSet,omitempty" yaml:"CpuSet,omitempty"`
- AttachStdin bool `json:"AttachStdin,omitempty" yaml:"AttachStdin,omitempty"`
- AttachStdout bool `json:"AttachStdout,omitempty" yaml:"AttachStdout,omitempty"`
- AttachStderr bool `json:"AttachStderr,omitempty" yaml:"AttachStderr,omitempty"`
@@ -70854,7 +71152,7 @@ index 3e3556b..0000000
-
-// InspectContainer returns information about a container by its ID.
-//
--// See http://goo.gl/2o52Sx for more details.
+-// See http://goo.gl/CxVuJ5 for more details.
-func (c *Client) InspectContainer(id string) (*Container, error) {
- path := "/containers/" + id + "/json"
- body, status, err := c.do("GET", path, nil)
@@ -70874,7 +71172,7 @@ index 3e3556b..0000000
-
-// ContainerChanges returns changes in the filesystem of the given container.
-//
--// See http://goo.gl/DpGyzK for more details.
+-// See http://goo.gl/QkW9sH for more details.
-func (c *Client) ContainerChanges(id string) ([]Change, error) {
- path := "/containers/" + id + "/changes"
- body, status, err := c.do("GET", path, nil)
@@ -70894,7 +71192,7 @@ index 3e3556b..0000000
-
-// CreateContainerOptions specify parameters to the CreateContainer function.
-//
--// See http://goo.gl/WPPYtB for more details.
+-// See http://goo.gl/mErxNp for more details.
-type CreateContainerOptions struct {
- Name string
- Config *Config `qs:"-"`
@@ -70903,7 +71201,7 @@ index 3e3556b..0000000
-// CreateContainer creates a new container, returning the container instance,
-// or an error in case of failure.
-//
--// See http://goo.gl/tjihUc for more details.
+-// See http://goo.gl/mErxNp for more details.
-func (c *Client) CreateContainer(opts CreateContainerOptions) (*Container, error) {
- path := "/containers/create?" + queryString(opts)
- body, status, err := c.do("POST", path, opts.Config)
@@ -70979,7 +71277,7 @@ index 3e3556b..0000000
-
-// StartContainer starts a container, returning an error in case of failure.
-//
--// See http://goo.gl/y5GZlE for more details.
+-// See http://goo.gl/iM5GYs for more details.
-func (c *Client) StartContainer(id string, hostConfig *HostConfig) error {
- if hostConfig == nil {
- hostConfig = &HostConfig{}
@@ -71001,7 +71299,7 @@ index 3e3556b..0000000
-// StopContainer stops a container, killing it after the given timeout (in
-// seconds).
-//
--// See http://goo.gl/X2mj8t for more details.
+-// See http://goo.gl/EbcpXt for more details.
-func (c *Client) StopContainer(id string, timeout uint) error {
- path := fmt.Sprintf("/containers/%s/stop?t=%d", id, timeout)
- _, status, err := c.do("POST", path, nil)
@@ -71020,7 +71318,7 @@ index 3e3556b..0000000
-// RestartContainer stops a container, killing it after the given timeout (in
-// seconds), during the stop process.
-//
--// See http://goo.gl/zms73Z for more details.
+-// See http://goo.gl/VOzR2n for more details.
-func (c *Client) RestartContainer(id string, timeout uint) error {
- path := fmt.Sprintf("/containers/%s/restart?t=%d", id, timeout)
- _, status, err := c.do("POST", path, nil)
@@ -71063,8 +71361,43 @@ index 3e3556b..0000000
- return nil
-}
-
+-// TopResult represents the list of processes running in a container, as
+-// returned by /containers/<id>/top.
+-//
+-// See http://goo.gl/qu4gse for more details.
+-type TopResult struct {
+- Titles []string
+- Processes [][]string
+-}
+-
+-// TopContainer returns processes running inside a container
+-//
+-// See http://goo.gl/qu4gse for more details.
+-func (c *Client) TopContainer(id string, psArgs string) (TopResult, error) {
+- var args string
+- var result TopResult
+- if psArgs != "" {
+- args = fmt.Sprintf("?ps_args=%s", psArgs)
+- }
+- path := fmt.Sprintf("/containers/%s/top%s", id, args)
+- body, status, err := c.do("GET", path, nil)
+- if status == http.StatusNotFound {
+- return result, &NoSuchContainer{ID: id}
+- }
+- if err != nil {
+- return result, err
+- }
+- err = json.Unmarshal(body, &result)
+- if err != nil {
+- return result, err
+- }
+- return result, nil
+-}
+-
-// KillContainerOptions represents the set of options that can be used in a
-// call to KillContainer.
+-//
+-// See http://goo.gl/TFkECx for more details.
-type KillContainerOptions struct {
- // The ID of the container.
- ID string `qs:"-"`
@@ -71076,7 +71409,7 @@ index 3e3556b..0000000
-
-// KillContainer kills a container, returning an error in case of failure.
-//
--// See http://goo.gl/DPbbBy for more details.
+-// See http://goo.gl/TFkECx for more details.
-func (c *Client) KillContainer(opts KillContainerOptions) error {
- path := "/containers/" + opts.ID + "/kill" + "?" + queryString(opts)
- _, status, err := c.do("POST", path, nil)
@@ -71090,6 +71423,8 @@ index 3e3556b..0000000
-}
-
-// RemoveContainerOptions encapsulates options to remove a container.
+-//
+-// See http://goo.gl/ZB83ji for more details.
-type RemoveContainerOptions struct {
- // The ID of the container.
- ID string `qs:"-"`
@@ -71105,7 +71440,7 @@ index 3e3556b..0000000
-
-// RemoveContainer removes a container, returning an error in case of failure.
-//
--// See http://goo.gl/PBvGdU for more details.
+-// See http://goo.gl/ZB83ji for more details.
-func (c *Client) RemoveContainer(opts RemoveContainerOptions) error {
- path := "/containers/" + opts.ID + "?" + queryString(opts)
- _, status, err := c.do("DELETE", path, nil)
@@ -71121,7 +71456,7 @@ index 3e3556b..0000000
-// CopyFromContainerOptions is the set of options that can be used when copying
-// files or folders from a container.
-//
--// See http://goo.gl/mnxRMl for more details.
+-// See http://goo.gl/rINMlw for more details.
-type CopyFromContainerOptions struct {
- OutputStream io.Writer `json:"-"`
- Container string `json:"-"`
@@ -71131,7 +71466,7 @@ index 3e3556b..0000000
-// CopyFromContainer copy files or folders from a container, using a given
-// resource.
-//
--// See http://goo.gl/mnxRMl for more details.
+-// See http://goo.gl/rINMlw for more details.
-func (c *Client) CopyFromContainer(opts CopyFromContainerOptions) error {
- if opts.Container == "" {
- return &NoSuchContainer{ID: opts.Container}
@@ -71151,7 +71486,7 @@ index 3e3556b..0000000
-// WaitContainer blocks until the given container stops, return the exit code
-// of the container status.
-//
--// See http://goo.gl/gnHJL2 for more details.
+-// See http://goo.gl/J88DHU for more details.
-func (c *Client) WaitContainer(id string) (int, error) {
- body, status, err := c.do("POST", "/containers/"+id+"/wait", nil)
- if status == http.StatusNotFound {
@@ -71170,7 +71505,7 @@ index 3e3556b..0000000
-
-// CommitContainerOptions aggregates parameters to the CommitContainer method.
-//
--// See http://goo.gl/628gxm for more details.
+-// See http://goo.gl/Jn8pe8 for more details.
-type CommitContainerOptions struct {
- Container string
- Repository string `qs:"repo"`
@@ -71182,7 +71517,7 @@ index 3e3556b..0000000
-
-// CommitContainer creates a new image from a container's changes.
-//
--// See http://goo.gl/628gxm for more details.
+-// See http://goo.gl/Jn8pe8 for more details.
-func (c *Client) CommitContainer(opts CommitContainerOptions) (*Image, error) {
- path := "/commit?" + queryString(opts)
- body, status, err := c.do("POST", path, opts.Run)
@@ -71203,7 +71538,7 @@ index 3e3556b..0000000
-// AttachToContainerOptions is the set of options that can be used when
-// attaching to a container.
-//
--// See http://goo.gl/oPzcqH for more details.
+-// See http://goo.gl/RRAhws for more details.
-type AttachToContainerOptions struct {
- Container string `qs:"-"`
- InputStream io.Reader `qs:"-"`
@@ -71238,13 +71573,13 @@ index 3e3556b..0000000
-
-// AttachToContainer attaches to a container, using the given options.
-//
--// See http://goo.gl/oPzcqH for more details.
+-// See http://goo.gl/RRAhws for more details.
-func (c *Client) AttachToContainer(opts AttachToContainerOptions) error {
- if opts.Container == "" {
- return &NoSuchContainer{ID: opts.Container}
- }
- path := "/containers/" + opts.Container + "/attach?" + queryString(opts)
-- return c.hijack("POST", path, opts.Success, opts.RawTerminal, opts.InputStream, opts.ErrorStream, opts.OutputStream)
+- return c.hijack("POST", path, opts.Success, opts.RawTerminal, opts.InputStream, opts.ErrorStream, opts.OutputStream, nil)
-}
-
-// LogsOptions represents the set of options used when getting logs from a
@@ -71291,7 +71626,7 @@ index 3e3556b..0000000
-// ExportContainerOptions is the set of parameters to the ExportContainer
-// method.
-//
--// See http://goo.gl/Lqk0FZ for more details.
+-// See http://goo.gl/hnzE62 for more details.
-type ExportContainerOptions struct {
- ID string
- OutputStream io.Writer
@@ -71300,7 +71635,7 @@ index 3e3556b..0000000
-// ExportContainer export the contents of container id as tar archive
-// and prints the exported contents to stdout.
-//
--// See http://goo.gl/Lqk0FZ for more details.
+-// See http://goo.gl/hnzE62 for more details.
-func (c *Client) ExportContainer(opts ExportContainerOptions) error {
- if opts.ID == "" {
- return &NoSuchContainer{ID: opts.ID}
@@ -71339,10 +71674,10 @@ index 3e3556b..0000000
-}
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container_test.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container_test.go
deleted file mode 100644
-index f3e1954..0000000
+index d80270b..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container_test.go
+++ /dev/null
-@@ -1,1416 +0,0 @@
+@@ -1,1495 +0,0 @@
-// Copyright 2014 go-dockerclient authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
@@ -72759,6 +73094,85 @@ index f3e1954..0000000
- t.Errorf("NeverRestart(): wrong MaximumRetryCount. Want 0. Got %d", policy.MaximumRetryCount)
- }
-}
+-
+-func TestTopContainer(t *testing.T) {
+- jsonTop := `{
+- "Processes": [
+- [
+- "ubuntu",
+- "3087",
+- "815",
+- "0",
+- "01:44",
+- "?",
+- "00:00:00",
+- "cmd1"
+- ],
+- [
+- "root",
+- "3158",
+- "3087",
+- "0",
+- "01:44",
+- "?",
+- "00:00:01",
+- "cmd2"
+- ]
+- ],
+- "Titles": [
+- "UID",
+- "PID",
+- "PPID",
+- "C",
+- "STIME",
+- "TTY",
+- "TIME",
+- "CMD"
+- ]
+-}`
+- var expected TopResult
+- err := json.Unmarshal([]byte(jsonTop), &expected)
+- if err != nil {
+- t.Fatal(err)
+- }
+- id := "4fa6e0f0"
+- fakeRT := &FakeRoundTripper{message: jsonTop, status: http.StatusOK}
+- client := newTestClient(fakeRT)
+- processes, err := client.TopContainer(id, "")
+- if err != nil {
+- t.Fatal(err)
+- }
+- if !reflect.DeepEqual(processes, expected) {
+- t.Errorf("TopContainer: Expected %#v. Got %#v.", expected, processes)
+- }
+- if len(processes.Processes) != 2 || len(processes.Processes[0]) != 8 ||
+- processes.Processes[0][7] != "cmd1" {
+- t.Errorf("TopContainer: Process list to include cmd1. Got %#v.", expected, processes)
+- }
+- expectedURI := "/containers/" + id + "/top"
+- if !strings.HasSuffix(fakeRT.requests[0].URL.String(), expectedURI) {
+- t.Errorf("TopContainer: Expected URI to have %q. Got %q.", expectedURI, fakeRT.requests[0].URL.String())
+- }
+-}
+-
+-func TestTopContainerNotFound(t *testing.T) {
+- client := newTestClient(&FakeRoundTripper{message: "no such container", status: http.StatusNotFound})
+- _, err := client.TopContainer("abef348", "")
+- expected := &NoSuchContainer{ID: "abef348"}
+- if !reflect.DeepEqual(err, expected) {
+- t.Errorf("StopContainer: Wrong error returned. Want %#v. Got %#v.", expected, err)
+- }
+-}
+-
+-func TestTopContainerWithPsArgs(t *testing.T) {
+- fakeRT := &FakeRoundTripper{message: "no such container", status: http.StatusNotFound}
+- client := newTestClient(fakeRT)
+- client.TopContainer("abef348", "aux")
+- expectedURI := "/containers/abef348/top?ps_args=aux"
+- if !strings.HasSuffix(fakeRT.requests[0].URL.String(), expectedURI) {
+- t.Errorf("TopContainer: Expected URI to have %q. Got %q.", expectedURI, fakeRT.requests[0].URL.String())
+- }
+-}
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/env.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/env.go
deleted file mode 100644
index c54b0b0..0000000
@@ -73845,12 +74259,278 @@ index 8c2c719..0000000
- log.Fatal(err)
- }
-}
+diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/exec.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/exec.go
+deleted file mode 100644
+index 62a0a80..0000000
+--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/exec.go
++++ /dev/null
+@@ -1,126 +0,0 @@
+-// Copyright 2014 go-dockerclient authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style
+-// license that can be found in the LICENSE file.
+-
+-// Docs can currently be found at https://github.com/docker/docker/blob/master/docs/sources/reference/api/docker_remote_api_v1.15.md#exec-create
+-
+-package docker
+-
+-import (
+- "encoding/json"
+- "fmt"
+- "io"
+- "net/http"
+- "net/url"
+- "strconv"
+-)
+-
+-// CreateExecOptions specify parameters to the CreateExecContainer function.
+-//
+-// See http://goo.gl/8izrzI for more details
+-type CreateExecOptions struct {
+- AttachStdin bool `json:"AttachStdin,omitempty" yaml:"AttachStdin,omitempty"`
+- AttachStdout bool `json:"AttachStdout,omitempty" yaml:"AttachStdout,omitempty"`
+- AttachStderr bool `json:"AttachStderr,omitempty" yaml:"AttachStderr,omitempty"`
+- Tty bool `json:"Tty,omitempty" yaml:"Tty,omitempty"`
+- Cmd []string `json:"Cmd,omitempty" yaml:"Cmd,omitempty"`
+- Container string `json:"Container,omitempty" yaml:"Container,omitempty"`
+-}
+-
+-// StartExecOptions specify parameters to the StartExecContainer function.
+-//
+-// See http://goo.gl/JW8Lxl for more details
+-type StartExecOptions struct {
+- Detach bool `json:"Detach,omitempty" yaml:"Detach,omitempty"`
+-
+- Tty bool `json:"Tty,omitempty" yaml:"Tty,omitempty"`
+-
+- InputStream io.Reader `qs:"-"`
+- OutputStream io.Writer `qs:"-"`
+- ErrorStream io.Writer `qs:"-"`
+-
+- // Use raw terminal? Usually true when the container contains a TTY.
+- RawTerminal bool `qs:"-"`
+-
+- // If set, after a successful connect, a sentinel will be sent and then the
+- // client will block on receive before continuing.
+- //
+- // It must be an unbuffered channel. Using a buffered channel can lead
+- // to unexpected behavior.
+- Success chan struct{} `json:"-"`
+-}
+-
+-type Exec struct {
+- Id string `json:"Id,omitempty" yaml:"Id,omitempty"`
+-}
+-
+-// CreateExec sets up an exec instance in a running container `id`, returning the exec
+-// instance, or an error in case of failure.
+-//
+-// See http://goo.gl/8izrzI for more details
+-func (c *Client) CreateExec(opts CreateExecOptions) (*Exec, error) {
+- path := fmt.Sprintf("/containers/%s/exec", opts.Container)
+- body, status, err := c.do("POST", path, opts)
+- if status == http.StatusNotFound {
+- return nil, &NoSuchContainer{ID: opts.Container}
+- }
+- if err != nil {
+- return nil, err
+- }
+- var exec Exec
+- err = json.Unmarshal(body, &exec)
+- if err != nil {
+- return nil, err
+- }
+-
+- return &exec, nil
+-}
+-
+-// Starts a previously set up exec instance id. If opts.Detach is true, it returns
+-// after starting the exec command. Otherwise, it sets up an interactive session
+-// with the exec command.
+-//
+-// See http://goo.gl/JW8Lxl for more details
+-func (c *Client) StartExec(id string, opts StartExecOptions) error {
+- if id == "" {
+- return &NoSuchExec{ID: id}
+- }
+-
+- path := fmt.Sprintf("/exec/%s/start", id)
+-
+- if opts.Detach {
+- _, status, err := c.do("POST", path, opts)
+- if status == http.StatusNotFound {
+- return &NoSuchExec{ID: id}
+- }
+- if err != nil {
+- return err
+- }
+- return nil
+- }
+-
+- return c.hijack("POST", path, opts.Success, opts.RawTerminal, opts.InputStream, opts.ErrorStream, opts.OutputStream, opts)
+-}
+-
+-// Resizes the tty session used by the exec command id. This API is valid only
+-// if Tty was specified as part of creating and starting the exec command.
+-//
+-// See http://goo.gl/YDSx1f for more details
+-func (c *Client) ResizeExecTTY(id string, height, width int) error {
+- params := make(url.Values)
+- params.Set("h", strconv.Itoa(height))
+- params.Set("w", strconv.Itoa(width))
+-
+- path := fmt.Sprintf("/exec/%s/resize?%s", id, params.Encode())
+- _, _, err := c.do("POST", path, nil)
+- return err
+-}
+-
+-// NoSuchExec is the error returned when a given exec instance does not exist.
+-type NoSuchExec struct {
+- ID string
+-}
+-
+-func (err *NoSuchExec) Error() string {
+- return "No such exec instance: " + err.ID
+-}
+diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/exec_test.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/exec_test.go
+deleted file mode 100644
+index 70fa64b..0000000
+--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/exec_test.go
++++ /dev/null
+@@ -1,128 +0,0 @@
+-// Copyright 2014 go-dockerclient authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style
+-// license that can be found in the LICENSE file.
+-
+-package docker
+-
+-import (
+- "bytes"
+- "encoding/json"
+- "net/http"
+- "net/http/httptest"
+- "net/url"
+- "strings"
+- "testing"
+-)
+-
+-func TestExecCreate(t *testing.T) {
+- jsonContainer := `{"Id": "4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2"}`
+- var expected struct{ Id string }
+- err := json.Unmarshal([]byte(jsonContainer), &expected)
+- if err != nil {
+- t.Fatal(err)
+- }
+- fakeRT := &FakeRoundTripper{message: jsonContainer, status: http.StatusOK}
+- client := newTestClient(fakeRT)
+- config := CreateExecOptions{
+- Container: "test",
+- AttachStdin: true,
+- AttachStdout: true,
+- AttachStderr: false,
+- Tty: false,
+- Cmd: []string{"touch", "/tmp/file"},
+- }
+- execObj, err := client.CreateExec(config)
+- if err != nil {
+- t.Fatal(err)
+- }
+- expectedId := "4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2"
+- if execObj.Id != expectedId {
+- t.Errorf("ExecCreate: wrong ID. Want %q. Got %q.", expectedId, execObj.Id)
+- }
+- req := fakeRT.requests[0]
+- if req.Method != "POST" {
+- t.Errorf("ExecCreate: wrong HTTP method. Want %q. Got %q.", "POST", req.Method)
+- }
+- expectedURL, _ := url.Parse(client.getURL("/containers/test/exec"))
+- if gotPath := req.URL.Path; gotPath != expectedURL.Path {
+- t.Errorf("ExecCreate: Wrong path in request. Want %q. Got %q.", expectedURL.Path, gotPath)
+- }
+- var gotBody struct{ Id string }
+- err = json.NewDecoder(req.Body).Decode(&gotBody)
+- if err != nil {
+- t.Fatal(err)
+- }
+-}
+-
+-func TestExecStartDetached(t *testing.T) {
+- execId := "4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2"
+- fakeRT := &FakeRoundTripper{status: http.StatusOK}
+- client := newTestClient(fakeRT)
+- config := StartExecOptions{
+- Detach: true,
+- }
+- err := client.StartExec(execId, config)
+- if err != nil {
+- t.Fatal(err)
+- }
+- req := fakeRT.requests[0]
+- if req.Method != "POST" {
+- t.Errorf("ExecStart: wrong HTTP method. Want %q. Got %q.", "POST", req.Method)
+- }
+- expectedURL, _ := url.Parse(client.getURL("/exec/" + execId + "/start"))
+- if gotPath := req.URL.Path; gotPath != expectedURL.Path {
+- t.Errorf("ExecCreate: Wrong path in request. Want %q. Got %q.", expectedURL.Path, gotPath)
+- }
+- t.Log(req.Body)
+- var gotBody struct{ Detach bool }
+- err = json.NewDecoder(req.Body).Decode(&gotBody)
+- if err != nil {
+- t.Fatal(err)
+- }
+- if !gotBody.Detach {
+- t.Fatal("Expected Detach in StartExecOptions to be true")
+- }
+-}
+-
+-func TestExecStartAndAttach(t *testing.T) {
+- var reader = strings.NewReader("send value")
+- var req http.Request
+- server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+- w.Write([]byte{1, 0, 0, 0, 0, 0, 0, 5})
+- w.Write([]byte("hello"))
+- req = *r
+- }))
+- defer server.Close()
+- client, _ := NewClient(server.URL)
+- client.SkipServerVersionCheck = true
+- var stdout, stderr bytes.Buffer
+- success := make(chan struct{})
+- execId := "4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2"
+- opts := StartExecOptions{
+- OutputStream: &stdout,
+- ErrorStream: &stderr,
+- InputStream: reader,
+- RawTerminal: true,
+- Success: success,
+- }
+- go client.StartExec(execId, opts)
+- <-success
+-}
+-
+-func TestExecResize(t *testing.T) {
+- execId := "4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2"
+- fakeRT := &FakeRoundTripper{status: http.StatusOK}
+- client := newTestClient(fakeRT)
+- err := client.ResizeExecTTY(execId, 10, 20)
+- if err != nil {
+- t.Fatal(err)
+- }
+- req := fakeRT.requests[0]
+- if req.Method != "POST" {
+- t.Errorf("ExecStart: wrong HTTP method. Want %q. Got %q.", "POST", req.Method)
+- }
+- expectedURL, _ := url.Parse(client.getURL("/exec/" + execId + "/resize?h=10&w=20"))
+- if gotPath := req.URL.RequestURI(); gotPath != expectedURL.RequestURI() {
+- t.Errorf("ExecCreate: Wrong path in request. Want %q. Got %q.", expectedURL.Path, gotPath)
+- }
+-}
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image.go
deleted file mode 100644
-index 4ce94c8..0000000
+index e1fbb23..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image.go
+++ /dev/null
-@@ -1,351 +0,0 @@
+@@ -1,417 +0,0 @@
-// Copyright 2014 go-dockerclient authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
@@ -73895,6 +74575,16 @@ index 4ce94c8..0000000
- Size int64 `json:"Size,omitempty" yaml:"Size,omitempty"`
-}
-
+-// ImageHistory represent a layer in an image's history returned by the
+-// ImageHistory call.
+-type ImageHistory struct {
+- ID string `json:"Id" yaml:"Id"`
+- Tags []string `json:"Tags,omitempty" yaml:"Tags,omitempty"`
+- Created int64 `json:"Created,omitempty" yaml:"Created,omitempty"`
+- CreatedBy string `json:"CreatedBy,omitempty" yaml:"CreatedBy,omitempty"`
+- Size int64 `json:"Size,omitempty" yaml:"Size,omitempty"`
+-}
+-
-type ImagePre012 struct {
- ID string `json:"id"`
- Parent string `json:"parent,omitempty"`
@@ -73924,7 +74614,7 @@ index 4ce94c8..0000000
-
-// ListImages returns the list of available images in the server.
-//
--// See http://goo.gl/dkMrwP for more details.
+-// See http://goo.gl/VmcR6v for more details.
-func (c *Client) ListImages(all bool) ([]APIImages, error) {
- path := "/images/json?all="
- if all {
@@ -73944,9 +74634,28 @@ index 4ce94c8..0000000
- return images, nil
-}
-
+-// ImageHistory returns the history of the image by its name or ID.
+-//
+-// See http://goo.gl/2oJmNs for more details.
+-func (c *Client) ImageHistory(name string) ([]ImageHistory, error) {
+- body, status, err := c.do("GET", "/images/"+name+"/history", nil)
+- if status == http.StatusNotFound {
+- return nil, ErrNoSuchImage
+- }
+- if err != nil {
+- return nil, err
+- }
+- var history []ImageHistory
+- err = json.Unmarshal(body, &history)
+- if err != nil {
+- return nil, err
+- }
+- return history, nil
+-}
+-
-// RemoveImage removes an image by its name or ID.
-//
--// See http://goo.gl/7hjHHy for more details.
+-// See http://goo.gl/znj0wM for more details.
-func (c *Client) RemoveImage(name string) error {
- _, status, err := c.do("DELETE", "/images/"+name, nil)
- if status == http.StatusNotFound {
@@ -73957,7 +74666,7 @@ index 4ce94c8..0000000
-
-// InspectImage returns an image by its name or ID.
-//
--// See http://goo.gl/pHEbma for more details.
+-// See http://goo.gl/Q112NY for more details.
-func (c *Client) InspectImage(name string) (*Image, error) {
- body, status, err := c.do("GET", "/images/"+name+"/json", nil)
- if status == http.StatusNotFound {
@@ -74000,7 +74709,7 @@ index 4ce94c8..0000000
-
-// PushImageOptions represents options to use in the PushImage method.
-//
--// See http://goo.gl/GBmyhc for more details.
+-// See http://goo.gl/pN8A3P for more details.
-type PushImageOptions struct {
- // Name of the image
- Name string
@@ -74011,7 +74720,8 @@ index 4ce94c8..0000000
- // Registry server to push the image
- Registry string
-
-- OutputStream io.Writer `qs:"-"`
+- OutputStream io.Writer `qs:"-"`
+- RawJSONStream bool `qs:"-"`
-}
-
-// AuthConfiguration represents authentication options to use in the PushImage
@@ -74027,7 +74737,7 @@ index 4ce94c8..0000000
-// An empty instance of AuthConfiguration may be used for unauthenticated
-// pushes.
-//
--// See http://goo.gl/GBmyhc for more details.
+-// See http://goo.gl/pN8A3P for more details.
-func (c *Client) PushImage(opts PushImageOptions, auth AuthConfiguration) error {
- if opts.Name == "" {
- return ErrNoSuchImage
@@ -74041,13 +74751,13 @@ index 4ce94c8..0000000
-
- headers["X-Registry-Auth"] = base64.URLEncoding.EncodeToString(buf.Bytes())
-
-- return c.stream("POST", path, true, false, headers, nil, opts.OutputStream, nil)
+- return c.stream("POST", path, true, opts.RawJSONStream, headers, nil, opts.OutputStream, nil)
-}
-
-// PullImageOptions present the set of options available for pulling an image
-// from a registry.
-//
--// See http://goo.gl/PhBKnS for more details.
+-// See http://goo.gl/ACyYNS for more details.
-type PullImageOptions struct {
- Repository string `qs:"fromImage"`
- Registry string
@@ -74058,7 +74768,7 @@ index 4ce94c8..0000000
-
-// PullImage pulls an image from a remote registry, logging progress to w.
-//
--// See http://goo.gl/PhBKnS for more details.
+-// See http://goo.gl/ACyYNS for more details.
-func (c *Client) PullImage(opts PullImageOptions, auth AuthConfiguration) error {
- if opts.Repository == "" {
- return ErrNoSuchImage
@@ -74141,9 +74851,11 @@ index 4ce94c8..0000000
- return c.createImage(queryString(&opts), nil, opts.InputStream, opts.OutputStream, false)
-}
-
--// BuildImageOptions present the set of informations available for building
--// an image from a tarfile with a Dockerfile in it,the details about Dockerfile
--// see http://docs.docker.io/en/latest/reference/builder/
+-// BuildImageOptions present the set of informations available for building an
+-// image from a tarfile with a Dockerfile in it.
+-//
+-// For more details about the Docker building process, see
+-// http://goo.gl/tlPXPu.
-type BuildImageOptions struct {
- Name string `qs:"t"`
- NoCache bool `qs:"nocache"`
@@ -74152,11 +74864,14 @@ index 4ce94c8..0000000
- ForceRmTmpContainer bool `qs:"forcerm"`
- InputStream io.Reader `qs:"-"`
- OutputStream io.Writer `qs:"-"`
+- RawJSONStream bool `qs:"-"`
- Remote string `qs:"remote"`
-}
-
-// BuildImage builds an image from a tarball's url or a Dockerfile in the input
-// stream.
+-//
+-// See http://goo.gl/wRsW76 for more details.
-func (c *Client) BuildImage(opts BuildImageOptions) error {
- if opts.OutputStream == nil {
- return ErrMissingOutputStream
@@ -74171,17 +74886,21 @@ index 4ce94c8..0000000
- return ErrMissingRepo
- }
- return c.stream("POST", fmt.Sprintf("/build?%s",
-- queryString(&opts)), true, false, headers, opts.InputStream, opts.OutputStream, nil)
+- queryString(&opts)), true, opts.RawJSONStream, headers, opts.InputStream, opts.OutputStream, nil)
-}
-
--// TagImageOptions present the set of options to tag an image
+-// TagImageOptions present the set of options to tag an image.
+-//
+-// See http://goo.gl/5g6qFy for more details.
-type TagImageOptions struct {
- Repo string
- Tag string
- Force bool
-}
-
--// TagImage adds a tag to the image 'name'
+-// TagImage adds a tag to the image identified by the given name.
+-//
+-// See http://goo.gl/5g6qFy for more details.
-func (c *Client) TagImage(name string, opts TagImageOptions) error {
- if name == "" {
- return ErrNoSuchImage
@@ -74202,12 +74921,39 @@ index 4ce94c8..0000000
- }
- return p.Scheme == "http" || p.Scheme == "https"
-}
+-
+-// APIImageSearch reflect the result of a search on the dockerHub
+-//
+-// See http://goo.gl/xI5lLZ for more details.
+-type APIImageSearch struct {
+- Description string `json:"description,omitempty" yaml:"description,omitempty"`
+- IsOfficial bool `json:"is_official,omitempty" yaml:"is_official,omitempty"`
+- IsAutomated bool `json:"is_automated,omitempty" yaml:"is_automated,omitempty"`
+- Name string `json:"name,omitempty" yaml:"name,omitempty"`
+- StarCount int `json:"star_count,omitempty" yaml:"star_count,omitempty"`
+-}
+-
+-// SearchImages search the docker hub with a specific given term.
+-//
+-// See http://goo.gl/xI5lLZ for more details.
+-func (c *Client) SearchImages(term string) ([]APIImageSearch, error) {
+- body, _, err := c.do("GET", "/images/search?term="+term, nil)
+- if err != nil {
+- return nil, err
+- }
+- var searchResult []APIImageSearch
+- err = json.Unmarshal(body, &searchResult)
+- if err != nil {
+- return nil, err
+- }
+- return searchResult, nil
+-}
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image_test.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image_test.go
deleted file mode 100644
-index 97612f2..0000000
+index 5a7b2de..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image_test.go
+++ /dev/null
-@@ -1,712 +0,0 @@
+@@ -1,861 +0,0 @@
-// Copyright 2014 go-dockerclient authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
@@ -74332,6 +75078,48 @@ index 97612f2..0000000
- }
-}
-
+-func TestImageHistory(t *testing.T) {
+- body := `[
+- {
+- "Id": "25daec02219d2d852f7526137213a9b199926b4b24e732eab5b8bc6c49bd470e",
+- "Tags": [
+- "debian:7.6",
+- "debian:latest",
+- "debian:7",
+- "debian:wheezy"
+- ],
+- "Created": 1409856216,
+- "CreatedBy": "/bin/sh -c #(nop) CMD [/bin/bash]"
+- },
+- {
+- "Id": "41026a5347fb5be6ed16115bf22df8569697139f246186de9ae8d4f67c335dce",
+- "Created": 1409856213,
+- "CreatedBy": "/bin/sh -c #(nop) ADD file:1ee9e97209d00e3416a4543b23574cc7259684741a46bbcbc755909b8a053a38 in /",
+- "Size": 85178663
+- },
+- {
+- "Id": "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158",
+- "Tags": [
+- "scratch:latest"
+- ],
+- "Created": 1371157430
+- }
+-]`
+- var expected []ImageHistory
+- err := json.Unmarshal([]byte(body), &expected)
+- if err != nil {
+- t.Fatal(err)
+- }
+- client := newTestClient(&FakeRoundTripper{message: body, status: http.StatusOK})
+- history, err := client.ImageHistory("debian:latest")
+- if err != nil {
+- t.Error(err)
+- }
+- if !reflect.DeepEqual(history, expected) {
+- t.Errorf("ImageHistory: Wrong return value. Want %#v. Got %#v.", expected, history)
+- }
+-}
+-
-func TestRemoveImage(t *testing.T) {
- name := "test"
- fakeRT := &FakeRoundTripper{message: "", status: http.StatusNoContent}
@@ -74434,6 +75222,35 @@ index 97612f2..0000000
- }
-}
-
+-func TestPushImageWithRawJSON(t *testing.T) {
+- body := `
+- {"status":"Pushing..."}
+- {"status":"Pushing", "progress":"1/? (n/a)", "progressDetail":{"current":1}}}
+- {"status":"Image successfully pushed"}
+- `
+- fakeRT := &FakeRoundTripper{
+- message: body,
+- status: http.StatusOK,
+- header: map[string]string{
+- "Content-Type": "application/json",
+- },
+- }
+- client := newTestClient(fakeRT)
+- var buf bytes.Buffer
+-
+- err := client.PushImage(PushImageOptions{
+- Name: "test",
+- OutputStream: &buf,
+- RawJSONStream: true,
+- }, AuthConfiguration{})
+- if err != nil {
+- t.Fatal(err)
+- }
+- if buf.String() != body {
+- t.Errorf("PushImage: Wrong raw output. Want %q. Got %q.", body, buf.String())
+- }
+-}
+-
-func TestPushImageWithAuthentication(t *testing.T) {
- fakeRT := &FakeRoundTripper{message: "Pushing 1/100", status: http.StatusOK}
- client := newTestClient(fakeRT)
@@ -74789,7 +75606,7 @@ index 97612f2..0000000
- expected := map[string][]string{"t": {opts.Name}, "remote": {opts.Remote}, "q": {"1"}}
- got := map[string][]string(req.URL.Query())
- if !reflect.DeepEqual(got, expected) {
-- t.Errorf("ImportImage: wrong query string. Want %#v. Got %#v.", expected, got)
+- t.Errorf("BuildImage: wrong query string. Want %#v. Got %#v.", expected, got)
- }
-}
-
@@ -74818,6 +75635,44 @@ index 97612f2..0000000
- }
-}
-
+-func TestBuildImageWithRawJSON(t *testing.T) {
+- body := `
+- {"stream":"Step 0 : FROM ubuntu:latest\n"}
+- {"stream":" ---\u003e 4300eb9d3c8d\n"}
+- {"stream":"Step 1 : MAINTAINER docker <eng at docker.com>\n"}
+- {"stream":" ---\u003e Using cache\n"}
+- {"stream":" ---\u003e 3a3ed758c370\n"}
+- {"stream":"Step 2 : CMD /usr/bin/top\n"}
+- {"stream":" ---\u003e Running in 36b1479cc2e4\n"}
+- {"stream":" ---\u003e 4b6188aebe39\n"}
+- {"stream":"Removing intermediate container 36b1479cc2e4\n"}
+- {"stream":"Successfully built 4b6188aebe39\n"}
+- `
+- fakeRT := &FakeRoundTripper{
+- message: body,
+- status: http.StatusOK,
+- header: map[string]string{
+- "Content-Type": "application/json",
+- },
+- }
+- client := newTestClient(fakeRT)
+- var buf bytes.Buffer
+- opts := BuildImageOptions{
+- Name: "testImage",
+- RmTmpContainer: true,
+- InputStream: &buf,
+- OutputStream: &buf,
+- RawJSONStream: true,
+- }
+- err := client.BuildImage(opts)
+- if err != nil {
+- t.Fatal(err)
+- }
+- if buf.String() != body {
+- t.Errorf("BuildImage: Wrong raw output. Want %q. Got %q.", body, buf.String())
+- }
+-}
+-
-func TestBuildImageRemoteWithoutName(t *testing.T) {
- fakeRT := &FakeRoundTripper{message: "", status: http.StatusOK}
- client := newTestClient(fakeRT)
@@ -74920,9 +75775,49 @@ index 97612f2..0000000
- t.Errorf("ExportIMage: wrong path. Expected %q. Got %q.", expectedPath, req.URL.Path)
- }
-}
+-
+-func TestSearchImages(t *testing.T) {
+- body := `[
+- {
+- "description":"A container with Cassandra 2.0.3",
+- "is_official":true,
+- "is_automated":true,
+- "name":"poklet/cassandra",
+- "star_count":17
+- },
+- {
+- "description":"A container with Cassandra 2.0.3",
+- "is_official":true,
+- "is_automated":false,
+- "name":"poklet/cassandra",
+- "star_count":17
+- }
+- ,
+- {
+- "description":"A container with Cassandra 2.0.3",
+- "is_official":false,
+- "is_automated":true,
+- "name":"poklet/cassandra",
+- "star_count":17
+- }
+-]`
+- var expected []APIImageSearch
+- err := json.Unmarshal([]byte(body), &expected)
+- if err != nil {
+- t.Fatal(err)
+- }
+- client := newTestClient(&FakeRoundTripper{message: body, status: http.StatusOK})
+- result, err := client.SearchImages("cassandra")
+- if err != nil {
+- t.Error(err)
+- }
+- if !reflect.DeepEqual(result, expected) {
+- t.Errorf("SearchImages: Wrong return value. Want %#v. Got %#v.", expected, result)
+- }
+-}
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/misc.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/misc.go
deleted file mode 100644
-index 3f32bf2..0000000
+index 2678ab5..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/misc.go
+++ /dev/null
@@ -1,59 +0,0 @@
@@ -74939,7 +75834,7 @@ index 3f32bf2..0000000
-
-// Version returns version information about the docker server.
-//
--// See http://goo.gl/IqKNRE for more details.
+-// See http://goo.gl/BOZrF5 for more details.
-func (c *Client) Version() (*Env, error) {
- body, _, err := c.do("GET", "/version", nil)
- if err != nil {
@@ -74952,9 +75847,9 @@ index 3f32bf2..0000000
- return &env, nil
-}
-
--// Info returns system-wide information, like the number of running containers.
+-// Info returns system-wide information about the Docker server.
-//
--// See http://goo.gl/LOmySw for more details.
+-// See http://goo.gl/wmqZsW for more details.
-func (c *Client) Info() (*Env, error) {
- body, _, err := c.do("GET", "/info", nil)
- if err != nil {
@@ -75616,10 +76511,10 @@ o;5QJT#=q||{Y*ZuNn-Gk-)jtGb|Y`+PV+v2`vmS2xaA4_1I+dVl>h($
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server.go
deleted file mode 100644
-index 42c20e4..0000000
+index e2ca1d9..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server.go
+++ /dev/null
-@@ -1,668 +0,0 @@
+@@ -1,692 +0,0 @@
-// Copyright 2014 go-dockerclient authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
@@ -75653,7 +76548,7 @@ index 42c20e4..0000000
-// It can used in standalone mode, listening for connections or as an arbitrary
-// HTTP handler.
-//
--// For more details on the remote API, check http://goo.gl/yMI1S.
+-// For more details on the remote API, check http://goo.gl/G3plxW.
-type DockerServer struct {
- containers []*docker.Container
- cMut sync.RWMutex
@@ -75710,6 +76605,7 @@ index 42c20e4..0000000
- s.mux.Path("/containers/json").Methods("GET").HandlerFunc(s.handlerWrapper(s.listContainers))
- s.mux.Path("/containers/create").Methods("POST").HandlerFunc(s.handlerWrapper(s.createContainer))
- s.mux.Path("/containers/{id:.*}/json").Methods("GET").HandlerFunc(s.handlerWrapper(s.inspectContainer))
+- s.mux.Path("/containers/{id:.*}/top").Methods("GET").HandlerFunc(s.handlerWrapper(s.topContainer))
- s.mux.Path("/containers/{id:.*}/start").Methods("POST").HandlerFunc(s.handlerWrapper(s.startContainer))
- s.mux.Path("/containers/{id:.*}/stop").Methods("POST").HandlerFunc(s.handlerWrapper(s.stopContainer))
- s.mux.Path("/containers/{id:.*}/pause").Methods("POST").HandlerFunc(s.handlerWrapper(s.pauseContainer))
@@ -75961,6 +76857,29 @@ index 42c20e4..0000000
- json.NewEncoder(w).Encode(container)
-}
-
+-func (s *DockerServer) topContainer(w http.ResponseWriter, r *http.Request) {
+- id := mux.Vars(r)["id"]
+- container, _, err := s.findContainer(id)
+- if err != nil {
+- http.Error(w, err.Error(), http.StatusNotFound)
+- return
+- }
+- if !container.State.Running {
+- w.WriteHeader(http.StatusInternalServerError)
+- fmt.Fprintf(w, "Container %s is not running", id)
+- return
+- }
+- w.Header().Set("Content-Type", "application/json")
+- w.WriteHeader(http.StatusOK)
+- result := docker.TopResult{
+- Titles: []string{"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"},
+- Processes: [][]string{
+- {"root", "7535", "7516", "0", "03:20", "?", "00:00:00", container.Path + " " + strings.Join(container.Args, " ")},
+- },
+- }
+- json.NewEncoder(w).Encode(result)
+-}
+-
-func (s *DockerServer) startContainer(w http.ResponseWriter, r *http.Request) {
- id := mux.Vars(r)["id"]
- container, _, err := s.findContainer(id)
@@ -76290,10 +77209,10 @@ index 42c20e4..0000000
-}
diff --git a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server_test.go b/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server_test.go
deleted file mode 100644
-index 5203004..0000000
+index ad5ce7d..0000000
--- a/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/testing/server_test.go
+++ /dev/null
-@@ -1,965 +0,0 @@
+@@ -1,1017 +0,0 @@
-// Copyright 2014 go-dockerclient authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
@@ -76639,6 +77558,58 @@ index 5203004..0000000
- }
-}
-
+-func TestTopContainer(t *testing.T) {
+- server := DockerServer{}
+- addContainers(&server, 1)
+- server.containers[0].State.Running = true
+- server.buildMuxer()
+- recorder := httptest.NewRecorder()
+- path := fmt.Sprintf("/containers/%s/top", server.containers[0].ID)
+- request, _ := http.NewRequest("GET", path, nil)
+- server.ServeHTTP(recorder, request)
+- if recorder.Code != http.StatusOK {
+- t.Errorf("TopContainer: wrong status. Want %d. Got %d.", http.StatusOK, recorder.Code)
+- }
+- var got docker.TopResult
+- err := json.NewDecoder(recorder.Body).Decode(&got)
+- if err != nil {
+- t.Fatal(err)
+- }
+- if !reflect.DeepEqual(got.Titles, []string{"UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"}) {
+- t.Fatalf("TopContainer: Unexpected titles, got: %#v", got.Titles)
+- }
+- if len(got.Processes) != 1 {
+- t.Fatalf("TopContainer: Unexpected process len, got: %d", len(got.Processes))
+- }
+- if got.Processes[0][len(got.Processes[0])-1] != "ls -la .." {
+- t.Fatalf("TopContainer: Unexpected command name, got: %s", got.Processes[0][len(got.Processes[0])-1])
+- }
+-}
+-
+-func TestTopContainerNotFound(t *testing.T) {
+- server := DockerServer{}
+- server.buildMuxer()
+- recorder := httptest.NewRecorder()
+- request, _ := http.NewRequest("GET", "/containers/xyz/top", nil)
+- server.ServeHTTP(recorder, request)
+- if recorder.Code != http.StatusNotFound {
+- t.Errorf("TopContainer: wrong status. Want %d. Got %d.", http.StatusNotFound, recorder.Code)
+- }
+-}
+-
+-func TestTopContainerStopped(t *testing.T) {
+- server := DockerServer{}
+- addContainers(&server, 1)
+- server.buildMuxer()
+- recorder := httptest.NewRecorder()
+- path := fmt.Sprintf("/containers/%s/top", server.containers[0].ID)
+- request, _ := http.NewRequest("GET", path, nil)
+- server.ServeHTTP(recorder, request)
+- if recorder.Code != http.StatusInternalServerError {
+- t.Errorf("TopContainer: wrong status. Want %d. Got %d.", http.StatusInternalServerError, recorder.Code)
+- }
+-}
+-
-func TestStartContainer(t *testing.T) {
- server := DockerServer{}
- addContainers(&server, 1)
@@ -81183,6 +82154,739 @@ index 4f0d4db..0000000
- return 7, true
- })
-}
+diff --git a/Godeps/_workspace/src/github.com/kr/text/License b/Godeps/_workspace/src/github.com/kr/text/License
+deleted file mode 100644
+index 480a328..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/License
++++ /dev/null
+@@ -1,19 +0,0 @@
+-Copyright 2012 Keith Rarick
+-
+-Permission is hereby granted, free of charge, to any person obtaining a copy
+-of this software and associated documentation files (the "Software"), to deal
+-in the Software without restriction, including without limitation the rights
+-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+-copies of the Software, and to permit persons to whom the Software is
+-furnished to do so, subject to the following conditions:
+-
+-The above copyright notice and this permission notice shall be included in
+-all copies or substantial portions of the Software.
+-
+-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+-THE SOFTWARE.
+diff --git a/Godeps/_workspace/src/github.com/kr/text/Readme b/Godeps/_workspace/src/github.com/kr/text/Readme
+deleted file mode 100644
+index 7e6e7c0..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/Readme
++++ /dev/null
+@@ -1,3 +0,0 @@
+-This is a Go package for manipulating paragraphs of text.
+-
+-See http://go.pkgdoc.org/github.com/kr/text for full documentation.
+diff --git a/Godeps/_workspace/src/github.com/kr/text/colwriter/Readme b/Godeps/_workspace/src/github.com/kr/text/colwriter/Readme
+deleted file mode 100644
+index 1c1f4e6..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/colwriter/Readme
++++ /dev/null
+@@ -1,5 +0,0 @@
+-Package colwriter provides a write filter that formats
+-input lines in multiple columns.
+-
+-The package is a straightforward translation from
+-/src/cmd/draw/mc.c in Plan 9 from User Space.
+diff --git a/Godeps/_workspace/src/github.com/kr/text/colwriter/column.go b/Godeps/_workspace/src/github.com/kr/text/colwriter/column.go
+deleted file mode 100644
+index 7302ce9..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/colwriter/column.go
++++ /dev/null
+@@ -1,147 +0,0 @@
+-// Package colwriter provides a write filter that formats
+-// input lines in multiple columns.
+-//
+-// The package is a straightforward translation from
+-// /src/cmd/draw/mc.c in Plan 9 from User Space.
+-package colwriter
+-
+-import (
+- "bytes"
+- "io"
+- "unicode/utf8"
+-)
+-
+-const (
+- tab = 4
+-)
+-
+-const (
+- // Print each input line ending in a colon ':' separately.
+- BreakOnColon uint = 1 << iota
+-)
+-
+-// A Writer is a filter that arranges input lines in as many columns as will
+-// fit in its width. Tab '\t' chars in the input are translated to sequences
+-// of spaces ending at multiples of 4 positions.
+-//
+-// If BreakOnColon is set, each input line ending in a colon ':' is written
+-// separately.
+-//
+-// The Writer assumes that all Unicode code points have the same width; this
+-// may not be true in some fonts.
+-type Writer struct {
+- w io.Writer
+- buf []byte
+- width int
+- flag uint
+-}
+-
+-// NewWriter allocates and initializes a new Writer writing to w.
+-// Parameter width controls the total number of characters on each line
+-// across all columns.
+-func NewWriter(w io.Writer, width int, flag uint) *Writer {
+- return &Writer{
+- w: w,
+- width: width,
+- flag: flag,
+- }
+-}
+-
+-// Write writes p to the writer w. The only errors returned are ones
+-// encountered while writing to the underlying output stream.
+-func (w *Writer) Write(p []byte) (n int, err error) {
+- var linelen int
+- var lastWasColon bool
+- for i, c := range p {
+- w.buf = append(w.buf, c)
+- linelen++
+- if c == '\t' {
+- w.buf[len(w.buf)-1] = ' '
+- for linelen%tab != 0 {
+- w.buf = append(w.buf, ' ')
+- linelen++
+- }
+- }
+- if w.flag&BreakOnColon != 0 && c == ':' {
+- lastWasColon = true
+- } else if lastWasColon {
+- if c == '\n' {
+- pos := bytes.LastIndex(w.buf[:len(w.buf)-1], []byte{'\n'})
+- if pos < 0 {
+- pos = 0
+- }
+- line := w.buf[pos:]
+- w.buf = w.buf[:pos]
+- if err = w.columnate(); err != nil {
+- if len(line) < i {
+- return i - len(line), err
+- }
+- return 0, err
+- }
+- if n, err := w.w.Write(line); err != nil {
+- if r := len(line) - n; r < i {
+- return i - r, err
+- }
+- return 0, err
+- }
+- }
+- lastWasColon = false
+- }
+- if c == '\n' {
+- linelen = 0
+- }
+- }
+- return len(p), nil
+-}
+-
+-// Flush should be called after the last call to Write to ensure that any data
+-// buffered in the Writer is written to output.
+-func (w *Writer) Flush() error {
+- return w.columnate()
+-}
+-
+-func (w *Writer) columnate() error {
+- words := bytes.Split(w.buf, []byte{'\n'})
+- w.buf = nil
+- if len(words[len(words)-1]) == 0 {
+- words = words[:len(words)-1]
+- }
+- maxwidth := 0
+- for _, wd := range words {
+- if n := utf8.RuneCount(wd); n > maxwidth {
+- maxwidth = n
+- }
+- }
+- maxwidth++ // space char
+- wordsPerLine := w.width / maxwidth
+- if wordsPerLine <= 0 {
+- wordsPerLine = 1
+- }
+- nlines := (len(words) + wordsPerLine - 1) / wordsPerLine
+- for i := 0; i < nlines; i++ {
+- col := 0
+- endcol := 0
+- for j := i; j < len(words); j += nlines {
+- endcol += maxwidth
+- _, err := w.w.Write(words[j])
+- if err != nil {
+- return err
+- }
+- col += utf8.RuneCount(words[j])
+- if j+nlines < len(words) {
+- for col < endcol {
+- _, err := w.w.Write([]byte{' '})
+- if err != nil {
+- return err
+- }
+- col++
+- }
+- }
+- }
+- _, err := w.w.Write([]byte{'\n'})
+- if err != nil {
+- return err
+- }
+- }
+- return nil
+-}
+diff --git a/Godeps/_workspace/src/github.com/kr/text/colwriter/column_test.go b/Godeps/_workspace/src/github.com/kr/text/colwriter/column_test.go
+deleted file mode 100644
+index 8d0bf8f..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/colwriter/column_test.go
++++ /dev/null
+@@ -1,90 +0,0 @@
+-package colwriter
+-
+-import (
+- "bytes"
+- "testing"
+-)
+-
+-var src = `
+-.git
+-.gitignore
+-.godir
+-Procfile:
+-README.md
+-api.go
+-apps.go
+-auth.go
+-darwin.go
+-data.go
+-dyno.go:
+-env.go
+-git.go
+-help.go
+-hkdist
+-linux.go
+-ls.go
+-main.go
+-plugin.go
+-run.go
+-scale.go
+-ssh.go
+-tail.go
+-term
+-unix.go
+-update.go
+-version.go
+-windows.go
+-`[1:]
+-
+-var tests = []struct{
+- wid int
+- flag uint
+- src string
+- want string
+-}{
+- {80, 0, "", ""},
+- {80, 0, src, `
+-.git README.md darwin.go git.go ls.go scale.go unix.go
+-.gitignore api.go data.go help.go main.go ssh.go update.go
+-.godir apps.go dyno.go: hkdist plugin.go tail.go version.go
+-Procfile: auth.go env.go linux.go run.go term windows.go
+-`[1:]},
+- {80, BreakOnColon, src, `
+-.git .gitignore .godir
+-
+-Procfile:
+-README.md api.go apps.go auth.go darwin.go data.go
+-
+-dyno.go:
+-env.go hkdist main.go scale.go term version.go
+-git.go linux.go plugin.go ssh.go unix.go windows.go
+-help.go ls.go run.go tail.go update.go
+-`[1:]},
+- {20, 0, `
+-Hello
+-Γειά σου
+-안녕
+-今日は
+-`[1:], `
+-Hello 안녕
+-Γειά σου 今日は
+-`[1:]},
+-}
+-
+-func TestWriter(t *testing.T) {
+- for _, test := range tests {
+- b := new(bytes.Buffer)
+- w := NewWriter(b, test.wid, test.flag)
+- if _, err := w.Write([]byte(test.src)); err != nil {
+- t.Error(err)
+- }
+- if err := w.Flush(); err != nil {
+- t.Error(err)
+- }
+- if g := b.String(); test.want != g {
+- t.Log("\n" + test.want)
+- t.Log("\n" + g)
+- t.Errorf("%q != %q", test.want, g)
+- }
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/kr/text/doc.go b/Godeps/_workspace/src/github.com/kr/text/doc.go
+deleted file mode 100644
+index cf4c198..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/doc.go
++++ /dev/null
+@@ -1,3 +0,0 @@
+-// Package text provides rudimentary functions for manipulating text in
+-// paragraphs.
+-package text
+diff --git a/Godeps/_workspace/src/github.com/kr/text/indent.go b/Godeps/_workspace/src/github.com/kr/text/indent.go
+deleted file mode 100644
+index 4ebac45..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/indent.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package text
+-
+-import (
+- "io"
+-)
+-
+-// Indent inserts prefix at the beginning of each non-empty line of s. The
+-// end-of-line marker is NL.
+-func Indent(s, prefix string) string {
+- return string(IndentBytes([]byte(s), []byte(prefix)))
+-}
+-
+-// IndentBytes inserts prefix at the beginning of each non-empty line of b.
+-// The end-of-line marker is NL.
+-func IndentBytes(b, prefix []byte) []byte {
+- var res []byte
+- bol := true
+- for _, c := range b {
+- if bol && c != '\n' {
+- res = append(res, prefix...)
+- }
+- res = append(res, c)
+- bol = c == '\n'
+- }
+- return res
+-}
+-
+-// Writer indents each line of its input.
+-type indentWriter struct {
+- w io.Writer
+- bol bool
+- pre [][]byte
+- sel int
+- off int
+-}
+-
+-// NewIndentWriter makes a new write filter that indents the input
+-// lines. Each line is prefixed in order with the corresponding
+-// element of pre. If there are more lines than elements, the last
+-// element of pre is repeated for each subsequent line.
+-func NewIndentWriter(w io.Writer, pre ...[]byte) io.Writer {
+- return &indentWriter{
+- w: w,
+- pre: pre,
+- bol: true,
+- }
+-}
+-
+-// The only errors returned are from the underlying indentWriter.
+-func (w *indentWriter) Write(p []byte) (n int, err error) {
+- for _, c := range p {
+- if w.bol {
+- var i int
+- i, err = w.w.Write(w.pre[w.sel][w.off:])
+- w.off += i
+- if err != nil {
+- return n, err
+- }
+- }
+- _, err = w.w.Write([]byte{c})
+- if err != nil {
+- return n, err
+- }
+- n++
+- w.bol = c == '\n'
+- if w.bol {
+- w.off = 0
+- if w.sel < len(w.pre)-1 {
+- w.sel++
+- }
+- }
+- }
+- return n, nil
+-}
+diff --git a/Godeps/_workspace/src/github.com/kr/text/indent_test.go b/Godeps/_workspace/src/github.com/kr/text/indent_test.go
+deleted file mode 100644
+index 5c723ee..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/indent_test.go
++++ /dev/null
+@@ -1,119 +0,0 @@
+-package text
+-
+-import (
+- "bytes"
+- "testing"
+-)
+-
+-type T struct {
+- inp, exp, pre string
+-}
+-
+-var tests = []T{
+- {
+- "The quick brown fox\njumps over the lazy\ndog.\nBut not quickly.\n",
+- "xxxThe quick brown fox\nxxxjumps over the lazy\nxxxdog.\nxxxBut not quickly.\n",
+- "xxx",
+- },
+- {
+- "The quick brown fox\njumps over the lazy\ndog.\n\nBut not quickly.",
+- "xxxThe quick brown fox\nxxxjumps over the lazy\nxxxdog.\n\nxxxBut not quickly.",
+- "xxx",
+- },
+-}
+-
+-func TestIndent(t *testing.T) {
+- for _, test := range tests {
+- got := Indent(test.inp, test.pre)
+- if got != test.exp {
+- t.Errorf("mismatch %q != %q", got, test.exp)
+- }
+- }
+-}
+-
+-type IndentWriterTest struct {
+- inp, exp string
+- pre []string
+-}
+-
+-var ts = []IndentWriterTest{
+- {
+- `
+-The quick brown fox
+-jumps over the lazy
+-dog.
+-But not quickly.
+-`[1:],
+- `
+-xxxThe quick brown fox
+-xxxjumps over the lazy
+-xxxdog.
+-xxxBut not quickly.
+-`[1:],
+- []string{"xxx"},
+- },
+- {
+- `
+-The quick brown fox
+-jumps over the lazy
+-dog.
+-But not quickly.
+-`[1:],
+- `
+-xxaThe quick brown fox
+-xxxjumps over the lazy
+-xxxdog.
+-xxxBut not quickly.
+-`[1:],
+- []string{"xxa", "xxx"},
+- },
+- {
+- `
+-The quick brown fox
+-jumps over the lazy
+-dog.
+-But not quickly.
+-`[1:],
+- `
+-xxaThe quick brown fox
+-xxbjumps over the lazy
+-xxcdog.
+-xxxBut not quickly.
+-`[1:],
+- []string{"xxa", "xxb", "xxc", "xxx"},
+- },
+- {
+- `
+-The quick brown fox
+-jumps over the lazy
+-dog.
+-
+-But not quickly.`[1:],
+- `
+-xxaThe quick brown fox
+-xxxjumps over the lazy
+-xxxdog.
+-xxx
+-xxxBut not quickly.`[1:],
+- []string{"xxa", "xxx"},
+- },
+-}
+-
+-func TestIndentWriter(t *testing.T) {
+- for _, test := range ts {
+- b := new(bytes.Buffer)
+- pre := make([][]byte, len(test.pre))
+- for i := range test.pre {
+- pre[i] = []byte(test.pre[i])
+- }
+- w := NewIndentWriter(b, pre...)
+- if _, err := w.Write([]byte(test.inp)); err != nil {
+- t.Error(err)
+- }
+- if got := b.String(); got != test.exp {
+- t.Errorf("mismatch %q != %q", got, test.exp)
+- t.Log(got)
+- t.Log(test.exp)
+- }
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/kr/text/mc/Readme b/Godeps/_workspace/src/github.com/kr/text/mc/Readme
+deleted file mode 100644
+index 519ddc0..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/mc/Readme
++++ /dev/null
+@@ -1,9 +0,0 @@
+-Command mc prints in multiple columns.
+-
+- Usage: mc [-] [-N] [file...]
+-
+-Mc splits the input into as many columns as will fit in N
+-print positions. If the output is a tty, the default N is
+-the number of characters in a terminal line; otherwise the
+-default N is 80. Under option - each input line ending in
+-a colon ':' is printed separately.
+diff --git a/Godeps/_workspace/src/github.com/kr/text/mc/mc.go b/Godeps/_workspace/src/github.com/kr/text/mc/mc.go
+deleted file mode 100644
+index 00169a3..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/mc/mc.go
++++ /dev/null
+@@ -1,62 +0,0 @@
+-// Command mc prints in multiple columns.
+-//
+-// Usage: mc [-] [-N] [file...]
+-//
+-// Mc splits the input into as many columns as will fit in N
+-// print positions. If the output is a tty, the default N is
+-// the number of characters in a terminal line; otherwise the
+-// default N is 80. Under option - each input line ending in
+-// a colon ':' is printed separately.
+-package main
+-
+-import (
+- "github.com/kr/pty"
+- "github.com/kr/text/colwriter"
+- "io"
+- "log"
+- "os"
+- "strconv"
+-)
+-
+-func main() {
+- var width int
+- var flag uint
+- args := os.Args[1:]
+- for len(args) > 0 && len(args[0]) > 0 && args[0][0] == '-' {
+- if len(args[0]) > 1 {
+- width, _ = strconv.Atoi(args[0][1:])
+- } else {
+- flag |= colwriter.BreakOnColon
+- }
+- args = args[1:]
+- }
+- if width < 1 {
+- _, width, _ = pty.Getsize(os.Stdout)
+- }
+- if width < 1 {
+- width = 80
+- }
+-
+- w := colwriter.NewWriter(os.Stdout, width, flag)
+- if len(args) > 0 {
+- for _, s := range args {
+- if f, err := os.Open(s); err == nil {
+- copyin(w, f)
+- f.Close()
+- } else {
+- log.Println(err)
+- }
+- }
+- } else {
+- copyin(w, os.Stdin)
+- }
+-}
+-
+-func copyin(w *colwriter.Writer, r io.Reader) {
+- if _, err := io.Copy(w, r); err != nil {
+- log.Println(err)
+- }
+- if err := w.Flush(); err != nil {
+- log.Println(err)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/kr/text/wrap.go b/Godeps/_workspace/src/github.com/kr/text/wrap.go
+deleted file mode 100644
+index ca88565..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/wrap.go
++++ /dev/null
+@@ -1,86 +0,0 @@
+-package text
+-
+-import (
+- "bytes"
+- "math"
+-)
+-
+-var (
+- nl = []byte{'\n'}
+- sp = []byte{' '}
+-)
+-
+-const defaultPenalty = 1e5
+-
+-// Wrap wraps s into a paragraph of lines of length lim, with minimal
+-// raggedness.
+-func Wrap(s string, lim int) string {
+- return string(WrapBytes([]byte(s), lim))
+-}
+-
+-// WrapBytes wraps b into a paragraph of lines of length lim, with minimal
+-// raggedness.
+-func WrapBytes(b []byte, lim int) []byte {
+- words := bytes.Split(bytes.Replace(bytes.TrimSpace(b), nl, sp, -1), sp)
+- var lines [][]byte
+- for _, line := range WrapWords(words, 1, lim, defaultPenalty) {
+- lines = append(lines, bytes.Join(line, sp))
+- }
+- return bytes.Join(lines, nl)
+-}
+-
+-// WrapWords is the low-level line-breaking algorithm, useful if you need more
+-// control over the details of the text wrapping process. For most uses, either
+-// Wrap or WrapBytes will be sufficient and more convenient.
+-//
+-// WrapWords splits a list of words into lines with minimal "raggedness",
+-// treating each byte as one unit, accounting for spc units between adjacent
+-// words on each line, and attempting to limit lines to lim units. Raggedness
+-// is the total error over all lines, where error is the square of the
+-// difference of the length of the line and lim. Too-long lines (which only
+-// happen when a single word is longer than lim units) have pen penalty units
+-// added to the error.
+-func WrapWords(words [][]byte, spc, lim, pen int) [][][]byte {
+- n := len(words)
+-
+- length := make([][]int, n)
+- for i := 0; i < n; i++ {
+- length[i] = make([]int, n)
+- length[i][i] = len(words[i])
+- for j := i + 1; j < n; j++ {
+- length[i][j] = length[i][j-1] + spc + len(words[j])
+- }
+- }
+-
+- nbrk := make([]int, n)
+- cost := make([]int, n)
+- for i := range cost {
+- cost[i] = math.MaxInt32
+- }
+- for i := n - 1; i >= 0; i-- {
+- if length[i][n-1] <= lim {
+- cost[i] = 0
+- nbrk[i] = n
+- } else {
+- for j := i + 1; j < n; j++ {
+- d := lim - length[i][j-1]
+- c := d*d + cost[j]
+- if length[i][j-1] > lim {
+- c += pen // too-long lines get a worse penalty
+- }
+- if c < cost[i] {
+- cost[i] = c
+- nbrk[i] = j
+- }
+- }
+- }
+- }
+-
+- var lines [][][]byte
+- i := 0
+- for i < n {
+- lines = append(lines, words[i:nbrk[i]])
+- i = nbrk[i]
+- }
+- return lines
+-}
+diff --git a/Godeps/_workspace/src/github.com/kr/text/wrap_test.go b/Godeps/_workspace/src/github.com/kr/text/wrap_test.go
+deleted file mode 100644
+index 90f065c..0000000
+--- a/Godeps/_workspace/src/github.com/kr/text/wrap_test.go
++++ /dev/null
+@@ -1,44 +0,0 @@
+-package text
+-
+-import (
+- "bytes"
+- "testing"
+-)
+-
+-var text = "The quick brown fox jumps over the lazy dog."
+-
+-func TestWrap(t *testing.T) {
+- exp := [][]string{
+- {"The", "quick", "brown", "fox"},
+- {"jumps", "over", "the", "lazy", "dog."},
+- }
+- words := bytes.Split([]byte(text), sp)
+- got := WrapWords(words, 1, 24, defaultPenalty)
+- if len(exp) != len(got) {
+- t.Fail()
+- }
+- for i := range exp {
+- if len(exp[i]) != len(got[i]) {
+- t.Fail()
+- }
+- for j := range exp[i] {
+- if exp[i][j] != string(got[i][j]) {
+- t.Fatal(i, exp[i][j], got[i][j])
+- }
+- }
+- }
+-}
+-
+-func TestWrapNarrow(t *testing.T) {
+- exp := "The\nquick\nbrown\nfox\njumps\nover\nthe\nlazy\ndog."
+- if Wrap(text, 5) != exp {
+- t.Fail()
+- }
+-}
+-
+-func TestWrapOneLine(t *testing.T) {
+- exp := "The quick brown fox jumps over the lazy dog."
+- if Wrap(text, 500) != exp {
+- t.Fail()
+- }
+-}
diff --git a/Godeps/_workspace/src/github.com/mitchellh/goamz/aws/attempt.go b/Godeps/_workspace/src/github.com/mitchellh/goamz/aws/attempt.go
deleted file mode 100644
index c0654f5..0000000
@@ -88973,234 +90677,13015 @@ index 86d203e..0000000
- expected := "okj96/5ucWBSc1uR2zXVfm6mDHtgfNv657rRtt/aunQ="
- c.Assert(params["Signature"], Equals, expected)
-}
-diff --git a/Godeps/_workspace/src/github.com/skratchdot/LICENSE-MIT b/Godeps/_workspace/src/github.com/skratchdot/LICENSE-MIT
+diff --git a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE b/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE
deleted file mode 100644
-index afd04c8..0000000
---- a/Godeps/_workspace/src/github.com/skratchdot/LICENSE-MIT
+index f9c841a..0000000
+--- a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE
+++ /dev/null
-@@ -1,22 +0,0 @@
--Copyright (c) 2013 skratchdot
+@@ -1,21 +0,0 @@
+-The MIT License (MIT)
-
--Permission is hereby granted, free of charge, to any person
--obtaining a copy of this software and associated documentation
--files (the "Software"), to deal in the Software without
--restriction, including without limitation the rights to use,
--copy, modify, merge, publish, distribute, sublicense, and/or sell
--copies of the Software, and to permit persons to whom the
--Software is furnished to do so, subject to the following
--conditions:
+-Copyright (c) 2013 Mitchell Hashimoto
-
--The above copyright notice and this permission notice shall be
--included in all copies or substantial portions of the Software.
+-Permission is hereby granted, free of charge, to any person obtaining a copy
+-of this software and associated documentation files (the "Software"), to deal
+-in the Software without restriction, including without limitation the rights
+-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+-copies of the Software, and to permit persons to whom the Software is
+-furnished to do so, subject to the following conditions:
-
--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
--EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
--OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
--NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
--HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
--WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
--FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
--OTHER DEALINGS IN THE SOFTWARE.
-diff --git a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec.go b/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec.go
+-The above copyright notice and this permission notice shall be included in
+-all copies or substantial portions of the Software.
+-
+-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+-THE SOFTWARE.
+diff --git a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/README.md b/Godeps/_workspace/src/github.com/mitchellh/mapstructure/README.md
deleted file mode 100644
-index cc37339..0000000
---- a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec.go
+index 659d688..0000000
+--- a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/README.md
+++ /dev/null
-@@ -1,15 +0,0 @@
--// +build !windows,!darwin
+@@ -1,46 +0,0 @@
+-# mapstructure
-
--package open
+-mapstructure is a Go library for decoding generic map values to structures
+-and vice versa, while providing helpful error handling.
+-
+-This library is most useful when decoding values from some data stream (JSON,
+-Gob, etc.) where you don't _quite_ know the structure of the underlying data
+-until you read a part of it. You can therefore read a `map[string]interface{}`
+-and use this library to decode it into the proper underlying native Go
+-structure.
+-
+-## Installation
+-
+-Standard `go get`:
+-
+-```
+-$ go get github.com/mitchellh/mapstructure
+-```
+-
+-## Usage & Example
+-
+-For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/mapstructure).
+-
+-The `Decode` function has examples associated with it there.
+-
+-## But Why?!
+-
+-Go offers fantastic standard libraries for decoding formats such as JSON.
+-The standard method is to have a struct pre-created, and populate that struct
+-from the bytes of the encoded format. This is great, but the problem is if
+-you have configuration or an encoding that changes slightly depending on
+-specific fields. For example, consider this JSON:
+-
+-```json
+-{
+- "type": "person",
+- "name": "Mitchell"
+-}
+-```
+-
+-Perhaps we can't populate a specific structure without first reading
+-the "type" field from the JSON. We could always do two passes over the
+-decoding of the JSON (reading the "type" first, and the rest later).
+-However, it is much simpler to just decode this into a `map[string]interface{}`
+-structure, read the "type" key, then use something like this library
+-to decode it into the proper structure.
+diff --git a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/decode_hooks.go b/Godeps/_workspace/src/github.com/mitchellh/mapstructure/decode_hooks.go
+deleted file mode 100644
+index 087a392..0000000
+--- a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/decode_hooks.go
++++ /dev/null
+@@ -1,84 +0,0 @@
+-package mapstructure
-
-import (
-- "os/exec"
+- "reflect"
+- "strconv"
+- "strings"
-)
-
--func open(input string) *exec.Cmd {
-- return exec.Command("xdg-open", input)
+-// ComposeDecodeHookFunc creates a single DecodeHookFunc that
+-// automatically composes multiple DecodeHookFuncs.
+-//
+-// The composed funcs are called in order, with the result of the
+-// previous transformation.
+-func ComposeDecodeHookFunc(fs ...DecodeHookFunc) DecodeHookFunc {
+- return func(
+- f reflect.Kind,
+- t reflect.Kind,
+- data interface{}) (interface{}, error) {
+- var err error
+- for _, f1 := range fs {
+- data, err = f1(f, t, data)
+- if err != nil {
+- return nil, err
+- }
+-
+- // Modify the from kind to be correct with the new data
+- f = getKind(reflect.ValueOf(data))
+- }
+-
+- return data, nil
+- }
-}
-
--func openWith(input string, appName string) *exec.Cmd {
-- return exec.Command(appName, input)
+-// StringToSliceHookFunc returns a DecodeHookFunc that converts
+-// string to []string by splitting on the given sep.
+-func StringToSliceHookFunc(sep string) DecodeHookFunc {
+- return func(
+- f reflect.Kind,
+- t reflect.Kind,
+- data interface{}) (interface{}, error) {
+- if f != reflect.String || t != reflect.Slice {
+- return data, nil
+- }
+-
+- raw := data.(string)
+- if raw == "" {
+- return []string{}, nil
+- }
+-
+- return strings.Split(raw, sep), nil
+- }
-}
-diff --git a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_darwin.go b/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_darwin.go
+-
+-func WeaklyTypedHook(
+- f reflect.Kind,
+- t reflect.Kind,
+- data interface{}) (interface{}, error) {
+- dataVal := reflect.ValueOf(data)
+- switch t {
+- case reflect.String:
+- switch f {
+- case reflect.Bool:
+- if dataVal.Bool() {
+- return "1", nil
+- } else {
+- return "0", nil
+- }
+- case reflect.Float32:
+- return strconv.FormatFloat(dataVal.Float(), 'f', -1, 64), nil
+- case reflect.Int:
+- return strconv.FormatInt(dataVal.Int(), 10), nil
+- case reflect.Slice:
+- dataType := dataVal.Type()
+- elemKind := dataType.Elem().Kind()
+- if elemKind == reflect.Uint8 {
+- return string(dataVal.Interface().([]uint8)), nil
+- }
+- case reflect.Uint:
+- return strconv.FormatUint(dataVal.Uint(), 10), nil
+- }
+- }
+-
+- return data, nil
+-}
+diff --git a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/decode_hooks_test.go b/Godeps/_workspace/src/github.com/mitchellh/mapstructure/decode_hooks_test.go
deleted file mode 100644
-index 16160e6..0000000
---- a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_darwin.go
+index b417dee..0000000
+--- a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/decode_hooks_test.go
+++ /dev/null
-@@ -1,15 +0,0 @@
--// +build darwin
--
--package open
+@@ -1,191 +0,0 @@
+-package mapstructure
-
-import (
-- "os/exec"
+- "errors"
+- "reflect"
+- "testing"
-)
-
--func open(input string) *exec.Cmd {
-- return exec.Command("open", input)
+-func TestComposeDecodeHookFunc(t *testing.T) {
+- f1 := func(
+- f reflect.Kind,
+- t reflect.Kind,
+- data interface{}) (interface{}, error) {
+- return data.(string) + "foo", nil
+- }
+-
+- f2 := func(
+- f reflect.Kind,
+- t reflect.Kind,
+- data interface{}) (interface{}, error) {
+- return data.(string) + "bar", nil
+- }
+-
+- f := ComposeDecodeHookFunc(f1, f2)
+-
+- result, err := f(reflect.String, reflect.Slice, "")
+- if err != nil {
+- t.Fatalf("bad: %s", err)
+- }
+- if result.(string) != "foobar" {
+- t.Fatalf("bad: %#v", result)
+- }
-}
-
--func openWith(input string, appName string) *exec.Cmd {
-- return exec.Command("open", "-a", appName, input)
+-func TestComposeDecodeHookFunc_err(t *testing.T) {
+- f1 := func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error) {
+- return nil, errors.New("foo")
+- }
+-
+- f2 := func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error) {
+- panic("NOPE")
+- }
+-
+- f := ComposeDecodeHookFunc(f1, f2)
+-
+- _, err := f(reflect.String, reflect.Slice, 42)
+- if err.Error() != "foo" {
+- t.Fatalf("bad: %s", err)
+- }
-}
-diff --git a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_windows.go b/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_windows.go
+-
+-func TestComposeDecodeHookFunc_kinds(t *testing.T) {
+- var f2From reflect.Kind
+-
+- f1 := func(
+- f reflect.Kind,
+- t reflect.Kind,
+- data interface{}) (interface{}, error) {
+- return int(42), nil
+- }
+-
+- f2 := func(
+- f reflect.Kind,
+- t reflect.Kind,
+- data interface{}) (interface{}, error) {
+- f2From = f
+- return data, nil
+- }
+-
+- f := ComposeDecodeHookFunc(f1, f2)
+-
+- _, err := f(reflect.String, reflect.Slice, "")
+- if err != nil {
+- t.Fatalf("bad: %s", err)
+- }
+- if f2From != reflect.Int {
+- t.Fatalf("bad: %#v", f2From)
+- }
+-}
+-
+-func TestStringToSliceHookFunc(t *testing.T) {
+- f := StringToSliceHookFunc(",")
+-
+- cases := []struct {
+- f, t reflect.Kind
+- data interface{}
+- result interface{}
+- err bool
+- }{
+- {reflect.Slice, reflect.Slice, 42, 42, false},
+- {reflect.String, reflect.String, 42, 42, false},
+- {
+- reflect.String,
+- reflect.Slice,
+- "foo,bar,baz",
+- []string{"foo", "bar", "baz"},
+- false,
+- },
+- {
+- reflect.String,
+- reflect.Slice,
+- "",
+- []string{},
+- false,
+- },
+- }
+-
+- for i, tc := range cases {
+- actual, err := f(tc.f, tc.t, tc.data)
+- if tc.err != (err != nil) {
+- t.Fatalf("case %d: expected err %#v", i, tc.err)
+- }
+- if !reflect.DeepEqual(actual, tc.result) {
+- t.Fatalf(
+- "case %d: expected %#v, got %#v",
+- i, tc.result, actual)
+- }
+- }
+-}
+-
+-func TestWeaklyTypedHook(t *testing.T) {
+- var f DecodeHookFunc = WeaklyTypedHook
+-
+- cases := []struct {
+- f, t reflect.Kind
+- data interface{}
+- result interface{}
+- err bool
+- }{
+- // TO STRING
+- {
+- reflect.Bool,
+- reflect.String,
+- false,
+- "0",
+- false,
+- },
+-
+- {
+- reflect.Bool,
+- reflect.String,
+- true,
+- "1",
+- false,
+- },
+-
+- {
+- reflect.Float32,
+- reflect.String,
+- float32(7),
+- "7",
+- false,
+- },
+-
+- {
+- reflect.Int,
+- reflect.String,
+- int(7),
+- "7",
+- false,
+- },
+-
+- {
+- reflect.Slice,
+- reflect.String,
+- []uint8("foo"),
+- "foo",
+- false,
+- },
+-
+- {
+- reflect.Uint,
+- reflect.String,
+- uint(7),
+- "7",
+- false,
+- },
+- }
+-
+- for i, tc := range cases {
+- actual, err := f(tc.f, tc.t, tc.data)
+- if tc.err != (err != nil) {
+- t.Fatalf("case %d: expected err %#v", i, tc.err)
+- }
+- if !reflect.DeepEqual(actual, tc.result) {
+- t.Fatalf(
+- "case %d: expected %#v, got %#v",
+- i, tc.result, actual)
+- }
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/error.go b/Godeps/_workspace/src/github.com/mitchellh/mapstructure/error.go
deleted file mode 100644
-index ac44cfa..0000000
---- a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_windows.go
+index 3460799..0000000
+--- a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/error.go
+++ /dev/null
-@@ -1,21 +0,0 @@
--// +build windows
--
--package open
+@@ -1,32 +0,0 @@
+-package mapstructure
-
-import (
-- "os/exec"
+- "fmt"
- "strings"
-)
-
--func cleaninput(input string) string {
-- r := strings.NewReplacer("&", "^&")
-- return r.Replace(input)
+-// Error implements the error interface and can represents multiple
+-// errors that occur in the course of a single decode.
+-type Error struct {
+- Errors []string
-}
-
--func open(input string) *exec.Cmd {
-- return exec.Command("cmd", "/C", "start", "", cleaninput(input))
+-func (e *Error) Error() string {
+- points := make([]string, len(e.Errors))
+- for i, err := range e.Errors {
+- points[i] = fmt.Sprintf("* %s", err)
+- }
+-
+- return fmt.Sprintf(
+- "%d error(s) decoding:\n\n%s",
+- len(e.Errors), strings.Join(points, "\n"))
-}
-
--func openWith(input string, appName string) *exec.Cmd {
-- return exec.Command("cmd", "/C", "start", "", appName, cleaninput(input))
+-func appendErrors(errors []string, err error) []string {
+- switch e := err.(type) {
+- case *Error:
+- return append(errors, e.Errors...)
+- default:
+- return append(errors, e.Error())
+- }
-}
-diff --git a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open.go b/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open.go
+diff --git a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure.go b/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure.go
deleted file mode 100644
-index b1f648f..0000000
---- a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open.go
+index 381ba5d..0000000
+--- a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure.go
+++ /dev/null
-@@ -1,50 +0,0 @@
--/*
+@@ -1,704 +0,0 @@
+-// The mapstructure package exposes functionality to convert an
+-// abitrary map[string]interface{} into a native Go structure.
+-//
+-// The Go structure can be arbitrarily complex, containing slices,
+-// other structs, etc. and the decoder will properly decode nested
+-// maps and so on into the proper structures in the native Go struct.
+-// See the examples to see what the decoder is capable of.
+-package mapstructure
-
-- Open a file, directory, or URI using the OS's default
-- application for that object type. Optionally, you can
-- specify an application to use.
+-import (
+- "errors"
+- "fmt"
+- "reflect"
+- "sort"
+- "strconv"
+- "strings"
+-)
-
-- This is a proxy for the following commands:
+-// DecodeHookFunc is the callback function that can be used for
+-// data transformations. See "DecodeHook" in the DecoderConfig
+-// struct.
+-type DecodeHookFunc func(
+- from reflect.Kind,
+- to reflect.Kind,
+- data interface{}) (interface{}, error)
+-
+-// DecoderConfig is the configuration that is used to create a new decoder
+-// and allows customization of various aspects of decoding.
+-type DecoderConfig struct {
+- // DecodeHook, if set, will be called before any decoding and any
+- // type conversion (if WeaklyTypedInput is on). This lets you modify
+- // the values before they're set down onto the resulting struct.
+- //
+- // If an error is returned, the entire decode will fail with that
+- // error.
+- DecodeHook DecodeHookFunc
-
-- OSX: "open"
-- Windows: "start"
-- Linux/Other: "xdg-open"
+- // If ErrorUnused is true, then it is an error for there to exist
+- // keys in the original map that were unused in the decoding process
+- // (extra keys).
+- ErrorUnused bool
-
-- This is a golang port of the node.js module: https://github.com/pwnall/node-open
+- // If WeaklyTypedInput is true, the decoder will make the following
+- // "weak" conversions:
+- //
+- // - bools to string (true = "1", false = "0")
+- // - numbers to string (base 10)
+- // - bools to int/uint (true = 1, false = 0)
+- // - strings to int/uint (base implied by prefix)
+- // - int to bool (true if value != 0)
+- // - string to bool (accepts: 1, t, T, TRUE, true, True, 0, f, F,
+- // FALSE, false, False. Anything else is an error)
+- // - empty array = empty map and vice versa
+- //
+- WeaklyTypedInput bool
-
--*/
--package open
+- // Metadata is the struct that will contain extra metadata about
+- // the decoding. If this is nil, then no metadata will be tracked.
+- Metadata *Metadata
-
--/*
-- Open a file, directory, or URI using the OS's default
-- application for that object type. Wait for the open
-- command to complete.
--*/
--func Run(input string) error {
-- return open(input).Run()
+- // Result is a pointer to the struct that will contain the decoded
+- // value.
+- Result interface{}
+-
+- // The tag name that mapstructure reads for field names. This
+- // defaults to "mapstructure"
+- TagName string
-}
-
--/*
-- Open a file, directory, or URI using the OS's default
-- application for that object type. Don't wait for the
-- open command to complete.
--*/
--func Start(input string) error {
-- return open(input).Start()
+-// A Decoder takes a raw interface value and turns it into structured
+-// data, keeping track of rich error information along the way in case
+-// anything goes wrong. Unlike the basic top-level Decode method, you can
+-// more finely control how the Decoder behaves using the DecoderConfig
+-// structure. The top-level Decode method is just a convenience that sets
+-// up the most basic Decoder.
+-type Decoder struct {
+- config *DecoderConfig
-}
-
--/*
-- Open a file, directory, or URI using the specified application.
-- Wait for the open command to complete.
--*/
--func RunWith(input string, appName string) error {
-- return openWith(input, appName).Run()
+-// Metadata contains information about decoding a structure that
+-// is tedious or difficult to get otherwise.
+-type Metadata struct {
+- // Keys are the keys of the structure which were successfully decoded
+- Keys []string
+-
+- // Unused is a slice of keys that were found in the raw value but
+- // weren't decoded since there was no matching field in the result interface
+- Unused []string
-}
-
--/*
-- Open a file, directory, or URI using the specified application.
-- Don't wait for the open command to complete.
--*/
--func StartWith(input string, appName string) error {
-- return openWith(input, appName).Start()
+-// Decode takes a map and uses reflection to convert it into the
+-// given Go native structure. val must be a pointer to a struct.
+-func Decode(m interface{}, rawVal interface{}) error {
+- config := &DecoderConfig{
+- Metadata: nil,
+- Result: rawVal,
+- }
+-
+- decoder, err := NewDecoder(config)
+- if err != nil {
+- return err
+- }
+-
+- return decoder.Decode(m)
-}
-diff --git a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open_test.go b/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open_test.go
-deleted file mode 100644
-index 5db2da2..0000000
---- a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open_test.go
-+++ /dev/null
-@@ -1,70 +0,0 @@
--package open
-
--import "testing"
+-// WeakDecode is the same as Decode but is shorthand to enable
+-// WeaklyTypedInput. See DecoderConfig for more info.
+-func WeakDecode(input, output interface{}) error {
+- config := &DecoderConfig{
+- Metadata: nil,
+- Result: output,
+- WeaklyTypedInput: true,
+- }
-
--func TestRun(t *testing.T) {
-- // shouldn't error
-- input := "https://google.com/"
-- err := Run(input)
+- decoder, err := NewDecoder(config)
- if err != nil {
-- t.Errorf("open.Run(\"%s\") threw an error: %s", input, err)
+- return err
- }
-
-- // should error
-- input = "xxxxxxxxxxxxxxx"
-- err = Run(input)
-- if err == nil {
-- t.Errorf("Run(\"%s\") did not throw an error as expected", input)
+- return decoder.Decode(input)
+-}
+-
+-// NewDecoder returns a new decoder for the given configuration. Once
+-// a decoder has been returned, the same configuration must not be used
+-// again.
+-func NewDecoder(config *DecoderConfig) (*Decoder, error) {
+- val := reflect.ValueOf(config.Result)
+- if val.Kind() != reflect.Ptr {
+- return nil, errors.New("result must be a pointer")
+- }
+-
+- val = val.Elem()
+- if !val.CanAddr() {
+- return nil, errors.New("result must be addressable (a pointer)")
+- }
+-
+- if config.Metadata != nil {
+- if config.Metadata.Keys == nil {
+- config.Metadata.Keys = make([]string, 0)
+- }
+-
+- if config.Metadata.Unused == nil {
+- config.Metadata.Unused = make([]string, 0)
+- }
+- }
+-
+- if config.TagName == "" {
+- config.TagName = "mapstructure"
+- }
+-
+- result := &Decoder{
+- config: config,
- }
+-
+- return result, nil
-}
-
--func TestStart(t *testing.T) {
-- // shouldn't error
-- input := "https://google.com/"
-- err := Start(input)
-- if err != nil {
-- t.Errorf("open.Start(\"%s\") threw an error: %s", input, err)
+-// Decode decodes the given raw interface to the target pointer specified
+-// by the configuration.
+-func (d *Decoder) Decode(raw interface{}) error {
+- return d.decode("", raw, reflect.ValueOf(d.config.Result).Elem())
+-}
+-
+-// Decodes an unknown data type into a specific reflection value.
+-func (d *Decoder) decode(name string, data interface{}, val reflect.Value) error {
+- if data == nil {
+- // If the data is nil, then we don't set anything.
+- return nil
- }
-
-- // shouldn't error
-- input = "xxxxxxxxxxxxxxx"
-- err = Start(input)
-- if err != nil {
-- t.Errorf("open.Start(\"%s\") shouldn't even fail on invalid input: %s", input, err)
+- dataVal := reflect.ValueOf(data)
+- if !dataVal.IsValid() {
+- // If the data value is invalid, then we just set the value
+- // to be the zero value.
+- val.Set(reflect.Zero(val.Type()))
+- return nil
+- }
+-
+- if d.config.DecodeHook != nil {
+- // We have a DecodeHook, so let's pre-process the data.
+- var err error
+- data, err = d.config.DecodeHook(getKind(dataVal), getKind(val), data)
+- if err != nil {
+- return err
+- }
+- }
+-
+- var err error
+- dataKind := getKind(val)
+- switch dataKind {
+- case reflect.Bool:
+- err = d.decodeBool(name, data, val)
+- case reflect.Interface:
+- err = d.decodeBasic(name, data, val)
+- case reflect.String:
+- err = d.decodeString(name, data, val)
+- case reflect.Int:
+- err = d.decodeInt(name, data, val)
+- case reflect.Uint:
+- err = d.decodeUint(name, data, val)
+- case reflect.Float32:
+- err = d.decodeFloat(name, data, val)
+- case reflect.Struct:
+- err = d.decodeStruct(name, data, val)
+- case reflect.Map:
+- err = d.decodeMap(name, data, val)
+- case reflect.Ptr:
+- err = d.decodePtr(name, data, val)
+- case reflect.Slice:
+- err = d.decodeSlice(name, data, val)
+- default:
+- // If we reached this point then we weren't able to decode it
+- return fmt.Errorf("%s: unsupported type: %s", name, dataKind)
+- }
+-
+- // If we reached here, then we successfully decoded SOMETHING, so
+- // mark the key as used if we're tracking metadata.
+- if d.config.Metadata != nil && name != "" {
+- d.config.Metadata.Keys = append(d.config.Metadata.Keys, name)
- }
+-
+- return err
-}
-
--func TestRunWith(t *testing.T) {
-- // shouldn't error
-- input := "https://google.com/"
-- app := "firefox"
-- err := RunWith(input, app)
-- if err != nil {
-- t.Errorf("open.RunWith(\"%s\", \"%s\") threw an error: %s", input, app, err)
+-// This decodes a basic type (bool, int, string, etc.) and sets the
+-// value to "data" of that type.
+-func (d *Decoder) decodeBasic(name string, data interface{}, val reflect.Value) error {
+- dataVal := reflect.ValueOf(data)
+- dataValType := dataVal.Type()
+- if !dataValType.AssignableTo(val.Type()) {
+- return fmt.Errorf(
+- "'%s' expected type '%s', got '%s'",
+- name, val.Type(), dataValType)
- }
-
-- // should error
-- app = "xxxxxxxxxxxxxxx"
-- err = RunWith(input, app)
-- if err == nil {
-- t.Errorf("RunWith(\"%s\", \"%s\") did not throw an error as expected", input, app)
+- val.Set(dataVal)
+- return nil
+-}
+-
+-func (d *Decoder) decodeString(name string, data interface{}, val reflect.Value) error {
+- dataVal := reflect.ValueOf(data)
+- dataKind := getKind(dataVal)
+-
+- converted := true
+- switch {
+- case dataKind == reflect.String:
+- val.SetString(dataVal.String())
+- case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
+- if dataVal.Bool() {
+- val.SetString("1")
+- } else {
+- val.SetString("0")
+- }
+- case dataKind == reflect.Int && d.config.WeaklyTypedInput:
+- val.SetString(strconv.FormatInt(dataVal.Int(), 10))
+- case dataKind == reflect.Uint && d.config.WeaklyTypedInput:
+- val.SetString(strconv.FormatUint(dataVal.Uint(), 10))
+- case dataKind == reflect.Float32 && d.config.WeaklyTypedInput:
+- val.SetString(strconv.FormatFloat(dataVal.Float(), 'f', -1, 64))
+- case dataKind == reflect.Slice && d.config.WeaklyTypedInput:
+- dataType := dataVal.Type()
+- elemKind := dataType.Elem().Kind()
+- switch {
+- case elemKind == reflect.Uint8:
+- val.SetString(string(dataVal.Interface().([]uint8)))
+- default:
+- converted = false
+- }
+- default:
+- converted = false
+- }
+-
+- if !converted {
+- return fmt.Errorf(
+- "'%s' expected type '%s', got unconvertible type '%s'",
+- name, val.Type(), dataVal.Type())
- }
+-
+- return nil
-}
-
--func TestStartWith(t *testing.T) {
-- // shouldn't error
-- input := "https://google.com/"
-- app := "firefox"
-- err := StartWith(input, app)
-- if err != nil {
-- t.Errorf("open.StartWith(\"%s\", \"%s\") threw an error: %s", input, app, err)
+-func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) error {
+- dataVal := reflect.ValueOf(data)
+- dataKind := getKind(dataVal)
+-
+- switch {
+- case dataKind == reflect.Int:
+- val.SetInt(dataVal.Int())
+- case dataKind == reflect.Uint:
+- val.SetInt(int64(dataVal.Uint()))
+- case dataKind == reflect.Float32:
+- val.SetInt(int64(dataVal.Float()))
+- case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
+- if dataVal.Bool() {
+- val.SetInt(1)
+- } else {
+- val.SetInt(0)
+- }
+- case dataKind == reflect.String && d.config.WeaklyTypedInput:
+- i, err := strconv.ParseInt(dataVal.String(), 0, val.Type().Bits())
+- if err == nil {
+- val.SetInt(i)
+- } else {
+- return fmt.Errorf("cannot parse '%s' as int: %s", name, err)
+- }
+- default:
+- return fmt.Errorf(
+- "'%s' expected type '%s', got unconvertible type '%s'",
+- name, val.Type(), dataVal.Type())
- }
-
-- // shouldn't error
-- input = "[<Invalid URL>]"
-- err = StartWith(input, app)
-- if err != nil {
-- t.Errorf("StartWith(\"%s\", \"%s\") shouldn't even fail on invalid input: %s", input, app, err)
+- return nil
+-}
+-
+-func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) error {
+- dataVal := reflect.ValueOf(data)
+- dataKind := getKind(dataVal)
+-
+- switch {
+- case dataKind == reflect.Int:
+- val.SetUint(uint64(dataVal.Int()))
+- case dataKind == reflect.Uint:
+- val.SetUint(dataVal.Uint())
+- case dataKind == reflect.Float32:
+- val.SetUint(uint64(dataVal.Float()))
+- case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
+- if dataVal.Bool() {
+- val.SetUint(1)
+- } else {
+- val.SetUint(0)
+- }
+- case dataKind == reflect.String && d.config.WeaklyTypedInput:
+- i, err := strconv.ParseUint(dataVal.String(), 0, val.Type().Bits())
+- if err == nil {
+- val.SetUint(i)
+- } else {
+- return fmt.Errorf("cannot parse '%s' as uint: %s", name, err)
+- }
+- default:
+- return fmt.Errorf(
+- "'%s' expected type '%s', got unconvertible type '%s'",
+- name, val.Type(), dataVal.Type())
- }
-
+- return nil
+-}
+-
+-func (d *Decoder) decodeBool(name string, data interface{}, val reflect.Value) error {
+- dataVal := reflect.ValueOf(data)
+- dataKind := getKind(dataVal)
+-
+- switch {
+- case dataKind == reflect.Bool:
+- val.SetBool(dataVal.Bool())
+- case dataKind == reflect.Int && d.config.WeaklyTypedInput:
+- val.SetBool(dataVal.Int() != 0)
+- case dataKind == reflect.Uint && d.config.WeaklyTypedInput:
+- val.SetBool(dataVal.Uint() != 0)
+- case dataKind == reflect.Float32 && d.config.WeaklyTypedInput:
+- val.SetBool(dataVal.Float() != 0)
+- case dataKind == reflect.String && d.config.WeaklyTypedInput:
+- b, err := strconv.ParseBool(dataVal.String())
+- if err == nil {
+- val.SetBool(b)
+- } else if dataVal.String() == "" {
+- val.SetBool(false)
+- } else {
+- return fmt.Errorf("cannot parse '%s' as bool: %s", name, err)
+- }
+- default:
+- return fmt.Errorf(
+- "'%s' expected type '%s', got unconvertible type '%s'",
+- name, val.Type(), dataVal.Type())
+- }
+-
+- return nil
+-}
+-
+-func (d *Decoder) decodeFloat(name string, data interface{}, val reflect.Value) error {
+- dataVal := reflect.ValueOf(data)
+- dataKind := getKind(dataVal)
+-
+- switch {
+- case dataKind == reflect.Int:
+- val.SetFloat(float64(dataVal.Int()))
+- case dataKind == reflect.Uint:
+- val.SetFloat(float64(dataVal.Uint()))
+- case dataKind == reflect.Float32:
+- val.SetFloat(float64(dataVal.Float()))
+- case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
+- if dataVal.Bool() {
+- val.SetFloat(1)
+- } else {
+- val.SetFloat(0)
+- }
+- case dataKind == reflect.String && d.config.WeaklyTypedInput:
+- f, err := strconv.ParseFloat(dataVal.String(), val.Type().Bits())
+- if err == nil {
+- val.SetFloat(f)
+- } else {
+- return fmt.Errorf("cannot parse '%s' as float: %s", name, err)
+- }
+- default:
+- return fmt.Errorf(
+- "'%s' expected type '%s', got unconvertible type '%s'",
+- name, val.Type(), dataVal.Type())
+- }
+-
+- return nil
+-}
+-
+-func (d *Decoder) decodeMap(name string, data interface{}, val reflect.Value) error {
+- valType := val.Type()
+- valKeyType := valType.Key()
+- valElemType := valType.Elem()
+-
+- // Make a new map to hold our result
+- mapType := reflect.MapOf(valKeyType, valElemType)
+- valMap := reflect.MakeMap(mapType)
+-
+- // Check input type
+- dataVal := reflect.Indirect(reflect.ValueOf(data))
+- if dataVal.Kind() != reflect.Map {
+- // Accept empty array/slice instead of an empty map in weakly typed mode
+- if d.config.WeaklyTypedInput &&
+- (dataVal.Kind() == reflect.Slice || dataVal.Kind() == reflect.Array) &&
+- dataVal.Len() == 0 {
+- val.Set(valMap)
+- return nil
+- } else {
+- return fmt.Errorf("'%s' expected a map, got '%s'", name, dataVal.Kind())
+- }
+- }
+-
+- // Accumulate errors
+- errors := make([]string, 0)
+-
+- for _, k := range dataVal.MapKeys() {
+- fieldName := fmt.Sprintf("%s[%s]", name, k)
+-
+- // First decode the key into the proper type
+- currentKey := reflect.Indirect(reflect.New(valKeyType))
+- if err := d.decode(fieldName, k.Interface(), currentKey); err != nil {
+- errors = appendErrors(errors, err)
+- continue
+- }
+-
+- // Next decode the data into the proper type
+- v := dataVal.MapIndex(k).Interface()
+- currentVal := reflect.Indirect(reflect.New(valElemType))
+- if err := d.decode(fieldName, v, currentVal); err != nil {
+- errors = appendErrors(errors, err)
+- continue
+- }
+-
+- valMap.SetMapIndex(currentKey, currentVal)
+- }
+-
+- // Set the built up map to the value
+- val.Set(valMap)
+-
+- // If we had errors, return those
+- if len(errors) > 0 {
+- return &Error{errors}
+- }
+-
+- return nil
+-}
+-
+-func (d *Decoder) decodePtr(name string, data interface{}, val reflect.Value) error {
+- // Create an element of the concrete (non pointer) type and decode
+- // into that. Then set the value of the pointer to this type.
+- valType := val.Type()
+- valElemType := valType.Elem()
+- realVal := reflect.New(valElemType)
+- if err := d.decode(name, data, reflect.Indirect(realVal)); err != nil {
+- return err
+- }
+-
+- val.Set(realVal)
+- return nil
+-}
+-
+-func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) error {
+- dataVal := reflect.Indirect(reflect.ValueOf(data))
+- dataValKind := dataVal.Kind()
+- valType := val.Type()
+- valElemType := valType.Elem()
+- sliceType := reflect.SliceOf(valElemType)
+-
+- // Check input type
+- if dataValKind != reflect.Array && dataValKind != reflect.Slice {
+- // Accept empty map instead of array/slice in weakly typed mode
+- if d.config.WeaklyTypedInput && dataVal.Kind() == reflect.Map && dataVal.Len() == 0 {
+- val.Set(reflect.MakeSlice(sliceType, 0, 0))
+- return nil
+- } else {
+- return fmt.Errorf(
+- "'%s': source data must be an array or slice, got %s", name, dataValKind)
+- }
+- }
+-
+- // Make a new slice to hold our result, same size as the original data.
+- valSlice := reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len())
+-
+- // Accumulate any errors
+- errors := make([]string, 0)
+-
+- for i := 0; i < dataVal.Len(); i++ {
+- currentData := dataVal.Index(i).Interface()
+- currentField := valSlice.Index(i)
+-
+- fieldName := fmt.Sprintf("%s[%d]", name, i)
+- if err := d.decode(fieldName, currentData, currentField); err != nil {
+- errors = appendErrors(errors, err)
+- }
+- }
+-
+- // Finally, set the value to the slice we built up
+- val.Set(valSlice)
+-
+- // If there were errors, we return those
+- if len(errors) > 0 {
+- return &Error{errors}
+- }
+-
+- return nil
+-}
+-
+-func (d *Decoder) decodeStruct(name string, data interface{}, val reflect.Value) error {
+- dataVal := reflect.Indirect(reflect.ValueOf(data))
+- dataValKind := dataVal.Kind()
+- if dataValKind != reflect.Map {
+- return fmt.Errorf("'%s' expected a map, got '%s'", name, dataValKind)
+- }
+-
+- dataValType := dataVal.Type()
+- if kind := dataValType.Key().Kind(); kind != reflect.String && kind != reflect.Interface {
+- return fmt.Errorf(
+- "'%s' needs a map with string keys, has '%s' keys",
+- name, dataValType.Key().Kind())
+- }
+-
+- dataValKeys := make(map[reflect.Value]struct{})
+- dataValKeysUnused := make(map[interface{}]struct{})
+- for _, dataValKey := range dataVal.MapKeys() {
+- dataValKeys[dataValKey] = struct{}{}
+- dataValKeysUnused[dataValKey.Interface()] = struct{}{}
+- }
+-
+- errors := make([]string, 0)
+-
+- // This slice will keep track of all the structs we'll be decoding.
+- // There can be more than one struct if there are embedded structs
+- // that are squashed.
+- structs := make([]reflect.Value, 1, 5)
+- structs[0] = val
+-
+- // Compile the list of all the fields that we're going to be decoding
+- // from all the structs.
+- fields := make(map[*reflect.StructField]reflect.Value)
+- for len(structs) > 0 {
+- structVal := structs[0]
+- structs = structs[1:]
+-
+- structType := structVal.Type()
+- for i := 0; i < structType.NumField(); i++ {
+- fieldType := structType.Field(i)
+-
+- if fieldType.Anonymous {
+- fieldKind := fieldType.Type.Kind()
+- if fieldKind != reflect.Struct {
+- errors = appendErrors(errors,
+- fmt.Errorf("%s: unsupported type: %s", fieldType.Name, fieldKind))
+- continue
+- }
+-
+- // We have an embedded field. We "squash" the fields down
+- // if specified in the tag.
+- squash := false
+- tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",")
+- for _, tag := range tagParts[1:] {
+- if tag == "squash" {
+- squash = true
+- break
+- }
+- }
+-
+- if squash {
+- structs = append(structs, val.FieldByName(fieldType.Name))
+- continue
+- }
+- }
+-
+- // Normal struct field, store it away
+- fields[&fieldType] = structVal.Field(i)
+- }
+- }
+-
+- for fieldType, field := range fields {
+- fieldName := fieldType.Name
+-
+- tagValue := fieldType.Tag.Get(d.config.TagName)
+- tagValue = strings.SplitN(tagValue, ",", 2)[0]
+- if tagValue != "" {
+- fieldName = tagValue
+- }
+-
+- rawMapKey := reflect.ValueOf(fieldName)
+- rawMapVal := dataVal.MapIndex(rawMapKey)
+- if !rawMapVal.IsValid() {
+- // Do a slower search by iterating over each key and
+- // doing case-insensitive search.
+- for dataValKey, _ := range dataValKeys {
+- mK, ok := dataValKey.Interface().(string)
+- if !ok {
+- // Not a string key
+- continue
+- }
+-
+- if strings.EqualFold(mK, fieldName) {
+- rawMapKey = dataValKey
+- rawMapVal = dataVal.MapIndex(dataValKey)
+- break
+- }
+- }
+-
+- if !rawMapVal.IsValid() {
+- // There was no matching key in the map for the value in
+- // the struct. Just ignore.
+- continue
+- }
+- }
+-
+- // Delete the key we're using from the unused map so we stop tracking
+- delete(dataValKeysUnused, rawMapKey.Interface())
+-
+- if !field.IsValid() {
+- // This should never happen
+- panic("field is not valid")
+- }
+-
+- // If we can't set the field, then it is unexported or something,
+- // and we just continue onwards.
+- if !field.CanSet() {
+- continue
+- }
+-
+- // If the name is empty string, then we're at the root, and we
+- // don't dot-join the fields.
+- if name != "" {
+- fieldName = fmt.Sprintf("%s.%s", name, fieldName)
+- }
+-
+- if err := d.decode(fieldName, rawMapVal.Interface(), field); err != nil {
+- errors = appendErrors(errors, err)
+- }
+- }
+-
+- if d.config.ErrorUnused && len(dataValKeysUnused) > 0 {
+- keys := make([]string, 0, len(dataValKeysUnused))
+- for rawKey, _ := range dataValKeysUnused {
+- keys = append(keys, rawKey.(string))
+- }
+- sort.Strings(keys)
+-
+- err := fmt.Errorf("'%s' has invalid keys: %s", name, strings.Join(keys, ", "))
+- errors = appendErrors(errors, err)
+- }
+-
+- if len(errors) > 0 {
+- return &Error{errors}
+- }
+-
+- // Add the unused keys to the list of unused keys if we're tracking metadata
+- if d.config.Metadata != nil {
+- for rawKey, _ := range dataValKeysUnused {
+- key := rawKey.(string)
+- if name != "" {
+- key = fmt.Sprintf("%s.%s", name, key)
+- }
+-
+- d.config.Metadata.Unused = append(d.config.Metadata.Unused, key)
+- }
+- }
+-
+- return nil
+-}
+-
+-func getKind(val reflect.Value) reflect.Kind {
+- kind := val.Kind()
+-
+- switch {
+- case kind >= reflect.Int && kind <= reflect.Int64:
+- return reflect.Int
+- case kind >= reflect.Uint && kind <= reflect.Uint64:
+- return reflect.Uint
+- case kind >= reflect.Float32 && kind <= reflect.Float64:
+- return reflect.Float32
+- default:
+- return kind
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go b/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go
+deleted file mode 100644
+index b50ac36..0000000
+--- a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go
++++ /dev/null
+@@ -1,243 +0,0 @@
+-package mapstructure
+-
+-import (
+- "testing"
+-)
+-
+-func Benchmark_Decode(b *testing.B) {
+- type Person struct {
+- Name string
+- Age int
+- Emails []string
+- Extra map[string]string
+- }
+-
+- input := map[string]interface{}{
+- "name": "Mitchell",
+- "age": 91,
+- "emails": []string{"one", "two", "three"},
+- "extra": map[string]string{
+- "twitter": "mitchellh",
+- },
+- }
+-
+- var result Person
+- for i := 0; i < b.N; i++ {
+- Decode(input, &result)
+- }
+-}
+-
+-func Benchmark_DecodeBasic(b *testing.B) {
+- input := map[string]interface{}{
+- "vstring": "foo",
+- "vint": 42,
+- "Vuint": 42,
+- "vbool": true,
+- "Vfloat": 42.42,
+- "vsilent": true,
+- "vdata": 42,
+- }
+-
+- var result Basic
+- for i := 0; i < b.N; i++ {
+- Decode(input, &result)
+- }
+-}
+-
+-func Benchmark_DecodeEmbedded(b *testing.B) {
+- input := map[string]interface{}{
+- "vstring": "foo",
+- "Basic": map[string]interface{}{
+- "vstring": "innerfoo",
+- },
+- "vunique": "bar",
+- }
+-
+- var result Embedded
+- for i := 0; i < b.N; i++ {
+- Decode(input, &result)
+- }
+-}
+-
+-func Benchmark_DecodeTypeConversion(b *testing.B) {
+- input := map[string]interface{}{
+- "IntToFloat": 42,
+- "IntToUint": 42,
+- "IntToBool": 1,
+- "IntToString": 42,
+- "UintToInt": 42,
+- "UintToFloat": 42,
+- "UintToBool": 42,
+- "UintToString": 42,
+- "BoolToInt": true,
+- "BoolToUint": true,
+- "BoolToFloat": true,
+- "BoolToString": true,
+- "FloatToInt": 42.42,
+- "FloatToUint": 42.42,
+- "FloatToBool": 42.42,
+- "FloatToString": 42.42,
+- "StringToInt": "42",
+- "StringToUint": "42",
+- "StringToBool": "1",
+- "StringToFloat": "42.42",
+- "SliceToMap": []interface{}{},
+- "MapToSlice": map[string]interface{}{},
+- }
+-
+- var resultStrict TypeConversionResult
+- for i := 0; i < b.N; i++ {
+- Decode(input, &resultStrict)
+- }
+-}
+-
+-func Benchmark_DecodeMap(b *testing.B) {
+- input := map[string]interface{}{
+- "vfoo": "foo",
+- "vother": map[interface{}]interface{}{
+- "foo": "foo",
+- "bar": "bar",
+- },
+- }
+-
+- var result Map
+- for i := 0; i < b.N; i++ {
+- Decode(input, &result)
+- }
+-}
+-
+-func Benchmark_DecodeMapOfStruct(b *testing.B) {
+- input := map[string]interface{}{
+- "value": map[string]interface{}{
+- "foo": map[string]string{"vstring": "one"},
+- "bar": map[string]string{"vstring": "two"},
+- },
+- }
+-
+- var result MapOfStruct
+- for i := 0; i < b.N; i++ {
+- Decode(input, &result)
+- }
+-}
+-
+-func Benchmark_DecodeSlice(b *testing.B) {
+- input := map[string]interface{}{
+- "vfoo": "foo",
+- "vbar": []string{"foo", "bar", "baz"},
+- }
+-
+- var result Slice
+- for i := 0; i < b.N; i++ {
+- Decode(input, &result)
+- }
+-}
+-
+-func Benchmark_DecodeSliceOfStruct(b *testing.B) {
+- input := map[string]interface{}{
+- "value": []map[string]interface{}{
+- {"vstring": "one"},
+- {"vstring": "two"},
+- },
+- }
+-
+- var result SliceOfStruct
+- for i := 0; i < b.N; i++ {
+- Decode(input, &result)
+- }
+-}
+-
+-func Benchmark_DecodeWeaklyTypedInput(b *testing.B) {
+- type Person struct {
+- Name string
+- Age int
+- Emails []string
+- }
+-
+- // This input can come from anywhere, but typically comes from
+- // something like decoding JSON, generated by a weakly typed language
+- // such as PHP.
+- input := map[string]interface{}{
+- "name": 123, // number => string
+- "age": "42", // string => number
+- "emails": map[string]interface{}{}, // empty map => empty array
+- }
+-
+- var result Person
+- config := &DecoderConfig{
+- WeaklyTypedInput: true,
+- Result: &result,
+- }
+-
+- decoder, err := NewDecoder(config)
+- if err != nil {
+- panic(err)
+- }
+-
+- for i := 0; i < b.N; i++ {
+- decoder.Decode(input)
+- }
+-}
+-
+-func Benchmark_DecodeMetadata(b *testing.B) {
+- type Person struct {
+- Name string
+- Age int
+- }
+-
+- input := map[string]interface{}{
+- "name": "Mitchell",
+- "age": 91,
+- "email": "foo at bar.com",
+- }
+-
+- var md Metadata
+- var result Person
+- config := &DecoderConfig{
+- Metadata: &md,
+- Result: &result,
+- }
+-
+- decoder, err := NewDecoder(config)
+- if err != nil {
+- panic(err)
+- }
+-
+- for i := 0; i < b.N; i++ {
+- decoder.Decode(input)
+- }
+-}
+-
+-func Benchmark_DecodeMetadataEmbedded(b *testing.B) {
+- input := map[string]interface{}{
+- "vstring": "foo",
+- "vunique": "bar",
+- }
+-
+- var md Metadata
+- var result EmbeddedSquash
+- config := &DecoderConfig{
+- Metadata: &md,
+- Result: &result,
+- }
+-
+- decoder, err := NewDecoder(config)
+- if err != nil {
+- b.Fatalf("err: %s", err)
+- }
+-
+- for i := 0; i < b.N; i++ {
+- decoder.Decode(input)
+- }
+-}
+-
+-func Benchmark_DecodeTagged(b *testing.B) {
+- input := map[string]interface{}{
+- "foo": "bar",
+- "bar": "value",
+- }
+-
+- var result Tagged
+- for i := 0; i < b.N; i++ {
+- Decode(input, &result)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go b/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go
+deleted file mode 100644
+index 7054f1a..0000000
+--- a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go
++++ /dev/null
+@@ -1,47 +0,0 @@
+-package mapstructure
+-
+-import "testing"
+-
+-// GH-1
+-func TestDecode_NilValue(t *testing.T) {
+- input := map[string]interface{}{
+- "vfoo": nil,
+- "vother": nil,
+- }
+-
+- var result Map
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("should not error: %s", err)
+- }
+-
+- if result.Vfoo != "" {
+- t.Fatalf("value should be default: %s", result.Vfoo)
+- }
+-
+- if result.Vother != nil {
+- t.Fatalf("Vother should be nil: %s", result.Vother)
+- }
+-}
+-
+-// GH-10
+-func TestDecode_mapInterfaceInterface(t *testing.T) {
+- input := map[interface{}]interface{}{
+- "vfoo": nil,
+- "vother": nil,
+- }
+-
+- var result Map
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("should not error: %s", err)
+- }
+-
+- if result.Vfoo != "" {
+- t.Fatalf("value should be default: %s", result.Vfoo)
+- }
+-
+- if result.Vother != nil {
+- t.Fatalf("Vother should be nil: %s", result.Vother)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_examples_test.go b/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_examples_test.go
+deleted file mode 100644
+index aa393cc..0000000
+--- a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_examples_test.go
++++ /dev/null
+@@ -1,169 +0,0 @@
+-package mapstructure
+-
+-import (
+- "fmt"
+-)
+-
+-func ExampleDecode() {
+- type Person struct {
+- Name string
+- Age int
+- Emails []string
+- Extra map[string]string
+- }
+-
+- // This input can come from anywhere, but typically comes from
+- // something like decoding JSON where we're not quite sure of the
+- // struct initially.
+- input := map[string]interface{}{
+- "name": "Mitchell",
+- "age": 91,
+- "emails": []string{"one", "two", "three"},
+- "extra": map[string]string{
+- "twitter": "mitchellh",
+- },
+- }
+-
+- var result Person
+- err := Decode(input, &result)
+- if err != nil {
+- panic(err)
+- }
+-
+- fmt.Printf("%#v", result)
+- // Output:
+- // mapstructure.Person{Name:"Mitchell", Age:91, Emails:[]string{"one", "two", "three"}, Extra:map[string]string{"twitter":"mitchellh"}}
+-}
+-
+-func ExampleDecode_errors() {
+- type Person struct {
+- Name string
+- Age int
+- Emails []string
+- Extra map[string]string
+- }
+-
+- // This input can come from anywhere, but typically comes from
+- // something like decoding JSON where we're not quite sure of the
+- // struct initially.
+- input := map[string]interface{}{
+- "name": 123,
+- "age": "bad value",
+- "emails": []int{1, 2, 3},
+- }
+-
+- var result Person
+- err := Decode(input, &result)
+- if err == nil {
+- panic("should have an error")
+- }
+-
+- fmt.Println(err.Error())
+- // Output:
+- // 5 error(s) decoding:
+- //
+- // * 'Name' expected type 'string', got unconvertible type 'int'
+- // * 'Age' expected type 'int', got unconvertible type 'string'
+- // * 'Emails[0]' expected type 'string', got unconvertible type 'int'
+- // * 'Emails[1]' expected type 'string', got unconvertible type 'int'
+- // * 'Emails[2]' expected type 'string', got unconvertible type 'int'
+-}
+-
+-func ExampleDecode_metadata() {
+- type Person struct {
+- Name string
+- Age int
+- }
+-
+- // This input can come from anywhere, but typically comes from
+- // something like decoding JSON where we're not quite sure of the
+- // struct initially.
+- input := map[string]interface{}{
+- "name": "Mitchell",
+- "age": 91,
+- "email": "foo at bar.com",
+- }
+-
+- // For metadata, we make a more advanced DecoderConfig so we can
+- // more finely configure the decoder that is used. In this case, we
+- // just tell the decoder we want to track metadata.
+- var md Metadata
+- var result Person
+- config := &DecoderConfig{
+- Metadata: &md,
+- Result: &result,
+- }
+-
+- decoder, err := NewDecoder(config)
+- if err != nil {
+- panic(err)
+- }
+-
+- if err := decoder.Decode(input); err != nil {
+- panic(err)
+- }
+-
+- fmt.Printf("Unused keys: %#v", md.Unused)
+- // Output:
+- // Unused keys: []string{"email"}
+-}
+-
+-func ExampleDecode_weaklyTypedInput() {
+- type Person struct {
+- Name string
+- Age int
+- Emails []string
+- }
+-
+- // This input can come from anywhere, but typically comes from
+- // something like decoding JSON, generated by a weakly typed language
+- // such as PHP.
+- input := map[string]interface{}{
+- "name": 123, // number => string
+- "age": "42", // string => number
+- "emails": map[string]interface{}{}, // empty map => empty array
+- }
+-
+- var result Person
+- config := &DecoderConfig{
+- WeaklyTypedInput: true,
+- Result: &result,
+- }
+-
+- decoder, err := NewDecoder(config)
+- if err != nil {
+- panic(err)
+- }
+-
+- err = decoder.Decode(input)
+- if err != nil {
+- panic(err)
+- }
+-
+- fmt.Printf("%#v", result)
+- // Output: mapstructure.Person{Name:"123", Age:42, Emails:[]string{}}
+-}
+-
+-func ExampleDecode_tags() {
+- // Note that the mapstructure tags defined in the struct type
+- // can indicate which fields the values are mapped to.
+- type Person struct {
+- Name string `mapstructure:"person_name"`
+- Age int `mapstructure:"person_age"`
+- }
+-
+- input := map[string]interface{}{
+- "person_name": "Mitchell",
+- "person_age": 91,
+- }
+-
+- var result Person
+- err := Decode(input, &result)
+- if err != nil {
+- panic(err)
+- }
+-
+- fmt.Printf("%#v", result)
+- // Output:
+- // mapstructure.Person{Name:"Mitchell", Age:91}
+-}
+diff --git a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_test.go b/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_test.go
+deleted file mode 100644
+index 23029c7..0000000
+--- a/Godeps/_workspace/src/github.com/mitchellh/mapstructure/mapstructure_test.go
++++ /dev/null
+@@ -1,828 +0,0 @@
+-package mapstructure
+-
+-import (
+- "reflect"
+- "sort"
+- "testing"
+-)
+-
+-type Basic struct {
+- Vstring string
+- Vint int
+- Vuint uint
+- Vbool bool
+- Vfloat float64
+- Vextra string
+- vsilent bool
+- Vdata interface{}
+-}
+-
+-type Embedded struct {
+- Basic
+- Vunique string
+-}
+-
+-type EmbeddedPointer struct {
+- *Basic
+- Vunique string
+-}
+-
+-type EmbeddedSquash struct {
+- Basic `mapstructure:",squash"`
+- Vunique string
+-}
+-
+-type Map struct {
+- Vfoo string
+- Vother map[string]string
+-}
+-
+-type MapOfStruct struct {
+- Value map[string]Basic
+-}
+-
+-type Nested struct {
+- Vfoo string
+- Vbar Basic
+-}
+-
+-type NestedPointer struct {
+- Vfoo string
+- Vbar *Basic
+-}
+-
+-type Slice struct {
+- Vfoo string
+- Vbar []string
+-}
+-
+-type SliceOfStruct struct {
+- Value []Basic
+-}
+-
+-type Tagged struct {
+- Extra string `mapstructure:"bar,what,what"`
+- Value string `mapstructure:"foo"`
+-}
+-
+-type TypeConversionResult struct {
+- IntToFloat float32
+- IntToUint uint
+- IntToBool bool
+- IntToString string
+- UintToInt int
+- UintToFloat float32
+- UintToBool bool
+- UintToString string
+- BoolToInt int
+- BoolToUint uint
+- BoolToFloat float32
+- BoolToString string
+- FloatToInt int
+- FloatToUint uint
+- FloatToBool bool
+- FloatToString string
+- SliceUint8ToString string
+- StringToInt int
+- StringToUint uint
+- StringToBool bool
+- StringToFloat float32
+- SliceToMap map[string]interface{}
+- MapToSlice []interface{}
+-}
+-
+-func TestBasicTypes(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vstring": "foo",
+- "vint": 42,
+- "Vuint": 42,
+- "vbool": true,
+- "Vfloat": 42.42,
+- "vsilent": true,
+- "vdata": 42,
+- }
+-
+- var result Basic
+- err := Decode(input, &result)
+- if err != nil {
+- t.Errorf("got an err: %s", err.Error())
+- t.FailNow()
+- }
+-
+- if result.Vstring != "foo" {
+- t.Errorf("vstring value should be 'foo': %#v", result.Vstring)
+- }
+-
+- if result.Vint != 42 {
+- t.Errorf("vint value should be 42: %#v", result.Vint)
+- }
+-
+- if result.Vuint != 42 {
+- t.Errorf("vuint value should be 42: %#v", result.Vuint)
+- }
+-
+- if result.Vbool != true {
+- t.Errorf("vbool value should be true: %#v", result.Vbool)
+- }
+-
+- if result.Vfloat != 42.42 {
+- t.Errorf("vfloat value should be 42.42: %#v", result.Vfloat)
+- }
+-
+- if result.Vextra != "" {
+- t.Errorf("vextra value should be empty: %#v", result.Vextra)
+- }
+-
+- if result.vsilent != false {
+- t.Error("vsilent should not be set, it is unexported")
+- }
+-
+- if result.Vdata != 42 {
+- t.Error("vdata should be valid")
+- }
+-}
+-
+-func TestBasic_IntWithFloat(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vint": float64(42),
+- }
+-
+- var result Basic
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("got an err: %s", err)
+- }
+-}
+-
+-func TestDecode_Embedded(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vstring": "foo",
+- "Basic": map[string]interface{}{
+- "vstring": "innerfoo",
+- },
+- "vunique": "bar",
+- }
+-
+- var result Embedded
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("got an err: %s", err.Error())
+- }
+-
+- if result.Vstring != "innerfoo" {
+- t.Errorf("vstring value should be 'innerfoo': %#v", result.Vstring)
+- }
+-
+- if result.Vunique != "bar" {
+- t.Errorf("vunique value should be 'bar': %#v", result.Vunique)
+- }
+-}
+-
+-func TestDecode_EmbeddedPointer(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vstring": "foo",
+- "Basic": map[string]interface{}{
+- "vstring": "innerfoo",
+- },
+- "vunique": "bar",
+- }
+-
+- var result EmbeddedPointer
+- err := Decode(input, &result)
+- if err == nil {
+- t.Fatal("should get error")
+- }
+-}
+-
+-func TestDecode_EmbeddedSquash(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vstring": "foo",
+- "vunique": "bar",
+- }
+-
+- var result EmbeddedSquash
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("got an err: %s", err.Error())
+- }
+-
+- if result.Vstring != "foo" {
+- t.Errorf("vstring value should be 'foo': %#v", result.Vstring)
+- }
+-
+- if result.Vunique != "bar" {
+- t.Errorf("vunique value should be 'bar': %#v", result.Vunique)
+- }
+-}
+-
+-func TestDecode_DecodeHook(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vint": "WHAT",
+- }
+-
+- decodeHook := func(from reflect.Kind, to reflect.Kind, v interface{}) (interface{}, error) {
+- if from == reflect.String && to != reflect.String {
+- return 5, nil
+- }
+-
+- return v, nil
+- }
+-
+- var result Basic
+- config := &DecoderConfig{
+- DecodeHook: decodeHook,
+- Result: &result,
+- }
+-
+- decoder, err := NewDecoder(config)
+- if err != nil {
+- t.Fatalf("err: %s", err)
+- }
+-
+- err = decoder.Decode(input)
+- if err != nil {
+- t.Fatalf("got an err: %s", err)
+- }
+-
+- if result.Vint != 5 {
+- t.Errorf("vint should be 5: %#v", result.Vint)
+- }
+-}
+-
+-func TestDecode_Nil(t *testing.T) {
+- t.Parallel()
+-
+- var input interface{} = nil
+- result := Basic{
+- Vstring: "foo",
+- }
+-
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("err: %s", err)
+- }
+-
+- if result.Vstring != "foo" {
+- t.Fatalf("bad: %#v", result.Vstring)
+- }
+-}
+-
+-func TestDecode_NonStruct(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "foo": "bar",
+- "bar": "baz",
+- }
+-
+- var result map[string]string
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("err: %s", err)
+- }
+-
+- if result["foo"] != "bar" {
+- t.Fatal("foo is not bar")
+- }
+-}
+-
+-func TestDecode_TypeConversion(t *testing.T) {
+- input := map[string]interface{}{
+- "IntToFloat": 42,
+- "IntToUint": 42,
+- "IntToBool": 1,
+- "IntToString": 42,
+- "UintToInt": 42,
+- "UintToFloat": 42,
+- "UintToBool": 42,
+- "UintToString": 42,
+- "BoolToInt": true,
+- "BoolToUint": true,
+- "BoolToFloat": true,
+- "BoolToString": true,
+- "FloatToInt": 42.42,
+- "FloatToUint": 42.42,
+- "FloatToBool": 42.42,
+- "FloatToString": 42.42,
+- "SliceUint8ToString": []uint8("foo"),
+- "StringToInt": "42",
+- "StringToUint": "42",
+- "StringToBool": "1",
+- "StringToFloat": "42.42",
+- "SliceToMap": []interface{}{},
+- "MapToSlice": map[string]interface{}{},
+- }
+-
+- expectedResultStrict := TypeConversionResult{
+- IntToFloat: 42.0,
+- IntToUint: 42,
+- UintToInt: 42,
+- UintToFloat: 42,
+- BoolToInt: 0,
+- BoolToUint: 0,
+- BoolToFloat: 0,
+- FloatToInt: 42,
+- FloatToUint: 42,
+- }
+-
+- expectedResultWeak := TypeConversionResult{
+- IntToFloat: 42.0,
+- IntToUint: 42,
+- IntToBool: true,
+- IntToString: "42",
+- UintToInt: 42,
+- UintToFloat: 42,
+- UintToBool: true,
+- UintToString: "42",
+- BoolToInt: 1,
+- BoolToUint: 1,
+- BoolToFloat: 1,
+- BoolToString: "1",
+- FloatToInt: 42,
+- FloatToUint: 42,
+- FloatToBool: true,
+- FloatToString: "42.42",
+- SliceUint8ToString: "foo",
+- StringToInt: 42,
+- StringToUint: 42,
+- StringToBool: true,
+- StringToFloat: 42.42,
+- SliceToMap: map[string]interface{}{},
+- MapToSlice: []interface{}{},
+- }
+-
+- // Test strict type conversion
+- var resultStrict TypeConversionResult
+- err := Decode(input, &resultStrict)
+- if err == nil {
+- t.Errorf("should return an error")
+- }
+- if !reflect.DeepEqual(resultStrict, expectedResultStrict) {
+- t.Errorf("expected %v, got: %v", expectedResultStrict, resultStrict)
+- }
+-
+- // Test weak type conversion
+- var decoder *Decoder
+- var resultWeak TypeConversionResult
+-
+- config := &DecoderConfig{
+- WeaklyTypedInput: true,
+- Result: &resultWeak,
+- }
+-
+- decoder, err = NewDecoder(config)
+- if err != nil {
+- t.Fatalf("err: %s", err)
+- }
+-
+- err = decoder.Decode(input)
+- if err != nil {
+- t.Fatalf("got an err: %s", err)
+- }
+-
+- if !reflect.DeepEqual(resultWeak, expectedResultWeak) {
+- t.Errorf("expected \n%#v, got: \n%#v", expectedResultWeak, resultWeak)
+- }
+-}
+-
+-func TestDecoder_ErrorUnused(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vstring": "hello",
+- "foo": "bar",
+- }
+-
+- var result Basic
+- config := &DecoderConfig{
+- ErrorUnused: true,
+- Result: &result,
+- }
+-
+- decoder, err := NewDecoder(config)
+- if err != nil {
+- t.Fatalf("err: %s", err)
+- }
+-
+- err = decoder.Decode(input)
+- if err == nil {
+- t.Fatal("expected error")
+- }
+-}
+-
+-func TestMap(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vfoo": "foo",
+- "vother": map[interface{}]interface{}{
+- "foo": "foo",
+- "bar": "bar",
+- },
+- }
+-
+- var result Map
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("got an error: %s", err)
+- }
+-
+- if result.Vfoo != "foo" {
+- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
+- }
+-
+- if result.Vother == nil {
+- t.Fatal("vother should not be nil")
+- }
+-
+- if len(result.Vother) != 2 {
+- t.Error("vother should have two items")
+- }
+-
+- if result.Vother["foo"] != "foo" {
+- t.Errorf("'foo' key should be foo, got: %#v", result.Vother["foo"])
+- }
+-
+- if result.Vother["bar"] != "bar" {
+- t.Errorf("'bar' key should be bar, got: %#v", result.Vother["bar"])
+- }
+-}
+-
+-func TestMapOfStruct(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "value": map[string]interface{}{
+- "foo": map[string]string{"vstring": "one"},
+- "bar": map[string]string{"vstring": "two"},
+- },
+- }
+-
+- var result MapOfStruct
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("got an err: %s", err)
+- }
+-
+- if result.Value == nil {
+- t.Fatal("value should not be nil")
+- }
+-
+- if len(result.Value) != 2 {
+- t.Error("value should have two items")
+- }
+-
+- if result.Value["foo"].Vstring != "one" {
+- t.Errorf("foo value should be 'one', got: %s", result.Value["foo"].Vstring)
+- }
+-
+- if result.Value["bar"].Vstring != "two" {
+- t.Errorf("bar value should be 'two', got: %s", result.Value["bar"].Vstring)
+- }
+-}
+-
+-func TestNestedType(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vfoo": "foo",
+- "vbar": map[string]interface{}{
+- "vstring": "foo",
+- "vint": 42,
+- "vbool": true,
+- },
+- }
+-
+- var result Nested
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("got an err: %s", err.Error())
+- }
+-
+- if result.Vfoo != "foo" {
+- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
+- }
+-
+- if result.Vbar.Vstring != "foo" {
+- t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring)
+- }
+-
+- if result.Vbar.Vint != 42 {
+- t.Errorf("vint value should be 42: %#v", result.Vbar.Vint)
+- }
+-
+- if result.Vbar.Vbool != true {
+- t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool)
+- }
+-
+- if result.Vbar.Vextra != "" {
+- t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra)
+- }
+-}
+-
+-func TestNestedTypePointer(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vfoo": "foo",
+- "vbar": &map[string]interface{}{
+- "vstring": "foo",
+- "vint": 42,
+- "vbool": true,
+- },
+- }
+-
+- var result NestedPointer
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("got an err: %s", err.Error())
+- }
+-
+- if result.Vfoo != "foo" {
+- t.Errorf("vfoo value should be 'foo': %#v", result.Vfoo)
+- }
+-
+- if result.Vbar.Vstring != "foo" {
+- t.Errorf("vstring value should be 'foo': %#v", result.Vbar.Vstring)
+- }
+-
+- if result.Vbar.Vint != 42 {
+- t.Errorf("vint value should be 42: %#v", result.Vbar.Vint)
+- }
+-
+- if result.Vbar.Vbool != true {
+- t.Errorf("vbool value should be true: %#v", result.Vbar.Vbool)
+- }
+-
+- if result.Vbar.Vextra != "" {
+- t.Errorf("vextra value should be empty: %#v", result.Vbar.Vextra)
+- }
+-}
+-
+-func TestSlice(t *testing.T) {
+- t.Parallel()
+-
+- inputStringSlice := map[string]interface{}{
+- "vfoo": "foo",
+- "vbar": []string{"foo", "bar", "baz"},
+- }
+-
+- inputStringSlicePointer := map[string]interface{}{
+- "vfoo": "foo",
+- "vbar": &[]string{"foo", "bar", "baz"},
+- }
+-
+- outputStringSlice := &Slice{
+- "foo",
+- []string{"foo", "bar", "baz"},
+- }
+-
+- testSliceInput(t, inputStringSlice, outputStringSlice)
+- testSliceInput(t, inputStringSlicePointer, outputStringSlice)
+-}
+-
+-func TestInvalidSlice(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vfoo": "foo",
+- "vbar": 42,
+- }
+-
+- result := Slice{}
+- err := Decode(input, &result)
+- if err == nil {
+- t.Errorf("expected failure")
+- }
+-}
+-
+-func TestSliceOfStruct(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "value": []map[string]interface{}{
+- {"vstring": "one"},
+- {"vstring": "two"},
+- },
+- }
+-
+- var result SliceOfStruct
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("got unexpected error: %s", err)
+- }
+-
+- if len(result.Value) != 2 {
+- t.Fatalf("expected two values, got %d", len(result.Value))
+- }
+-
+- if result.Value[0].Vstring != "one" {
+- t.Errorf("first value should be 'one', got: %s", result.Value[0].Vstring)
+- }
+-
+- if result.Value[1].Vstring != "two" {
+- t.Errorf("second value should be 'two', got: %s", result.Value[1].Vstring)
+- }
+-}
+-
+-func TestInvalidType(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vstring": 42,
+- }
+-
+- var result Basic
+- err := Decode(input, &result)
+- if err == nil {
+- t.Fatal("error should exist")
+- }
+-
+- derr, ok := err.(*Error)
+- if !ok {
+- t.Fatalf("error should be kind of Error, instead: %#v", err)
+- }
+-
+- if derr.Errors[0] != "'Vstring' expected type 'string', got unconvertible type 'int'" {
+- t.Errorf("got unexpected error: %s", err)
+- }
+-}
+-
+-func TestMetadata(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vfoo": "foo",
+- "vbar": map[string]interface{}{
+- "vstring": "foo",
+- "Vuint": 42,
+- "foo": "bar",
+- },
+- "bar": "nil",
+- }
+-
+- var md Metadata
+- var result Nested
+- config := &DecoderConfig{
+- Metadata: &md,
+- Result: &result,
+- }
+-
+- decoder, err := NewDecoder(config)
+- if err != nil {
+- t.Fatalf("err: %s", err)
+- }
+-
+- err = decoder.Decode(input)
+- if err != nil {
+- t.Fatalf("err: %s", err.Error())
+- }
+-
+- expectedKeys := []string{"Vfoo", "Vbar.Vstring", "Vbar.Vuint", "Vbar"}
+- if !reflect.DeepEqual(md.Keys, expectedKeys) {
+- t.Fatalf("bad keys: %#v", md.Keys)
+- }
+-
+- expectedUnused := []string{"Vbar.foo", "bar"}
+- if !reflect.DeepEqual(md.Unused, expectedUnused) {
+- t.Fatalf("bad unused: %#v", md.Unused)
+- }
+-}
+-
+-func TestMetadata_Embedded(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "vstring": "foo",
+- "vunique": "bar",
+- }
+-
+- var md Metadata
+- var result EmbeddedSquash
+- config := &DecoderConfig{
+- Metadata: &md,
+- Result: &result,
+- }
+-
+- decoder, err := NewDecoder(config)
+- if err != nil {
+- t.Fatalf("err: %s", err)
+- }
+-
+- err = decoder.Decode(input)
+- if err != nil {
+- t.Fatalf("err: %s", err.Error())
+- }
+-
+- expectedKeys := []string{"Vstring", "Vunique"}
+-
+- sort.Strings(md.Keys)
+- if !reflect.DeepEqual(md.Keys, expectedKeys) {
+- t.Fatalf("bad keys: %#v", md.Keys)
+- }
+-
+- expectedUnused := []string{}
+- if !reflect.DeepEqual(md.Unused, expectedUnused) {
+- t.Fatalf("bad unused: %#v", md.Unused)
+- }
+-}
+-
+-func TestNonPtrValue(t *testing.T) {
+- t.Parallel()
+-
+- err := Decode(map[string]interface{}{}, Basic{})
+- if err == nil {
+- t.Fatal("error should exist")
+- }
+-
+- if err.Error() != "result must be a pointer" {
+- t.Errorf("got unexpected error: %s", err)
+- }
+-}
+-
+-func TestTagged(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "foo": "bar",
+- "bar": "value",
+- }
+-
+- var result Tagged
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("unexpected error: %s", err)
+- }
+-
+- if result.Value != "bar" {
+- t.Errorf("value should be 'bar', got: %#v", result.Value)
+- }
+-
+- if result.Extra != "value" {
+- t.Errorf("extra should be 'value', got: %#v", result.Extra)
+- }
+-}
+-
+-func TestWeakDecode(t *testing.T) {
+- t.Parallel()
+-
+- input := map[string]interface{}{
+- "foo": "4",
+- "bar": "value",
+- }
+-
+- var result struct {
+- Foo int
+- Bar string
+- }
+-
+- if err := WeakDecode(input, &result); err != nil {
+- t.Fatalf("err: %s", err)
+- }
+- if result.Foo != 4 {
+- t.Fatalf("bad: %#v", result)
+- }
+- if result.Bar != "value" {
+- t.Fatalf("bad: %#v", result)
+- }
+-}
+-
+-func testSliceInput(t *testing.T, input map[string]interface{}, expected *Slice) {
+- var result Slice
+- err := Decode(input, &result)
+- if err != nil {
+- t.Fatalf("got error: %s", err)
+- }
+-
+- if result.Vfoo != expected.Vfoo {
+- t.Errorf("Vfoo expected '%s', got '%s'", expected.Vfoo, result.Vfoo)
+- }
+-
+- if result.Vbar == nil {
+- t.Fatalf("Vbar a slice, got '%#v'", result.Vbar)
+- }
+-
+- if len(result.Vbar) != len(expected.Vbar) {
+- t.Errorf("Vbar length should be %d, got %d", len(expected.Vbar), len(result.Vbar))
+- }
+-
+- for i, v := range result.Vbar {
+- if v != expected.Vbar[i] {
+- t.Errorf(
+- "Vbar[%d] should be '%#v', got '%#v'",
+- i, expected.Vbar[i], v)
+- }
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/racker/perigee/.gitignore b/Godeps/_workspace/src/github.com/racker/perigee/.gitignore
+deleted file mode 100644
+index 49ca32a..0000000
+--- a/Godeps/_workspace/src/github.com/racker/perigee/.gitignore
++++ /dev/null
+@@ -1,2 +0,0 @@
+-bin/*
+-pkg/*
+diff --git a/Godeps/_workspace/src/github.com/racker/perigee/LICENSE b/Godeps/_workspace/src/github.com/racker/perigee/LICENSE
+deleted file mode 100644
+index d645695..0000000
+--- a/Godeps/_workspace/src/github.com/racker/perigee/LICENSE
++++ /dev/null
+@@ -1,202 +0,0 @@
+-
+- Apache License
+- Version 2.0, January 2004
+- http://www.apache.org/licenses/
+-
+- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+-
+- 1. Definitions.
+-
+- "License" shall mean the terms and conditions for use, reproduction,
+- and distribution as defined by Sections 1 through 9 of this document.
+-
+- "Licensor" shall mean the copyright owner or entity authorized by
+- the copyright owner that is granting the License.
+-
+- "Legal Entity" shall mean the union of the acting entity and all
+- other entities that control, are controlled by, or are under common
+- control with that entity. For the purposes of this definition,
+- "control" means (i) the power, direct or indirect, to cause the
+- direction or management of such entity, whether by contract or
+- otherwise, or (ii) ownership of fifty percent (50%) or more of the
+- outstanding shares, or (iii) beneficial ownership of such entity.
+-
+- "You" (or "Your") shall mean an individual or Legal Entity
+- exercising permissions granted by this License.
+-
+- "Source" form shall mean the preferred form for making modifications,
+- including but not limited to software source code, documentation
+- source, and configuration files.
+-
+- "Object" form shall mean any form resulting from mechanical
+- transformation or translation of a Source form, including but
+- not limited to compiled object code, generated documentation,
+- and conversions to other media types.
+-
+- "Work" shall mean the work of authorship, whether in Source or
+- Object form, made available under the License, as indicated by a
+- copyright notice that is included in or attached to the work
+- (an example is provided in the Appendix below).
+-
+- "Derivative Works" shall mean any work, whether in Source or Object
+- form, that is based on (or derived from) the Work and for which the
+- editorial revisions, annotations, elaborations, or other modifications
+- represent, as a whole, an original work of authorship. For the purposes
+- of this License, Derivative Works shall not include works that remain
+- separable from, or merely link (or bind by name) to the interfaces of,
+- the Work and Derivative Works thereof.
+-
+- "Contribution" shall mean any work of authorship, including
+- the original version of the Work and any modifications or additions
+- to that Work or Derivative Works thereof, that is intentionally
+- submitted to Licensor for inclusion in the Work by the copyright owner
+- or by an individual or Legal Entity authorized to submit on behalf of
+- the copyright owner. For the purposes of this definition, "submitted"
+- means any form of electronic, verbal, or written communication sent
+- to the Licensor or its representatives, including but not limited to
+- communication on electronic mailing lists, source code control systems,
+- and issue tracking systems that are managed by, or on behalf of, the
+- Licensor for the purpose of discussing and improving the Work, but
+- excluding communication that is conspicuously marked or otherwise
+- designated in writing by the copyright owner as "Not a Contribution."
+-
+- "Contributor" shall mean Licensor and any individual or Legal Entity
+- on behalf of whom a Contribution has been received by Licensor and
+- subsequently incorporated within the Work.
+-
+- 2. Grant of Copyright License. Subject to the terms and conditions of
+- this License, each Contributor hereby grants to You a perpetual,
+- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+- copyright license to reproduce, prepare Derivative Works of,
+- publicly display, publicly perform, sublicense, and distribute the
+- Work and such Derivative Works in Source or Object form.
+-
+- 3. Grant of Patent License. Subject to the terms and conditions of
+- this License, each Contributor hereby grants to You a perpetual,
+- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+- (except as stated in this section) patent license to make, have made,
+- use, offer to sell, sell, import, and otherwise transfer the Work,
+- where such license applies only to those patent claims licensable
+- by such Contributor that are necessarily infringed by their
+- Contribution(s) alone or by combination of their Contribution(s)
+- with the Work to which such Contribution(s) was submitted. If You
+- institute patent litigation against any entity (including a
+- cross-claim or counterclaim in a lawsuit) alleging that the Work
+- or a Contribution incorporated within the Work constitutes direct
+- or contributory patent infringement, then any patent licenses
+- granted to You under this License for that Work shall terminate
+- as of the date such litigation is filed.
+-
+- 4. Redistribution. You may reproduce and distribute copies of the
+- Work or Derivative Works thereof in any medium, with or without
+- modifications, and in Source or Object form, provided that You
+- meet the following conditions:
+-
+- (a) You must give any other recipients of the Work or
+- Derivative Works a copy of this License; and
+-
+- (b) You must cause any modified files to carry prominent notices
+- stating that You changed the files; and
+-
+- (c) You must retain, in the Source form of any Derivative Works
+- that You distribute, all copyright, patent, trademark, and
+- attribution notices from the Source form of the Work,
+- excluding those notices that do not pertain to any part of
+- the Derivative Works; and
+-
+- (d) If the Work includes a "NOTICE" text file as part of its
+- distribution, then any Derivative Works that You distribute must
+- include a readable copy of the attribution notices contained
+- within such NOTICE file, excluding those notices that do not
+- pertain to any part of the Derivative Works, in at least one
+- of the following places: within a NOTICE text file distributed
+- as part of the Derivative Works; within the Source form or
+- documentation, if provided along with the Derivative Works; or,
+- within a display generated by the Derivative Works, if and
+- wherever such third-party notices normally appear. The contents
+- of the NOTICE file are for informational purposes only and
+- do not modify the License. You may add Your own attribution
+- notices within Derivative Works that You distribute, alongside
+- or as an addendum to the NOTICE text from the Work, provided
+- that such additional attribution notices cannot be construed
+- as modifying the License.
+-
+- You may add Your own copyright statement to Your modifications and
+- may provide additional or different license terms and conditions
+- for use, reproduction, or distribution of Your modifications, or
+- for any such Derivative Works as a whole, provided Your use,
+- reproduction, and distribution of the Work otherwise complies with
+- the conditions stated in this License.
+-
+- 5. Submission of Contributions. Unless You explicitly state otherwise,
+- any Contribution intentionally submitted for inclusion in the Work
+- by You to the Licensor shall be under the terms and conditions of
+- this License, without any additional terms or conditions.
+- Notwithstanding the above, nothing herein shall supersede or modify
+- the terms of any separate license agreement you may have executed
+- with Licensor regarding such Contributions.
+-
+- 6. Trademarks. This License does not grant permission to use the trade
+- names, trademarks, service marks, or product names of the Licensor,
+- except as required for reasonable and customary use in describing the
+- origin of the Work and reproducing the content of the NOTICE file.
+-
+- 7. Disclaimer of Warranty. Unless required by applicable law or
+- agreed to in writing, Licensor provides the Work (and each
+- Contributor provides its Contributions) on an "AS IS" BASIS,
+- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+- implied, including, without limitation, any warranties or conditions
+- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+- PARTICULAR PURPOSE. You are solely responsible for determining the
+- appropriateness of using or redistributing the Work and assume any
+- risks associated with Your exercise of permissions under this License.
+-
+- 8. Limitation of Liability. In no event and under no legal theory,
+- whether in tort (including negligence), contract, or otherwise,
+- unless required by applicable law (such as deliberate and grossly
+- negligent acts) or agreed to in writing, shall any Contributor be
+- liable to You for damages, including any direct, indirect, special,
+- incidental, or consequential damages of any character arising as a
+- result of this License or out of the use or inability to use the
+- Work (including but not limited to damages for loss of goodwill,
+- work stoppage, computer failure or malfunction, or any and all
+- other commercial damages or losses), even if such Contributor
+- has been advised of the possibility of such damages.
+-
+- 9. Accepting Warranty or Additional Liability. While redistributing
+- the Work or Derivative Works thereof, You may choose to offer,
+- and charge a fee for, acceptance of support, warranty, indemnity,
+- or other liability obligations and/or rights consistent with this
+- License. However, in accepting such obligations, You may act only
+- on Your own behalf and on Your sole responsibility, not on behalf
+- of any other Contributor, and only if You agree to indemnify,
+- defend, and hold each Contributor harmless for any liability
+- incurred by, or claims asserted against, such Contributor by reason
+- of your accepting any such warranty or additional liability.
+-
+- END OF TERMS AND CONDITIONS
+-
+- APPENDIX: How to apply the Apache License to your work.
+-
+- To apply the Apache License to your work, attach the following
+- boilerplate notice, with the fields enclosed by brackets "[]"
+- replaced with your own identifying information. (Don't include
+- the brackets!) The text should be enclosed in the appropriate
+- comment syntax for the file format. We also recommend that a
+- file or class name and description of purpose be included on the
+- same "printed page" as the copyright notice for easier
+- identification within third-party archives.
+-
+- Copyright [yyyy] [name of copyright owner]
+-
+- Licensed under the Apache License, Version 2.0 (the "License");
+- you may not use this file except in compliance with the License.
+- You may obtain a copy of the License at
+-
+- http://www.apache.org/licenses/LICENSE-2.0
+-
+- Unless required by applicable law or agreed to in writing, software
+- distributed under the License is distributed on an "AS IS" BASIS,
+- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- See the License for the specific language governing permissions and
+- limitations under the License.
+diff --git a/Godeps/_workspace/src/github.com/racker/perigee/README.md b/Godeps/_workspace/src/github.com/racker/perigee/README.md
+deleted file mode 100644
+index 81cbf4a..0000000
+--- a/Godeps/_workspace/src/github.com/racker/perigee/README.md
++++ /dev/null
+@@ -1,120 +0,0 @@
+-# perigee
+-
+-Perigee provides a REST client that, while it should be generic enough to use with most any RESTful API, is nonetheless optimized to the needs of the OpenStack APIs.
+-Perigee grew out of the need to refactor out common API access code from the [gorax](http://github.com/racker/gorax) project.
+-
+-Several things influenced the name of the project.
+-Numerous elements of the OpenStack ecosystem are named after astronomical artifacts.
+-Additionally, perigee occurs when two orbiting bodies are closest to each other.
+-Perigee seemed appropriate for something aiming to bring OpenStack and other RESTful services closer to the end-user.
+-
+-**This library is still in the very early stages of development. Unless you want to contribute, it probably isn't what you want**
+-
+-## Installation and Testing
+-
+-To install:
+-
+-```bash
+-go get github.com/racker/perigee
+-```
+-
+-To run unit tests:
+-
+-```bash
+-go test github.com/racker/perigee
+-```
+-
+-## Contributing
+-
+-The following guidelines are preliminary, as this project is just starting out.
+-However, this should serve as a working first-draft.
+-
+-### Branching
+-
+-The master branch must always be a valid build.
+-The `go get` command will not work otherwise.
+-Therefore, development must occur on a different branch.
+-
+-When creating a feature branch, do so off the master branch:
+-
+-```bash
+-git checkout master
+-git pull
+-git checkout -b featureBranch
+-git checkout -b featureBranch-wip # optional
+-```
+-
+-Perform all your editing and testing in the WIP-branch.
+-Feel free to make as many commits as you see fit.
+-You may even open "WIP" pull requests from your feature branch to seek feedback.
+-WIP pull requests will **never** be merged, however.
+-
+-To get code merged, you'll need to "squash" your changes into one or more clean commits in the feature branch.
+-These steps should be followed:
+-
+-```bash
+-git checkout featureBranch
+-git merge --squash featureBranch-wip
+-git commit -a
+-git push origin featureBranch
+-```
+-
+-You may now open a nice, clean, self-contained pull request from featureBranch to master.
+-
+-The `git commit -a` command above will open a text editor so that
+-you may provide a comprehensive description of the changes.
+-
+-In general, when submitting a pull request against master,
+-be sure to answer the following questions:
+-
+-- What is the problem?
+-- Why is it a problem?
+-- What is your solution?
+-- How does your solution work? (Recommended for non-trivial changes.)
+-- Why should we use your solution over someone elses? (Recommended especially if multiple solutions being discussed.)
+-
+-Remember that monster-sized pull requests are a bear to code-review,
+-so having helpful commit logs are an absolute must to review changes as quickly as possible.
+-
+-Finally, (s)he who breaks master is ultimately responsible for fixing master.
+-
+-### Source Representation
+-
+-The Go community firmly believes in a consistent representation for all Go source code.
+-We do too.
+-Make sure all source code is passed through "go fmt" *before* you create your pull request.
+-
+-Please note, however, that we fully acknowledge and recognize that we no longer rely upon punch-cards for representing source files.
+-Therefore, no 80-column limit exists.
+-However, if a line exceeds 132 columns, you may want to consider splitting the line.
+-
+-### Unit and Integration Tests
+-
+-Pull requests that include non-trivial code changes without accompanying unit tests will be flatly rejected.
+-While we have no way of enforcing this practice,
+-you can ensure your code is thoroughly tested by always [writing tests first by intention.](http://en.wikipedia.org/wiki/Test-driven_development)
+-
+-When creating a pull request, if even one test fails, the PR will be rejected.
+-Make sure all unit tests pass.
+-Make sure all integration tests pass.
+-
+-### Documentation
+-
+-Private functions and methods which are obvious to anyone unfamiliar with gorax needn't be accompanied by documentation.
+-However, this is a code-smell; if submitting a PR, expect to justify your decision.
+-
+-Public functions, regardless of how obvious, **must** have accompanying godoc-style documentation.
+-This is not to suggest you should provide a tome for each function, however.
+-Sometimes a link to more information is more appropriate, provided the link is stable, reliable, and pertinent.
+-
+-Changing documentation often results in bizarre diffs in pull requests, due to text often spanning multiple lines.
+-To work around this, put [one logical thought or sentence on a single line.](http://rhodesmill.org/brandon/2012/one-sentence-per-line/)
+-While this looks weird in a plain-text editor,
+-remember that both godoc and HTML viewers will reflow text.
+-The source code and its comments should be easy to edit with minimal diff pollution.
+-Let software dedicated to presenting the documentation to human readers deal with its presentation.
+-
+-## Examples
+-
+-t.b.d.
+-
+diff --git a/Godeps/_workspace/src/github.com/racker/perigee/api.go b/Godeps/_workspace/src/github.com/racker/perigee/api.go
+deleted file mode 100644
+index 0fcbadb..0000000
+--- a/Godeps/_workspace/src/github.com/racker/perigee/api.go
++++ /dev/null
+@@ -1,269 +0,0 @@
+-// vim: ts=8 sw=8 noet ai
+-
+-package perigee
+-
+-import (
+- "encoding/json"
+- "fmt"
+- "io"
+- "io/ioutil"
+- "log"
+- "net/http"
+- "strings"
+-)
+-
+-// The UnexpectedResponseCodeError structure represents a mismatch in understanding between server and client in terms of response codes.
+-// Most often, this is due to an actual error condition (e.g., getting a 404 for a resource when you expect a 200).
+-// However, it needn't always be the case (e.g., getting a 204 (No Content) response back when a 200 is expected).
+-type UnexpectedResponseCodeError struct {
+- Url string
+- Expected []int
+- Actual int
+- Body []byte
+-}
+-
+-func (err *UnexpectedResponseCodeError) Error() string {
+- return fmt.Sprintf("Expected HTTP response code %d when accessing URL(%s); got %d instead with the following body:\n%s", err.Expected, err.Url, err.Actual, string(err.Body))
+-}
+-
+-// Request issues an HTTP request, marshaling parameters, and unmarshaling results, as configured in the provided Options parameter.
+-// The Response structure returned, if any, will include accumulated results recovered from the HTTP server.
+-// See the Response structure for more details.
+-func Request(method string, url string, opts Options) (*Response, error) {
+- var body io.Reader
+- var response Response
+-
+- client := opts.CustomClient
+- if client == nil {
+- client = new(http.Client)
+- }
+-
+- contentType := opts.ContentType
+-
+- body = nil
+- if opts.ReqBody != nil {
+- if contentType == "" {
+- contentType = "application/json"
+- }
+-
+- if contentType == "application/json" {
+- bodyText, err := json.Marshal(opts.ReqBody)
+- if err != nil {
+- return nil, err
+- }
+- body = strings.NewReader(string(bodyText))
+- if opts.DumpReqJson {
+- log.Printf("Making request:\n%#v\n", string(bodyText))
+- }
+- } else {
+- // assume opts.ReqBody implements the correct interface
+- body = opts.ReqBody.(io.Reader)
+- }
+- }
+-
+- req, err := http.NewRequest(method, url, body)
+- if err != nil {
+- return nil, err
+- }
+-
+- if contentType != "" {
+- req.Header.Add("Content-Type", contentType)
+- }
+-
+- if opts.ContentLength > 0 {
+- req.ContentLength = opts.ContentLength
+- req.Header.Add("Content-Length", string(opts.ContentLength))
+- }
+-
+- if opts.MoreHeaders != nil {
+- for k, v := range opts.MoreHeaders {
+- req.Header.Add(k, v)
+- }
+- }
+-
+- if accept := req.Header.Get("Accept"); accept == "" {
+- accept = opts.Accept
+- if accept == "" {
+- accept = "application/json"
+- }
+- req.Header.Add("Accept", accept)
+- }
+-
+- if opts.SetHeaders != nil {
+- err = opts.SetHeaders(req)
+- if err != nil {
+- return &response, err
+- }
+- }
+-
+- httpResponse, err := client.Do(req)
+- if httpResponse != nil {
+- response.HttpResponse = *httpResponse
+- response.StatusCode = httpResponse.StatusCode
+- }
+-
+- if err != nil {
+- return &response, err
+- }
+- // This if-statement is legacy code, preserved for backward compatibility.
+- if opts.StatusCode != nil {
+- *opts.StatusCode = httpResponse.StatusCode
+- }
+-
+- acceptableResponseCodes := opts.OkCodes
+- if len(acceptableResponseCodes) != 0 {
+- if not_in(httpResponse.StatusCode, acceptableResponseCodes) {
+- b, _ := ioutil.ReadAll(httpResponse.Body)
+- httpResponse.Body.Close()
+- return &response, &UnexpectedResponseCodeError{
+- Url: url,
+- Expected: acceptableResponseCodes,
+- Actual: httpResponse.StatusCode,
+- Body: b,
+- }
+- }
+- }
+- if opts.Results != nil {
+- defer httpResponse.Body.Close()
+- jsonResult, err := ioutil.ReadAll(httpResponse.Body)
+- response.JsonResult = jsonResult
+- if err != nil {
+- return &response, err
+- }
+-
+- err = json.Unmarshal(jsonResult, opts.Results)
+- // This if-statement is legacy code, preserved for backward compatibility.
+- if opts.ResponseJson != nil {
+- *opts.ResponseJson = jsonResult
+- }
+- }
+- return &response, err
+-}
+-
+-// not_in returns false if, and only if, the provided needle is _not_
+-// in the given set of integers.
+-func not_in(needle int, haystack []int) bool {
+- for _, straw := range haystack {
+- if needle == straw {
+- return false
+- }
+- }
+- return true
+-}
+-
+-// Post makes a POST request against a server using the provided HTTP client.
+-// The url must be a fully-formed URL string.
+-// DEPRECATED. Use Request() instead.
+-func Post(url string, opts Options) error {
+- r, err := Request("POST", url, opts)
+- if opts.Response != nil {
+- *opts.Response = r
+- }
+- return err
+-}
+-
+-// Get makes a GET request against a server using the provided HTTP client.
+-// The url must be a fully-formed URL string.
+-// DEPRECATED. Use Request() instead.
+-func Get(url string, opts Options) error {
+- r, err := Request("GET", url, opts)
+- if opts.Response != nil {
+- *opts.Response = r
+- }
+- return err
+-}
+-
+-// Delete makes a DELETE request against a server using the provided HTTP client.
+-// The url must be a fully-formed URL string.
+-// DEPRECATED. Use Request() instead.
+-func Delete(url string, opts Options) error {
+- r, err := Request("DELETE", url, opts)
+- if opts.Response != nil {
+- *opts.Response = r
+- }
+- return err
+-}
+-
+-// Put makes a PUT request against a server using the provided HTTP client.
+-// The url must be a fully-formed URL string.
+-// DEPRECATED. Use Request() instead.
+-func Put(url string, opts Options) error {
+- r, err := Request("PUT", url, opts)
+- if opts.Response != nil {
+- *opts.Response = r
+- }
+- return err
+-}
+-
+-// Options describes a set of optional parameters to the various request calls.
+-//
+-// The custom client can be used for a variety of purposes beyond selecting encrypted versus unencrypted channels.
+-// Transports can be defined to provide augmented logging, header manipulation, et. al.
+-//
+-// If the ReqBody field is provided, it will be embedded as a JSON object.
+-// Otherwise, provide nil.
+-//
+-// If JSON output is to be expected from the response,
+-// provide either a pointer to the container structure in Results,
+-// or a pointer to a nil-initialized pointer variable.
+-// The latter method will cause the unmarshaller to allocate the container type for you.
+-// If no response is expected, provide a nil Results value.
+-//
+-// The MoreHeaders map, if non-nil or empty, provides a set of headers to add to those
+-// already present in the request. At present, only Accepted and Content-Type are set
+-// by default.
+-//
+-// OkCodes provides a set of acceptable, positive responses.
+-//
+-// If provided, StatusCode specifies a pointer to an integer, which will receive the
+-// returned HTTP status code, successful or not. DEPRECATED; use the Response.StatusCode field instead for new software.
+-//
+-// ResponseJson, if specified, provides a means for returning the raw JSON. This is
+-// most useful for diagnostics. DEPRECATED; use the Response.JsonResult field instead for new software.
+-//
+-// DumpReqJson, if set to true, will cause the request to appear to stdout for debugging purposes.
+-// This attribute may be removed at any time in the future; DO NOT use this attribute in production software.
+-//
+-// Response, if set, provides a way to communicate the complete set of HTTP response, raw JSON, status code, and
+-// other useful attributes back to the caller. Note that the Request() method returns a Response structure as part
+-// of its public interface; you don't need to set the Response field here to use this structure. The Response field
+-// exists primarily for legacy or deprecated functions.
+-//
+-// SetHeaders allows the caller to provide code to set any custom headers programmatically. Typically, this
+-// facility can invoke, e.g., SetBasicAuth() on the request to easily set up authentication.
+-// Any error generated will terminate the request and will propegate back to the caller.
+-type Options struct {
+- CustomClient *http.Client
+- ReqBody interface{}
+- Results interface{}
+- MoreHeaders map[string]string
+- OkCodes []int
+- StatusCode *int `DEPRECATED`
+- DumpReqJson bool `UNSUPPORTED`
+- ResponseJson *[]byte `DEPRECATED`
+- Response **Response
+- ContentType string `json:"Content-Type,omitempty"`
+- ContentLength int64 `json:"Content-Length,omitempty"`
+- Accept string `json:"Accept,omitempty"`
+- SetHeaders func(r *http.Request) error
+-}
+-
+-// Response contains return values from the various request calls.
+-//
+-// HttpResponse will return the http response from the request call.
+-// Note: HttpResponse.Body is always closed and will not be available from this return value.
+-//
+-// StatusCode specifies the returned HTTP status code, successful or not.
+-//
+-// If Results is specified in the Options:
+-// - JsonResult will contain the raw return from the request call
+-// This is most useful for diagnostics.
+-// - Result will contain the unmarshalled json either in the Result passed in
+-// or the unmarshaller will allocate the container type for you.
+-
+-type Response struct {
+- HttpResponse http.Response
+- JsonResult []byte
+- Results interface{}
+- StatusCode int
+-}
+diff --git a/Godeps/_workspace/src/github.com/racker/perigee/api_test.go b/Godeps/_workspace/src/github.com/racker/perigee/api_test.go
+deleted file mode 100644
+index da943b2..0000000
+--- a/Godeps/_workspace/src/github.com/racker/perigee/api_test.go
++++ /dev/null
+@@ -1,226 +0,0 @@
+-package perigee
+-
+-import (
+- "bytes"
+- "fmt"
+- "net/http"
+- "net/http/httptest"
+- "strings"
+- "testing"
+-)
+-
+-func TestNormal(t *testing.T) {
+- handler := http.HandlerFunc(
+- func(w http.ResponseWriter, r *http.Request) {
+- w.Write([]byte("testing"))
+- })
+- ts := httptest.NewServer(handler)
+- defer ts.Close()
+-
+- response, err := Request("GET", ts.URL, Options{})
+- if err != nil {
+- t.Fatalf("should not have error: %s", err)
+- }
+- if response.StatusCode != 200 {
+- t.Fatalf("response code %d is not 200", response.StatusCode)
+- }
+-}
+-
+-func TestOKCodes(t *testing.T) {
+- expectCode := 201
+- handler := http.HandlerFunc(
+- func(w http.ResponseWriter, r *http.Request) {
+- w.WriteHeader(expectCode)
+- w.Write([]byte("testing"))
+- })
+- ts := httptest.NewServer(handler)
+- defer ts.Close()
+-
+- options := Options{
+- OkCodes: []int{expectCode},
+- }
+- results, err := Request("GET", ts.URL, options)
+- if err != nil {
+- t.Fatalf("should not have error: %s", err)
+- }
+- if results.StatusCode != expectCode {
+- t.Fatalf("response code %d is not %d", results.StatusCode, expectCode)
+- }
+-}
+-
+-func TestLocation(t *testing.T) {
+- newLocation := "http://www.example.com"
+- handler := http.HandlerFunc(
+- func(w http.ResponseWriter, r *http.Request) {
+- w.Header().Set("Location", newLocation)
+- w.Write([]byte("testing"))
+- })
+- ts := httptest.NewServer(handler)
+- defer ts.Close()
+-
+- response, err := Request("GET", ts.URL, Options{})
+- if err != nil {
+- t.Fatalf("should not have error: %s", err)
+- }
+-
+- location, err := response.HttpResponse.Location()
+- if err != nil {
+- t.Fatalf("should not have error: %s", err)
+- }
+-
+- if location.String() != newLocation {
+- t.Fatalf("location returned \"%s\" is not \"%s\"", location.String(), newLocation)
+- }
+-}
+-
+-func TestHeaders(t *testing.T) {
+- newLocation := "http://www.example.com"
+- handler := http.HandlerFunc(
+- func(w http.ResponseWriter, r *http.Request) {
+- w.Header().Set("Location", newLocation)
+- w.Write([]byte("testing"))
+- })
+- ts := httptest.NewServer(handler)
+- defer ts.Close()
+-
+- response, err := Request("GET", ts.URL, Options{})
+- if err != nil {
+- t.Fatalf("should not have error: %s", err)
+- }
+-
+- location := response.HttpResponse.Header.Get("Location")
+- if location == "" {
+- t.Fatalf("Location should not empty")
+- }
+-
+- if location != newLocation {
+- t.Fatalf("location returned \"%s\" is not \"%s\"", location, newLocation)
+- }
+-}
+-
+-func TestCustomHeaders(t *testing.T) {
+- var contentType, accept, contentLength string
+-
+- handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+- m := map[string][]string(r.Header)
+- contentType = m["Content-Type"][0]
+- accept = m["Accept"][0]
+- contentLength = m["Content-Length"][0]
+- })
+- ts := httptest.NewServer(handler)
+- defer ts.Close()
+-
+- _, err := Request("GET", ts.URL, Options{
+- ContentLength: 5,
+- ContentType: "x-application/vb",
+- Accept: "x-application/c",
+- ReqBody: strings.NewReader("Hello"),
+- })
+- if err != nil {
+- t.Fatalf(err.Error())
+- }
+-
+- if contentType != "x-application/vb" {
+- t.Fatalf("I expected x-application/vb; got ", contentType)
+- }
+-
+- if contentLength != "5" {
+- t.Fatalf("I expected 5 byte content length; got ", contentLength)
+- }
+-
+- if accept != "x-application/c" {
+- t.Fatalf("I expected x-application/c; got ", accept)
+- }
+-}
+-
+-func TestJson(t *testing.T) {
+- newLocation := "http://www.example.com"
+- jsonBytes := []byte(`{"foo": {"bar": "baz"}}`)
+- handler := http.HandlerFunc(
+- func(w http.ResponseWriter, r *http.Request) {
+- w.Header().Set("Location", newLocation)
+- w.Write(jsonBytes)
+- })
+- ts := httptest.NewServer(handler)
+- defer ts.Close()
+-
+- type Data struct {
+- Foo struct {
+- Bar string `json:"bar"`
+- } `json:"foo"`
+- }
+- var data Data
+-
+- response, err := Request("GET", ts.URL, Options{Results: &data})
+- if err != nil {
+- t.Fatalf("should not have error: %s", err)
+- }
+-
+- if bytes.Compare(jsonBytes, response.JsonResult) != 0 {
+- t.Fatalf("json returned \"%s\" is not \"%s\"", response.JsonResult, jsonBytes)
+- }
+-
+- if data.Foo.Bar != "baz" {
+- t.Fatalf("Results returned %v", data)
+- }
+-}
+-
+-func TestSetHeaders(t *testing.T) {
+- var wasCalled bool
+- handler := http.HandlerFunc(
+- func(w http.ResponseWriter, r *http.Request) {
+- w.Write([]byte("Hi"))
+- })
+- ts := httptest.NewServer(handler)
+- defer ts.Close()
+-
+- _, err := Request("GET", ts.URL, Options{
+- SetHeaders: func(r *http.Request) error {
+- wasCalled = true
+- return nil
+- },
+- })
+-
+- if err != nil {
+- t.Fatal(err)
+- }
+-
+- if !wasCalled {
+- t.Fatal("I expected header setter callback to be called, but it wasn't")
+- }
+-
+- myError := fmt.Errorf("boo")
+-
+- _, err = Request("GET", ts.URL, Options{
+- SetHeaders: func(r *http.Request) error {
+- return myError
+- },
+- })
+-
+- if err != myError {
+- t.Fatal("I expected errors to propegate back to the caller.")
+- }
+-}
+-
+-func TestBodilessMethodsAreSentWithoutContentHeaders(t *testing.T) {
+- var h map[string][]string
+-
+- handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+- h = r.Header
+- })
+- ts := httptest.NewServer(handler)
+- defer ts.Close()
+-
+- _, err := Request("GET", ts.URL, Options{})
+- if err != nil {
+- t.Fatalf(err.Error())
+- }
+-
+- if len(h["Content-Type"]) != 0 {
+- t.Fatalf("I expected nothing for Content-Type but got ", h["Content-Type"])
+- }
+-
+- if len(h["Content-Length"]) != 0 {
+- t.Fatalf("I expected nothing for Content-Length but got ", h["Content-Length"])
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/.editorconfig b/Godeps/_workspace/src/github.com/rackspace/gophercloud/.editorconfig
+deleted file mode 100644
+index 2655ebc..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/.editorconfig
++++ /dev/null
+@@ -1,16 +0,0 @@
+-# EditorConfig is awesome: http://EditorConfig.org
+-
+-# top-most EditorConfig file
+-root = true
+-
+-# All files
+-[*]
+-end_of_line = lf
+-insert_final_newline = true
+-charset = utf-8
+-trim_trailing_whitespace = true
+-
+-# Golang
+-[*.go]
+-indent_style = tab
+-indent_size = 2
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/.travis.yml b/Godeps/_workspace/src/github.com/rackspace/gophercloud/.travis.yml
+deleted file mode 100644
+index 6e1dbd0..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/.travis.yml
++++ /dev/null
+@@ -1,14 +0,0 @@
+-language: go
+-install:
+- - go get -v .
+-go:
+- - 1.1
+- - 1.2
+- - tip
+-after_success:
+- - go get code.google.com/p/go.tools/cmd/cover
+- - go get github.com/axw/gocov/gocov
+- - go get github.com/mattn/goveralls
+- - export PATH=$PATH:$HOME/gopath/bin/
+- - goveralls 2k7PTU3xa474Hymwgdj6XjqenNfGTNkO8
+-
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/CONTRIBUTORS.md b/Godeps/_workspace/src/github.com/rackspace/gophercloud/CONTRIBUTORS.md
+deleted file mode 100644
+index 9076695..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/CONTRIBUTORS.md
++++ /dev/null
+@@ -1,6 +0,0 @@
+-Contributors
+-============
+-
+-Samuel A. Falvo II <sam.falvo at rackspace.com>
+-Glen Campbell <glen.campbell at rackspace.com>
+-Jesse Noller <jesse.noller at rackspace.com>
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE b/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE
+deleted file mode 100644
+index fbbbc9e..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE
++++ /dev/null
+@@ -1,191 +0,0 @@
+-Copyright 2012-2013 Rackspace, Inc.
+-
+-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+-this file except in compliance with the License. You may obtain a copy of the
+-License at
+-
+- http://www.apache.org/licenses/LICENSE-2.0
+-
+-Unless required by applicable law or agreed to in writing, software distributed
+-under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+-CONDITIONS OF ANY KIND, either express or implied. See the License for the
+-specific language governing permissions and limitations under the License.
+-
+-------
+-
+- Apache License
+- Version 2.0, January 2004
+- http://www.apache.org/licenses/
+-
+- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+-
+- 1. Definitions.
+-
+- "License" shall mean the terms and conditions for use, reproduction,
+- and distribution as defined by Sections 1 through 9 of this document.
+-
+- "Licensor" shall mean the copyright owner or entity authorized by
+- the copyright owner that is granting the License.
+-
+- "Legal Entity" shall mean the union of the acting entity and all
+- other entities that control, are controlled by, or are under common
+- control with that entity. For the purposes of this definition,
+- "control" means (i) the power, direct or indirect, to cause the
+- direction or management of such entity, whether by contract or
+- otherwise, or (ii) ownership of fifty percent (50%) or more of the
+- outstanding shares, or (iii) beneficial ownership of such entity.
+-
+- "You" (or "Your") shall mean an individual or Legal Entity
+- exercising permissions granted by this License.
+-
+- "Source" form shall mean the preferred form for making modifications,
+- including but not limited to software source code, documentation
+- source, and configuration files.
+-
+- "Object" form shall mean any form resulting from mechanical
+- transformation or translation of a Source form, including but
+- not limited to compiled object code, generated documentation,
+- and conversions to other media types.
+-
+- "Work" shall mean the work of authorship, whether in Source or
+- Object form, made available under the License, as indicated by a
+- copyright notice that is included in or attached to the work
+- (an example is provided in the Appendix below).
+-
+- "Derivative Works" shall mean any work, whether in Source or Object
+- form, that is based on (or derived from) the Work and for which the
+- editorial revisions, annotations, elaborations, or other modifications
+- represent, as a whole, an original work of authorship. For the purposes
+- of this License, Derivative Works shall not include works that remain
+- separable from, or merely link (or bind by name) to the interfaces of,
+- the Work and Derivative Works thereof.
+-
+- "Contribution" shall mean any work of authorship, including
+- the original version of the Work and any modifications or additions
+- to that Work or Derivative Works thereof, that is intentionally
+- submitted to Licensor for inclusion in the Work by the copyright owner
+- or by an individual or Legal Entity authorized to submit on behalf of
+- the copyright owner. For the purposes of this definition, "submitted"
+- means any form of electronic, verbal, or written communication sent
+- to the Licensor or its representatives, including but not limited to
+- communication on electronic mailing lists, source code control systems,
+- and issue tracking systems that are managed by, or on behalf of, the
+- Licensor for the purpose of discussing and improving the Work, but
+- excluding communication that is conspicuously marked or otherwise
+- designated in writing by the copyright owner as "Not a Contribution."
+-
+- "Contributor" shall mean Licensor and any individual or Legal Entity
+- on behalf of whom a Contribution has been received by Licensor and
+- subsequently incorporated within the Work.
+-
+- 2. Grant of Copyright License. Subject to the terms and conditions of
+- this License, each Contributor hereby grants to You a perpetual,
+- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+- copyright license to reproduce, prepare Derivative Works of,
+- publicly display, publicly perform, sublicense, and distribute the
+- Work and such Derivative Works in Source or Object form.
+-
+- 3. Grant of Patent License. Subject to the terms and conditions of
+- this License, each Contributor hereby grants to You a perpetual,
+- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+- (except as stated in this section) patent license to make, have made,
+- use, offer to sell, sell, import, and otherwise transfer the Work,
+- where such license applies only to those patent claims licensable
+- by such Contributor that are necessarily infringed by their
+- Contribution(s) alone or by combination of their Contribution(s)
+- with the Work to which such Contribution(s) was submitted. If You
+- institute patent litigation against any entity (including a
+- cross-claim or counterclaim in a lawsuit) alleging that the Work
+- or a Contribution incorporated within the Work constitutes direct
+- or contributory patent infringement, then any patent licenses
+- granted to You under this License for that Work shall terminate
+- as of the date such litigation is filed.
+-
+- 4. Redistribution. You may reproduce and distribute copies of the
+- Work or Derivative Works thereof in any medium, with or without
+- modifications, and in Source or Object form, provided that You
+- meet the following conditions:
+-
+- (a) You must give any other recipients of the Work or
+- Derivative Works a copy of this License; and
+-
+- (b) You must cause any modified files to carry prominent notices
+- stating that You changed the files; and
+-
+- (c) You must retain, in the Source form of any Derivative Works
+- that You distribute, all copyright, patent, trademark, and
+- attribution notices from the Source form of the Work,
+- excluding those notices that do not pertain to any part of
+- the Derivative Works; and
+-
+- (d) If the Work includes a "NOTICE" text file as part of its
+- distribution, then any Derivative Works that You distribute must
+- include a readable copy of the attribution notices contained
+- within such NOTICE file, excluding those notices that do not
+- pertain to any part of the Derivative Works, in at least one
+- of the following places: within a NOTICE text file distributed
+- as part of the Derivative Works; within the Source form or
+- documentation, if provided along with the Derivative Works; or,
+- within a display generated by the Derivative Works, if and
+- wherever such third-party notices normally appear. The contents
+- of the NOTICE file are for informational purposes only and
+- do not modify the License. You may add Your own attribution
+- notices within Derivative Works that You distribute, alongside
+- or as an addendum to the NOTICE text from the Work, provided
+- that such additional attribution notices cannot be construed
+- as modifying the License.
+-
+- You may add Your own copyright statement to Your modifications and
+- may provide additional or different license terms and conditions
+- for use, reproduction, or distribution of Your modifications, or
+- for any such Derivative Works as a whole, provided Your use,
+- reproduction, and distribution of the Work otherwise complies with
+- the conditions stated in this License.
+-
+- 5. Submission of Contributions. Unless You explicitly state otherwise,
+- any Contribution intentionally submitted for inclusion in the Work
+- by You to the Licensor shall be under the terms and conditions of
+- this License, without any additional terms or conditions.
+- Notwithstanding the above, nothing herein shall supersede or modify
+- the terms of any separate license agreement you may have executed
+- with Licensor regarding such Contributions.
+-
+- 6. Trademarks. This License does not grant permission to use the trade
+- names, trademarks, service marks, or product names of the Licensor,
+- except as required for reasonable and customary use in describing the
+- origin of the Work and reproducing the content of the NOTICE file.
+-
+- 7. Disclaimer of Warranty. Unless required by applicable law or
+- agreed to in writing, Licensor provides the Work (and each
+- Contributor provides its Contributions) on an "AS IS" BASIS,
+- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+- implied, including, without limitation, any warranties or conditions
+- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+- PARTICULAR PURPOSE. You are solely responsible for determining the
+- appropriateness of using or redistributing the Work and assume any
+- risks associated with Your exercise of permissions under this License.
+-
+- 8. Limitation of Liability. In no event and under no legal theory,
+- whether in tort (including negligence), contract, or otherwise,
+- unless required by applicable law (such as deliberate and grossly
+- negligent acts) or agreed to in writing, shall any Contributor be
+- liable to You for damages, including any direct, indirect, special,
+- incidental, or consequential damages of any character arising as a
+- result of this License or out of the use or inability to use the
+- Work (including but not limited to damages for loss of goodwill,
+- work stoppage, computer failure or malfunction, or any and all
+- other commercial damages or losses), even if such Contributor
+- has been advised of the possibility of such damages.
+-
+- 9. Accepting Warranty or Additional Liability. While redistributing
+- the Work or Derivative Works thereof, You may choose to offer,
+- and charge a fee for, acceptance of support, warranty, indemnity,
+- or other liability obligations and/or rights consistent with this
+- License. However, in accepting such obligations, You may act only
+- on Your own behalf and on Your sole responsibility, not on behalf
+- of any other Contributor, and only if You agree to indemnify,
+- defend, and hold each Contributor harmless for any liability
+- incurred by, or claims asserted against, such Contributor by reason
+- of your accepting any such warranty or additional liability.
+-
+- END OF TERMS AND CONDITIONS
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/README.asciidoc b/Godeps/_workspace/src/github.com/rackspace/gophercloud/README.asciidoc
+deleted file mode 100644
+index b7a7c01..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/README.asciidoc
++++ /dev/null
+@@ -1,44 +0,0 @@
+-== Gophercloud -- V0.1.0 image:https://secure.travis-ci.org/rackspace/gophercloud.png?branch=master["build status",link="https://travis-ci.org/rackspace/gophercloud"]
+-
+-Gophercloud currently lets you authenticate with OpenStack providers to create and manage servers.
+-We are working on extending the API to further include cloud files, block storage, DNS, databases, security groups, and other features.
+-
+-WARNING: This library is still in the very early stages of development. Unless you want to contribute, it probably isn't what you want. Yet.
+-
+-=== Outstanding Features
+-
+-1. Apache 2.0 License, making Gophercloud friendly to commercial and open-source enterprises alike.
+-2. Gophercloud is one of the most actively maintained Go SDKs for OpenStack.
+-3. Gophercloud supports Identity V2 and Nova V2 APIs. More coming soon!
+-4. The up-coming Gophercloud 0.2.0 release supports API extensions, and makes writing support for new extensions easy.
+-5. Gophercloud supports automatic reauthentication upon auth token timeout, if enabled by your software.
+-6. Gophercloud is the only SDK implementation with actual acceptance-level integration tests.
+-
+-=== What Does it Look Like?
+-
+-The Gophercloud 0.1.0 and earlier APIs are now deprecated and obsolete.
+-No new feature development will occur for 0.1.0 or 0.0.0.
+-However, we will accept and provide bug fixes for these APIs.
+-Please refer to the acceptance tests in the master brach for code examples using the v0.1.0 API.
+-The most up to date documentation for version 0.1.x can be found at link:http://godoc.org/github.com/rackspace/gophercloud[our Godoc.org documentation].
+-
+-We are working on a new API that provides much better support for extensions, pagination, and other features that proved difficult to implement before.
+-This new API will be substantially more Go-idiomatic as well; one of the complaints received about 0.1.x and earlier is that it didn't "feel" right.
+-To see what this new API is going to look like, you can look at the code examples up on the link:http://gophercloud.io/docs.html[Gophercloud website].
+-If you're interested in tracking progress, note that features for version 0.2.0 will appear in the `v0.2.0` branch until merged to master.
+-
+-=== How can I Contribute?
+-
+-After using Gophercloud for a while, you might find that it lacks some useful feature, or that existing behavior seems buggy. We welcome contributions
+-from our users for both missing functionality as well as for bug fixes. We encourage contributors to collaborate with the
+-link:http://gophercloud.io/community.html[Gophercloud community.]
+-
+-Finally, Gophercloud maintains its own link:http://gophercloud.io[announcements and updates blog.]
+-Feel free to check back now and again to see what's new.
+-
+-== License
+-
+-Copyright (C) 2013, 2014 Rackspace, Inc.
+-
+-Licensed under the Apache License, Version 2.0
+-
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/00-authentication.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/00-authentication.go
+deleted file mode 100644
+index 6467203..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/00-authentication.go
++++ /dev/null
+@@ -1,30 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "fmt"
+- "github.com/rackspace/gophercloud"
+- "os"
+- "strings"
+-)
+-
+-func main() {
+- provider, username, _, apiKey := getCredentials()
+-
+- if !strings.Contains(provider, "rackspace") {
+- fmt.Fprintf(os.Stdout, "Skipping test because provider doesn't support API_KEYs\n")
+- return
+- }
+-
+- _, err := gophercloud.Authenticate(
+- provider,
+- gophercloud.AuthOptions{
+- Username: username,
+- ApiKey: apiKey,
+- },
+- )
+- if err != nil {
+- panic(err)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/01-authentication.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/01-authentication.go
+deleted file mode 100644
+index 5cc9d38..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/01-authentication.go
++++ /dev/null
+@@ -1,22 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "github.com/rackspace/gophercloud"
+-)
+-
+-func main() {
+- provider, username, password, _ := getCredentials()
+-
+- _, err := gophercloud.Authenticate(
+- provider,
+- gophercloud.AuthOptions{
+- Username: username,
+- Password: password,
+- },
+- )
+- if err != nil {
+- panic(err)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/02-list-servers.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/02-list-servers.go
+deleted file mode 100644
+index 772852e..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/02-list-servers.go
++++ /dev/null
+@@ -1,62 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing. $? still indicates errors though.")
+-
+-func main() {
+- flag.Parse()
+-
+- withIdentity(false, func(acc gophercloud.AccessProvider) {
+- withServerApi(acc, func(api gophercloud.CloudServersProvider) {
+- tryFullDetails(api)
+- tryLinksOnly(api)
+- })
+- })
+-}
+-
+-func tryLinksOnly(api gophercloud.CloudServersProvider) {
+- servers, err := api.ListServersLinksOnly()
+- if err != nil {
+- panic(err)
+- }
+-
+- if !*quiet {
+- fmt.Println("Id,Name")
+- for _, s := range servers {
+- if s.AccessIPv4 != "" {
+- panic("IPv4 not expected")
+- }
+-
+- if s.Status != "" {
+- panic("Status not expected")
+- }
+-
+- if s.Progress != 0 {
+- panic("Progress not expected")
+- }
+-
+- fmt.Printf("%s,\"%s\"\n", s.Id, s.Name)
+- }
+- }
+-}
+-
+-func tryFullDetails(api gophercloud.CloudServersProvider) {
+- servers, err := api.ListServers()
+- if err != nil {
+- panic(err)
+- }
+-
+- if !*quiet {
+- fmt.Println("Id,Name,AccessIPv4,Status,Progress")
+- for _, s := range servers {
+- fmt.Printf("%s,\"%s\",%s,%s,%d\n", s.Id, s.Name, s.AccessIPv4, s.Status, s.Progress)
+- }
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/03-get-server-details.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/03-get-server-details.go
+deleted file mode 100644
+index 01140a9..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/03-get-server-details.go
++++ /dev/null
+@@ -1,134 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+- "os"
+- "github.com/racker/perigee"
+-)
+-
+-var id = flag.String("i", "", "Server ID to get info on. Defaults to first server in your account if unspecified.")
+-var rgn = flag.String("r", "", "Datacenter region. Leave blank for default region.")
+-var quiet = flag.Bool("quiet", false, "Run quietly, for acceptance testing. $? non-zero if issue.")
+-
+-func main() {
+- flag.Parse()
+-
+- resultCode := 0
+- withIdentity(false, func(auth gophercloud.AccessProvider) {
+- withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+- var (
+- err error
+- serverId string
+- deleteAfterwards bool
+- )
+-
+- // Figure out which server to provide server details for.
+- if *id == "" {
+- deleteAfterwards, serverId, err = locateAServer(servers)
+- if err != nil {
+- panic(err)
+- }
+- if deleteAfterwards {
+- defer servers.DeleteServerById(serverId)
+- }
+- } else {
+- serverId = *id
+- }
+-
+- // Grab server details by ID, and provide a report.
+- s, err := servers.ServerById(serverId)
+- if err != nil {
+- panic(err)
+- }
+-
+- configs := []string{
+- "Access IPv4: %s\n",
+- "Access IPv6: %s\n",
+- " Created: %s\n",
+- " Flavor: %s\n",
+- " Host ID: %s\n",
+- " ID: %s\n",
+- " Image: %s\n",
+- " Name: %s\n",
+- " Progress: %s\n",
+- " Status: %s\n",
+- " Tenant ID: %s\n",
+- " Updated: %s\n",
+- " User ID: %s\n",
+- }
+-
+- values := []string{
+- s.AccessIPv4,
+- s.AccessIPv6,
+- s.Created,
+- s.Flavor.Id,
+- s.HostId,
+- s.Id,
+- s.Image.Id,
+- s.Name,
+- fmt.Sprintf("%d", s.Progress),
+- s.Status,
+- s.TenantId,
+- s.Updated,
+- s.UserId,
+- }
+-
+- if !*quiet {
+- fmt.Println("Server info:")
+- for i, _ := range configs {
+- fmt.Printf(configs[i], values[i])
+- }
+- }
+- })
+-
+- // Negative test -- We should absolutely never panic for a server that doesn't exist.
+- withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+- _, err := servers.ServerById(randomString("garbage", 32))
+- if err == nil {
+- fmt.Printf("Expected a 404 response when looking for a server known not to exist\n")
+- resultCode = 1
+- }
+- perigeeError, ok := err.(*perigee.UnexpectedResponseCodeError)
+- if !ok {
+- fmt.Printf("Unexpected error type\n")
+- resultCode = 1
+- } else {
+- if perigeeError.Actual != 404 {
+- fmt.Printf("Expected a 404 error code\n")
+- }
+- }
+- })
+- })
+- os.Exit(resultCode)
+-}
+-
+-// locateAServer queries the set of servers owned by the user. If at least one
+-// exists, the first found is picked, and its ID is returned. Otherwise, a new
+-// server will be created, and its ID returned.
+-//
+-// deleteAfter will be true if the caller should schedule a call to DeleteServerById()
+-// to clean up.
+-func locateAServer(servers gophercloud.CloudServersProvider) (deleteAfter bool, id string, err error) {
+- ss, err := servers.ListServers()
+- if err != nil {
+- return false, "", err
+- }
+-
+- if len(ss) > 0 {
+- // We could just cheat and dump the server details from ss[0].
+- // But, that tests ListServers(), and not ServerById(). So, we
+- // elect not to cheat.
+- return false, ss[0].Id, nil
+- }
+-
+- serverId, err := createServer(servers, "", "", "", "")
+- if err != nil {
+- return false, "", err
+- }
+- err = waitForServerState(servers, serverId, "ACTIVE")
+- return true, serverId, err
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/04-create-server.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/04-create-server.go
+deleted file mode 100644
+index 03fd606..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/04-create-server.go
++++ /dev/null
+@@ -1,47 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var region, serverName, imageRef, flavorRef *string
+-var adminPass = flag.String("a", "", "Administrator password (auto-assigned if none)")
+-var quiet = flag.Bool("quiet", false, "Quiet mode for acceptance tests. $? non-zero if error.")
+-
+-func configure() {
+- region = flag.String("r", "", "Region in which to create the server. Leave blank for provider-default region.")
+- serverName = flag.String("n", randomString("ACPTTEST--", 16), "Server name (what you see in the control panel)")
+- imageRef = flag.String("i", "", "ID of image to deploy onto the server")
+- flavorRef = flag.String("f", "", "Flavor of server to deploy image upon")
+-
+- flag.Parse()
+-}
+-
+-func main() {
+- configure()
+-
+- withIdentity(false, func(auth gophercloud.AccessProvider) {
+- withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+- _, err := createServer(servers, *imageRef, *flavorRef, *serverName, *adminPass)
+- if err != nil {
+- panic(err)
+- }
+-
+- allServers, err := servers.ListServers()
+- if err != nil {
+- panic(err)
+- }
+-
+- if !*quiet {
+- fmt.Printf("ID,Name,Status,Progress\n")
+- for _, i := range allServers {
+- fmt.Printf("%s,\"%s\",%s,%d\n", i.Id, i.Name, i.Status, i.Progress)
+- }
+- }
+- })
+- })
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/05-list-images.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/05-list-images.go
+deleted file mode 100644
+index 5ead18b..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/05-list-images.go
++++ /dev/null
+@@ -1,32 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode for acceptance testing. $? non-zero on error though.")
+-var rgn = flag.String("r", "", "Datacenter region to interrogate. Leave blank for provider-default region.")
+-
+-func main() {
+- flag.Parse()
+-
+- withIdentity(false, func(auth gophercloud.AccessProvider) {
+- withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+- images, err := servers.ListImages()
+- if err != nil {
+- panic(err)
+- }
+-
+- if !*quiet {
+- fmt.Println("ID,Name,MinRam,MinDisk")
+- for _, image := range images {
+- fmt.Printf("%s,\"%s\",%d,%d\n", image.Id, image.Name, image.MinRam, image.MinDisk)
+- }
+- }
+- })
+- })
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/06-list-flavors.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/06-list-flavors.go
+deleted file mode 100644
+index 65db7da..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/06-list-flavors.go
++++ /dev/null
+@@ -1,32 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode for acceptance testing. $? non-zero on error though.")
+-var rgn = flag.String("r", "", "Datacenter region to interrogate. Leave blank for provider-default region.")
+-
+-func main() {
+- flag.Parse()
+-
+- withIdentity(false, func(auth gophercloud.AccessProvider) {
+- withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+- flavors, err := servers.ListFlavors()
+- if err != nil {
+- panic(err)
+- }
+-
+- if !*quiet {
+- fmt.Println("ID,Name,MinRam,MinDisk")
+- for _, f := range flavors {
+- fmt.Printf("%s,\"%s\",%d,%d\n", f.Id, f.Name, f.Ram, f.Disk)
+- }
+- }
+- })
+- })
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/07-change-admin-password.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/07-change-admin-password.go
+deleted file mode 100644
+index 880fbe8..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/07-change-admin-password.go
++++ /dev/null
+@@ -1,49 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing. $? still indicates errors though.")
+-var serverId = flag.String("i", "", "ID of server whose admin password is to be changed.")
+-var newPass = flag.String("p", "", "New password for the server.")
+-
+-func main() {
+- flag.Parse()
+-
+- withIdentity(false, func(acc gophercloud.AccessProvider) {
+- withServerApi(acc, func(api gophercloud.CloudServersProvider) {
+- // If user doesn't explicitly provide a server ID, create one dynamically.
+- if *serverId == "" {
+- var err error
+- *serverId, err = createServer(api, "", "", "", "")
+- if err != nil {
+- panic(err)
+- }
+- waitForServerState(api, *serverId, "ACTIVE")
+- }
+-
+- // If no password is provided, create one dynamically.
+- if *newPass == "" {
+- *newPass = randomString("", 16)
+- }
+-
+- // Submit the request for changing the admin password.
+- // Note that we don't verify this actually completes;
+- // doing so is beyond the scope of the SDK, and should be
+- // the responsibility of your specific OpenStack provider.
+- err := api.SetAdminPassword(*serverId, *newPass)
+- if err != nil {
+- panic(err)
+- }
+-
+- if !*quiet {
+- fmt.Println("Password change request submitted.")
+- }
+- })
+- })
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/08-reauthentication.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/08-reauthentication.go
+deleted file mode 100644
+index c46f5bb..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/08-reauthentication.go
++++ /dev/null
+@@ -1,50 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode for acceptance testing. $? non-zero on error though.")
+-var rgn = flag.String("r", "", "Datacenter region to interrogate. Leave blank for provider-default region.")
+-
+-func main() {
+- flag.Parse()
+-
+- // Invoke withIdentity such that re-auth is enabled.
+- withIdentity(true, func(auth gophercloud.AccessProvider) {
+- token1 := auth.AuthToken()
+-
+- withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+- // Just to confirm everything works, we should be able to list images without error.
+- _, err := servers.ListImages()
+- if err != nil {
+- panic(err)
+- }
+-
+- // Revoke our current authentication token.
+- auth.Revoke(auth.AuthToken())
+-
+- // Attempt to list images again. This should _succeed_, because we enabled re-authentication.
+- _, err = servers.ListImages()
+- if err != nil {
+- panic(err)
+- }
+-
+- // However, our new authentication token should differ.
+- token2 := auth.AuthToken()
+-
+- if !*quiet {
+- fmt.Println("Old authentication token: ", token1)
+- fmt.Println("New authentication token: ", token2)
+- }
+-
+- if token1 == token2 {
+- panic("Tokens should differ")
+- }
+- })
+- })
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/09-resize-server.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/09-resize-server.go
+deleted file mode 100644
+index a2ef3c8..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/09-resize-server.go
++++ /dev/null
+@@ -1,102 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+- "time"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing. $? still indicates errors though.")
+-
+-func main() {
+- flag.Parse()
+-
+- withIdentity(false, func(acc gophercloud.AccessProvider) {
+- withServerApi(acc, func(api gophercloud.CloudServersProvider) {
+- // These tests are going to take some time to complete.
+- // So, we'll do two tests at the same time to help amortize test time.
+- done := make(chan bool)
+- go resizeRejectTest(api, done)
+- go resizeAcceptTest(api, done)
+- _ = <-done
+- _ = <-done
+-
+- if !*quiet {
+- fmt.Println("Done.")
+- }
+- })
+- })
+-}
+-
+-// Perform the resize test, but reject the resize request.
+-func resizeRejectTest(api gophercloud.CloudServersProvider, done chan bool) {
+- withServer(api, func(id string) {
+- newFlavorId := findAlternativeFlavor()
+- err := api.ResizeServer(id, randomString("ACPTTEST", 24), newFlavorId, "")
+- if err != nil {
+- panic(err)
+- }
+-
+- waitForServerState(api, id, "VERIFY_RESIZE")
+-
+- err = api.RevertResize(id)
+- if err != nil {
+- panic(err)
+- }
+- })
+- done <- true
+-}
+-
+-// Perform the resize test, but accept the resize request.
+-func resizeAcceptTest(api gophercloud.CloudServersProvider, done chan bool) {
+- withServer(api, func(id string) {
+- newFlavorId := findAlternativeFlavor()
+- err := api.ResizeServer(id, randomString("ACPTTEST", 24), newFlavorId, "")
+- if err != nil {
+- panic(err)
+- }
+-
+- waitForServerState(api, id, "VERIFY_RESIZE")
+-
+- err = api.ConfirmResize(id)
+- if err != nil {
+- panic(err)
+- }
+- })
+- done <- true
+-}
+-
+-func withServer(api gophercloud.CloudServersProvider, f func(string)) {
+- id, err := createServer(api, "", "", "", "")
+- if err != nil {
+- panic(err)
+- }
+-
+- for {
+- s, err := api.ServerById(id)
+- if err != nil {
+- panic(err)
+- }
+- if s.Status == "ACTIVE" {
+- break
+- }
+- time.Sleep(10 * time.Second)
+- }
+-
+- f(id)
+-
+- // I've learned that resizing an instance can fail if a delete request
+- // comes in prior to its completion. This ends up leaving the server
+- // in an error state, and neither the resize NOR the delete complete.
+- // This is a bug in OpenStack, as far as I'm concerned, but thankfully,
+- // there's an easy work-around -- just wait for your server to return to
+- // active state first!
+- waitForServerState(api, id, "ACTIVE")
+- err = api.DeleteServerById(id)
+- if err != nil {
+- panic(err)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/10-reboot-server.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/10-reboot-server.go
+deleted file mode 100644
+index ba6215a..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/10-reboot-server.go
++++ /dev/null
+@@ -1,45 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing. $? still indicates errors though.")
+-
+-func main() {
+- flag.Parse()
+-
+- withIdentity(false, func(acc gophercloud.AccessProvider) {
+- withServerApi(acc, func(servers gophercloud.CloudServersProvider) {
+- log("Creating server")
+- serverId, err := createServer(servers, "", "", "", "")
+- if err != nil {
+- panic(err)
+- }
+- waitForServerState(servers, serverId, "ACTIVE")
+-
+- log("Soft-rebooting server")
+- servers.RebootServer(serverId, false)
+- waitForServerState(servers, serverId, "REBOOT")
+- waitForServerState(servers, serverId, "ACTIVE")
+-
+- log("Hard-rebooting server")
+- servers.RebootServer(serverId, true)
+- waitForServerState(servers, serverId, "HARD_REBOOT")
+- waitForServerState(servers, serverId, "ACTIVE")
+-
+- log("Done")
+- servers.DeleteServerById(serverId)
+- })
+- })
+-}
+-
+-func log(s string) {
+- if !*quiet {
+- fmt.Println(s)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/11-rescue-unrescue-server.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/11-rescue-unrescue-server.go
+deleted file mode 100644
+index 008ad9d..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/11-rescue-unrescue-server.go
++++ /dev/null
+@@ -1,52 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing. $? still indicates errors though.")
+-
+-func main() {
+- flag.Parse()
+- withIdentity(false, func(acc gophercloud.AccessProvider) {
+- withServerApi(acc, func(servers gophercloud.CloudServersProvider) {
+- log("Creating server")
+- id, err := createServer(servers, "", "", "", "")
+- if err != nil {
+- panic(err)
+- }
+- waitForServerState(servers, id, "ACTIVE")
+- defer servers.DeleteServerById(id)
+-
+- log("Rescuing server")
+- adminPass, err := servers.RescueServer(id)
+- if err != nil {
+- panic(err)
+- }
+- log(" Admin password = " + adminPass)
+- if len(adminPass) < 1 {
+- panic("Empty admin password")
+- }
+- waitForServerState(servers, id, "RESCUE")
+-
+- log("Unrescuing server")
+- err = servers.UnrescueServer(id)
+- if err != nil {
+- panic(err)
+- }
+- waitForServerState(servers, id, "ACTIVE")
+-
+- log("Done")
+- })
+- })
+-}
+-
+-func log(s string) {
+- if !*quiet {
+- fmt.Println(s)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/12-update-server.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/12-update-server.go
+deleted file mode 100644
+index c0191f1..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/12-update-server.go
++++ /dev/null
+@@ -1,46 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing. $? still indicates errors though.")
+-
+-func main() {
+- flag.Parse()
+- withIdentity(false, func(acc gophercloud.AccessProvider) {
+- withServerApi(acc, func(servers gophercloud.CloudServersProvider) {
+- log("Creating server")
+- id, err := createServer(servers, "", "", "", "")
+- if err != nil {
+- panic(err)
+- }
+- waitForServerState(servers, id, "ACTIVE")
+- defer servers.DeleteServerById(id)
+-
+- log("Updating name of server")
+- newName := randomString("ACPTTEST", 32)
+- newDetails, err := servers.UpdateServer(id, gophercloud.NewServerSettings{
+- Name: newName,
+- })
+- if err != nil {
+- panic(err)
+- }
+- if newDetails.Name != newName {
+- panic("Name change didn't appear to take")
+- }
+-
+- log("Done")
+- })
+- })
+-}
+-
+-func log(s string) {
+- if !*quiet {
+- fmt.Println(s)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/13-rebuild-server.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/13-rebuild-server.go
+deleted file mode 100644
+index ae7e19f..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/13-rebuild-server.go
++++ /dev/null
+@@ -1,46 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing. $? still indicates errors though.")
+-
+-func main() {
+- flag.Parse()
+- withIdentity(false, func(acc gophercloud.AccessProvider) {
+- withServerApi(acc, func(servers gophercloud.CloudServersProvider) {
+- log("Creating server")
+- id, err := createServer(servers, "", "", "", "")
+- if err != nil {
+- panic(err)
+- }
+- waitForServerState(servers, id, "ACTIVE")
+- defer servers.DeleteServerById(id)
+-
+- log("Rebuilding server")
+- newDetails, err := servers.RebuildServer(id, gophercloud.NewServer{
+- Name: randomString("ACPTTEST", 32),
+- ImageRef: findAlternativeImage(),
+- FlavorRef: findAlternativeFlavor(),
+- AdminPass: randomString("", 16),
+- })
+- if err != nil {
+- panic(err)
+- }
+- waitForServerState(servers, newDetails.Id, "ACTIVE")
+-
+- log("Done")
+- })
+- })
+-}
+-
+-func log(s string) {
+- if !*quiet {
+- fmt.Println(s)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/14-list-addresses.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/14-list-addresses.go
+deleted file mode 100644
+index 1d7d26b..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/14-list-addresses.go
++++ /dev/null
+@@ -1,66 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing. $? still indicates errors though.")
+-
+-func main() {
+- flag.Parse()
+- withIdentity(false, func(acc gophercloud.AccessProvider) {
+- withServerApi(acc, func(api gophercloud.CloudServersProvider) {
+- log("Creating server")
+- id, err := createServer(api, "", "", "", "")
+- if err != nil {
+- panic(err)
+- }
+- waitForServerState(api, id, "ACTIVE")
+- defer api.DeleteServerById(id)
+-
+- tryAllAddresses(id, api)
+- tryAddressesByNetwork("private", id, api)
+-
+- log("Done")
+- })
+- })
+-}
+-
+-func tryAllAddresses(id string, api gophercloud.CloudServersProvider) {
+- log("Getting list of all addresses...")
+- addresses, err := api.ListAddresses(id)
+- if (err != nil) && (err != gophercloud.WarnUnauthoritative) {
+- panic(err)
+- }
+- if err == gophercloud.WarnUnauthoritative {
+- log("Uh oh -- got a response back, but it's not authoritative for some reason.")
+- }
+- if !*quiet {
+- fmt.Println("Addresses:")
+- fmt.Printf("%+v\n", addresses)
+- }
+-}
+-
+-func tryAddressesByNetwork(networkLabel string, id string, api gophercloud.CloudServersProvider) {
+- log("Getting list of addresses on", networkLabel, "network...")
+- network, err := api.ListAddressesByNetwork(id, networkLabel)
+- if (err != nil) && (err != gophercloud.WarnUnauthoritative) {
+- panic(err)
+- }
+- if err == gophercloud.WarnUnauthoritative {
+- log("Uh oh -- got a response back, but it's not authoritative for some reason.")
+- }
+- for _, addr := range network[networkLabel] {
+- log("Address:", addr.Addr, " IPv", addr.Version)
+- }
+-}
+-
+-func log(s ...interface{}) {
+- if !*quiet {
+- fmt.Println(s...)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/15-list-keypairs.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/15-list-keypairs.go
+deleted file mode 100644
+index 1a617ed..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/15-list-keypairs.go
++++ /dev/null
+@@ -1,32 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode for acceptance testing. $? non-zero on error though.")
+-var rgn = flag.String("r", "", "Datacenter region to interrogate. Leave blank for provider-default region.")
+-
+-func main() {
+- flag.Parse()
+-
+- withIdentity(false, func(auth gophercloud.AccessProvider) {
+- withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+- keypairs, err := servers.ListKeyPairs()
+- if err != nil {
+- panic(err)
+- }
+-
+- if !*quiet {
+- fmt.Println("name,fingerprint,publickey")
+- for _, key := range keypairs {
+- fmt.Printf("%s,%s,%s\n", key.Name, key.FingerPrint, key.PublicKey)
+- }
+- }
+- })
+- })
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/16-create-delete-keypair.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/16-create-delete-keypair.go
+deleted file mode 100644
+index f59e51c..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/16-create-delete-keypair.go
++++ /dev/null
+@@ -1,45 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode for acceptance testing. $? non-zero on error though.")
+-var rgn = flag.String("r", "", "Datacenter region to interrogate. Leave blank for provider-default region.")
+-
+-func main() {
+- flag.Parse()
+-
+- withIdentity(false, func(auth gophercloud.AccessProvider) {
+- withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+- name := randomString("ACPTTEST", 16)
+- kp := gophercloud.NewKeyPair{
+- Name: name,
+- }
+- keypair, err := servers.CreateKeyPair(kp)
+- if err != nil {
+- panic(err)
+- }
+- if !*quiet {
+- fmt.Printf("%s,%s,%s\n", keypair.Name, keypair.FingerPrint, keypair.PublicKey)
+- }
+-
+- keypair, err = servers.ShowKeyPair(name)
+- if err != nil {
+- panic(err)
+- }
+- if !*quiet {
+- fmt.Printf("%s,%s,%s\n", keypair.Name, keypair.FingerPrint, keypair.PublicKey)
+- }
+-
+- err = servers.DeleteKeyPair(name)
+- if err != nil {
+- panic(err)
+- }
+- })
+- })
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/17-create-delete-image.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/17-create-delete-image.go
+deleted file mode 100644
+index b3d80a3..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/17-create-delete-image.go
++++ /dev/null
+@@ -1,52 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode for acceptance testing. $? non-zero on error though.")
+-var rgn = flag.String("r", "", "Datacenter region to interrogate. Leave blank for provider-default region.")
+-
+-func main() {
+- flag.Parse()
+-
+- withIdentity(false, func(auth gophercloud.AccessProvider) {
+- withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+- log("Creating server")
+- serverId, err := createServer(servers, "", "", "", "")
+- if err != nil {
+- panic(err)
+- }
+- waitForServerState(servers, serverId, "ACTIVE")
+-
+- log("Creating image")
+- name := randomString("ACPTTEST", 16)
+- createImage := gophercloud.CreateImage{
+- Name: name,
+- }
+- imageId, err := servers.CreateImage(serverId, createImage)
+- if err != nil {
+- panic(err)
+- }
+- waitForImageState(servers, imageId, "ACTIVE")
+-
+- log("Deleting server")
+- servers.DeleteServerById(serverId)
+-
+- log("Deleting image")
+- servers.DeleteImageById(imageId)
+-
+- log("Done")
+- })
+- })
+-}
+-
+-func log(s string) {
+- if !*quiet {
+- fmt.Println(s)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/18-osutil-authentication.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/18-osutil-authentication.go
+deleted file mode 100644
+index 01ff4e9..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/18-osutil-authentication.go
++++ /dev/null
+@@ -1,19 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "github.com/rackspace/gophercloud"
+- "github.com/rackspace/gophercloud/osutil"
+-)
+-
+-func main() {
+- provider, authOptions, err := osutil.AuthOptions()
+- if err != nil {
+- panic(err)
+- }
+- _, err = gophercloud.Authenticate(provider, authOptions)
+- if err != nil {
+- panic(err)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/19-list-addresses-0.1.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/19-list-addresses-0.1.go
+deleted file mode 100644
+index d60557b..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/19-list-addresses-0.1.go
++++ /dev/null
+@@ -1,58 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing. $? still indicates errors though.")
+-
+-func main() {
+- flag.Parse()
+- withIdentity(false, func(acc gophercloud.AccessProvider) {
+- withServerApi(acc, func(api gophercloud.CloudServersProvider) {
+- log("Creating server")
+- id, err := createServer(api, "", "", "", "")
+- if err != nil {
+- panic(err)
+- }
+- waitForServerState(api, id, "ACTIVE")
+- defer api.DeleteServerById(id)
+-
+- tryAllAddresses(id, api)
+-
+- log("Done")
+- })
+- })
+-}
+-
+-func tryAllAddresses(id string, api gophercloud.CloudServersProvider) {
+- log("Getting the server instance")
+- s, err := api.ServerById(id)
+- if err != nil {
+- panic(err)
+- }
+-
+- log("Getting the complete set of pools")
+- ps, err := s.AllAddressPools()
+- if err != nil {
+- panic(err)
+- }
+-
+- log("Listing IPs for each pool")
+- for k, v := range ps {
+- log(fmt.Sprintf(" Pool %s", k))
+- for _, a := range v {
+- log(fmt.Sprintf(" IP: %s, Version: %d", a.Addr, a.Version))
+- }
+- }
+-}
+-
+-func log(s ...interface{}) {
+- if !*quiet {
+- fmt.Println(s...)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/99-delete-server.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/99-delete-server.go
+deleted file mode 100644
+index 3e38ba4..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/99-delete-server.go
++++ /dev/null
+@@ -1,48 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "flag"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+-)
+-
+-var quiet = flag.Bool("quiet", false, "Quiet operation for acceptance tests. $? non-zero if problem.")
+-var region = flag.String("r", "", "Datacenter region. Leave blank for provider-default region.")
+-
+-func main() {
+- flag.Parse()
+-
+- withIdentity(false, func(auth gophercloud.AccessProvider) {
+- withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+- // Grab a listing of all servers.
+- ss, err := servers.ListServers()
+- if err != nil {
+- panic(err)
+- }
+-
+- // And for each one that starts with the ACPTTEST prefix, delete it.
+- // These are likely left-overs from previously running acceptance tests.
+- // Note that 04-create-servers.go is intended to leak servers by intention,
+- // so as to test this code. :)
+- n := 0
+- for _, s := range ss {
+- if len(s.Name) < 8 {
+- continue
+- }
+- if s.Name[0:8] == "ACPTTEST" {
+- err := servers.DeleteServerById(s.Id)
+- if err != nil {
+- panic(err)
+- }
+- n++
+- }
+- }
+-
+- if !*quiet {
+- fmt.Printf("%d servers removed.\n", n)
+- }
+- })
+- })
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/libargs.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/libargs.go
+deleted file mode 100644
+index cf234e7..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/libargs.go
++++ /dev/null
+@@ -1,239 +0,0 @@
+-// +build acceptance,old
+-
+-package main
+-
+-import (
+- "crypto/rand"
+- "fmt"
+- "github.com/rackspace/gophercloud"
+- "os"
+- "strings"
+- "time"
+-)
+-
+-// getCredentials will verify existence of needed credential information
+-// provided through environment variables. This function will not return
+-// if at least one piece of required information is missing.
+-func getCredentials() (provider, username, password, apiKey string) {
+- provider = os.Getenv("SDK_PROVIDER")
+- username = os.Getenv("SDK_USERNAME")
+- password = os.Getenv("SDK_PASSWORD")
+- apiKey = os.Getenv("SDK_API_KEY")
+- var authURL = os.Getenv("OS_AUTH_URL")
+-
+- if (provider == "") || (username == "") || (password == "") {
+- fmt.Fprintf(os.Stderr, "One or more of the following environment variables aren't set:\n")
+- fmt.Fprintf(os.Stderr, " SDK_PROVIDER=\"%s\"\n", provider)
+- fmt.Fprintf(os.Stderr, " SDK_USERNAME=\"%s\"\n", username)
+- fmt.Fprintf(os.Stderr, " SDK_PASSWORD=\"%s\"\n", password)
+- os.Exit(1)
+- }
+-
+- if strings.Contains(provider, "rackspace") && (authURL != "") {
+- provider = authURL + "/v2.0/tokens"
+- }
+-
+- return
+-}
+-
+-// randomString generates a string of given length, but random content.
+-// All content will be within the ASCII graphic character set.
+-// (Implementation from Even Shaw's contribution on
+-// http://stackoverflow.com/questions/12771930/what-is-the-fastest-way-to-generate-a-long-random-string-in-go).
+-func randomString(prefix string, n int) string {
+- const alphanum = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
+- var bytes = make([]byte, n)
+- rand.Read(bytes)
+- for i, b := range bytes {
+- bytes[i] = alphanum[b%byte(len(alphanum))]
+- }
+- return prefix + string(bytes)
+-}
+-
+-// aSuitableImage finds a minimal image for use in dynamically creating servers.
+-// If none can be found, this function will panic.
+-func aSuitableImage(api gophercloud.CloudServersProvider) string {
+- images, err := api.ListImages()
+- if err != nil {
+- panic(err)
+- }
+-
+- // TODO(sfalvo):
+- // Works for Rackspace, might not work for your provider!
+- // Need to figure out why ListImages() provides 0 values for
+- // Ram and Disk fields.
+- //
+- // Until then, just return Ubuntu 12.04 LTS.
+- for i := 0; i < len(images); i++ {
+- if strings.Contains(images[i].Name, "Ubuntu 12.04 LTS") {
+- return images[i].Id
+- }
+- }
+- panic("Image for Ubuntu 12.04 LTS not found.")
+-}
+-
+-// aSuitableFlavor finds the minimum flavor capable of running the test image
+-// chosen by aSuitableImage. If none can be found, this function will panic.
+-func aSuitableFlavor(api gophercloud.CloudServersProvider) string {
+- flavors, err := api.ListFlavors()
+- if err != nil {
+- panic(err)
+- }
+-
+- // TODO(sfalvo):
+- // Works for Rackspace, might not work for your provider!
+- // Need to figure out why ListFlavors() provides 0 values for
+- // Ram and Disk fields.
+- //
+- // Until then, just return Ubuntu 12.04 LTS.
+- for i := 0; i < len(flavors); i++ {
+- if flavors[i].Id == "2" {
+- return flavors[i].Id
+- }
+- }
+- panic("Flavor 2 (512MB 1-core 20GB machine) not found.")
+-}
+-
+-// createServer creates a new server in a manner compatible with acceptance testing.
+-// In particular, it ensures that the name of the server always starts with "ACPTTEST--",
+-// which the delete servers acceptance test relies on to identify servers to delete.
+-// Passing in empty image and flavor references will force the use of reasonable defaults.
+-// An empty name string will result in a dynamically created name prefixed with "ACPTTEST--".
+-// A blank admin password will cause a password to be automatically generated; however,
+-// at present no means of recovering this password exists, as no acceptance tests yet require
+-// this data.
+-func createServer(servers gophercloud.CloudServersProvider, imageRef, flavorRef, name, adminPass string) (string, error) {
+- if imageRef == "" {
+- imageRef = aSuitableImage(servers)
+- }
+-
+- if flavorRef == "" {
+- flavorRef = aSuitableFlavor(servers)
+- }
+-
+- if len(name) < 1 {
+- name = randomString("ACPTTEST", 16)
+- }
+-
+- if (len(name) < 8) || (name[0:8] != "ACPTTEST") {
+- name = fmt.Sprintf("ACPTTEST--%s", name)
+- }
+-
+- newServer, err := servers.CreateServer(gophercloud.NewServer{
+- Name: name,
+- ImageRef: imageRef,
+- FlavorRef: flavorRef,
+- AdminPass: adminPass,
+- })
+-
+- if err != nil {
+- return "", err
+- }
+-
+- return newServer.Id, nil
+-}
+-
+-// findAlternativeFlavor locates a flavor to resize a server to. It is guaranteed to be different
+-// than what aSuitableFlavor() returns. If none could be found, this function will panic.
+-func findAlternativeFlavor() string {
+- return "3" // 1GB image, up from 512MB image
+-}
+-
+-// findAlternativeImage locates an image to resize or rebuild a server with. It is guaranteed to be
+-// different than what aSuitableImage() returns. If none could be found, this function will panic.
+-func findAlternativeImage() string {
+- return "c6f9c411-e708-4952-91e5-62ded5ea4d3e"
+-}
+-
+-// withIdentity authenticates the user against the provider's identity service, and provides an
+-// accessor for additional services.
+-func withIdentity(ar bool, f func(gophercloud.AccessProvider)) {
+- _, _, _, apiKey := getCredentials()
+- if len(apiKey) == 0 {
+- withPasswordIdentity(ar, f)
+- } else {
+- withAPIKeyIdentity(ar, f)
+- }
+-}
+-
+-func withPasswordIdentity(ar bool, f func(gophercloud.AccessProvider)) {
+- provider, username, password, _ := getCredentials()
+- acc, err := gophercloud.Authenticate(
+- provider,
+- gophercloud.AuthOptions{
+- Username: username,
+- Password: password,
+- AllowReauth: ar,
+- },
+- )
+- if err != nil {
+- panic(err)
+- }
+-
+- f(acc)
+-}
+-
+-func withAPIKeyIdentity(ar bool, f func(gophercloud.AccessProvider)) {
+- provider, username, _, apiKey := getCredentials()
+- acc, err := gophercloud.Authenticate(
+- provider,
+- gophercloud.AuthOptions{
+- Username: username,
+- ApiKey: apiKey,
+- AllowReauth: ar,
+- },
+- )
+- if err != nil {
+- panic(err)
+- }
+-
+- f(acc)
+-}
+-
+-// withServerApi acquires the cloud servers API.
+-func withServerApi(acc gophercloud.AccessProvider, f func(gophercloud.CloudServersProvider)) {
+- api, err := gophercloud.ServersApi(acc, gophercloud.ApiCriteria{
+- Name: "cloudServersOpenStack",
+- VersionId: "2",
+- UrlChoice: gophercloud.PublicURL,
+- })
+- if err != nil {
+- panic(err)
+- }
+-
+- f(api)
+-}
+-
+-// waitForServerState polls, every 10 seconds, for a given server to appear in the indicated state.
+-// This call will block forever if it never appears in the desired state, so if a timeout is required,
+-// make sure to call this function in a goroutine.
+-func waitForServerState(api gophercloud.CloudServersProvider, id, state string) error {
+- for {
+- s, err := api.ServerById(id)
+- if err != nil {
+- return err
+- }
+- if s.Status == state {
+- return nil
+- }
+- time.Sleep(10 * time.Second)
+- }
+- panic("Impossible")
+-}
+-
+-// waitForImageState polls, every 10 seconds, for a given image to appear in the indicated state.
+-// This call will block forever if it never appears in the desired state, so if a timeout is required,
+-// make sure to call this function in a goroutine.
+-func waitForImageState(api gophercloud.CloudServersProvider, id, state string) error {
+- for {
+- s, err := api.ImageById(id)
+- if err != nil {
+- return err
+- }
+- if s.Status == state {
+- return nil
+- }
+- time.Sleep(10 * time.Second)
+- }
+- panic("Impossible")
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/api_fetch.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/api_fetch.go
+deleted file mode 100644
+index 196047e..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/api_fetch.go
++++ /dev/null
+@@ -1,49 +0,0 @@
+-package gophercloud
+-
+-import(
+- "fmt"
+- "github.com/mitchellh/mapstructure"
+-)
+-
+-//The default generic openstack api
+-var OpenstackApi = map[string]interface{}{
+- "Type": "compute",
+- "UrlChoice": PublicURL,
+-}
+-
+-// Api for use with rackspace
+-var RackspaceApi = map[string]interface{}{
+- "Name": "cloudServersOpenStack",
+- "VersionId": "2",
+- "UrlChoice": PublicURL,
+-}
+-
+-
+-//Populates an ApiCriteria struct with the api values
+-//from one of the api maps
+-func PopulateApi(variant string) (ApiCriteria, error){
+- var Api ApiCriteria
+- var variantMap map[string]interface{}
+-
+- switch variant {
+- case "":
+- variantMap = OpenstackApi
+-
+- case "openstack":
+- variantMap = OpenstackApi
+-
+- case "rackspace":
+- variantMap = RackspaceApi
+-
+- default:
+- var err = fmt.Errorf(
+- "PopulateApi: Unknown variant %# v; legal values: \"openstack\", \"rackspace\"", variant)
+- return Api, err
+- }
+-
+- err := mapstructure.Decode(variantMap,&Api)
+- if err != nil{
+- return Api,err
+- }
+- return Api, err
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/authenticate.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/authenticate.go
+deleted file mode 100644
+index ff609aa..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/authenticate.go
++++ /dev/null
+@@ -1,257 +0,0 @@
+-package gophercloud
+-
+-import (
+- "fmt"
+- "github.com/racker/perigee"
+-)
+-
+-// AuthOptions lets anyone calling Authenticate() supply the required access credentials.
+-// At present, only Identity V2 API support exists; therefore, only Username, Password,
+-// and optionally, TenantId are provided. If future Identity API versions become available,
+-// alternative fields unique to those versions may appear here.
+-type AuthOptions struct {
+- // Username and Password are required if using Identity V2 API.
+- // Consult with your provider's control panel to discover your
+- // account's username and password.
+- Username, Password string
+-
+- // ApiKey used for providers that support Api Key authentication
+- ApiKey string
+-
+- // The TenantId field is optional for the Identity V2 API.
+- TenantId string
+-
+- // The TenantName can be specified instead of the TenantId
+- TenantName string
+-
+- // AllowReauth should be set to true if you grant permission for Gophercloud to cache
+- // your credentials in memory, and to allow Gophercloud to attempt to re-authenticate
+- // automatically if/when your token expires. If you set it to false, it will not cache
+- // these settings, but re-authentication will not be possible. This setting defaults
+- // to false.
+- AllowReauth bool
+-}
+-
+-// AuthContainer provides a JSON encoding wrapper for passing credentials to the Identity
+-// service. You will not work with this structure directly.
+-type AuthContainer struct {
+- Auth Auth `json:"auth"`
+-}
+-
+-// Auth provides a JSON encoding wrapper for passing credentials to the Identity
+-// service. You will not work with this structure directly.
+-type Auth struct {
+- PasswordCredentials *PasswordCredentials `json:"passwordCredentials,omitempty"`
+- ApiKeyCredentials *ApiKeyCredentials `json:"RAX-KSKEY:apiKeyCredentials,omitempty"`
+- TenantId string `json:"tenantId,omitempty"`
+- TenantName string `json:"tenantName,omitempty"`
+-}
+-
+-// PasswordCredentials provides a JSON encoding wrapper for passing credentials to the Identity
+-// service. You will not work with this structure directly.
+-type PasswordCredentials struct {
+- Username string `json:"username"`
+- Password string `json:"password"`
+-}
+-
+-type ApiKeyCredentials struct {
+- Username string `json:"username"`
+- ApiKey string `json:"apiKey"`
+-}
+-
+-// Access encapsulates the API token and its relevant fields, as well as the
+-// services catalog that Identity API returns once authenticated.
+-type Access struct {
+- Token Token
+- ServiceCatalog []CatalogEntry
+- User User
+- provider Provider `json:"-"`
+- options AuthOptions `json:"-"`
+- context *Context `json:"-"`
+-}
+-
+-// Token encapsulates an authentication token and when it expires. It also includes
+-// tenant information if available.
+-type Token struct {
+- Id, Expires string
+- Tenant Tenant
+-}
+-
+-// Tenant encapsulates tenant authentication information. If, after authentication,
+-// no tenant information is supplied, both Id and Name will be "".
+-type Tenant struct {
+- Id, Name string
+-}
+-
+-// User encapsulates the user credentials, and provides visibility in what
+-// the user can do through its role assignments.
+-type User struct {
+- Id, Name string
+- XRaxDefaultRegion string `json:"RAX-AUTH:defaultRegion"`
+- Roles []Role
+-}
+-
+-// Role encapsulates a permission that a user can rely on.
+-type Role struct {
+- Description, Id, Name string
+-}
+-
+-// CatalogEntry encapsulates a service catalog record.
+-type CatalogEntry struct {
+- Name, Type string
+- Endpoints []EntryEndpoint
+-}
+-
+-// EntryEndpoint encapsulates how to get to the API of some service.
+-type EntryEndpoint struct {
+- Region, TenantId string
+- PublicURL, InternalURL string
+- VersionId, VersionInfo, VersionList string
+-}
+-
+-type AuthError struct {
+- StatusCode int
+-}
+-
+-func (ae *AuthError) Error() string {
+- switch ae.StatusCode {
+- case 401:
+- return "Auth failed. Bad credentials."
+-
+- default:
+- return fmt.Sprintf("Auth failed. Status code is: %s.", ae.StatusCode)
+- }
+-}
+-
+-//
+-func getAuthCredentials(options AuthOptions) Auth {
+- if options.ApiKey == "" {
+- return Auth{
+- PasswordCredentials: &PasswordCredentials{
+- Username: options.Username,
+- Password: options.Password,
+- },
+- TenantId: options.TenantId,
+- TenantName: options.TenantName,
+- }
+- } else {
+- return Auth{
+- ApiKeyCredentials: &ApiKeyCredentials{
+- Username: options.Username,
+- ApiKey: options.ApiKey,
+- },
+- TenantId: options.TenantId,
+- TenantName: options.TenantName,
+- }
+- }
+-}
+-
+-// papersPlease contains the common logic between authentication and re-authentication.
+-// The name, obviously a joke on the process of authentication, was chosen because
+-// of how many other entities exist in the program containing the word Auth or Authorization.
+-// I didn't need another one.
+-func (c *Context) papersPlease(p Provider, options AuthOptions) (*Access, error) {
+- var access *Access
+- access = new(Access)
+-
+- if (options.Username == "") || (options.Password == "" && options.ApiKey == "") {
+- return nil, ErrCredentials
+- }
+-
+- resp, err := perigee.Request("POST", p.AuthEndpoint, perigee.Options{
+- CustomClient: c.httpClient,
+- ReqBody: &AuthContainer{
+- Auth: getAuthCredentials(options),
+- },
+- Results: &struct {
+- Access **Access `json:"access"`
+- }{
+- &access,
+- },
+- })
+-
+- if err == nil {
+- switch resp.StatusCode {
+- case 200:
+- access.options = options
+- access.provider = p
+- access.context = c
+-
+- default:
+- err = &AuthError {
+- StatusCode: resp.StatusCode,
+- }
+- }
+- }
+-
+- return access, err
+-}
+-
+-// Authenticate() grants access to the OpenStack-compatible provider API.
+-//
+-// Providers are identified through a unique key string.
+-// See the RegisterProvider() method for more details.
+-//
+-// The supplied AuthOptions instance allows the client to specify only those credentials
+-// relevant for the authentication request. At present, support exists for OpenStack
+-// Identity V2 API only; support for V3 will become available as soon as documentation for it
+-// becomes readily available.
+-//
+-// For Identity V2 API requirements, you must provide at least the Username and Password
+-// options. The TenantId field is optional, and defaults to "".
+-func (c *Context) Authenticate(provider string, options AuthOptions) (*Access, error) {
+- p, err := c.ProviderByName(provider)
+- if err != nil {
+- return nil, err
+- }
+- return c.papersPlease(p, options)
+-}
+-
+-// Reauthenticate attempts to reauthenticate using the configured access credentials, if
+-// allowed. This method takes no action unless your AuthOptions has the AllowReauth flag
+-// set to true.
+-func (a *Access) Reauthenticate() error {
+- var other *Access
+- var err error
+-
+- if a.options.AllowReauth {
+- other, err = a.context.papersPlease(a.provider, a.options)
+- if err == nil {
+- *a = *other
+- }
+- }
+- return err
+-}
+-
+-// See AccessProvider interface definition for details.
+-func (a *Access) FirstEndpointUrlByCriteria(ac ApiCriteria) string {
+- ep := FindFirstEndpointByCriteria(a.ServiceCatalog, ac)
+- urls := []string{ep.PublicURL, ep.InternalURL}
+- return urls[ac.UrlChoice]
+-}
+-
+-// See AccessProvider interface definition for details.
+-func (a *Access) AuthToken() string {
+- return a.Token.Id
+-}
+-
+-// See AccessProvider interface definition for details.
+-func (a *Access) Revoke(tok string) error {
+- url := a.provider.AuthEndpoint + "/" + tok
+- err := perigee.Delete(url, perigee.Options{
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": a.AuthToken(),
+- },
+- OkCodes: []int{204},
+- })
+- return err
+-}
+-
+-// See ServiceCatalogerForIdentityV2 interface definition for details.
+-// Note that the raw slice is returend; be careful not to alter the fields of any members,
+-// for other components of Gophercloud may depend upon them.
+-// If this becomes a problem in the future,
+-// a future revision may return a deep-copy of the service catalog instead.
+-func (a *Access) V2ServiceCatalog() []CatalogEntry {
+- return a.ServiceCatalog
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/authenticate_test.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/authenticate_test.go
+deleted file mode 100644
+index b05c780..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/authenticate_test.go
++++ /dev/null
+@@ -1,264 +0,0 @@
+-package gophercloud
+-
+-import (
+- "net/http"
+- "testing"
+-)
+-
+-const SUCCESSFUL_RESPONSE = `{
+- "access": {
+- "serviceCatalog": [{
+- "endpoints": [{
+- "publicURL": "https://ord.servers.api.rackspacecloud.com/v2/12345",
+- "region": "ORD",
+- "tenantId": "12345",
+- "versionId": "2",
+- "versionInfo": "https://ord.servers.api.rackspacecloud.com/v2",
+- "versionList": "https://ord.servers.api.rackspacecloud.com/"
+- },{
+- "publicURL": "https://dfw.servers.api.rackspacecloud.com/v2/12345",
+- "region": "DFW",
+- "tenantId": "12345",
+- "versionId": "2",
+- "versionInfo": "https://dfw.servers.api.rackspacecloud.com/v2",
+- "versionList": "https://dfw.servers.api.rackspacecloud.com/"
+- }],
+- "name": "cloudServersOpenStack",
+- "type": "compute"
+- },{
+- "endpoints": [{
+- "publicURL": "https://ord.databases.api.rackspacecloud.com/v1.0/12345",
+- "region": "ORD",
+- "tenantId": "12345"
+- }],
+- "name": "cloudDatabases",
+- "type": "rax:database"
+- }],
+- "token": {
+- "expires": "2012-04-13T13:15:00.000-05:00",
+- "id": "aaaaa-bbbbb-ccccc-dddd"
+- },
+- "user": {
+- "RAX-AUTH:defaultRegion": "DFW",
+- "id": "161418",
+- "name": "demoauthor",
+- "roles": [{
+- "description": "User Admin Role.",
+- "id": "3",
+- "name": "identity:user-admin"
+- }]
+- }
+- }
+-}
+-`
+-
+-func TestAuthProvider(t *testing.T) {
+- tt := newTransport().WithResponse(SUCCESSFUL_RESPONSE)
+- c := TestContext().UseCustomClient(&http.Client{
+- Transport: tt,
+- })
+-
+- _, err := c.Authenticate("", AuthOptions{})
+- if err == nil {
+- t.Error("Expected error for empty provider string")
+- return
+- }
+- _, err = c.Authenticate("unknown-provider", AuthOptions{Username: "u", Password: "p"})
+- if err == nil {
+- t.Error("Expected error for unknown service provider")
+- return
+- }
+-
+- err = c.RegisterProvider("provider", Provider{AuthEndpoint: "/"})
+- if err != nil {
+- t.Error(err)
+- return
+- }
+- _, err = c.Authenticate("provider", AuthOptions{Username: "u", Password: "p"})
+- if err != nil {
+- t.Error(err)
+- return
+- }
+- if tt.called != 1 {
+- t.Error("Expected transport to be called once.")
+- return
+- }
+-}
+-
+-func TestTenantIdEncoding(t *testing.T) {
+- tt := newTransport().WithResponse(SUCCESSFUL_RESPONSE)
+- c := TestContext().
+- UseCustomClient(&http.Client{
+- Transport: tt,
+- }).
+- WithProvider("provider", Provider{AuthEndpoint: "/"})
+-
+- tt.IgnoreTenantId()
+- _, err := c.Authenticate("provider", AuthOptions{
+- Username: "u",
+- Password: "p",
+- })
+- if err != nil {
+- t.Error(err)
+- return
+- }
+- if tt.tenantIdFound {
+- t.Error("Tenant ID should not have been encoded")
+- return
+- }
+-
+- tt.ExpectTenantId()
+- _, err = c.Authenticate("provider", AuthOptions{
+- Username: "u",
+- Password: "p",
+- TenantId: "t",
+- })
+- if err != nil {
+- t.Error(err)
+- return
+- }
+- if !tt.tenantIdFound {
+- t.Error("Tenant ID should have been encoded")
+- return
+- }
+-}
+-
+-func TestUserNameAndPassword(t *testing.T) {
+- c := TestContext().
+- WithProvider("provider", Provider{AuthEndpoint: "http://localhost/"}).
+- UseCustomClient(&http.Client{Transport: newTransport().WithResponse(SUCCESSFUL_RESPONSE)})
+-
+- credentials := []AuthOptions{
+- {},
+- {Username: "u"},
+- {Password: "p"},
+- }
+- for i, auth := range credentials {
+- _, err := c.Authenticate("provider", auth)
+- if err == nil {
+- t.Error("Expected error from missing credentials (%d)", i)
+- return
+- }
+- }
+-
+- _, err := c.Authenticate("provider", AuthOptions{Username: "u", Password: "p"})
+- if err != nil {
+- t.Error(err)
+- return
+- }
+-}
+-
+-func TestUserNameAndApiKey(t *testing.T) {
+- c := TestContext().
+- WithProvider("provider", Provider{AuthEndpoint: "http://localhost/"}).
+- UseCustomClient(&http.Client{Transport: newTransport().WithResponse(SUCCESSFUL_RESPONSE)})
+-
+- credentials := []AuthOptions{
+- {},
+- {Username: "u"},
+- {ApiKey: "a"},
+- }
+- for i, auth := range credentials {
+- _, err := c.Authenticate("provider", auth)
+- if err == nil {
+- t.Error("Expected error from missing credentials (%d)", i)
+- return
+- }
+- }
+-
+- _, err := c.Authenticate("provider", AuthOptions{Username: "u", ApiKey: "a"})
+- if err != nil {
+- t.Error(err)
+- return
+- }
+-}
+-
+-func TestTokenAcquisition(t *testing.T) {
+- c := TestContext().
+- UseCustomClient(&http.Client{Transport: newTransport().WithResponse(SUCCESSFUL_RESPONSE)}).
+- WithProvider("provider", Provider{AuthEndpoint: "http://localhost/"})
+-
+- acc, err := c.Authenticate("provider", AuthOptions{Username: "u", Password: "p"})
+- if err != nil {
+- t.Error(err)
+- return
+- }
+-
+- tok := acc.Token
+- if (tok.Id == "") || (tok.Expires == "") {
+- t.Error("Expected a valid token for successful login; got %s, %s", tok.Id, tok.Expires)
+- return
+- }
+-}
+-
+-func TestServiceCatalogAcquisition(t *testing.T) {
+- c := TestContext().
+- UseCustomClient(&http.Client{Transport: newTransport().WithResponse(SUCCESSFUL_RESPONSE)}).
+- WithProvider("provider", Provider{AuthEndpoint: "http://localhost/"})
+-
+- acc, err := c.Authenticate("provider", AuthOptions{Username: "u", Password: "p"})
+- if err != nil {
+- t.Error(err)
+- return
+- }
+-
+- svcs := acc.ServiceCatalog
+- if len(svcs) < 2 {
+- t.Error("Expected 2 service catalog entries; got %d", len(svcs))
+- return
+- }
+-
+- types := map[string]bool{
+- "compute": true,
+- "rax:database": true,
+- }
+- for _, entry := range svcs {
+- if !types[entry.Type] {
+- t.Error("Expected to find type %s.", entry.Type)
+- return
+- }
+- }
+-}
+-
+-func TestUserAcquisition(t *testing.T) {
+- c := TestContext().
+- UseCustomClient(&http.Client{Transport: newTransport().WithResponse(SUCCESSFUL_RESPONSE)}).
+- WithProvider("provider", Provider{AuthEndpoint: "http://localhost/"})
+-
+- acc, err := c.Authenticate("provider", AuthOptions{Username: "u", Password: "p"})
+- if err != nil {
+- t.Error(err)
+- return
+- }
+-
+- u := acc.User
+- if u.Id != "161418" {
+- t.Error("Expected user ID of 16148; got", u.Id)
+- return
+- }
+-}
+-
+-func TestAuthenticationNeverReauths(t *testing.T) {
+- tt := newTransport().WithError(401)
+- c := TestContext().
+- UseCustomClient(&http.Client{Transport: tt}).
+- WithProvider("provider", Provider{AuthEndpoint: "http://localhost"})
+-
+- _, err := c.Authenticate("provider", AuthOptions{Username: "u", Password: "p"})
+- if err == nil {
+- t.Error("Expected an error from a 401 Unauthorized response")
+- return
+- }
+-
+- rc, _ := ActualResponseCode(err)
+- if rc != 401 {
+- t.Error("Expected a 401 error code")
+- return
+- }
+-
+- err = tt.VerifyCalls(t, 1)
+- if err != nil {
+- // Test object already flagged.
+- return
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/common_types.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/common_types.go
+deleted file mode 100644
+index 044b308..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/common_types.go
++++ /dev/null
+@@ -1,24 +0,0 @@
+-package gophercloud
+-
+-// Link is used for JSON (un)marshalling.
+-// It provides RESTful links to a resource.
+-type Link struct {
+- Href string `json:"href"`
+- Rel string `json:"rel"`
+- Type string `json:"type"`
+-}
+-
+-// FileConfig structures represent a blob of data which must appear at a
+-// a specific location in a server's filesystem. The file contents are
+-// base-64 encoded.
+-type FileConfig struct {
+- Path string `json:"path"`
+- Contents string `json:"contents"`
+-}
+-
+-// NetworkConfig structures represent an affinity between a server and a
+-// specific, uniquely identified network. Networks are identified through
+-// universally unique IDs.
+-type NetworkConfig struct {
+- Uuid string `json:"uuid"`
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/context.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/context.go
+deleted file mode 100644
+index e753c8b..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/context.go
++++ /dev/null
+@@ -1,150 +0,0 @@
+-package gophercloud
+-
+-import (
+- "net/http"
+- "strings"
+- "fmt"
+- "github.com/tonnerre/golang-pretty"
+-)
+-
+-// Provider structures exist for each tangible provider of OpenStack service.
+-// For example, Rackspace, Hewlett-Packard, and NASA might have their own instance of this structure.
+-//
+-// At a minimum, a provider must expose an authentication endpoint.
+-type Provider struct {
+- AuthEndpoint string
+-}
+-
+-// ReauthHandlerFunc functions are responsible for somehow performing the task of
+-// reauthentication.
+-type ReauthHandlerFunc func(AccessProvider) error
+-
+-// Context structures encapsulate Gophercloud-global state in a manner which
+-// facilitates easier unit testing. As a user of this SDK, you'll never
+-// have to use this structure, except when contributing new code to the SDK.
+-type Context struct {
+- // providerMap serves as a directory of supported providers.
+- providerMap map[string]Provider
+-
+- // httpClient refers to the current HTTP client interface to use.
+- httpClient *http.Client
+-
+- // reauthHandler provides the functionality needed to re-authenticate
+- // if that feature is enabled. Note: in order to allow for automatic
+- // re-authentication, the Context object will need to remember your
+- // username, password, and tenant ID as provided in the initial call
+- // to Authenticate(). If you do not desire this, you'll need to handle
+- // reauthentication yourself through other means. Two methods exist:
+- // the first approach is to just handle errors yourself at the application
+- // layer, and the other is through a custom reauthentication handler
+- // set through the WithReauthHandler() method.
+- reauthHandler ReauthHandlerFunc
+-}
+-
+-// TestContext yields a new Context instance, pre-initialized with a barren
+-// state suitable for per-unit-test customization. This configuration consists
+-// of:
+-//
+-// * An empty provider map.
+-//
+-// * An HTTP client built by the net/http package (see http://godoc.org/net/http#Client).
+-func TestContext() *Context {
+- return &Context{
+- providerMap: make(map[string]Provider),
+- httpClient: &http.Client{},
+- reauthHandler: func(acc AccessProvider) error {
+- return acc.Reauthenticate()
+- },
+- }
+-}
+-
+-// UseCustomClient configures the context to use a customized HTTP client
+-// instance. By default, TestContext() will return a Context which uses
+-// the net/http package's default client instance.
+-func (c *Context) UseCustomClient(hc *http.Client) *Context {
+- c.httpClient = hc
+- return c
+-}
+-
+-// RegisterProvider allows a unit test to register a mythical provider convenient for testing.
+-// If the provider structure lacks adequate configuration, or the configuration given has some
+-// detectable error, an ErrConfiguration error will result.
+-func (c *Context) RegisterProvider(name string, p Provider) error {
+- if p.AuthEndpoint == "" {
+- return ErrConfiguration
+- }
+-
+- c.providerMap[name] = p
+- return nil
+-}
+-
+-// WithProvider offers convenience for unit tests.
+-func (c *Context) WithProvider(name string, p Provider) *Context {
+- err := c.RegisterProvider(name, p)
+- if err != nil {
+- panic(err)
+- }
+- return c
+-}
+-
+-// ProviderByName will locate a provider amongst those previously registered, if it exists.
+-// If the named provider has not been registered, an ErrProvider error will result.
+-//
+-// You may also specify a custom Identity API URL.
+-// Any provider name that contains the characters "://", in that order, will be treated as a custom Identity API URL.
+-// Custom URLs, important for private cloud deployments, overrides all provider configurations.
+-func (c *Context) ProviderByName(name string) (p Provider, err error) {
+- for provider, descriptor := range c.providerMap {
+- if name == provider {
+- return descriptor, nil
+- }
+- }
+- if strings.Contains(name, "://") {
+- p = Provider{
+- AuthEndpoint: name,
+- }
+- return p, nil
+- }
+- return Provider{}, ErrProvider
+-}
+-
+-func getServiceCatalogFromAccessProvider(provider AccessProvider) ([]CatalogEntry) {
+- access, found := provider.(*Access)
+- if found {
+- return access.ServiceCatalog
+- } else {
+- return nil
+- }
+-}
+-
+-// Instantiates a Cloud Servers API for the provider given.
+-func (c *Context) ServersApi(provider AccessProvider, criteria ApiCriteria) (CloudServersProvider, error) {
+- url := provider.FirstEndpointUrlByCriteria(criteria)
+- if url == "" {
+- var err = fmt.Errorf(
+- "Missing endpoint, or insufficient privileges to access endpoint; criteria = %# v; serviceCatalog = %# v",
+- pretty.Formatter(criteria),
+- pretty.Formatter(getServiceCatalogFromAccessProvider(provider)))
+- return nil, err
+- }
+-
+- gcp := &genericServersProvider{
+- endpoint: url,
+- context: c,
+- access: provider,
+- }
+-
+- return gcp, nil
+-}
+-
+-// WithReauthHandler configures the context to handle reauthentication attempts using the supplied
+-// funtion. By default, reauthentication happens by invoking Authenticate(), which is unlikely to be
+-// useful in a unit test.
+-//
+-// Do not confuse this function with WithReauth()! Although they work together to support reauthentication,
+-// WithReauth() actually contains the decision-making logic to determine when to perform a reauth,
+-// while WithReauthHandler() is used to configure what a reauth actually entails.
+-func (c *Context) WithReauthHandler(f ReauthHandlerFunc) *Context {
+- c.reauthHandler = f
+- return c
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/context_test.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/context_test.go
+deleted file mode 100644
+index 2936526..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/context_test.go
++++ /dev/null
+@@ -1,28 +0,0 @@
+-package gophercloud
+-
+-import (
+- "testing"
+-)
+-
+-func TestProviderRegistry(t *testing.T) {
+- c := TestContext()
+-
+- _, err := c.ProviderByName("aProvider")
+- if err == nil {
+- t.Error("Expected error when looking for a provider by non-existant name")
+- return
+- }
+-
+- err = c.RegisterProvider("aProvider", Provider{})
+- if err != ErrConfiguration {
+- t.Error("Unexpected error/nil when registering a provider w/out an auth endpoint\n %s", err)
+- return
+- }
+-
+- _ = c.RegisterProvider("aProvider", Provider{AuthEndpoint: "http://localhost/auth"})
+- _, err = c.ProviderByName("aProvider")
+- if err != nil {
+- t.Error(err)
+- return
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/errors.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/errors.go
+deleted file mode 100644
+index 726ba7e..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/errors.go
++++ /dev/null
+@@ -1,39 +0,0 @@
+-package gophercloud
+-
+-import (
+- "fmt"
+-)
+-
+-// ErrNotImplemented should be used only while developing new SDK features.
+-// No established function or method will ever produce this error.
+-var ErrNotImplemented = fmt.Errorf("Not implemented")
+-
+-// ErrProvider errors occur when attempting to reference an unsupported
+-// provider. More often than not, this error happens due to a typo in
+-// the name.
+-var ErrProvider = fmt.Errorf("Missing or incorrect provider")
+-
+-// ErrCredentials errors happen when attempting to authenticate using a
+-// set of credentials not recognized by the Authenticate() method.
+-// For example, not providing a username or password when attempting to
+-// authenticate against an Identity V2 API.
+-var ErrCredentials = fmt.Errorf("Missing or incomplete credentials")
+-
+-// ErrConfiguration errors happen when attempting to add a new provider, and
+-// the provider added lacks a correct or consistent configuration.
+-// For example, all providers must expose at least an Identity V2 API
+-// for authentication; if this endpoint isn't specified, you may receive
+-// this error when attempting to register it against a context.
+-var ErrConfiguration = fmt.Errorf("Missing or incomplete configuration")
+-
+-// ErrError errors happen when you attempt to discover the response code
+-// responsible for a previous request bombing with an error, but pass in an
+-// error interface which doesn't belong to the web client.
+-var ErrError = fmt.Errorf("Attempt to solicit actual HTTP response code from error entity which doesn't know")
+-
+-// WarnUnauthoritative warnings happen when a service believes its response
+-// to be correct, but is not in a position of knowing for sure at the moment.
+-// For example, the service could be responding with cached data that has
+-// exceeded its time-to-live setting, but which has not yet received an official
+-// update from an authoritative source.
+-var WarnUnauthoritative = fmt.Errorf("Unauthoritative data")
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/flavors.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/flavors.go
+deleted file mode 100644
+index eb864d5..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/flavors.go
++++ /dev/null
+@@ -1,55 +0,0 @@
+-package gophercloud
+-
+-import (
+- "github.com/racker/perigee"
+-)
+-
+-// See CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) ListFlavors() ([]Flavor, error) {
+- var fs []Flavor
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/flavors/detail"
+- return perigee.Get(url, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- Results: &struct{ Flavors *[]Flavor }{&fs},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+- return fs, err
+-}
+-
+-// FlavorLink provides a reference to a flavor by either ID or by direct URL.
+-// Some services use just the ID, others use just the URL.
+-// This structure provides a common means of expressing both in a single field.
+-type FlavorLink struct {
+- Id string `json:"id"`
+- Links []Link `json:"links"`
+-}
+-
+-// Flavor records represent (virtual) hardware configurations for server resources in a region.
+-//
+-// The Id field contains the flavor's unique identifier.
+-// For example, this identifier will be useful when specifying which hardware configuration to use for a new server instance.
+-//
+-// The Disk and Ram fields provide a measure of storage space offered by the flavor, in GB and MB, respectively.
+-//
+-// The Name field provides a human-readable moniker for the flavor.
+-//
+-// Swap indicates how much space is reserved for swap.
+-// If not provided, this field will be set to 0.
+-//
+-// VCpus indicates how many (virtual) CPUs are available for this flavor.
+-type Flavor struct {
+- OsFlvDisabled bool `json:"OS-FLV-DISABLED:disabled"`
+- Disk int `json:"disk"`
+- Id string `json:"id"`
+- Links []Link `json:"links"`
+- Name string `json:"name"`
+- Ram int `json:"ram"`
+- RxTxFactor float64 `json:"rxtx_factor"`
+- Swap int `json:"swap"`
+- VCpus int `json:"vcpus"`
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/floating_ips.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/floating_ips.go
+deleted file mode 100644
+index 1163667..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/floating_ips.go
++++ /dev/null
+@@ -1,88 +0,0 @@
+-package gophercloud
+-
+-import (
+- "errors"
+- "fmt"
+- "github.com/racker/perigee"
+-)
+-
+-func (gsp *genericServersProvider) ListFloatingIps() ([]FloatingIp, error) {
+- var fips []FloatingIp
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/os-floating-ips"
+- return perigee.Get(url, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- Results: &struct {
+- FloatingIps *[]FloatingIp `json:"floating_ips"`
+- }{&fips},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+- return fips, err
+-}
+-
+-func (gsp *genericServersProvider) CreateFloatingIp(pool string) (FloatingIp, error) {
+- fip := new(FloatingIp)
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/os-floating-ips"
+- return perigee.Post(url, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- ReqBody: map[string]string{
+- "pool": pool,
+- },
+- Results: &struct {
+- FloatingIp **FloatingIp `json:"floating_ip"`
+- }{&fip},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+-
+- if fip.Ip == "" {
+- return *fip, errors.New("Error creating floating IP")
+- }
+-
+- return *fip, err
+-}
+-
+-func (gsp *genericServersProvider) AssociateFloatingIp(serverId string, ip FloatingIp) error {
+- return gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/servers/%s/action", gsp.endpoint, serverId)
+- return perigee.Post(ep, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- ReqBody: map[string](map[string]string){
+- "addFloatingIp": map[string]string{"address": ip.Ip},
+- },
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{202},
+- })
+- })
+-}
+-
+-func (gsp *genericServersProvider) DeleteFloatingIp(ip FloatingIp) error {
+- return gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/os-floating-ips/%d", gsp.endpoint, ip.Id)
+- return perigee.Delete(ep, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{202},
+- })
+- })
+-}
+-
+-type FloatingIp struct {
+- Id int `json:"id"`
+- Pool string `json:"pool"`
+- Ip string `json:"ip"`
+- FixedIp string `json:"fixed_ip"`
+- InstanceId string `json:"instance_id"`
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/global_context.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/global_context.go
+deleted file mode 100644
+index 89d283b..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/global_context.go
++++ /dev/null
+@@ -1,67 +0,0 @@
+-package gophercloud
+-
+-import (
+- "github.com/racker/perigee"
+-)
+-
+-// globalContext is the, well, "global context."
+-// Most of this SDK is written in a manner to facilitate easier testing,
+-// which doesn't require all the configuration a real-world application would require.
+-// However, for real-world deployments, applications should be able to rely on a consistent configuration of providers, etc.
+-var globalContext *Context
+-
+-// providers is the set of supported providers.
+-var providers = map[string]Provider{
+- "rackspace-us": {
+- AuthEndpoint: "https://identity.api.rackspacecloud.com/v2.0/tokens",
+- },
+- "rackspace-uk": {
+- AuthEndpoint: "https://lon.identity.api.rackspacecloud.com/v2.0/tokens",
+- },
+-}
+-
+-// Initialize the global context to sane configuration.
+-// The Go runtime ensures this function is called before main(),
+-// thus guaranteeing proper configuration before your application ever runs.
+-func init() {
+- globalContext = TestContext()
+- for name, descriptor := range providers {
+- globalContext.RegisterProvider(name, descriptor)
+- }
+-}
+-
+-// Authenticate() grants access to the OpenStack-compatible provider API.
+-//
+-// Providers are identified through a unique key string.
+-// Specifying an unsupported provider will result in an ErrProvider error.
+-// However, you may also specify a custom Identity API URL.
+-// Any provider name that contains the characters "://", in that order, will be treated as a custom Identity API URL.
+-// Custom URLs, important for private cloud deployments, overrides all provider configurations.
+-//
+-// The supplied AuthOptions instance allows the client to specify only those credentials
+-// relevant for the authentication request. At present, support exists for OpenStack
+-// Identity V2 API only; support for V3 will become available as soon as documentation for it
+-// becomes readily available.
+-//
+-// For Identity V2 API requirements, you must provide at least the Username and Password
+-// options. The TenantId field is optional, and defaults to "".
+-func Authenticate(provider string, options AuthOptions) (*Access, error) {
+- return globalContext.Authenticate(provider, options)
+-}
+-
+-// Instantiates a Cloud Servers object for the provider given.
+-func ServersApi(acc AccessProvider, criteria ApiCriteria) (CloudServersProvider, error) {
+- return globalContext.ServersApi(acc, criteria)
+-}
+-
+-// ActualResponseCode inspects a returned error, and discovers the actual response actual
+-// response code that caused the error to be raised.
+-func ActualResponseCode(e error) (int, error) {
+- if err, typeOk := e.(*perigee.UnexpectedResponseCodeError); typeOk {
+- return err.Actual, nil
+- } else if err, typeOk := e.(*AuthError); typeOk{
+- return err.StatusCode, nil
+- }
+-
+- return 0, ErrError
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/images.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/images.go
+deleted file mode 100644
+index a23e0bb..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/images.go
++++ /dev/null
+@@ -1,106 +0,0 @@
+-package gophercloud
+-
+-import (
+- "github.com/racker/perigee"
+-)
+-
+-// See the CloudImagesProvider interface for details.
+-func (gsp *genericServersProvider) ListImages() ([]Image, error) {
+- var is []Image
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/images/detail"
+- return perigee.Get(url, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- Results: &struct{ Images *[]Image }{&is},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+- return is, err
+-}
+-
+-func (gsp *genericServersProvider) ImageById(id string) (*Image, error) {
+- var is *Image
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/images/" + id
+- return perigee.Get(url, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- Results: &struct{ Image **Image }{&is},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+- return is, err
+-}
+-
+-func (gsp *genericServersProvider) DeleteImageById(id string) error {
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/images/" + id
+- _, err := perigee.Request("DELETE", url, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- return err
+- })
+- return err
+-}
+-
+-// ImageLink provides a reference to a image by either ID or by direct URL.
+-// Some services use just the ID, others use just the URL.
+-// This structure provides a common means of expressing both in a single field.
+-type ImageLink struct {
+- Id string `json:"id"`
+- Links []Link `json:"links"`
+-}
+-
+-// Image is used for JSON (un)marshalling.
+-// It provides a description of an OS image.
+-//
+-// The Id field contains the image's unique identifier.
+-// For example, this identifier will be useful for specifying which operating system to install on a new server instance.
+-//
+-// The MinDisk and MinRam fields specify the minimum resources a server must provide to be able to install the image.
+-//
+-// The Name field provides a human-readable moniker for the OS image.
+-//
+-// The Progress and Status fields indicate image-creation status.
+-// Any usable image will have 100% progress.
+-//
+-// The Updated field indicates the last time this image was changed.
+-//
+-// OsDcfDiskConfig indicates the server's boot volume configuration.
+-// Valid values are:
+-// AUTO
+-// ----
+-// The server is built with a single partition the size of the target flavor disk.
+-// The file system is automatically adjusted to fit the entire partition.
+-// This keeps things simple and automated.
+-// AUTO is valid only for images and servers with a single partition that use the EXT3 file system.
+-// This is the default setting for applicable Rackspace base images.
+-//
+-// MANUAL
+-// ------
+-// The server is built using whatever partition scheme and file system is in the source image.
+-// If the target flavor disk is larger,
+-// the remaining disk space is left unpartitioned.
+-// This enables images to have non-EXT3 file systems, multiple partitions, and so on,
+-// and enables you to manage the disk configuration.
+-//
+-type Image struct {
+- Created string `json:"created"`
+- Id string `json:"id"`
+- Links []Link `json:"links"`
+- MinDisk int `json:"minDisk"`
+- MinRam int `json:"minRam"`
+- Name string `json:"name"`
+- Progress int `json:"progress"`
+- Status string `json:"status"`
+- Updated string `json:"updated"`
+- OsDcfDiskConfig string `json:"OS-DCF:diskConfig"`
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/interfaces.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/interfaces.go
+deleted file mode 100644
+index 4c7dbee..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/interfaces.go
++++ /dev/null
+@@ -1,247 +0,0 @@
+-package gophercloud
+-
+-import "net/url"
+-
+-// AccessProvider instances encapsulate a Keystone authentication interface.
+-type AccessProvider interface {
+- // FirstEndpointUrlByCriteria searches through the service catalog for the first
+- // matching entry endpoint fulfilling the provided criteria. If nothing found,
+- // return "". Otherwise, return either the public or internal URL for the
+- // endpoint, depending on both its existence and the setting of the ApiCriteria.UrlChoice
+- // field.
+- FirstEndpointUrlByCriteria(ApiCriteria) string
+-
+- // AuthToken provides a copy of the current authentication token for the user's credentials.
+- // Note that AuthToken() will not automatically refresh an expired token.
+- AuthToken() string
+-
+- // Revoke allows you to terminate any program's access to the OpenStack API by token ID.
+- Revoke(string) error
+-
+- // Reauthenticate attempts to acquire a new authentication token, if the feature is enabled by
+- // AuthOptions.AllowReauth.
+- Reauthenticate() error
+-}
+-
+-// ServiceCatalogerIdentityV2 interface provides direct access to the service catalog as offered by the Identity V2 API.
+-// We regret we need to fracture the namespace of what should otherwise be a simple concept; however,
+-// the OpenStack community saw fit to render V3's service catalog completely incompatible with V2.
+-type ServiceCatalogerForIdentityV2 interface {
+- V2ServiceCatalog() []CatalogEntry
+-}
+-
+-// CloudServersProvider instances encapsulate a Cloud Servers API, should one exist in the service catalog
+-// for your provider.
+-type CloudServersProvider interface {
+- // Servers
+-
+- // ListServers provides a complete list of servers hosted by the user
+- // in a given region. This function differs from ListServersLinksOnly()
+- // in that it returns all available details for each server returned.
+- ListServers() ([]Server, error)
+-
+- // ListServersByFilters provides a list of servers hosted by the user in a
+- // given region. This function let you requests servers by certain URI
+- // paramaters defined by the API endpoint. This is sometimes more suitable
+- // if you have many servers and you only want to pick servers on certain
+- // criterias. An example usage could be :
+- //
+- // filter := url.Values{}
+- // filter.Set("name", "MyServer")
+- // filter.Set("status", "ACTIVE")
+- //
+- // filteredServers, err := c.ListServersByFilters(filter)
+- //
+- // Here, filteredServers only contains servers whose name started with
+- // "MyServer" and are in "ACTIVE" status.
+- ListServersByFilter(filter url.Values) ([]Server, error)
+-
+- // ListServers provides a complete list of servers hosted by the user
+- // in a given region. This function differs from ListServers() in that
+- // it returns only IDs and links to each server returned.
+- //
+- // This function should be used only under certain circumstances.
+- // It's most useful for checking to see if a server with a given ID exists,
+- // or that you have permission to work with that server. It's also useful
+- // when the cost of retrieving the server link list plus the overhead of manually
+- // invoking ServerById() for each of the servers you're interested in is less than
+- // just calling ListServers() to begin with. This may be a consideration, for
+- // example, with mobile applications.
+- //
+- // In other cases, you probably should just call ListServers() and cache the
+- // results to conserve overall bandwidth and reduce your access rate on the API.
+- ListServersLinksOnly() ([]Server, error)
+-
+- // ServerById will retrieve a detailed server description given the unique ID
+- // of a server. The ID can be returned by either ListServers() or by ListServersLinksOnly().
+- ServerById(id string) (*Server, error)
+-
+- // CreateServer requests a new server to be created by the cloud server provider.
+- // The user must pass in a pointer to an initialized NewServerContainer structure.
+- // Please refer to the NewServerContainer documentation for more details.
+- //
+- // If the NewServer structure's AdminPass is empty (""), a password will be
+- // automatically generated by your OpenStack provider, and returned through the
+- // AdminPass field of the result. Take care, however; this will be the only time
+- // this happens. No other means exists in the public API to acquire a password
+- // for a pre-existing server. If you lose it, you'll need to call SetAdminPassword()
+- // to set a new one.
+- CreateServer(ns NewServer) (*NewServer, error)
+-
+- // DeleteServerById requests that the server with the assigned ID be removed
+- // from your account. The delete happens asynchronously.
+- DeleteServerById(id string) error
+-
+- // SetAdminPassword requests that the server with the specified ID have its
+- // administrative password changed. For Linux, BSD, or other POSIX-like
+- // system, this password corresponds to the root user. For Windows machines,
+- // the Administrator password will be affected instead.
+- SetAdminPassword(id string, pw string) error
+-
+- // ResizeServer can be a short-hand for RebuildServer where only the size of the server
+- // changes. Note that after the resize operation is requested, you will need to confirm
+- // the resize has completed for changes to take effect permanently. Changes will assume
+- // to be confirmed even without an explicit confirmation after 24 hours from the initial
+- // request.
+- ResizeServer(id, newName, newFlavor, newDiskConfig string) error
+-
+- // RevertResize will reject a server's resized configuration, thus
+- // rolling back to the original server.
+- RevertResize(id string) error
+-
+- // ConfirmResizeServer will acknowledge a server's resized configuration.
+- ConfirmResize(id string) error
+-
+- // RebootServer requests that the server with the specified ID be rebooted.
+- // Two reboot mechanisms exist.
+- //
+- // - Hard. This will physically power-cycle the unit.
+- // - Soft. This will attempt to use the server's software-based mechanisms to restart
+- // the machine. E.g., "shutdown -r now" on Linux.
+- RebootServer(id string, hard bool) error
+-
+- // RescueServer requests that the server with the specified ID be placed into
+- // a state of maintenance. The server instance is replaced with a new instance,
+- // of the same flavor and image. This new image will have the boot volume of the
+- // original machine mounted as a secondary device, so that repair and administration
+- // may occur. Use UnrescueServer() to restore the server to its previous state.
+- // Note also that many providers will impose a time limit for how long a server may
+- // exist in rescue mode! Consult the API documentation for your provider for
+- // details.
+- RescueServer(id string) (string, error)
+-
+- // UnrescueServer requests that a server in rescue state be placed into its nominal
+- // operating state.
+- UnrescueServer(id string) error
+-
+- // UpdateServer alters one or more fields of the identified server's Server record.
+- // However, not all fields may be altered. Presently, only Name, AccessIPv4, and
+- // AccessIPv6 fields may be altered. If unspecified, or set to an empty or zero
+- // value, the corresponding field remains unaltered.
+- //
+- // This function returns the new set of server details if successful.
+- UpdateServer(id string, newValues NewServerSettings) (*Server, error)
+-
+- // RebuildServer reprovisions a server to the specifications given by the
+- // NewServer structure. The following fields are guaranteed to be recognized:
+- //
+- // Name (required) AccessIPv4
+- // imageRef (required) AccessIPv6
+- // AdminPass (required) Metadata
+- // Personality
+- //
+- // Other providers may reserve the right to act on additional fields.
+- RebuildServer(id string, ns NewServer) (*Server, error)
+-
+- // CreateImage will create a new image from the specified server id returning the id of the new image.
+- CreateImage(id string, ci CreateImage) (string, error)
+-
+- // Addresses
+-
+- // ListAddresses yields the list of available addresses for the server.
+- // This information is also returned by ServerById() in the Server.Addresses
+- // field. However, if you have a lot of servers and all you need are addresses,
+- // this function might be more efficient.
+- ListAddresses(id string) (AddressSet, error)
+-
+- // ListAddressesByNetwork yields the list of available addresses for a given server id and networkLabel.
+- // Example: ListAddressesByNetwork("234-4353-4jfrj-43j2s", "private")
+- ListAddressesByNetwork(id, networkLabel string) (NetworkAddress, error)
+-
+- // ListFloatingIps yields the list of all floating IP addresses allocated to the current project.
+- ListFloatingIps() ([]FloatingIp, error)
+-
+- // CreateFloatingIp allocates a new IP from the named pool to the current project.
+- CreateFloatingIp(pool string) (FloatingIp, error)
+-
+- // DeleteFloatingIp returns the specified IP from the current project to the pool.
+- DeleteFloatingIp(ip FloatingIp) error
+-
+- // AssociateFloatingIp associates the given floating IP to the given server id.
+- AssociateFloatingIp(serverId string, ip FloatingIp) error
+-
+- // Images
+-
+- // ListImages yields the list of available operating system images. This function
+- // returns full details for each image, if available.
+- ListImages() ([]Image, error)
+-
+- // ImageById yields details about a specific image.
+- ImageById(id string) (*Image, error)
+-
+- // DeleteImageById will delete the specific image.
+- DeleteImageById(id string) error
+-
+- // Flavors
+-
+- // ListFlavors yields the list of available system flavors. This function
+- // returns full details for each flavor, if available.
+- ListFlavors() ([]Flavor, error)
+-
+- // KeyPairs
+-
+- // ListKeyPairs yields the list of available keypairs.
+- ListKeyPairs() ([]KeyPair, error)
+-
+- // CreateKeyPairs will create or generate a new keypair.
+- CreateKeyPair(nkp NewKeyPair) (KeyPair, error)
+-
+- // DeleteKeyPair wil delete a keypair.
+- DeleteKeyPair(name string) error
+-
+- // ShowKeyPair will yield the named keypair.
+- ShowKeyPair(name string) (KeyPair, error)
+-
+- // ListSecurityGroups provides a listing of security groups for the tenant.
+- // This method works only if the provider supports the os-security-groups extension.
+- ListSecurityGroups() ([]SecurityGroup, error)
+-
+- // CreateSecurityGroup lets a tenant create a new security group.
+- // Only the SecurityGroup fields which are specified will be marshalled to the API.
+- // This method works only if the provider supports the os-security-groups extension.
+- CreateSecurityGroup(desired SecurityGroup) (*SecurityGroup, error)
+-
+- // ListSecurityGroupsByServerId provides a list of security groups which apply to the indicated server.
+- // This method works only if the provider supports the os-security-groups extension.
+- ListSecurityGroupsByServerId(id string) ([]SecurityGroup, error)
+-
+- // SecurityGroupById returns a security group corresponding to the provided ID number.
+- // This method works only if the provider supports the os-security-groups extension.
+- SecurityGroupById(id int) (*SecurityGroup, error)
+-
+- // DeleteSecurityGroupById disposes of a security group corresponding to the provided ID number.
+- // This method works only if the provider supports the os-security-groups extension.
+- DeleteSecurityGroupById(id int) error
+-
+- // ListDefaultSGRules lists default security group rules.
+- // This method only works if the provider supports the os-security-groups-default-rules extension.
+- ListDefaultSGRules() ([]SGRule, error)
+-
+- // CreateDefaultSGRule creates a default security group rule.
+- // This method only works if the provider supports the os-security-groups-default-rules extension.
+- CreateDefaultSGRule(SGRule) (*SGRule, error)
+-
+- // GetSGRule obtains information for a specified security group rule.
+- // This method only works if the provider supports the os-security-groups-default-rules extension.
+- GetSGRule(string) (*SGRule, error)
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/keypairs.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/keypairs.go
+deleted file mode 100644
+index 8ae8cd3..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/keypairs.go
++++ /dev/null
+@@ -1,98 +0,0 @@
+-package gophercloud
+-
+-import (
+- "github.com/racker/perigee"
+-)
+-
+-// See the CloudImagesProvider interface for details.
+-func (gsp *genericServersProvider) ListKeyPairs() ([]KeyPair, error) {
+- type KeyPairs struct {
+- KeyPairs []struct {
+- KeyPair KeyPair `json:"keypair"`
+- } `json:"keypairs"`
+- }
+-
+- var kp KeyPairs
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/os-keypairs"
+- return perigee.Get(url, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- Results: &kp,
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+-
+- // Flatten out the list of keypairs
+- var keypairs []KeyPair
+- for _, k := range kp.KeyPairs {
+- keypairs = append(keypairs, k.KeyPair)
+- }
+- return keypairs, err
+-}
+-
+-func (gsp *genericServersProvider) CreateKeyPair(nkp NewKeyPair) (KeyPair, error) {
+- var kp KeyPair
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/os-keypairs"
+- return perigee.Post(url, perigee.Options{
+- ReqBody: &struct {
+- KeyPair *NewKeyPair `json:"keypair"`
+- }{&nkp},
+- CustomClient: gsp.context.httpClient,
+- Results: &struct{ KeyPair *KeyPair }{&kp},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{200},
+- })
+- })
+- return kp, err
+-}
+-
+-// See the CloudImagesProvider interface for details.
+-func (gsp *genericServersProvider) DeleteKeyPair(name string) error {
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/os-keypairs/" + name
+- return perigee.Delete(url, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{202},
+- })
+- })
+- return err
+-}
+-
+-func (gsp *genericServersProvider) ShowKeyPair(name string) (KeyPair, error) {
+- var kp KeyPair
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/os-keypairs/" + name
+- return perigee.Get(url, perigee.Options{
+- CustomClient: gsp.context.httpClient,
+- Results: &struct{ KeyPair *KeyPair }{&kp},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+- return kp, err
+-}
+-
+-type KeyPair struct {
+- FingerPrint string `json:"fingerprint"`
+- Name string `json:"name"`
+- PrivateKey string `json:"private_key,omitempty"`
+- PublicKey string `json:"public_key"`
+- UserID string `json:"user_id,omitempty"`
+-}
+-
+-type NewKeyPair struct {
+- Name string `json:"name"`
+- PublicKey string `json:"public_key,omitempty"`
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/osutil/auth.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/osutil/auth.go
+deleted file mode 100644
+index a411b63..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/osutil/auth.go
++++ /dev/null
+@@ -1,64 +0,0 @@
+-package osutil
+-
+-import (
+- "fmt"
+- "github.com/rackspace/gophercloud"
+- "os"
+- "strings"
+-)
+-
+-var (
+- nilOptions = gophercloud.AuthOptions{}
+-
+- // ErrNoAuthUrl errors occur when the value of the OS_AUTH_URL environment variable cannot be determined.
+- ErrNoAuthUrl = fmt.Errorf("Environment variable OS_AUTH_URL needs to be set.")
+-
+- // ErrNoUsername errors occur when the value of the OS_USERNAME environment variable cannot be determined.
+- ErrNoUsername = fmt.Errorf("Environment variable OS_USERNAME needs to be set.")
+-
+- // ErrNoPassword errors occur when the value of the OS_PASSWORD environment variable cannot be determined.
+- ErrNoPassword = fmt.Errorf("Environment variable OS_PASSWORD or OS_API_KEY needs to be set.")
+-)
+-
+-// AuthOptions fills out a gophercloud.AuthOptions structure with the settings found on the various OpenStack
+-// OS_* environment variables. The following variables provide sources of truth: OS_AUTH_URL, OS_USERNAME,
+-// OS_PASSWORD, OS_TENANT_ID, and OS_TENANT_NAME. Of these, OS_USERNAME, OS_PASSWORD, and OS_AUTH_URL must
+-// have settings, or an error will result. OS_TENANT_ID and OS_TENANT_NAME are optional.
+-//
+-// The value of OS_AUTH_URL will be returned directly to the caller, for subsequent use in
+-// gophercloud.Authenticate()'s Provider parameter. This function will not interpret the value of OS_AUTH_URL,
+-// so as a convenient extention, you may set OS_AUTH_URL to, e.g., "rackspace-uk", or any other Gophercloud-recognized
+-// provider shortcuts. For broad compatibility, especially with local installations, you should probably
+-// avoid the temptation to do this.
+-func AuthOptions() (string, gophercloud.AuthOptions, error) {
+- provider := os.Getenv("OS_AUTH_URL")
+- username := os.Getenv("OS_USERNAME")
+- password := os.Getenv("OS_PASSWORD")
+- tenantId := os.Getenv("OS_TENANT_ID")
+- tenantName := os.Getenv("OS_TENANT_NAME")
+-
+- if provider == "" {
+- return "", nilOptions, ErrNoAuthUrl
+- }
+-
+- if username == "" {
+- return "", nilOptions, ErrNoUsername
+- }
+-
+- if password == "" {
+- return "", nilOptions, ErrNoPassword
+- }
+-
+- ao := gophercloud.AuthOptions{
+- Username: username,
+- Password: password,
+- TenantId: tenantId,
+- TenantName: tenantName,
+- }
+-
+- if !strings.HasSuffix(provider, "/tokens") {
+- provider += "/tokens"
+- }
+-
+- return provider, ao, nil
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/osutil/region.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/osutil/region.go
+deleted file mode 100644
+index f7df507..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/osutil/region.go
++++ /dev/null
+@@ -1,9 +0,0 @@
+-package osutil
+-
+-import "os"
+-
+-// Region provides a means of querying the OS_REGION_NAME environment variable.
+-// At present, you may also use os.Getenv("OS_REGION_NAME") as well.
+-func Region() string {
+- return os.Getenv("OS_REGION_NAME")
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/package.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/package.go
+deleted file mode 100644
+index 396e523..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/package.go
++++ /dev/null
+@@ -1,7 +0,0 @@
+-// Gophercloud provides a multi-vendor interface to OpenStack-compatible clouds which attempts to follow
+-// established Go community coding standards and social norms.
+-//
+-// Unless you intend on contributing code to the SDK, you will almost certainly never have to use any
+-// Context structures or any of its methods. Contextual methods exist for easier unit testing only.
+-// Stick with the global functions unless you know exactly what you're doing, and why.
+-package gophercloud
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/reauth.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/reauth.go
+deleted file mode 100644
+index 342aca4..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/reauth.go
++++ /dev/null
+@@ -1,36 +0,0 @@
+-package gophercloud
+-
+-import (
+- "github.com/racker/perigee"
+-)
+-
+-// WithReauth wraps a Perigee request fragment with logic to perform re-authentication
+-// if it's deemed necessary.
+-//
+-// Do not confuse this function with WithReauth()! Although they work together to support reauthentication,
+-// WithReauth() actually contains the decision-making logic to determine when to perform a reauth,
+-// while WithReauthHandler() is used to configure what a reauth actually entails.
+-func (c *Context) WithReauth(ap AccessProvider, f func() error) error {
+- err := f()
+- cause, ok := err.(*perigee.UnexpectedResponseCodeError)
+- if ok && cause.Actual == 401 {
+- err = c.reauthHandler(ap)
+- if err == nil {
+- err = f()
+- }
+- }
+- return err
+-}
+-
+-// This is like WithReauth above but returns a perigee Response object
+-func (c *Context) ResponseWithReauth(ap AccessProvider, f func() (*perigee.Response, error)) (*perigee.Response, error) {
+- response, err := f()
+- cause, ok := err.(*perigee.UnexpectedResponseCodeError)
+- if ok && cause.Actual == 401 {
+- err = c.reauthHandler(ap)
+- if err == nil {
+- response, err = f()
+- }
+- }
+- return response, err
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/reauth_test.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/reauth_test.go
+deleted file mode 100644
+index e3501b8..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/reauth_test.go
++++ /dev/null
+@@ -1,133 +0,0 @@
+-package gophercloud
+-
+-import (
+- "github.com/racker/perigee"
+- "testing"
+-)
+-
+-// This reauth-handler does nothing, and returns no error.
+-func doNothing(_ AccessProvider) error {
+- return nil
+-}
+-
+-func TestOtherErrorsPropegate(t *testing.T) {
+- calls := 0
+- c := TestContext().WithReauthHandler(doNothing)
+-
+- err := c.WithReauth(nil, func() error {
+- calls++
+- return &perigee.UnexpectedResponseCodeError{
+- Expected: []int{204},
+- Actual: 404,
+- }
+- })
+-
+- if err == nil {
+- t.Error("Expected MyError to be returned; got nil instead.")
+- return
+- }
+- if _, ok := err.(*perigee.UnexpectedResponseCodeError); !ok {
+- t.Error("Expected UnexpectedResponseCodeError; got %#v", err)
+- return
+- }
+- if calls != 1 {
+- t.Errorf("Expected the body to be invoked once; found %d calls instead", calls)
+- return
+- }
+-}
+-
+-func Test401ErrorCausesBodyInvokation2ndTime(t *testing.T) {
+- calls := 0
+- c := TestContext().WithReauthHandler(doNothing)
+-
+- err := c.WithReauth(nil, func() error {
+- calls++
+- return &perigee.UnexpectedResponseCodeError{
+- Expected: []int{204},
+- Actual: 401,
+- }
+- })
+-
+- if err == nil {
+- t.Error("Expected MyError to be returned; got nil instead.")
+- return
+- }
+- if calls != 2 {
+- t.Errorf("Expected the body to be invoked once; found %d calls instead", calls)
+- return
+- }
+-}
+-
+-func TestReauthAttemptShouldHappen(t *testing.T) {
+- calls := 0
+- c := TestContext().WithReauthHandler(func(_ AccessProvider) error {
+- calls++
+- return nil
+- })
+- c.WithReauth(nil, func() error {
+- return &perigee.UnexpectedResponseCodeError{
+- Expected: []int{204},
+- Actual: 401,
+- }
+- })
+-
+- if calls != 1 {
+- t.Errorf("Expected Reauthenticator to be called once; found %d instead", calls)
+- return
+- }
+-}
+-
+-type MyError struct{}
+-
+-func (*MyError) Error() string {
+- return "MyError instance"
+-}
+-
+-func TestReauthErrorShouldPropegate(t *testing.T) {
+- c := TestContext().WithReauthHandler(func(_ AccessProvider) error {
+- return &MyError{}
+- })
+-
+- err := c.WithReauth(nil, func() error {
+- return &perigee.UnexpectedResponseCodeError{
+- Expected: []int{204},
+- Actual: 401,
+- }
+- })
+-
+- if _, ok := err.(*MyError); !ok {
+- t.Errorf("Expected a MyError; got %#v", err)
+- return
+- }
+-}
+-
+-type MyAccess struct{}
+-
+-func (my *MyAccess) FirstEndpointUrlByCriteria(ApiCriteria) string {
+- return ""
+-}
+-func (my *MyAccess) AuthToken() string {
+- return ""
+-}
+-func (my *MyAccess) Revoke(string) error {
+- return nil
+-}
+-func (my *MyAccess) Reauthenticate() error {
+- return nil
+-}
+-
+-func TestReauthHandlerUsesSameAccessProvider(t *testing.T) {
+- fakeAccess := &MyAccess{}
+- c := TestContext().WithReauthHandler(func(acc AccessProvider) error {
+- if acc != fakeAccess {
+- t.Errorf("Expected acc = fakeAccess")
+- }
+- return nil
+- })
+- c.WithReauth(fakeAccess, func() error {
+- return &perigee.UnexpectedResponseCodeError{
+- Expected: []int{204},
+- Actual: 401,
+- }
+- })
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/scripts/create-environment.sh b/Godeps/_workspace/src/github.com/rackspace/gophercloud/scripts/create-environment.sh
+deleted file mode 100644
+index 6bae6e8..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/scripts/create-environment.sh
++++ /dev/null
+@@ -1,26 +0,0 @@
+-#!/bin/bash
+-#
+-# This script helps new contributors set up their local workstation for
+-# gophercloud development and contributions.
+-
+-# Create the environment
+-export GOPATH=$HOME/go/gophercloud
+-mkdir -p $GOPATH
+-
+-# Download gophercloud into that environment
+-go get github.com/rackspace/gophercloud
+-cd $GOPATH/src/github.com/rackspace/gophercloud
+-git checkout master
+-
+-# Write out the env.sh convenience file.
+-cd $GOPATH
+-cat <<EOF >env.sh
+-#!/bin/bash
+-export GOPATH=$(pwd)
+-export GOPHERCLOUD=$GOPATH/src/github.com/rackspace/gophercloud
+-EOF
+-chmod a+x env.sh
+-
+-# Make changes immediately available as a convenience.
+-. ./env.sh
+-
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/scripts/test-all.sh b/Godeps/_workspace/src/github.com/rackspace/gophercloud/scripts/test-all.sh
+deleted file mode 100644
+index 096736f..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/scripts/test-all.sh
++++ /dev/null
+@@ -1,37 +0,0 @@
+-#!/bin/bash
+-#
+-# This script is responsible for executing all the acceptance tests found in
+-# the acceptance/ directory.
+-
+-# Find where _this_ script is running from.
+-SCRIPTS=$(dirname $0)
+-SCRIPTS=$(cd $SCRIPTS; pwd)
+-
+-# Locate the acceptance test / examples directory.
+-ACCEPTANCE=$(cd $SCRIPTS/../acceptance; pwd)
+-
+-# Go workspace path
+-WS=$(cd $SCRIPTS/..; pwd)
+-
+-# In order to run Go code interactively, we need the GOPATH environment
+-# to be set.
+-if [ "x$GOPATH" == "x" ]; then
+- export GOPATH=$WS
+- echo "WARNING: You didn't have your GOPATH environment variable set."
+- echo " I'm assuming $GOPATH as its value."
+-fi
+-
+-# Run all acceptance tests sequentially.
+-# If any test fails, we fail fast.
+-LIBS=$(ls $ACCEPTANCE/lib*.go)
+-for T in $(ls -1 $ACCEPTANCE/[0-9][0-9]*.go); do
+- if ! [ -x $T ]; then
+- CMD="go run $T $LIBS -quiet"
+- echo "$CMD ..."
+- if ! $CMD ; then
+- echo "- FAILED. Try re-running w/out the -quiet option to see output."
+- exit 1
+- fi
+- fi
+-done
+-
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/servers.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/servers.go
+deleted file mode 100644
+index 1f6a7a4..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/servers.go
++++ /dev/null
+@@ -1,807 +0,0 @@
+-// TODO(sfalvo): Remove Rackspace-specific Server structure fields and refactor them into a provider-specific access method.
+-// Be sure to update godocs accordingly.
+-
+-package gophercloud
+-
+-import (
+- "fmt"
+- "net/url"
+- "strings"
+-
+- "github.com/mitchellh/mapstructure"
+- "github.com/racker/perigee"
+-)
+-
+-// genericServersProvider structures provide the implementation for generic OpenStack-compatible
+-// CloudServersProvider interfaces.
+-type genericServersProvider struct {
+- // endpoint refers to the provider's API endpoint base URL. This will be used to construct
+- // and issue queries.
+- endpoint string
+-
+- // Test context (if any) in which to issue requests.
+- context *Context
+-
+- // access associates this API provider with a set of credentials,
+- // which may be automatically renewed if they near expiration.
+- access AccessProvider
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gcp *genericServersProvider) ListServersByFilter(filter url.Values) ([]Server, error) {
+- var ss []Server
+-
+- err := gcp.context.WithReauth(gcp.access, func() error {
+- url := gcp.endpoint + "/servers/detail?" + filter.Encode()
+- return perigee.Get(url, perigee.Options{
+- CustomClient: gcp.context.httpClient,
+- Results: &struct{ Servers *[]Server }{&ss},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gcp.access.AuthToken(),
+- },
+- })
+- })
+- return ss, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gcp *genericServersProvider) ListServersLinksOnly() ([]Server, error) {
+- var ss []Server
+-
+- err := gcp.context.WithReauth(gcp.access, func() error {
+- url := gcp.endpoint + "/servers"
+- return perigee.Get(url, perigee.Options{
+- CustomClient: gcp.context.httpClient,
+- Results: &struct{ Servers *[]Server }{&ss},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gcp.access.AuthToken(),
+- },
+- })
+- })
+- return ss, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gcp *genericServersProvider) ListServers() ([]Server, error) {
+- var ss []Server
+-
+- err := gcp.context.WithReauth(gcp.access, func() error {
+- url := gcp.endpoint + "/servers/detail"
+- return perigee.Get(url, perigee.Options{
+- CustomClient: gcp.context.httpClient,
+- Results: &struct{ Servers *[]Server }{&ss},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gcp.access.AuthToken(),
+- },
+- })
+- })
+-
+- // Compatibility with v0.0.x -- we "map" our public and private
+- // addresses into a legacy structure field for the benefit of
+- // earlier software.
+-
+- if err != nil {
+- return ss, err
+- }
+-
+- for _, s := range ss {
+- err = mapstructure.Decode(s.RawAddresses, &s.Addresses)
+- if err != nil {
+- return ss, err
+- }
+- }
+-
+- return ss, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) ServerById(id string) (*Server, error) {
+- var s *Server
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/servers/" + id
+- return perigee.Get(url, perigee.Options{
+- Results: &struct{ Server **Server }{&s},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{200},
+- })
+- })
+-
+- // Compatibility with v0.0.x -- we "map" our public and private
+- // addresses into a legacy structure field for the benefit of
+- // earlier software.
+-
+- if err != nil {
+- return s, err
+- }
+-
+- err = mapstructure.Decode(s.RawAddresses, &s.Addresses)
+-
+- return s, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) CreateServer(ns NewServer) (*NewServer, error) {
+- var s *NewServer
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := gsp.endpoint + "/servers"
+- return perigee.Post(ep, perigee.Options{
+- ReqBody: &struct {
+- Server *NewServer `json:"server"`
+- }{&ns},
+- Results: &struct{ Server **NewServer }{&s},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{202},
+- })
+- })
+-
+- return s, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) DeleteServerById(id string) error {
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := gsp.endpoint + "/servers/" + id
+- return perigee.Delete(url, perigee.Options{
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{204},
+- })
+- })
+- return err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) SetAdminPassword(id, pw string) error {
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := fmt.Sprintf("%s/servers/%s/action", gsp.endpoint, id)
+- return perigee.Post(url, perigee.Options{
+- ReqBody: &struct {
+- ChangePassword struct {
+- AdminPass string `json:"adminPass"`
+- } `json:"changePassword"`
+- }{
+- struct {
+- AdminPass string `json:"adminPass"`
+- }{pw},
+- },
+- OkCodes: []int{202},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+- return err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) ResizeServer(id, newName, newFlavor, newDiskConfig string) error {
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := fmt.Sprintf("%s/servers/%s/action", gsp.endpoint, id)
+- rr := ResizeRequest{
+- Name: newName,
+- FlavorRef: newFlavor,
+- DiskConfig: newDiskConfig,
+- }
+- return perigee.Post(url, perigee.Options{
+- ReqBody: &struct {
+- Resize ResizeRequest `json:"resize"`
+- }{rr},
+- OkCodes: []int{202},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+- return err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) RevertResize(id string) error {
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := fmt.Sprintf("%s/servers/%s/action", gsp.endpoint, id)
+- return perigee.Post(url, perigee.Options{
+- ReqBody: &struct {
+- RevertResize *int `json:"revertResize"`
+- }{nil},
+- OkCodes: []int{202},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+- return err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) ConfirmResize(id string) error {
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := fmt.Sprintf("%s/servers/%s/action", gsp.endpoint, id)
+- return perigee.Post(url, perigee.Options{
+- ReqBody: &struct {
+- ConfirmResize *int `json:"confirmResize"`
+- }{nil},
+- OkCodes: []int{204},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+- return err
+-}
+-
+-// See the CloudServersProvider interface for details
+-func (gsp *genericServersProvider) RebootServer(id string, hard bool) error {
+- return gsp.context.WithReauth(gsp.access, func() error {
+- url := fmt.Sprintf("%s/servers/%s/action", gsp.endpoint, id)
+- types := map[bool]string{false: "SOFT", true: "HARD"}
+- return perigee.Post(url, perigee.Options{
+- ReqBody: &struct {
+- Reboot struct {
+- Type string `json:"type"`
+- } `json:"reboot"`
+- }{
+- struct {
+- Type string `json:"type"`
+- }{types[hard]},
+- },
+- OkCodes: []int{202},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- })
+- })
+-}
+-
+-// See the CloudServersProvider interface for details
+-func (gsp *genericServersProvider) RescueServer(id string) (string, error) {
+- var pw *string
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := fmt.Sprintf("%s/servers/%s/action", gsp.endpoint, id)
+- return perigee.Post(url, perigee.Options{
+- ReqBody: &struct {
+- Rescue string `json:"rescue"`
+- }{"none"},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- Results: &struct {
+- AdminPass **string `json:"adminPass"`
+- }{&pw},
+- })
+- })
+- return *pw, err
+-}
+-
+-// See the CloudServersProvider interface for details
+-func (gsp *genericServersProvider) UnrescueServer(id string) error {
+- return gsp.context.WithReauth(gsp.access, func() error {
+- url := fmt.Sprintf("%s/servers/%s/action", gsp.endpoint, id)
+- return perigee.Post(url, perigee.Options{
+- ReqBody: &struct {
+- Unrescue *int `json:"unrescue"`
+- }{nil},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{202},
+- })
+- })
+-}
+-
+-// See the CloudServersProvider interface for details
+-func (gsp *genericServersProvider) UpdateServer(id string, changes NewServerSettings) (*Server, error) {
+- var svr *Server
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- url := fmt.Sprintf("%s/servers/%s", gsp.endpoint, id)
+- return perigee.Put(url, perigee.Options{
+- ReqBody: &struct {
+- Server NewServerSettings `json:"server"`
+- }{changes},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- Results: &struct {
+- Server **Server `json:"server"`
+- }{&svr},
+- })
+- })
+- return svr, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) RebuildServer(id string, ns NewServer) (*Server, error) {
+- var s *Server
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/servers/%s/action", gsp.endpoint, id)
+- return perigee.Post(ep, perigee.Options{
+- ReqBody: &struct {
+- Rebuild *NewServer `json:"rebuild"`
+- }{&ns},
+- Results: &struct{ Server **Server }{&s},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{202},
+- })
+- })
+-
+- return s, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) ListAddresses(id string) (AddressSet, error) {
+- var pas *AddressSet
+- var statusCode int
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/servers/%s/ips", gsp.endpoint, id)
+- return perigee.Get(ep, perigee.Options{
+- Results: &struct{ Addresses **AddressSet }{&pas},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{200, 203},
+- StatusCode: &statusCode,
+- })
+- })
+-
+- if err != nil {
+- if statusCode == 203 {
+- err = WarnUnauthoritative
+- }
+- }
+-
+- return *pas, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) ListAddressesByNetwork(id, networkLabel string) (NetworkAddress, error) {
+- pas := make(NetworkAddress)
+- var statusCode int
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/servers/%s/ips/%s", gsp.endpoint, id, networkLabel)
+- return perigee.Get(ep, perigee.Options{
+- Results: &pas,
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{200, 203},
+- StatusCode: &statusCode,
+- })
+- })
+-
+- if err != nil {
+- if statusCode == 203 {
+- err = WarnUnauthoritative
+- }
+- }
+-
+- return pas, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) CreateImage(id string, ci CreateImage) (string, error) {
+- response, err := gsp.context.ResponseWithReauth(gsp.access, func() (*perigee.Response, error) {
+- ep := fmt.Sprintf("%s/servers/%s/action", gsp.endpoint, id)
+- return perigee.Request("POST", ep, perigee.Options{
+- ReqBody: &struct {
+- CreateImage *CreateImage `json:"createImage"`
+- }{&ci},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{200, 202},
+- })
+- })
+-
+- if err != nil {
+- return "", err
+- }
+- location, err := response.HttpResponse.Location()
+- if err != nil {
+- return "", err
+- }
+-
+- // Return the last element of the location which is the image id
+- locationArr := strings.Split(location.Path, "/")
+- return locationArr[len(locationArr)-1], err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) ListSecurityGroups() ([]SecurityGroup, error) {
+- var sgs []SecurityGroup
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/os-security-groups", gsp.endpoint)
+- return perigee.Get(ep, perigee.Options{
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- Results: &struct {
+- SecurityGroups *[]SecurityGroup `json:"security_groups"`
+- }{&sgs},
+- })
+- })
+- return sgs, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) CreateSecurityGroup(desired SecurityGroup) (*SecurityGroup, error) {
+- var actual *SecurityGroup
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/os-security-groups", gsp.endpoint)
+- return perigee.Post(ep, perigee.Options{
+- ReqBody: struct {
+- AddSecurityGroup SecurityGroup `json:"security_group"`
+- }{desired},
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- Results: &struct {
+- SecurityGroup **SecurityGroup `json:"security_group"`
+- }{&actual},
+- })
+- })
+- return actual, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) ListSecurityGroupsByServerId(id string) ([]SecurityGroup, error) {
+- var sgs []SecurityGroup
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/servers/%s/os-security-groups", gsp.endpoint, id)
+- return perigee.Get(ep, perigee.Options{
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- Results: &struct {
+- SecurityGroups *[]SecurityGroup `json:"security_groups"`
+- }{&sgs},
+- })
+- })
+- return sgs, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) SecurityGroupById(id int) (*SecurityGroup, error) {
+- var actual *SecurityGroup
+-
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/os-security-groups/%d", gsp.endpoint, id)
+- return perigee.Get(ep, perigee.Options{
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- Results: &struct {
+- SecurityGroup **SecurityGroup `json:"security_group"`
+- }{&actual},
+- })
+- })
+- return actual, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) DeleteSecurityGroupById(id int) error {
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/os-security-groups/%d", gsp.endpoint, id)
+- return perigee.Delete(ep, perigee.Options{
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- OkCodes: []int{202},
+- })
+- })
+- return err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) ListDefaultSGRules() ([]SGRule, error) {
+- var sgrs []SGRule
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/os-security-group-default-rules", gsp.endpoint)
+- return perigee.Get(ep, perigee.Options{
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- Results: &struct{ Security_group_default_rules *[]SGRule }{&sgrs},
+- })
+- })
+- return sgrs, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) CreateDefaultSGRule(r SGRule) (*SGRule, error) {
+- var sgr *SGRule
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/os-security-group-default-rules", gsp.endpoint)
+- return perigee.Post(ep, perigee.Options{
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- Results: &struct{ Security_group_default_rule **SGRule }{&sgr},
+- ReqBody: struct {
+- Security_group_default_rule SGRule `json:"security_group_default_rule"`
+- }{r},
+- })
+- })
+- return sgr, err
+-}
+-
+-// See the CloudServersProvider interface for details.
+-func (gsp *genericServersProvider) GetSGRule(id string) (*SGRule, error) {
+- var sgr *SGRule
+- err := gsp.context.WithReauth(gsp.access, func() error {
+- ep := fmt.Sprintf("%s/os-security-group-default-rules/%s", gsp.endpoint, id)
+- return perigee.Get(ep, perigee.Options{
+- MoreHeaders: map[string]string{
+- "X-Auth-Token": gsp.access.AuthToken(),
+- },
+- Results: &struct{ Security_group_default_rule **SGRule }{&sgr},
+- })
+- })
+- return sgr, err
+-}
+-
+-// SecurityGroup provides a description of a security group, including all its rules.
+-type SecurityGroup struct {
+- Description string `json:"description,omitempty"`
+- Id int `json:"id,omitempty"`
+- Name string `json:"name,omitempty"`
+- Rules []SGRule `json:"rules,omitempty"`
+- TenantId string `json:"tenant_id,omitempty"`
+-}
+-
+-// SGRule encapsulates a single rule which applies to a security group.
+-// This definition is just a guess, based on the documentation found in another extension here: http://docs.openstack.org/api/openstack-compute/2/content/GET_os-security-group-default-rules-v2_listSecGroupDefaultRules_v2__tenant_id__os-security-group-rules_ext-os-security-group-default-rules.html
+-type SGRule struct {
+- FromPort int `json:"from_port,omitempty"`
+- Id int `json:"id,omitempty"`
+- IpProtocol string `json:"ip_protocol,omitempty"`
+- IpRange map[string]interface{} `json:"ip_range,omitempty"`
+- ToPort int `json:"to_port,omitempty"`
+-}
+-
+-// RaxBandwidth provides measurement of server bandwidth consumed over a given audit interval.
+-type RaxBandwidth struct {
+- AuditPeriodEnd string `json:"audit_period_end"`
+- AuditPeriodStart string `json:"audit_period_start"`
+- BandwidthInbound int64 `json:"bandwidth_inbound"`
+- BandwidthOutbound int64 `json:"bandwidth_outbound"`
+- Interface string `json:"interface"`
+-}
+-
+-// A VersionedAddress denotes either an IPv4 or IPv6 (depending on version indicated)
+-// address.
+-type VersionedAddress struct {
+- Addr string `json:"addr"`
+- Version int `json:"version"`
+-}
+-
+-// An AddressSet provides a set of public and private IP addresses for a resource.
+-// Each address has a version to identify if IPv4 or IPv6.
+-type AddressSet struct {
+- Public []VersionedAddress `json:"public"`
+- Private []VersionedAddress `json:"private"`
+-}
+-
+-type NetworkAddress map[string][]VersionedAddress
+-
+-// Server records represent (virtual) hardware instances (not configurations) accessible by the user.
+-//
+-// The AccessIPv4 / AccessIPv6 fields provides IP addresses for the server in the IPv4 or IPv6 format, respectively.
+-//
+-// Addresses provides addresses for any attached isolated networks.
+-// The version field indicates whether the IP address is version 4 or 6.
+-// Note: only public and private pools appear here.
+-// To get the complete set, use the AllAddressPools() method instead.
+-//
+-// Created tells when the server entity was created.
+-//
+-// The Flavor field includes the flavor ID and flavor links.
+-//
+-// The compute provisioning algorithm has an anti-affinity property that
+-// attempts to spread customer VMs across hosts.
+-// Under certain situations,
+-// VMs from the same customer might be placed on the same host.
+-// The HostId field represents the host your server runs on and
+-// can be used to determine this scenario if it is relevant to your application.
+-// Note that HostId is unique only per account; it is not globally unique.
+-//
+-// Id provides the server's unique identifier.
+-// This field must be treated opaquely.
+-//
+-// Image indicates which image is installed on the server.
+-//
+-// Links provides one or more means of accessing the server.
+-//
+-// Metadata provides a small key-value store for application-specific information.
+-//
+-// Name provides a human-readable name for the server.
+-//
+-// Progress indicates how far along it is towards being provisioned.
+-// 100 represents complete, while 0 represents just beginning.
+-//
+-// Status provides an indication of what the server's doing at the moment.
+-// A server will be in ACTIVE state if it's ready for use.
+-//
+-// OsDcfDiskConfig indicates the server's boot volume configuration.
+-// Valid values are:
+-// AUTO
+-// ----
+-// The server is built with a single partition the size of the target flavor disk.
+-// The file system is automatically adjusted to fit the entire partition.
+-// This keeps things simple and automated.
+-// AUTO is valid only for images and servers with a single partition that use the EXT3 file system.
+-// This is the default setting for applicable Rackspace base images.
+-//
+-// MANUAL
+-// ------
+-// The server is built using whatever partition scheme and file system is in the source image.
+-// If the target flavor disk is larger,
+-// the remaining disk space is left unpartitioned.
+-// This enables images to have non-EXT3 file systems, multiple partitions, and so on,
+-// and enables you to manage the disk configuration.
+-//
+-// RaxBandwidth provides measures of the server's inbound and outbound bandwidth per interface.
+-//
+-// OsExtStsPowerState provides an indication of the server's power.
+-// This field appears to be a set of flag bits:
+-//
+-// ... 4 3 2 1 0
+-// +--//--+---+---+---+---+
+-// | .... | 0 | S | 0 | I |
+-// +--//--+---+---+---+---+
+-// | |
+-// | +--- 0=Instance is down.
+-// | 1=Instance is up.
+-// |
+-// +----------- 0=Server is switched ON.
+-// 1=Server is switched OFF.
+-// (note reverse logic.)
+-//
+-// Unused bits should be ignored when read, and written as 0 for future compatibility.
+-//
+-// OsExtStsTaskState and OsExtStsVmState work together
+-// to provide visibility in the provisioning process for the instance.
+-// Consult Rackspace documentation at
+-// http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ch_extensions.html#ext_status
+-// for more details. It's too lengthy to include here.
+-type Server struct {
+- AccessIPv4 string `json:"accessIPv4"`
+- AccessIPv6 string `json:"accessIPv6"`
+- Addresses AddressSet
+- Created string `json:"created"`
+- Flavor FlavorLink `json:"flavor"`
+- HostId string `json:"hostId"`
+- Id string `json:"id"`
+- Image ImageLink `json:"image"`
+- Links []Link `json:"links"`
+- Metadata map[string]string `json:"metadata"`
+- Name string `json:"name"`
+- Progress int `json:"progress"`
+- Status string `json:"status"`
+- TenantId string `json:"tenant_id"`
+- Updated string `json:"updated"`
+- UserId string `json:"user_id"`
+- OsDcfDiskConfig string `json:"OS-DCF:diskConfig"`
+- RaxBandwidth []RaxBandwidth `json:"rax-bandwidth:bandwidth"`
+- OsExtStsPowerState int `json:"OS-EXT-STS:power_state"`
+- OsExtStsTaskState string `json:"OS-EXT-STS:task_state"`
+- OsExtStsVmState string `json:"OS-EXT-STS:vm_state"`
+-
+- RawAddresses map[string]interface{} `json:"addresses"`
+-}
+-
+-// AllAddressPools returns a complete set of address pools available on the server.
+-// The name of each pool supported keys the map.
+-// The value of the map contains the addresses provided in the corresponding pool.
+-func (s *Server) AllAddressPools() (map[string][]VersionedAddress, error) {
+- pools := make(map[string][]VersionedAddress, 0)
+- for pool, subtree := range s.RawAddresses {
+- addresses := make([]VersionedAddress, 0)
+- err := mapstructure.Decode(subtree, &addresses)
+- if err != nil {
+- return nil, err
+- }
+- pools[pool] = addresses
+- }
+- return pools, nil
+-}
+-
+-// NewServerSettings structures record those fields of the Server structure to change
+-// when updating a server (see UpdateServer method).
+-type NewServerSettings struct {
+- Name string `json:"name,omitempty"`
+- AccessIPv4 string `json:"accessIPv4,omitempty"`
+- AccessIPv6 string `json:"accessIPv6,omitempty"`
+-}
+-
+-// NewServer structures are used for both requests and responses.
+-// The fields discussed below are relevent for server-creation purposes.
+-//
+-// The Name field contains the desired name of the server.
+-// Note that (at present) Rackspace permits more than one server with the same name;
+-// however, software should not depend on this.
+-// Not only will Rackspace support thank you, so will your own devops engineers.
+-// A name is required.
+-//
+-// The ImageRef field contains the ID of the desired software image to place on the server.
+-// This ID must be found in the image slice returned by the Images() function.
+-// This field is required.
+-//
+-// The FlavorRef field contains the ID of the server configuration desired for deployment.
+-// This ID must be found in the flavor slice returned by the Flavors() function.
+-// This field is required.
+-//
+-// For OsDcfDiskConfig, refer to the Image or Server structure documentation.
+-// This field defaults to "AUTO" if not explicitly provided.
+-//
+-// Metadata contains a small key/value association of arbitrary data.
+-// Neither Rackspace nor OpenStack places significance on this field in any way.
+-// This field defaults to an empty map if not provided.
+-//
+-// Personality specifies the contents of certain files in the server's filesystem.
+-// The files and their contents are mapped through a slice of FileConfig structures.
+-// If not provided, all filesystem entities retain their image-specific configuration.
+-//
+-// Networks specifies an affinity for the server's various networks and interfaces.
+-// Networks are identified through UUIDs; see NetworkConfig structure documentation for more details.
+-// If not provided, network affinity is determined automatically.
+-//
+-// The AdminPass field may be used to provide a root- or administrator-password
+-// during the server provisioning process.
+-// If not provided, a random password will be automatically generated and returned in this field.
+-//
+-// The following fields are intended to be used to communicate certain results about the server being provisioned.
+-// When attempting to create a new server, these fields MUST not be provided.
+-// They'll be filled in by the response received from the Rackspace APIs.
+-//
+-// The Id field contains the server's unique identifier.
+-// The identifier's scope is best assumed to be bound by the user's account, unless other arrangements have been made with Rackspace.
+-//
+-// The SecurityGroup field allows the user to specify a security group at launch.
+-//
+-// Any Links provided are used to refer to the server specifically by URL.
+-// These links are useful for making additional REST calls not explicitly supported by Gorax.
+-type NewServer struct {
+- Name string `json:"name,omitempty"`
+- ImageRef string `json:"imageRef,omitempty"`
+- FlavorRef string `json:"flavorRef,omitempty"`
+- Metadata map[string]string `json:"metadata,omitempty"`
+- Personality []FileConfig `json:"personality,omitempty"`
+- Networks []NetworkConfig `json:"networks,omitempty"`
+- AdminPass string `json:"adminPass,omitempty"`
+- KeyPairName string `json:"key_name,omitempty"`
+- Id string `json:"id,omitempty"`
+- Links []Link `json:"links,omitempty"`
+- OsDcfDiskConfig string `json:"OS-DCF:diskConfig,omitempty"`
+- SecurityGroup []map[string]interface{} `json:"security_groups,omitempty"`
+- ConfigDrive bool `json:"config_drive"`
+- UserData string `json:"user_data"`
+-}
+-
+-// ResizeRequest structures are used internally to encode to JSON the parameters required to resize a server instance.
+-// Client applications will not use this structure (no API accepts an instance of this structure).
+-// See the Region method ResizeServer() for more details on how to resize a server.
+-type ResizeRequest struct {
+- Name string `json:"name,omitempty"`
+- FlavorRef string `json:"flavorRef"`
+- DiskConfig string `json:"OS-DCF:diskConfig,omitempty"`
+-}
+-
+-type CreateImage struct {
+- Name string `json:"name"`
+- Metadata map[string]string `json:"metadata,omitempty"`
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/servers_test.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/servers_test.go
+deleted file mode 100644
+index 60c71c8..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/servers_test.go
++++ /dev/null
+@@ -1,54 +0,0 @@
+-package gophercloud
+-
+-import (
+- "net/http"
+- "testing"
+-)
+-
+-type testAccess struct {
+- public, internal string
+- calledFirstEndpointByCriteria int
+-}
+-
+-func (ta *testAccess) FirstEndpointUrlByCriteria(ac ApiCriteria) string {
+- ta.calledFirstEndpointByCriteria++
+- urls := []string{ta.public, ta.internal}
+- return urls[ac.UrlChoice]
+-}
+-
+-func (ta *testAccess) AuthToken() string {
+- return ""
+-}
+-
+-func (ta *testAccess) Revoke(string) error {
+- return nil
+-}
+-
+-func (ta *testAccess) Reauthenticate() error {
+- return nil
+-}
+-
+-func TestGetServersApi(t *testing.T) {
+- c := TestContext().UseCustomClient(&http.Client{Transport: newTransport().WithResponse("Hello")})
+-
+- acc := &testAccess{
+- public: "http://localhost:8080",
+- internal: "http://localhost:8086",
+- }
+-
+- _, err := c.ServersApi(acc, ApiCriteria{
+- Name: "cloudComputeOpenStack",
+- Region: "dfw",
+- VersionId: "2",
+- })
+-
+- if err != nil {
+- t.Error(err)
+- return
+- }
+-
+- if acc.calledFirstEndpointByCriteria != 1 {
+- t.Error("Expected FirstEndpointByCriteria to be called")
+- return
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/service_catalog.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/service_catalog.go
+deleted file mode 100644
+index e6cf4a0..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/service_catalog.go
++++ /dev/null
+@@ -1,75 +0,0 @@
+-package gophercloud
+-
+-import (
+- "os"
+- "strings"
+-)
+-
+-// ApiCriteria provides one or more criteria for the SDK to look for appropriate endpoints.
+-// Fields left unspecified or otherwise set to their zero-values are assumed to not be
+-// relevant, and do not participate in the endpoint search.
+-//
+-// Name specifies the desired service catalog entry name.
+-// Type specifies the desired service catalog entry type.
+-// Region specifies the desired endpoint region.
+-// If unset, Gophercloud will try to use the region set in the
+-// OS_REGION_NAME environment variable. If that's not set,
+-// region comparison will not occur. If OS_REGION_NAME is set
+-// and IgnoreEnvVars is also set, OS_REGION_NAME will be ignored.
+-// VersionId specifies the desired version of the endpoint.
+-// Note that this field is matched exactly, and is (at present)
+-// opaque to Gophercloud. Thus, requesting a version 2
+-// endpoint will _not_ match a version 3 endpoint.
+-// The UrlChoice field inidicates whether or not gophercloud
+-// should use the public or internal endpoint URL if a
+-// candidate endpoint is found.
+-// IgnoreEnvVars instructs Gophercloud to ignore helpful environment variables.
+-type ApiCriteria struct {
+- Name string
+- Type string
+- Region string
+- VersionId string
+- UrlChoice int
+- IgnoreEnvVars bool
+-}
+-
+-// The choices available for UrlChoice. See the ApiCriteria structure for details.
+-const (
+- PublicURL = iota
+- InternalURL
+-)
+-
+-// Given a set of criteria to match on, locate the first candidate endpoint
+-// in the provided service catalog.
+-//
+-// If nothing found, the result will be a zero-valued EntryEndpoint (all URLs
+-// set to "").
+-func FindFirstEndpointByCriteria(entries []CatalogEntry, ac ApiCriteria) EntryEndpoint {
+- rgn := strings.ToUpper(ac.Region)
+- if (rgn == "") && !ac.IgnoreEnvVars {
+- rgn = os.Getenv("OS_REGION_NAME")
+- }
+-
+- for _, entry := range entries {
+- if (ac.Name != "") && (ac.Name != entry.Name) {
+- continue
+- }
+-
+- if (ac.Type != "") && (ac.Type != entry.Type) {
+- continue
+- }
+-
+- for _, endpoint := range entry.Endpoints {
+- if (rgn != "") && (rgn != strings.ToUpper(endpoint.Region)) {
+- continue
+- }
+-
+- if (ac.VersionId != "") && (ac.VersionId != endpoint.VersionId) {
+- continue
+- }
+-
+- return endpoint
+- }
+- }
+- return EntryEndpoint{}
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/service_catalog_test.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/service_catalog_test.go
+deleted file mode 100644
+index b78f01f..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/service_catalog_test.go
++++ /dev/null
+@@ -1,190 +0,0 @@
+-package gophercloud
+-
+-import (
+- "os"
+- "testing"
+-)
+-
+-// TestFFEBCViaEnvVariable exercises only those calls where a region
+-// parameter is required, but is provided by an environment variable.
+-func TestFFEBCViaEnvVariable(t *testing.T) {
+- changeRegion("RGN")
+-
+- endpoint := FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "", ""),
+- ApiCriteria{Name: "test"},
+- )
+- if endpoint.PublicURL != "" {
+- t.Error("If provided, the Region qualifier must exclude endpoints with missing or mismatching regions.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "rgn", ""),
+- ApiCriteria{Name: "test"},
+- )
+- if endpoint.PublicURL != "http://localhost" {
+- t.Error("Regions are case insensitive.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "rgn", ""),
+- ApiCriteria{Name: "test", VersionId: "2"},
+- )
+- if endpoint.PublicURL != "" {
+- t.Error("Missing version ID means no match.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "rgn", "3"),
+- ApiCriteria{Name: "test", VersionId: "2"},
+- )
+- if endpoint.PublicURL != "" {
+- t.Error("Mismatched version ID means no match.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "rgn", "2"),
+- ApiCriteria{Name: "test", VersionId: "2"},
+- )
+- if endpoint.PublicURL != "http://localhost" {
+- t.Error("All search criteria met; endpoint expected.")
+- return
+- }
+-}
+-
+-// TestFFEBCViaRegionOption exercises only those calls where a region
+-// parameter is specified explicitly. The region option overrides
+-// any defined OS_REGION_NAME environment setting.
+-func TestFFEBCViaRegionOption(t *testing.T) {
+- changeRegion("Starfleet Command")
+-
+- endpoint := FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "", ""),
+- ApiCriteria{Name: "test", Region: "RGN"},
+- )
+- if endpoint.PublicURL != "" {
+- t.Error("If provided, the Region qualifier must exclude endpoints with missing or mismatching regions.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "rgn", ""),
+- ApiCriteria{Name: "test", Region: "RGN"},
+- )
+- if endpoint.PublicURL != "http://localhost" {
+- t.Error("Regions are case insensitive.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "rgn", ""),
+- ApiCriteria{Name: "test", Region: "RGN", VersionId: "2"},
+- )
+- if endpoint.PublicURL != "" {
+- t.Error("Missing version ID means no match.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "rgn", "3"),
+- ApiCriteria{Name: "test", Region: "RGN", VersionId: "2"},
+- )
+- if endpoint.PublicURL != "" {
+- t.Error("Mismatched version ID means no match.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "rgn", "2"),
+- ApiCriteria{Name: "test", Region: "RGN", VersionId: "2"},
+- )
+- if endpoint.PublicURL != "http://localhost" {
+- t.Error("All search criteria met; endpoint expected.")
+- return
+- }
+-}
+-
+-// TestFFEBCWithoutRegion exercises only those calls where a region
+-// is irrelevant. Just to make sure, though, we enforce Gophercloud
+-// from paying any attention to OS_REGION_NAME if it happens to be set.
+-func TestFindFirstEndpointByCriteria(t *testing.T) {
+- endpoint := FindFirstEndpointByCriteria([]CatalogEntry{}, ApiCriteria{Name: "test", IgnoreEnvVars: true})
+- if endpoint.PublicURL != "" {
+- t.Error("Not expecting to find anything in an empty service catalog.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- []CatalogEntry{
+- {Name: "test"},
+- },
+- ApiCriteria{Name: "test", IgnoreEnvVars: true},
+- )
+- if endpoint.PublicURL != "" {
+- t.Error("Even though we have a matching entry, no endpoints exist")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "", ""),
+- ApiCriteria{Name: "test", IgnoreEnvVars: true},
+- )
+- if endpoint.PublicURL != "http://localhost" {
+- t.Error("Looking for an endpoint by name but without region or version ID should match first entry endpoint.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "", ""),
+- ApiCriteria{Type: "compute", IgnoreEnvVars: true},
+- )
+- if endpoint.PublicURL != "http://localhost" {
+- t.Error("Looking for an endpoint by type but without region or version ID should match first entry endpoint.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "", ""),
+- ApiCriteria{Type: "identity", IgnoreEnvVars: true},
+- )
+- if endpoint.PublicURL != "" {
+- t.Error("Returned mismatched type.")
+- return
+- }
+-
+- endpoint = FindFirstEndpointByCriteria(
+- catalog("test", "compute", "http://localhost", "ord", "2"),
+- ApiCriteria{Name: "test", VersionId: "2", IgnoreEnvVars: true},
+- )
+- if endpoint.PublicURL != "http://localhost" {
+- t.Error("Sometimes, you might not care what region your stuff is in.")
+- return
+- }
+-}
+-
+-func catalog(name, entry_type, url, region, version string) []CatalogEntry {
+- return []CatalogEntry{
+- {
+- Name: name,
+- Type: entry_type,
+- Endpoints: []EntryEndpoint{
+- {
+- PublicURL: url,
+- Region: region,
+- VersionId: version,
+- },
+- },
+- },
+- }
+-}
+-
+-func changeRegion(r string) {
+- err := os.Setenv("OS_REGION_NAME", r)
+- if err != nil {
+- panic(err)
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/rackspace/gophercloud/transport_double_test.go b/Godeps/_workspace/src/github.com/rackspace/gophercloud/transport_double_test.go
+deleted file mode 100644
+index ef7f19a..0000000
+--- a/Godeps/_workspace/src/github.com/rackspace/gophercloud/transport_double_test.go
++++ /dev/null
+@@ -1,103 +0,0 @@
+-package gophercloud
+-
+-import (
+- "encoding/json"
+- "fmt"
+- "io/ioutil"
+- "net/http"
+- "strings"
+- "testing"
+-)
+-
+-type transport struct {
+- called int
+- response string
+- expectTenantId bool
+- tenantIdFound bool
+- status int
+-}
+-
+-func (t *transport) RoundTrip(req *http.Request) (rsp *http.Response, err error) {
+- var authContainer *AuthContainer
+-
+- t.called++
+-
+- headers := make(http.Header)
+- headers.Add("Content-Type", "application/xml; charset=UTF-8")
+-
+- body := ioutil.NopCloser(strings.NewReader(t.response))
+-
+- if t.status == 0 {
+- t.status = 200
+- }
+- statusMsg := "OK"
+- if (t.status < 200) || (299 < t.status) {
+- statusMsg = "Error"
+- }
+-
+- rsp = &http.Response{
+- Status: fmt.Sprintf("%d %s", t.status, statusMsg),
+- StatusCode: t.status,
+- Proto: "HTTP/1.1",
+- ProtoMajor: 1,
+- ProtoMinor: 1,
+- Header: headers,
+- Body: body,
+- ContentLength: -1,
+- TransferEncoding: nil,
+- Close: true,
+- Trailer: nil,
+- Request: req,
+- }
+-
+- bytes, err := ioutil.ReadAll(req.Body)
+- if err != nil {
+- return nil, err
+- }
+- err = json.Unmarshal(bytes, &authContainer)
+- if err != nil {
+- return nil, err
+- }
+- t.tenantIdFound = (authContainer.Auth.TenantId != "")
+-
+- if t.tenantIdFound != t.expectTenantId {
+- rsp.Status = "500 Internal Server Error"
+- rsp.StatusCode = 500
+- }
+- return
+-}
+-
+-func newTransport() *transport {
+- return &transport{}
+-}
+-
+-func (t *transport) IgnoreTenantId() *transport {
+- t.expectTenantId = false
+- return t
+-}
+-
+-func (t *transport) ExpectTenantId() *transport {
+- t.expectTenantId = true
+- return t
+-}
+-
+-func (t *transport) WithResponse(r string) *transport {
+- t.response = r
+- t.status = 200
+- return t
+-}
+-
+-func (t *transport) WithError(code int) *transport {
+- t.response = fmt.Sprintf("Error %d", code)
+- t.status = code
+- return t
+-}
+-
+-func (t *transport) VerifyCalls(test *testing.T, n int) error {
+- if t.called != n {
+- err := fmt.Errorf("Expected Transport to be called %d times; found %d instead", n, t.called)
+- test.Error(err)
+- return err
+- }
+- return nil
+-}
+diff --git a/Godeps/_workspace/src/github.com/skratchdot/LICENSE-MIT b/Godeps/_workspace/src/github.com/skratchdot/LICENSE-MIT
+deleted file mode 100644
+index afd04c8..0000000
+--- a/Godeps/_workspace/src/github.com/skratchdot/LICENSE-MIT
++++ /dev/null
+@@ -1,22 +0,0 @@
+-Copyright (c) 2013 skratchdot
+-
+-Permission is hereby granted, free of charge, to any person
+-obtaining a copy of this software and associated documentation
+-files (the "Software"), to deal in the Software without
+-restriction, including without limitation the rights to use,
+-copy, modify, merge, publish, distribute, sublicense, and/or sell
+-copies of the Software, and to permit persons to whom the
+-Software is furnished to do so, subject to the following
+-conditions:
+-
+-The above copyright notice and this permission notice shall be
+-included in all copies or substantial portions of the Software.
+-
+-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+-OTHER DEALINGS IN THE SOFTWARE.
+diff --git a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec.go b/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec.go
+deleted file mode 100644
+index cc37339..0000000
+--- a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec.go
++++ /dev/null
+@@ -1,15 +0,0 @@
+-// +build !windows,!darwin
+-
+-package open
+-
+-import (
+- "os/exec"
+-)
+-
+-func open(input string) *exec.Cmd {
+- return exec.Command("xdg-open", input)
+-}
+-
+-func openWith(input string, appName string) *exec.Cmd {
+- return exec.Command(appName, input)
+-}
+diff --git a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_darwin.go b/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_darwin.go
+deleted file mode 100644
+index 16160e6..0000000
+--- a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_darwin.go
++++ /dev/null
+@@ -1,15 +0,0 @@
+-// +build darwin
+-
+-package open
+-
+-import (
+- "os/exec"
+-)
+-
+-func open(input string) *exec.Cmd {
+- return exec.Command("open", input)
+-}
+-
+-func openWith(input string, appName string) *exec.Cmd {
+- return exec.Command("open", "-a", appName, input)
+-}
+diff --git a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_windows.go b/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_windows.go
+deleted file mode 100644
+index ac44cfa..0000000
+--- a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/exec_windows.go
++++ /dev/null
+@@ -1,21 +0,0 @@
+-// +build windows
+-
+-package open
+-
+-import (
+- "os/exec"
+- "strings"
+-)
+-
+-func cleaninput(input string) string {
+- r := strings.NewReplacer("&", "^&")
+- return r.Replace(input)
+-}
+-
+-func open(input string) *exec.Cmd {
+- return exec.Command("cmd", "/C", "start", "", cleaninput(input))
+-}
+-
+-func openWith(input string, appName string) *exec.Cmd {
+- return exec.Command("cmd", "/C", "start", "", appName, cleaninput(input))
+-}
+diff --git a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open.go b/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open.go
+deleted file mode 100644
+index b1f648f..0000000
+--- a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open.go
++++ /dev/null
+@@ -1,50 +0,0 @@
+-/*
+-
+- Open a file, directory, or URI using the OS's default
+- application for that object type. Optionally, you can
+- specify an application to use.
+-
+- This is a proxy for the following commands:
+-
+- OSX: "open"
+- Windows: "start"
+- Linux/Other: "xdg-open"
+-
+- This is a golang port of the node.js module: https://github.com/pwnall/node-open
+-
+-*/
+-package open
+-
+-/*
+- Open a file, directory, or URI using the OS's default
+- application for that object type. Wait for the open
+- command to complete.
+-*/
+-func Run(input string) error {
+- return open(input).Run()
+-}
+-
+-/*
+- Open a file, directory, or URI using the OS's default
+- application for that object type. Don't wait for the
+- open command to complete.
+-*/
+-func Start(input string) error {
+- return open(input).Start()
+-}
+-
+-/*
+- Open a file, directory, or URI using the specified application.
+- Wait for the open command to complete.
+-*/
+-func RunWith(input string, appName string) error {
+- return openWith(input, appName).Run()
+-}
+-
+-/*
+- Open a file, directory, or URI using the specified application.
+- Don't wait for the open command to complete.
+-*/
+-func StartWith(input string, appName string) error {
+- return openWith(input, appName).Start()
+-}
+diff --git a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open_test.go b/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open_test.go
+deleted file mode 100644
+index 5db2da2..0000000
+--- a/Godeps/_workspace/src/github.com/skratchdot/open-golang/open/open_test.go
++++ /dev/null
+@@ -1,70 +0,0 @@
+-package open
+-
+-import "testing"
+-
+-func TestRun(t *testing.T) {
+- // shouldn't error
+- input := "https://google.com/"
+- err := Run(input)
+- if err != nil {
+- t.Errorf("open.Run(\"%s\") threw an error: %s", input, err)
+- }
+-
+- // should error
+- input = "xxxxxxxxxxxxxxx"
+- err = Run(input)
+- if err == nil {
+- t.Errorf("Run(\"%s\") did not throw an error as expected", input)
+- }
+-}
+-
+-func TestStart(t *testing.T) {
+- // shouldn't error
+- input := "https://google.com/"
+- err := Start(input)
+- if err != nil {
+- t.Errorf("open.Start(\"%s\") threw an error: %s", input, err)
+- }
+-
+- // shouldn't error
+- input = "xxxxxxxxxxxxxxx"
+- err = Start(input)
+- if err != nil {
+- t.Errorf("open.Start(\"%s\") shouldn't even fail on invalid input: %s", input, err)
+- }
+-}
+-
+-func TestRunWith(t *testing.T) {
+- // shouldn't error
+- input := "https://google.com/"
+- app := "firefox"
+- err := RunWith(input, app)
+- if err != nil {
+- t.Errorf("open.RunWith(\"%s\", \"%s\") threw an error: %s", input, app, err)
+- }
+-
+- // should error
+- app = "xxxxxxxxxxxxxxx"
+- err = RunWith(input, app)
+- if err == nil {
+- t.Errorf("RunWith(\"%s\", \"%s\") did not throw an error as expected", input, app)
+- }
+-}
+-
+-func TestStartWith(t *testing.T) {
+- // shouldn't error
+- input := "https://google.com/"
+- app := "firefox"
+- err := StartWith(input, app)
+- if err != nil {
+- t.Errorf("open.StartWith(\"%s\", \"%s\") threw an error: %s", input, app, err)
+- }
+-
+- // shouldn't error
+- input = "[<Invalid URL>]"
+- err = StartWith(input, app)
+- if err != nil {
+- t.Errorf("StartWith(\"%s\", \"%s\") shouldn't even fail on invalid input: %s", input, app, err)
+- }
+-
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/.gitignore b/Godeps/_workspace/src/github.com/spf13/cobra/.gitignore
+deleted file mode 100644
+index 36d1a84..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/cobra/.gitignore
++++ /dev/null
+@@ -1,24 +0,0 @@
+-# Compiled Object files, Static and Dynamic libs (Shared Objects)
+-*.o
+-*.a
+-*.so
+-
+-# Folders
+-_obj
+-_test
+-
+-# Architecture specific extensions/prefixes
+-*.[568vq]
+-[568vq].out
+-
+-*.cgo1.go
+-*.cgo2.c
+-_cgo_defun.c
+-_cgo_gotypes.go
+-_cgo_export.*
+-
+-_testmain.go
+-
+-*.exe
+-
+-cobra.test
+diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/.travis.yml b/Godeps/_workspace/src/github.com/spf13/cobra/.travis.yml
+deleted file mode 100644
+index 6de9ac2..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/cobra/.travis.yml
++++ /dev/null
+@@ -1,6 +0,0 @@
+-language: go
+-go:
+- - 1.1
+-script:
+- - go test ./...
+- - go build
+diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt
+deleted file mode 100644
+index 298f0e2..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt
++++ /dev/null
+@@ -1,174 +0,0 @@
+- Apache License
+- Version 2.0, January 2004
+- http://www.apache.org/licenses/
+-
+- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+-
+- 1. Definitions.
+-
+- "License" shall mean the terms and conditions for use, reproduction,
+- and distribution as defined by Sections 1 through 9 of this document.
+-
+- "Licensor" shall mean the copyright owner or entity authorized by
+- the copyright owner that is granting the License.
+-
+- "Legal Entity" shall mean the union of the acting entity and all
+- other entities that control, are controlled by, or are under common
+- control with that entity. For the purposes of this definition,
+- "control" means (i) the power, direct or indirect, to cause the
+- direction or management of such entity, whether by contract or
+- otherwise, or (ii) ownership of fifty percent (50%) or more of the
+- outstanding shares, or (iii) beneficial ownership of such entity.
+-
+- "You" (or "Your") shall mean an individual or Legal Entity
+- exercising permissions granted by this License.
+-
+- "Source" form shall mean the preferred form for making modifications,
+- including but not limited to software source code, documentation
+- source, and configuration files.
+-
+- "Object" form shall mean any form resulting from mechanical
+- transformation or translation of a Source form, including but
+- not limited to compiled object code, generated documentation,
+- and conversions to other media types.
+-
+- "Work" shall mean the work of authorship, whether in Source or
+- Object form, made available under the License, as indicated by a
+- copyright notice that is included in or attached to the work
+- (an example is provided in the Appendix below).
+-
+- "Derivative Works" shall mean any work, whether in Source or Object
+- form, that is based on (or derived from) the Work and for which the
+- editorial revisions, annotations, elaborations, or other modifications
+- represent, as a whole, an original work of authorship. For the purposes
+- of this License, Derivative Works shall not include works that remain
+- separable from, or merely link (or bind by name) to the interfaces of,
+- the Work and Derivative Works thereof.
+-
+- "Contribution" shall mean any work of authorship, including
+- the original version of the Work and any modifications or additions
+- to that Work or Derivative Works thereof, that is intentionally
+- submitted to Licensor for inclusion in the Work by the copyright owner
+- or by an individual or Legal Entity authorized to submit on behalf of
+- the copyright owner. For the purposes of this definition, "submitted"
+- means any form of electronic, verbal, or written communication sent
+- to the Licensor or its representatives, including but not limited to
+- communication on electronic mailing lists, source code control systems,
+- and issue tracking systems that are managed by, or on behalf of, the
+- Licensor for the purpose of discussing and improving the Work, but
+- excluding communication that is conspicuously marked or otherwise
+- designated in writing by the copyright owner as "Not a Contribution."
+-
+- "Contributor" shall mean Licensor and any individual or Legal Entity
+- on behalf of whom a Contribution has been received by Licensor and
+- subsequently incorporated within the Work.
+-
+- 2. Grant of Copyright License. Subject to the terms and conditions of
+- this License, each Contributor hereby grants to You a perpetual,
+- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+- copyright license to reproduce, prepare Derivative Works of,
+- publicly display, publicly perform, sublicense, and distribute the
+- Work and such Derivative Works in Source or Object form.
+-
+- 3. Grant of Patent License. Subject to the terms and conditions of
+- this License, each Contributor hereby grants to You a perpetual,
+- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+- (except as stated in this section) patent license to make, have made,
+- use, offer to sell, sell, import, and otherwise transfer the Work,
+- where such license applies only to those patent claims licensable
+- by such Contributor that are necessarily infringed by their
+- Contribution(s) alone or by combination of their Contribution(s)
+- with the Work to which such Contribution(s) was submitted. If You
+- institute patent litigation against any entity (including a
+- cross-claim or counterclaim in a lawsuit) alleging that the Work
+- or a Contribution incorporated within the Work constitutes direct
+- or contributory patent infringement, then any patent licenses
+- granted to You under this License for that Work shall terminate
+- as of the date such litigation is filed.
+-
+- 4. Redistribution. You may reproduce and distribute copies of the
+- Work or Derivative Works thereof in any medium, with or without
+- modifications, and in Source or Object form, provided that You
+- meet the following conditions:
+-
+- (a) You must give any other recipients of the Work or
+- Derivative Works a copy of this License; and
+-
+- (b) You must cause any modified files to carry prominent notices
+- stating that You changed the files; and
+-
+- (c) You must retain, in the Source form of any Derivative Works
+- that You distribute, all copyright, patent, trademark, and
+- attribution notices from the Source form of the Work,
+- excluding those notices that do not pertain to any part of
+- the Derivative Works; and
+-
+- (d) If the Work includes a "NOTICE" text file as part of its
+- distribution, then any Derivative Works that You distribute must
+- include a readable copy of the attribution notices contained
+- within such NOTICE file, excluding those notices that do not
+- pertain to any part of the Derivative Works, in at least one
+- of the following places: within a NOTICE text file distributed
+- as part of the Derivative Works; within the Source form or
+- documentation, if provided along with the Derivative Works; or,
+- within a display generated by the Derivative Works, if and
+- wherever such third-party notices normally appear. The contents
+- of the NOTICE file are for informational purposes only and
+- do not modify the License. You may add Your own attribution
+- notices within Derivative Works that You distribute, alongside
+- or as an addendum to the NOTICE text from the Work, provided
+- that such additional attribution notices cannot be construed
+- as modifying the License.
+-
+- You may add Your own copyright statement to Your modifications and
+- may provide additional or different license terms and conditions
+- for use, reproduction, or distribution of Your modifications, or
+- for any such Derivative Works as a whole, provided Your use,
+- reproduction, and distribution of the Work otherwise complies with
+- the conditions stated in this License.
+-
+- 5. Submission of Contributions. Unless You explicitly state otherwise,
+- any Contribution intentionally submitted for inclusion in the Work
+- by You to the Licensor shall be under the terms and conditions of
+- this License, without any additional terms or conditions.
+- Notwithstanding the above, nothing herein shall supersede or modify
+- the terms of any separate license agreement you may have executed
+- with Licensor regarding such Contributions.
+-
+- 6. Trademarks. This License does not grant permission to use the trade
+- names, trademarks, service marks, or product names of the Licensor,
+- except as required for reasonable and customary use in describing the
+- origin of the Work and reproducing the content of the NOTICE file.
+-
+- 7. Disclaimer of Warranty. Unless required by applicable law or
+- agreed to in writing, Licensor provides the Work (and each
+- Contributor provides its Contributions) on an "AS IS" BASIS,
+- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+- implied, including, without limitation, any warranties or conditions
+- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+- PARTICULAR PURPOSE. You are solely responsible for determining the
+- appropriateness of using or redistributing the Work and assume any
+- risks associated with Your exercise of permissions under this License.
+-
+- 8. Limitation of Liability. In no event and under no legal theory,
+- whether in tort (including negligence), contract, or otherwise,
+- unless required by applicable law (such as deliberate and grossly
+- negligent acts) or agreed to in writing, shall any Contributor be
+- liable to You for damages, including any direct, indirect, special,
+- incidental, or consequential damages of any character arising as a
+- result of this License or out of the use or inability to use the
+- Work (including but not limited to damages for loss of goodwill,
+- work stoppage, computer failure or malfunction, or any and all
+- other commercial damages or losses), even if such Contributor
+- has been advised of the possibility of such damages.
+-
+- 9. Accepting Warranty or Additional Liability. While redistributing
+- the Work or Derivative Works thereof, You may choose to offer,
+- and charge a fee for, acceptance of support, warranty, indemnity,
+- or other liability obligations and/or rights consistent with this
+- License. However, in accepting such obligations, You may act only
+- on Your own behalf and on Your sole responsibility, not on behalf
+- of any other Contributor, and only if You agree to indemnify,
+- defend, and hold each Contributor harmless for any liability
+- incurred by, or claims asserted against, such Contributor by reason
+- of your accepting any such warranty or additional liability.
+diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/README.md b/Godeps/_workspace/src/github.com/spf13/cobra/README.md
+deleted file mode 100644
+index 67c4eff..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/cobra/README.md
++++ /dev/null
+@@ -1,397 +0,0 @@
+-# Cobra
+-
+-A Commander for modern go CLI interactions
+-
+-[![Build Status](https://travis-ci.org/spf13/cobra.png)](https://travis-ci.org/spf13/cobra)
+-
+-## Overview
+-
+-Cobra is a commander providing a simple interface to create powerful modern CLI
+-interfaces similar to git & go tools. In addition to providing an interface, Cobra
+-simultaneously provides a controller to organize your application code.
+-
+-Inspired by go, go-Commander, gh and subcommand, Cobra improves on these by
+-providing **fully posix compliant flags** (including short & long versions),
+-**nesting commands**, and the ability to **define your own help and usage** for any or
+-all commands.
+-
+-Cobra has an exceptionally clean interface and simple design without needless
+-constructors or initialization methods.
+-
+-Applications built with Cobra commands are designed to be as user friendly as
+-possible. Flags can be placed before or after the command (as long as a
+-confusing space isn’t provided). Both short and long flags can be used. A
+-command need not even be fully typed. The shortest unambiguous string will
+-suffice. Help is automatically generated and available for the application or
+-for a specific command using either the help command or the --help flag.
+-
+-## Concepts
+-
+-Cobra is built on a structure of commands & flags.
+-
+-**Commands** represent actions and **Flags** are modifiers for those actions.
+-
+-In the following example 'server' is a command and 'port' is a flag.
+-
+- hugo server --port=1313
+-
+-### Commands
+-
+-Command is the central point of the application. Each interaction that
+-the application supports will be contained in a Command. A command can
+-have children commands and optionally run an action.
+-
+-In the example above 'server' is the command
+-
+-A Command has the following structure:
+-
+- type Command struct {
+- Use string // The one-line usage message.
+- Short string // The short description shown in the 'help' output.
+- Long string // The long message shown in the 'help <this-command>' output.
+- Run func(cmd *Command, args []string) // Run runs the command.
+- }
+-
+-### Flags
+-
+-A Flag is a way to modify the behavior of an command. Cobra supports
+-fully posix compliant flags as well as the go flag package.
+-A Cobra command can define flags that persist through to children commands
+-and flags that are only available to that command.
+-
+-In the example above 'port' is the flag.
+-
+-Flag functionality is provided by the [pflag
+-libary](https://github.com/ogier/pflag), a fork of the flag standard library
+-which maintains the same interface while adding posix compliance.
+-
+-## Usage
+-
+-Cobra works by creating a set of commands and then organizing them into a tree.
+-The tree defines the structure of the application.
+-
+-Once each command is defined with it's corresponding flags, then the
+-tree is assigned to the commander which is finally executed.
+-
+-### Installing
+-Using Cobra is easy. First use go get to install the latest version
+-of the library.
+-
+- $ go get github.com/spf13/cobra
+-
+-Next include cobra in your application.
+-
+- import "github.com/spf13/cobra"
+-
+-### Create the root command
+-
+-The root command represents your binary itself.
+-
+-Cobra doesn't require any special constructors. Simply create your commands.
+-
+- var HugoCmd = &cobra.Command{
+- Use: "hugo",
+- Short: "Hugo is a very fast static site generator",
+- Long: `A Fast and Flexible Static Site Generator built with
+- love by spf13 and friends in Go.
+- Complete documentation is available at http://hugo.spf13.com`,
+- Run: func(cmd *cobra.Command, args []string) {
+- // Do Stuff Here
+- },
+- }
+-
+-### Create additional commands
+-
+-Additional commands can be defined.
+-
+- var versionCmd = &cobra.Command{
+- Use: "version",
+- Short: "Print the version number of Hugo",
+- Long: `All software has versions. This is Hugo's`,
+- Run: func(cmd *cobra.Command, args []string) {
+- fmt.Println("Hugo Static Site Generator v0.9 -- HEAD")
+- },
+- }
+-
+-### Attach command to its parent
+-In this example we are attaching it to the root, but commands can be attached at any level.
+-
+- HugoCmd.AddCommand(versionCmd)
+-
+-### Assign flags to a command
+-
+-Since the flags are defined and used in different locations, we need to define a variable outside with the correct scope to assign the flag to work with.
+-
+- var Verbose bool
+- var Source string
+-
+-There are two different approaches to assign a flag.
+-
+-#### Persistent Flags
+-
+-A flag can be 'persistent' meaning that this flag will be available to the
+-command it's assigned to as well as every command under that command. For
+-global flags assign a flag as a persistent flag on the root.
+-
+- HugoCmd.PersistentFlags().BoolVarP(&Verbose, "verbose", "v", false, "verbose output")
+-
+-#### Local Flags
+-
+-A flag can also be assigned locally which will only apply to that specific command.
+-
+- HugoCmd.Flags().StringVarP(&Source, "source", "s", "", "Source directory to read from")
+-
+-### Once all commands and flags are defined, Execute the commands
+-
+-Execute should be run on the root for clarity, though it can be called on any command.
+-
+- HugoCmd.Execute()
+-
+-## Example
+-
+-In the example below we have defined three commands. Two are at the top level
+-and one (cmdTimes) is a child of one of the top commands. In this case the root
+-is not executable meaning that a subcommand is required. This is accomplished
+-by not providing a 'Run' for the 'rootCmd'.
+-
+-We have only defined one flag for a single command.
+-
+-More documentation about flags is available at https://github.com/spf13/pflag
+-
+- import(
+- "github.com/spf13/cobra"
+- "fmt"
+- "strings"
+- )
+-
+- func main() {
+-
+- var echoTimes int
+-
+- var cmdPrint = &cobra.Command{
+- Use: "print [string to print]",
+- Short: "Print anything to the screen",
+- Long: `print is for printing anything back to the screen.
+- For many years people have printed back to the screen.
+- `,
+- Run: func(cmd *cobra.Command, args []string) {
+- fmt.Println("Print: " + strings.Join(args, " "))
+- },
+- }
+-
+- var cmdEcho = &cobra.Command{
+- Use: "echo [string to echo]",
+- Short: "Echo anything to the screen",
+- Long: `echo is for echoing anything back.
+- Echo works a lot like print, except it has a child command.
+- `,
+- Run: func(cmd *cobra.Command, args []string) {
+- fmt.Println("Print: " + strings.Join(args, " "))
+- },
+- }
+-
+- var cmdTimes = &cobra.Command{
+- Use: "times [# times] [string to echo]",
+- Short: "Echo anything to the screen more times",
+- Long: `echo things multiple times back to the user by providing
+- a count and a string.`,
+- Run: func(cmd *cobra.Command, args []string) {
+- for i:=0; i < echoTimes; i++ {
+- fmt.Println("Echo: " + strings.Join(args, " "))
+- }
+- },
+- }
+-
+- cmdTimes.Flags().IntVarP(&echoTimes, "times", "t", 1, "times to echo the input")
+-
+- var rootCmd = &cobra.Command{Use: "app"}
+- rootCmd.AddCommand(cmdPrint, cmdEcho)
+- cmdEcho.AddCommand(cmdTimes)
+- rootCmd.Execute()
+- }
+-
+-For a more complete example of a larger application, please checkout [Hugo](http://hugo.spf13.com)
+-
+-## The Help Command
+-
+-Cobra automatically adds a help command to your application.
+-This will be called when a user runs 'app help'. Additionally help will also
+-support all other commands as input. Say for instance you have a command called
+-'create' without any additional configuration cobra will work when 'app help
+-create' is called.
+-
+-### Example
+-
+-The following output is automatically generated by cobra. Nothing beyond the
+-command and flag definitions are needed.
+-
+- > hugo help
+-
+- A Fast and Flexible Static Site Generator built with
+- love by spf13 and friends in Go.
+-
+- Complete documentation is available at http://hugo.spf13.com
+-
+- Usage:
+- hugo [flags]
+- hugo [command]
+-
+- Available Commands:
+- server :: Hugo runs it's own a webserver to render the files
+- version :: Print the version number of Hugo
+- check :: Check content in the source directory
+- benchmark :: Benchmark hugo by building a site a number of times
+- help [command] :: Help about any command
+-
+- Available Flags:
+- -b, --base-url="": hostname (and path) to the root eg. http://spf13.com/
+- -D, --build-drafts=false: include content marked as draft
+- --config="": config file (default is path/config.yaml|json|toml)
+- -d, --destination="": filesystem path to write files to
+- -s, --source="": filesystem path to read files relative from
+- --stepAnalysis=false: display memory and timing of different steps of the program
+- --uglyurls=false: if true, use /filename.html instead of /filename/
+- -v, --verbose=false: verbose output
+- -w, --watch=false: watch filesystem for changes and recreate as needed
+-
+- Use "hugo help [command]" for more information about that command.
+-
+-
+-
+-Help is just a command like any other. There is no special logic or behavior
+-around it. In fact you can provide your own if you want.
+-
+-### Defining your own help
+-
+-You can provide your own Help command or you own template for the default command to use.
+-
+-The default help command is
+-
+- func (c *Command) initHelp() {
+- if c.helpCommand == nil {
+- c.helpCommand = &Command{
+- Use: "help [command]",
+- Short: "Help about any command",
+- Long: `Help provides help for any command in the application.
+- Simply type ` + c.Name() + ` help [path to command] for full details.`,
+- Run: c.HelpFunc(),
+- }
+- }
+- c.AddCommand(c.helpCommand)
+- }
+-
+-You can provide your own command, function or template through the following methods.
+-
+- command.SetHelpCommand(cmd *Command)
+-
+- command.SetHelpFunc(f func(*Command, []string))
+-
+- command.SetHelpTemplate(s string)
+-
+-The latter two will also apply to any children commands.
+-
+-## Usage
+-
+-When the user provides an invalid flag or invalid command Cobra responds by
+-showing the user the 'usage'
+-
+-### Example
+-You may recognize this from the help above. That's because the default help
+-embeds the usage as part of it's output.
+-
+- Usage:
+- hugo [flags]
+- hugo [command]
+-
+- Available Commands:
+- server Hugo runs it's own a webserver to render the files
+- version Print the version number of Hugo
+- check Check content in the source directory
+- benchmark Benchmark hugo by building a site a number of times
+- help [command] Help about any command
+-
+- Available Flags:
+- -b, --base-url="": hostname (and path) to the root eg. http://spf13.com/
+- -D, --build-drafts=false: include content marked as draft
+- --config="": config file (default is path/config.yaml|json|toml)
+- -d, --destination="": filesystem path to write files to
+- -s, --source="": filesystem path to read files relative from
+- --stepAnalysis=false: display memory and timing of different steps of the program
+- --uglyurls=false: if true, use /filename.html instead of /filename/
+- -v, --verbose=false: verbose output
+- -w, --watch=false: watch filesystem for changes and recreate as needed
+-
+-### Defining your own usage
+-You can provide your own usage function or template for cobra to use.
+-
+-The default usage function is
+-
+- return func(c *Command) error {
+- err := tmpl(c.Out(), c.UsageTemplate(), c)
+- return err
+- }
+-
+-Like help the function and template are over ridable through public methods.
+-
+- command.SetUsageFunc(f func(*Command) error)
+-
+- command.SetUsageTemplate(s string)
+-
+-
+-## Debugging
+-
+-Cobra provides a ‘DebugFlags’ method on a command which when called will print
+-out everything Cobra knows about the flags for each command
+-
+-### Example
+-
+- command.DebugFlags()
+-
+-## Release Notes
+-* **0.9.0** June 17, 2014
+- * flags can appears anywhere in the args (provided they are unambiguous)
+- * --help prints usage screen for app or command
+- * Prefix matching for commands
+- * Cleaner looking help and usage output
+- * Extensive test suite
+-* **0.8.0** Nov 5, 2013
+- * Reworked interface to remove commander completely
+- * Command now primary structure
+- * No initialization needed
+- * Usage & Help templates & functions definable at any level
+- * Updated Readme
+-* **0.7.0** Sept 24, 2013
+- * Needs more eyes
+- * Test suite
+- * Support for automatic error messages
+- * Support for help command
+- * Support for printing to any io.Writer instead of os.Stderr
+- * Support for persistent flags which cascade down tree
+- * Ready for integration into Hugo
+-* **0.1.0** Sept 3, 2013
+- * Implement first draft
+-
+-## ToDo
+-* Launch proper documentation site
+-
+-## Contributing
+-
+-1. Fork it
+-2. Create your feature branch (`git checkout -b my-new-feature`)
+-3. Commit your changes (`git commit -am 'Add some feature'`)
+-4. Push to the branch (`git push origin my-new-feature`)
+-5. Create new Pull Request
+-
+-## Contributors
+-
+-Names in no particular order:
+-
+-* [spf13](https://github.com/spf13)
+-
+-## License
+-
+-Cobra is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/spf13/cobra/blob/master/LICENSE.txt)
+-
+-
+-[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/spf13/cobra/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
+-
+diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/cobra.go b/Godeps/_workspace/src/github.com/spf13/cobra/cobra.go
+deleted file mode 100644
+index e03b496..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/cobra/cobra.go
++++ /dev/null
+@@ -1,98 +0,0 @@
+-// Copyright © 2013 Steve Francia <spf at spf13.com>.
+-//
+-// Licensed under the Apache License, Version 2.0 (the "License");
+-// you may not use this file except in compliance with the License.
+-// You may obtain a copy of the License at
+-// http://www.apache.org/licenses/LICENSE-2.0
+-//
+-// Unless required by applicable law or agreed to in writing, software
+-// distributed under the License is distributed on an "AS IS" BASIS,
+-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-// See the License for the specific language governing permissions and
+-// limitations under the License.
+-
+-// Commands similar to git, go tools and other modern CLI tools
+-// inspired by go, go-Commander, gh and subcommand
+-
+-package cobra
+-
+-import (
+- "fmt"
+- "io"
+- "reflect"
+- "strconv"
+- "strings"
+- "text/template"
+-)
+-
+-var initializers []func()
+-
+-// automatic prefix matching can be a dangerous thing to automatically enable in CLI tools.
+-// Set this to true to enable it
+-var EnablePrefixMatching bool = false
+-
+-func OnInitialize(y ...func()) {
+- for _, x := range y {
+- initializers = append(initializers, x)
+- }
+-}
+-
+-func Gt(a interface{}, b interface{}) bool {
+- var left, right int64
+- av := reflect.ValueOf(a)
+-
+- switch av.Kind() {
+- case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
+- left = int64(av.Len())
+- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+- left = av.Int()
+- case reflect.String:
+- left, _ = strconv.ParseInt(av.String(), 10, 64)
+- }
+-
+- bv := reflect.ValueOf(b)
+-
+- switch bv.Kind() {
+- case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
+- right = int64(bv.Len())
+- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+- right = bv.Int()
+- case reflect.String:
+- right, _ = strconv.ParseInt(bv.String(), 10, 64)
+- }
+-
+- return left > right
+-}
+-
+-func Eq(a interface{}, b interface{}) bool {
+- av := reflect.ValueOf(a)
+- bv := reflect.ValueOf(b)
+-
+- switch av.Kind() {
+- case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
+- panic("Eq called on unsupported type")
+- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+- return av.Int() == bv.Int()
+- case reflect.String:
+- return av.String() == bv.String()
+- }
+- return false
+-}
+-
+-func rpad(s string, padding int) string {
+- template := fmt.Sprintf("%%-%ds", padding)
+- return fmt.Sprintf(template, s)
+-}
+-
+-// tmpl executes the given template text on data, writing the result to w.
+-func tmpl(w io.Writer, text string, data interface{}) error {
+- t := template.New("top")
+- t.Funcs(template.FuncMap{
+- "trim": strings.TrimSpace,
+- "rpad": rpad,
+- "gt": Gt,
+- "eq": Eq,
+- })
+- template.Must(t.Parse(text))
+- return t.Execute(w, data)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/cobra_test.go b/Godeps/_workspace/src/github.com/spf13/cobra/cobra_test.go
+deleted file mode 100644
+index 05d18d0..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/cobra/cobra_test.go
++++ /dev/null
+@@ -1,507 +0,0 @@
+-package cobra
+-
+-import (
+- "bytes"
+- "fmt"
+- "strings"
+- "testing"
+-)
+-
+-var _ = fmt.Println
+-
+-var tp, te, tt, t1 []string
+-var flagb1, flagb2, flagb3, flagbr bool
+-var flags1, flags2, flags3 string
+-var flagi1, flagi2, flagi3, flagir int
+-var globalFlag1 bool
+-var flagEcho, rootcalled bool
+-
+-var cmdPrint = &Command{
+- Use: "print [string to print]",
+- Short: "Print anything to the screen",
+- Long: `an utterly useless command for testing.`,
+- Run: func(cmd *Command, args []string) {
+- tp = args
+- },
+-}
+-
+-var cmdEcho = &Command{
+- Use: "echo [string to echo]",
+- Aliases: []string{"say"},
+- Short: "Echo anything to the screen",
+- Long: `an utterly useless command for testing.`,
+- Run: func(cmd *Command, args []string) {
+- te = args
+- },
+-}
+-
+-var cmdTimes = &Command{
+- Use: "times [# times] [string to echo]",
+- Short: "Echo anything to the screen more times",
+- Long: `an slightly useless command for testing.`,
+- Run: func(cmd *Command, args []string) {
+- tt = args
+- },
+-}
+-
+-var cmdRootNoRun = &Command{
+- Use: "cobra-test",
+- Short: "The root can run it's own function",
+- Long: "The root description for help",
+-}
+-
+-var cmdRootSameName = &Command{
+- Use: "print",
+- Short: "Root with the same name as a subcommand",
+- Long: "The root description for help",
+-}
+-
+-var cmdRootWithRun = &Command{
+- Use: "cobra-test",
+- Short: "The root can run it's own function",
+- Long: "The root description for help",
+- Run: func(cmd *Command, args []string) {
+- rootcalled = true
+- },
+-}
+-
+-func flagInit() {
+- cmdEcho.ResetFlags()
+- cmdPrint.ResetFlags()
+- cmdTimes.ResetFlags()
+- cmdRootNoRun.ResetFlags()
+- cmdRootSameName.ResetFlags()
+- cmdRootWithRun.ResetFlags()
+- cmdEcho.Flags().IntVarP(&flagi1, "intone", "i", 123, "help message for flag intone")
+- cmdTimes.Flags().IntVarP(&flagi2, "inttwo", "j", 234, "help message for flag inttwo")
+- cmdPrint.Flags().IntVarP(&flagi3, "intthree", "i", 345, "help message for flag intthree")
+- cmdEcho.PersistentFlags().StringVarP(&flags1, "strone", "s", "one", "help message for flag strone")
+- cmdTimes.PersistentFlags().StringVarP(&flags2, "strtwo", "t", "two", "help message for flag strtwo")
+- cmdPrint.PersistentFlags().StringVarP(&flags3, "strthree", "s", "three", "help message for flag strthree")
+- cmdEcho.Flags().BoolVarP(&flagb1, "boolone", "b", true, "help message for flag boolone")
+- cmdTimes.Flags().BoolVarP(&flagb2, "booltwo", "c", false, "help message for flag booltwo")
+- cmdPrint.Flags().BoolVarP(&flagb3, "boolthree", "b", true, "help message for flag boolthree")
+-}
+-
+-func commandInit() {
+- cmdEcho.ResetCommands()
+- cmdPrint.ResetCommands()
+- cmdTimes.ResetCommands()
+- cmdRootNoRun.ResetCommands()
+- cmdRootSameName.ResetCommands()
+- cmdRootWithRun.ResetCommands()
+-}
+-
+-func initialize() *Command {
+- tt, tp, te = nil, nil, nil
+- var c = cmdRootNoRun
+- flagInit()
+- commandInit()
+- return c
+-}
+-
+-func initializeWithSameName() *Command {
+- tt, tp, te = nil, nil, nil
+- var c = cmdRootSameName
+- flagInit()
+- commandInit()
+- return c
+-}
+-
+-func initializeWithRootCmd() *Command {
+- cmdRootWithRun.ResetCommands()
+- tt, tp, te, rootcalled = nil, nil, nil, false
+- flagInit()
+- cmdRootWithRun.Flags().BoolVarP(&flagbr, "boolroot", "b", false, "help message for flag boolroot")
+- cmdRootWithRun.Flags().IntVarP(&flagir, "introot", "i", 321, "help message for flag introot")
+- commandInit()
+- return cmdRootWithRun
+-}
+-
+-type resulter struct {
+- Error error
+- Output string
+- Command *Command
+-}
+-
+-func fullSetupTest(input string) resulter {
+- c := initializeWithRootCmd()
+-
+- return fullTester(c, input)
+-}
+-
+-func noRRSetupTest(input string) resulter {
+- c := initialize()
+-
+- return fullTester(c, input)
+-}
+-
+-func fullTester(c *Command, input string) resulter {
+- buf := new(bytes.Buffer)
+- // Testing flag with invalid input
+- c.SetOutput(buf)
+- cmdEcho.AddCommand(cmdTimes)
+- c.AddCommand(cmdPrint, cmdEcho)
+- c.SetArgs(strings.Split(input, " "))
+-
+- err := c.Execute()
+- output := buf.String()
+-
+- return resulter{err, output, c}
+-}
+-
+-func checkResultContains(t *testing.T, x resulter, check string) {
+- if !strings.Contains(x.Output, check) {
+- t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", check, x.Output)
+- }
+-}
+-
+-func checkOutputContains(t *testing.T, c *Command, check string) {
+- buf := new(bytes.Buffer)
+- c.SetOutput(buf)
+- c.Execute()
+-
+- if !strings.Contains(buf.String(), check) {
+- t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", check, buf.String())
+- }
+-}
+-
+-func TestSingleCommand(t *testing.T) {
+- noRRSetupTest("print one two")
+-
+- if te != nil || tt != nil {
+- t.Error("Wrong command called")
+- }
+- if tp == nil {
+- t.Error("Wrong command called")
+- }
+- if strings.Join(tp, " ") != "one two" {
+- t.Error("Command didn't parse correctly")
+- }
+-}
+-
+-func TestChildCommand(t *testing.T) {
+- noRRSetupTest("echo times one two")
+-
+- if te != nil || tp != nil {
+- t.Error("Wrong command called")
+- }
+- if tt == nil {
+- t.Error("Wrong command called")
+- }
+- if strings.Join(tt, " ") != "one two" {
+- t.Error("Command didn't parse correctly")
+- }
+-}
+-
+-func TestCommandAlias(t *testing.T) {
+- noRRSetupTest("say times one two")
+-
+- if te != nil || tp != nil {
+- t.Error("Wrong command called")
+- }
+- if tt == nil {
+- t.Error("Wrong command called")
+- }
+- if strings.Join(tt, " ") != "one two" {
+- t.Error("Command didn't parse correctly")
+- }
+-}
+-
+-func TestPrefixMatching(t *testing.T) {
+- EnablePrefixMatching = true
+- noRRSetupTest("ech times one two")
+-
+- if te != nil || tp != nil {
+- t.Error("Wrong command called")
+- }
+- if tt == nil {
+- t.Error("Wrong command called")
+- }
+- if strings.Join(tt, " ") != "one two" {
+- t.Error("Command didn't parse correctly")
+- }
+-
+- EnablePrefixMatching = false
+-}
+-
+-func TestNoPrefixMatching(t *testing.T) {
+- EnablePrefixMatching = false
+-
+- noRRSetupTest("ech times one two")
+-
+- if !(tt == nil && te == nil && tp == nil) {
+- t.Error("Wrong command called")
+- }
+-}
+-
+-func TestAliasPrefixMatching(t *testing.T) {
+- EnablePrefixMatching = true
+- noRRSetupTest("sa times one two")
+-
+- if te != nil || tp != nil {
+- t.Error("Wrong command called")
+- }
+- if tt == nil {
+- t.Error("Wrong command called")
+- }
+- if strings.Join(tt, " ") != "one two" {
+- t.Error("Command didn't parse correctly")
+- }
+- EnablePrefixMatching = false
+-}
+-
+-func TestChildSameName(t *testing.T) {
+- c := initializeWithSameName()
+- c.AddCommand(cmdPrint, cmdEcho)
+- c.SetArgs(strings.Split("print one two", " "))
+- c.Execute()
+-
+- if te != nil || tt != nil {
+- t.Error("Wrong command called")
+- }
+- if tp == nil {
+- t.Error("Wrong command called")
+- }
+- if strings.Join(tp, " ") != "one two" {
+- t.Error("Command didn't parse correctly")
+- }
+-}
+-
+-func TestFlagLong(t *testing.T) {
+- noRRSetupTest("echo --intone=13 something here")
+-
+- if strings.Join(te, " ") != "something here" {
+- t.Errorf("flags didn't leave proper args remaining..%s given", te)
+- }
+- if flagi1 != 13 {
+- t.Errorf("int flag didn't get correct value, had %d", flagi1)
+- }
+- if flagi2 != 234 {
+- t.Errorf("default flag value changed, 234 expected, %d given", flagi2)
+- }
+-}
+-
+-func TestFlagShort(t *testing.T) {
+- noRRSetupTest("echo -i13 something here")
+-
+- if strings.Join(te, " ") != "something here" {
+- t.Errorf("flags didn't leave proper args remaining..%s given", te)
+- }
+- if flagi1 != 13 {
+- t.Errorf("int flag didn't get correct value, had %d", flagi1)
+- }
+- if flagi2 != 234 {
+- t.Errorf("default flag value changed, 234 expected, %d given", flagi2)
+- }
+-
+- noRRSetupTest("echo -i 13 something here")
+-
+- if strings.Join(te, " ") != "something here" {
+- t.Errorf("flags didn't leave proper args remaining..%s given", te)
+- }
+- if flagi1 != 13 {
+- t.Errorf("int flag didn't get correct value, had %d", flagi1)
+- }
+- if flagi2 != 234 {
+- t.Errorf("default flag value changed, 234 expected, %d given", flagi2)
+- }
+-
+- noRRSetupTest("print -i99 one two")
+-
+- if strings.Join(tp, " ") != "one two" {
+- t.Errorf("flags didn't leave proper args remaining..%s given", tp)
+- }
+- if flagi3 != 99 {
+- t.Errorf("int flag didn't get correct value, had %d", flagi3)
+- }
+- if flagi1 != 123 {
+- t.Errorf("default flag value changed on different command with same shortname, 234 expected, %d given", flagi2)
+- }
+-}
+-
+-func TestChildCommandFlags(t *testing.T) {
+- noRRSetupTest("echo times -j 99 one two")
+-
+- if strings.Join(tt, " ") != "one two" {
+- t.Errorf("flags didn't leave proper args remaining..%s given", tt)
+- }
+-
+- // Testing with flag that shouldn't be persistent
+- r := noRRSetupTest("echo times -j 99 -i77 one two")
+-
+- if r.Error == nil {
+- t.Errorf("invalid flag should generate error")
+- }
+-
+- if !strings.Contains(r.Output, "unknown shorthand") {
+- t.Errorf("Wrong error message displayed, \n %s", r.Output)
+- }
+-
+- if flagi2 != 99 {
+- t.Errorf("flag value should be 99, %d given", flagi2)
+- }
+-
+- if flagi1 != 123 {
+- t.Errorf("unset flag should have default value, expecting 123, given %d", flagi1)
+- }
+-
+- // Testing with flag only existing on child
+- r = noRRSetupTest("echo -j 99 -i77 one two")
+-
+- if r.Error == nil {
+- t.Errorf("invalid flag should generate error")
+- }
+-
+- if !strings.Contains(r.Output, "intone=123") {
+- t.Errorf("Wrong error message displayed, \n %s", r.Output)
+- }
+-
+- // Testing flag with invalid input
+- r = noRRSetupTest("echo -i10E")
+-
+- if r.Error == nil {
+- t.Errorf("invalid input should generate error")
+- }
+-
+- if !strings.Contains(r.Output, "invalid argument \"10E\" for -i10E") {
+- t.Errorf("Wrong error message displayed, \n %s", r.Output)
+- }
+-}
+-
+-func TestTrailingCommandFlags(t *testing.T) {
+- x := fullSetupTest("echo two -x")
+-
+- if x.Error == nil {
+- t.Errorf("invalid flag should generate error")
+- }
+-}
+-
+-func TestPersistentFlags(t *testing.T) {
+- fullSetupTest("echo -s something more here")
+-
+- // persistentFlag should act like normal flag on it's own command
+- if strings.Join(te, " ") != "more here" {
+- t.Errorf("flags didn't leave proper args remaining..%s given", te)
+- }
+-
+- // persistentFlag should act like normal flag on it's own command
+- if flags1 != "something" {
+- t.Errorf("string flag didn't get correct value, had %v", flags1)
+- }
+-
+- fullSetupTest("echo times -s again -c test here")
+-
+- if strings.Join(tt, " ") != "test here" {
+- t.Errorf("flags didn't leave proper args remaining..%s given", tt)
+- }
+-
+- if flags1 != "again" {
+- t.Errorf("string flag didn't get correct value, had %v", flags1)
+- }
+-
+- if flagb2 != true {
+- t.Errorf("local flag not parsed correctly. Expected false, had %v", flagb2)
+- }
+-}
+-
+-func TestHelpCommand(t *testing.T) {
+- c := fullSetupTest("help echo")
+- checkResultContains(t, c, cmdEcho.Long)
+-
+- r := fullSetupTest("help echo times")
+- checkResultContains(t, r, cmdTimes.Long)
+-}
+-
+-func TestRunnableRootCommand(t *testing.T) {
+- fullSetupTest("")
+-
+- if rootcalled != true {
+- t.Errorf("Root Function was not called")
+- }
+-}
+-
+-func TestRootFlags(t *testing.T) {
+- fullSetupTest("-i 17 -b")
+-
+- if flagbr != true {
+- t.Errorf("flag value should be true, %v given", flagbr)
+- }
+-
+- if flagir != 17 {
+- t.Errorf("flag value should be 17, %d given", flagir)
+- }
+-}
+-
+-func TestRootHelp(t *testing.T) {
+- x := fullSetupTest("--help")
+-
+- checkResultContains(t, x, "Available Commands:")
+-
+- if strings.Contains(x.Output, "unknown flag: --help") {
+- t.Errorf("--help shouldn't trigger an error, Got: \n %s", x.Output)
+- }
+-
+- x = fullSetupTest("echo --help")
+-
+- checkResultContains(t, x, "Available Commands:")
+-
+- if strings.Contains(x.Output, "unknown flag: --help") {
+- t.Errorf("--help shouldn't trigger an error, Got: \n %s", x.Output)
+- }
+-
+-}
+-
+-func TestFlagsBeforeCommand(t *testing.T) {
+- // short without space
+- x := fullSetupTest("-i10 echo")
+- if x.Error != nil {
+- t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error)
+- }
+-
+- // short (int) with equals
+- // It appears that pflags doesn't support this...
+- // Commenting out until support can be added
+-
+- //x = noRRSetupTest("echo -i=10")
+- //if x.Error != nil {
+- //t.Errorf("Valid Input shouldn't have errors, got:\n %s", x.Error)
+- //}
+-
+- // long with equals
+- x = noRRSetupTest("--intone=123 echo one two")
+- if x.Error != nil {
+- t.Errorf("Valid Input shouldn't have errors, got:\n %s", x.Error)
+- }
+-
+- // With parsing error properly reported
+- x = fullSetupTest("-i10E echo")
+- if !strings.Contains(x.Output, "invalid argument \"10E\" for -i10E") {
+- t.Errorf("Wrong error message displayed, \n %s", x.Output)
+- }
+-
+- //With quotes
+- x = fullSetupTest("-s=\"walking\" echo")
+- if x.Error != nil {
+- t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error)
+- }
+-
+- //With quotes and space
+- x = fullSetupTest("-s=\"walking fast\" echo")
+- if x.Error != nil {
+- t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error)
+- }
+-
+- //With inner quote
+- x = fullSetupTest("-s=\"walking \\\"Inner Quote\\\" fast\" echo")
+- if x.Error != nil {
+- t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error)
+- }
+-
+- //With quotes and space
+- x = fullSetupTest("-s=\"walking \\\"Inner Quote\\\" fast\" echo")
+- if x.Error != nil {
+- t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error)
+- }
+-
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/command.go b/Godeps/_workspace/src/github.com/spf13/cobra/command.go
+deleted file mode 100644
+index 1337065..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/cobra/command.go
++++ /dev/null
+@@ -1,764 +0,0 @@
+-// Copyright © 2013 Steve Francia <spf at spf13.com>.
+-//
+-// Licensed under the Apache License, Version 2.0 (the "License");
+-// you may not use this file except in compliance with the License.
+-// You may obtain a copy of the License at
+-// http://www.apache.org/licenses/LICENSE-2.0
+-//
+-// Unless required by applicable law or agreed to in writing, software
+-// distributed under the License is distributed on an "AS IS" BASIS,
+-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-// See the License for the specific language governing permissions and
+-// limitations under the License.
+-
+-// Commands similar to git, go tools and other modern CLI tools
+-// inspired by go, go-Commander, gh and subcommand
+-
+-package cobra
+-
+-import (
+- "bytes"
+- "fmt"
+- "io"
+- "os"
+- "strings"
+-
+- flag "github.com/spf13/pflag"
+-)
+-
+-// Command is just that, a command for your application.
+-// eg. 'go run' ... 'run' is the command. Cobra requires
+-// you to define the usage and description as part of your command
+-// definition to ensure usability.
+-type Command struct {
+- // Name is the command name, usually the executable's name.
+- name string
+- // The one-line usage message.
+- Use string
+- // An array of aliases that can be used instead of the first word in Use.
+- Aliases []string
+- // The short description shown in the 'help' output.
+- Short string
+- // The long message shown in the 'help <this-command>' output.
+- Long string
+- // Set of flags specific to this command.
+- flags *flag.FlagSet
+- // Set of flags children commands will inherit
+- pflags *flag.FlagSet
+- // Run runs the command.
+- // The args are the arguments after the command name.
+- Run func(cmd *Command, args []string)
+- // Commands is the list of commands supported by this program.
+- commands []*Command
+- // Parent Command for this command
+- parent *Command
+- // max lengths of commands' string lengths for use in padding
+- commandsMaxUseLen int
+- commandsMaxCommandPathLen int
+-
+- flagErrorBuf *bytes.Buffer
+-
+- args []string
+- output *io.Writer // nil means stderr; use Out() method instead
+- usageFunc func(*Command) error // Usage can be defined by application
+- usageTemplate string // Can be defined by Application
+- helpTemplate string // Can be defined by Application
+- helpFunc func(*Command, []string) // Help can be defined by application
+- helpCommand *Command // The help command
+- helpFlagVal bool
+-}
+-
+-// os.Args[1:] by default, if desired, can be overridden
+-// particularly useful when testing.
+-func (c *Command) SetArgs(a []string) {
+- c.args = a
+-}
+-
+-func (c *Command) Out() io.Writer {
+- if c.output != nil {
+- return *c.output
+- }
+-
+- if c.HasParent() {
+- return c.parent.Out()
+- } else {
+- return os.Stderr
+- }
+-}
+-
+-// SetOutput sets the destination for usage and error messages.
+-// If output is nil, os.Stderr is used.
+-func (c *Command) SetOutput(output io.Writer) {
+- c.output = &output
+-}
+-
+-// Usage can be defined by application
+-func (c *Command) SetUsageFunc(f func(*Command) error) {
+- c.usageFunc = f
+-}
+-
+-// Can be defined by Application
+-func (c *Command) SetUsageTemplate(s string) {
+- c.usageTemplate = s
+-}
+-
+-// Can be defined by Application
+-func (c *Command) SetHelpFunc(f func(*Command, []string)) {
+- c.helpFunc = f
+-}
+-
+-func (c *Command) SetHelpCommand(cmd *Command) {
+- c.helpCommand = cmd
+-}
+-
+-// Can be defined by Application
+-func (c *Command) SetHelpTemplate(s string) {
+- c.helpTemplate = s
+-}
+-
+-func (c *Command) UsageFunc() (f func(*Command) error) {
+- if c.usageFunc != nil {
+- return c.usageFunc
+- }
+-
+- if c.HasParent() {
+- return c.parent.UsageFunc()
+- } else {
+- return func(c *Command) error {
+- err := tmpl(c.Out(), c.UsageTemplate(), c)
+- return err
+- }
+- }
+-}
+-func (c *Command) HelpFunc() func(*Command, []string) {
+- if c.helpFunc != nil {
+- return c.helpFunc
+- }
+-
+- if c.HasParent() {
+- return c.parent.HelpFunc()
+- } else {
+- return func(c *Command, args []string) {
+- if len(args) == 0 {
+- // Help called without any topic, calling on root
+- c.Root().Help()
+- return
+- }
+-
+- cmd, _, e := c.Root().Find(args)
+- if cmd == nil || e != nil {
+- c.Printf("Unknown help topic %#q.", args)
+-
+- c.Root().Usage()
+- } else {
+- err := cmd.Help()
+- if err != nil {
+- c.Println(err)
+- }
+- }
+- }
+- }
+-}
+-
+-var minUsagePadding int = 25
+-
+-func (c *Command) UsagePadding() int {
+- if c.parent == nil || minUsagePadding > c.parent.commandsMaxUseLen {
+- return minUsagePadding
+- } else {
+- return c.parent.commandsMaxUseLen
+- }
+-}
+-
+-var minCommandPathPadding int = 11
+-
+-func (c *Command) CommandPathPadding() int {
+- if c.parent == nil || minCommandPathPadding > c.parent.commandsMaxCommandPathLen {
+- return minCommandPathPadding
+- } else {
+- return c.parent.commandsMaxCommandPathLen
+- }
+-}
+-
+-func (c *Command) UsageTemplate() string {
+- if c.usageTemplate != "" {
+- return c.usageTemplate
+- }
+-
+- if c.HasParent() {
+- return c.parent.UsageTemplate()
+- } else {
+- return `{{ $cmd := . }}
+-Usage: {{if .Runnable}}
+- {{.UseLine}}{{if .HasFlags}} [flags]{{end}}{{end}}{{if .HasSubCommands}}
+- {{ .CommandPath}} [command]{{end}}{{if gt .Aliases 0}}
+-
+-Aliases:
+- {{.NameAndAliases}}{{end}}
+-{{ if .HasSubCommands}}
+-Available Commands: {{range .Commands}}{{if .Runnable}}
+- {{rpad .Use .UsagePadding }} {{.Short}}{{end}}{{end}}
+-{{end}}
+-{{ if .HasFlags}} Available Flags:
+-{{.Flags.FlagUsages}}{{end}}{{if .HasParent}}{{if and (gt .Commands 0) (gt .Parent.Commands 1) }}
+-Additional help topics: {{if gt .Commands 0 }}{{range .Commands}}{{if not .Runnable}} {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if gt .Parent.Commands 1 }}{{range .Parent.Commands}}{{if .Runnable}}{{if not (eq .Name $cmd.Name) }}{{end}}
+- {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{end}}
+-{{end}}
+-Use "{{.Root.Name}} help [command]" for more information about that command.
+-`
+- }
+-}
+-
+-func (c *Command) HelpTemplate() string {
+- if c.helpTemplate != "" {
+- return c.helpTemplate
+- }
+-
+- if c.HasParent() {
+- return c.parent.HelpTemplate()
+- } else {
+- return `{{.Long | trim}}
+-{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}
+-`
+- }
+-}
+-
+-// Really only used when casting a command to a commander
+-func (c *Command) resetChildrensParents() {
+- for _, x := range c.commands {
+- x.parent = c
+- }
+-}
+-
+-func stripFlags(args []string) []string {
+- if len(args) < 1 {
+- return args
+- }
+-
+- commands := []string{}
+-
+- inQuote := false
+- for _, y := range args {
+- if !inQuote {
+- switch {
+- case strings.HasPrefix(y, "\""):
+- inQuote = true
+- case strings.Contains(y, "=\""):
+- inQuote = true
+- case !strings.HasPrefix(y, "-"):
+- commands = append(commands, y)
+- }
+- }
+-
+- if strings.HasSuffix(y, "\"") && !strings.HasSuffix(y, "\\\"") {
+- inQuote = false
+- }
+- }
+-
+- return commands
+-}
+-
+-func argsMinusX(args []string, x string) []string {
+- newargs := []string{}
+-
+- for _, y := range args {
+- if x != y {
+- newargs = append(newargs, y)
+- }
+- }
+- return newargs
+-}
+-
+-// find the target command given the args and command tree
+-// Meant to be run on the highest node. Only searches down.
+-func (c *Command) Find(arrs []string) (*Command, []string, error) {
+- if c == nil {
+- return nil, nil, fmt.Errorf("Called find() on a nil Command")
+- }
+-
+- if len(arrs) == 0 {
+- return c.Root(), arrs, nil
+- }
+-
+- var innerfind func(*Command, []string) (*Command, []string)
+-
+- innerfind = func(c *Command, args []string) (*Command, []string) {
+- if len(args) > 0 && c.HasSubCommands() {
+- argsWOflags := stripFlags(args)
+- if len(argsWOflags) > 0 {
+- matches := make([]*Command, 0)
+- for _, cmd := range c.commands {
+- if cmd.Name() == argsWOflags[0] || cmd.HasAlias(argsWOflags[0]) { // exact name or alias match
+- return innerfind(cmd, argsMinusX(args, argsWOflags[0]))
+- } else if EnablePrefixMatching {
+- if strings.HasPrefix(cmd.Name(), argsWOflags[0]) { // prefix match
+- matches = append(matches, cmd)
+- }
+- for _, x := range cmd.Aliases {
+- if strings.HasPrefix(x, argsWOflags[0]) {
+- matches = append(matches, cmd)
+- }
+- }
+- }
+- }
+-
+- // only accept a single prefix match - multiple matches would be ambiguous
+- if len(matches) == 1 {
+- return innerfind(matches[0], argsMinusX(args, argsWOflags[0]))
+- }
+- }
+- }
+-
+- return c, args
+- }
+-
+- commandFound, a := innerfind(c, arrs)
+-
+- // if commander returned and the first argument (if it exists) doesn't
+- // match the command name, return nil & error
+- if commandFound.Name() == c.Name() && len(arrs[0]) > 0 && commandFound.Name() != arrs[0] {
+- return nil, a, fmt.Errorf("unknown command %q\nRun 'help' for usage.\n", a[0])
+- }
+-
+- return commandFound, a, nil
+-}
+-
+-func (c *Command) Root() *Command {
+- var findRoot func(*Command) *Command
+-
+- findRoot = func(x *Command) *Command {
+- if x.HasParent() {
+- return findRoot(x.parent)
+- } else {
+- return x
+- }
+- }
+-
+- return findRoot(c)
+-}
+-
+-// execute the command determined by args and the command tree
+-func (c *Command) findAndExecute(args []string) (err error) {
+-
+- cmd, a, e := c.Find(args)
+- if e != nil {
+- return e
+- }
+- return cmd.execute(a)
+-}
+-
+-func (c *Command) execute(a []string) (err error) {
+- if c == nil {
+- return fmt.Errorf("Called Execute() on a nil Command")
+- }
+-
+- err = c.ParseFlags(a)
+-
+- if err != nil {
+- return err
+- } else {
+- // If help is called, regardless of other flags, we print that
+- if c.helpFlagVal {
+- c.Help()
+- return nil
+- }
+-
+- c.preRun()
+- argWoFlags := c.Flags().Args()
+- c.Run(c, argWoFlags)
+- return nil
+- }
+-}
+-
+-func (c *Command) preRun() {
+- for _, x := range initializers {
+- x()
+- }
+-}
+-
+-func (c *Command) errorMsgFromParse() string {
+- s := c.flagErrorBuf.String()
+-
+- x := strings.Split(s, "\n")
+-
+- if len(x) > 0 {
+- return x[0]
+- } else {
+- return ""
+- }
+-}
+-
+-// Call execute to use the args (os.Args[1:] by default)
+-// and run through the command tree finding appropriate matches
+-// for commands and then corresponding flags.
+-func (c *Command) Execute() (err error) {
+-
+- // Regardless of what command execute is called on, run on Root only
+- if c.HasParent() {
+- return c.Root().Execute()
+- }
+-
+- // initialize help as the last point possible to allow for user
+- // overriding
+- c.initHelp()
+-
+- var args []string
+-
+- if len(c.args) == 0 {
+- args = os.Args[1:]
+- } else {
+- args = c.args
+- }
+-
+- if len(args) == 0 {
+- // Only the executable is called and the root is runnable, run it
+- if c.Runnable() {
+- err = c.execute([]string(nil))
+- } else {
+- c.Help()
+- }
+- } else {
+- err = c.findAndExecute(args)
+- }
+-
+- // Now handle the case where the root is runnable and only flags are provided
+- if err != nil && c.Runnable() {
+- // This is pretty much a custom version of the *Command.execute method
+- // with a few differences because it's the final command (no fall back)
+- e := c.ParseFlags(args)
+- if e != nil {
+- // Flags parsing had an error.
+- // If an error happens here, we have to report it to the user
+- c.Println(c.errorMsgFromParse())
+- c.Usage()
+- return e
+- } else {
+- // If help is called, regardless of other flags, we print that
+- if c.helpFlagVal {
+- c.Help()
+- return nil
+- }
+-
+- argWoFlags := c.Flags().Args()
+- if len(argWoFlags) > 0 {
+- // If there are arguments (not flags) one of the earlier
+- // cases should have caught it.. It means invalid usage
+- // print the usage
+- c.Usage()
+- } else {
+- // Only flags left... Call root.Run
+- c.preRun()
+- c.Run(c, argWoFlags)
+- err = nil
+- }
+- }
+- }
+-
+- if err != nil {
+- c.Println("Error:", err.Error())
+- c.Printf("%v: invalid command %#q\n", c.Root().Name(), os.Args[1:])
+- c.Printf("Run '%v help' for usage\n", c.Root().Name())
+- }
+-
+- return
+-}
+-
+-func (c *Command) initHelp() {
+- if c.helpCommand == nil {
+- c.helpCommand = &Command{
+- Use: "help [command]",
+- Short: "Help about any command",
+- Long: `Help provides help for any command in the application.
+- Simply type ` + c.Name() + ` help [path to command] for full details.`,
+- Run: c.HelpFunc(),
+- }
+- }
+- c.AddCommand(c.helpCommand)
+-}
+-
+-// Used for testing
+-func (c *Command) ResetCommands() {
+- c.commands = nil
+-}
+-
+-func (c *Command) Commands() []*Command {
+- return c.commands
+-}
+-
+-// Add one or many commands as children of this
+-func (c *Command) AddCommand(cmds ...*Command) {
+- for i, x := range cmds {
+- if cmds[i] == c {
+- panic("Command can't be a child of itself")
+- }
+- cmds[i].parent = c
+- // update max lengths
+- usageLen := len(x.Use)
+- if usageLen > c.commandsMaxUseLen {
+- c.commandsMaxUseLen = usageLen
+- }
+- commandPathLen := len(x.CommandPath())
+- if commandPathLen > c.commandsMaxCommandPathLen {
+- c.commandsMaxCommandPathLen = commandPathLen
+- }
+- c.commands = append(c.commands, x)
+- }
+-}
+-
+-// Convenience method to Print to the defined output
+-func (c *Command) Print(i ...interface{}) {
+- fmt.Fprint(c.Out(), i...)
+-}
+-
+-// Convenience method to Println to the defined output
+-func (c *Command) Println(i ...interface{}) {
+- str := fmt.Sprintln(i...)
+- c.Print(str)
+-}
+-
+-// Convenience method to Printf to the defined output
+-func (c *Command) Printf(format string, i ...interface{}) {
+- str := fmt.Sprintf(format, i...)
+- c.Print(str)
+-}
+-
+-// Output the usage for the command
+-// Used when a user provides invalid input
+-// Can be defined by user by overriding UsageFunc
+-func (c *Command) Usage() error {
+- c.mergePersistentFlags()
+- err := c.UsageFunc()(c)
+- return err
+-}
+-
+-// Output the help for the command
+-// Used when a user calls help [command]
+-// by the default HelpFunc in the commander
+-func (c *Command) Help() error {
+- c.mergePersistentFlags()
+- err := tmpl(c.Out(), c.HelpTemplate(), c)
+- return err
+-}
+-
+-func (c *Command) UsageString() string {
+- tmpOutput := c.output
+- bb := new(bytes.Buffer)
+- c.SetOutput(bb)
+- c.Usage()
+- c.output = tmpOutput
+- return bb.String()
+-}
+-
+-// The full path to this command
+-func (c *Command) CommandPath() string {
+- str := c.Name()
+- x := c
+- for x.HasParent() {
+- str = x.parent.Name() + " " + str
+- x = x.parent
+- }
+- return str
+-}
+-
+-//The full usage for a given command (including parents)
+-func (c *Command) UseLine() string {
+- str := ""
+- if c.HasParent() {
+- str = c.parent.CommandPath() + " "
+- }
+- return str + c.Use
+-}
+-
+-// For use in determining which flags have been assigned to which commands
+-// and which persist
+-func (c *Command) DebugFlags() {
+- c.Println("DebugFlags called on", c.Name())
+- var debugflags func(*Command)
+-
+- debugflags = func(x *Command) {
+- if x.HasFlags() || x.HasPersistentFlags() {
+- c.Println(x.Name())
+- }
+- if x.HasFlags() {
+- x.flags.VisitAll(func(f *flag.Flag) {
+- if x.HasPersistentFlags() {
+- if x.persistentFlag(f.Name) == nil {
+- c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [L]")
+- } else {
+- c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [LP]")
+- }
+- } else {
+- c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [L]")
+- }
+- })
+- }
+- if x.HasPersistentFlags() {
+- x.pflags.VisitAll(func(f *flag.Flag) {
+- if x.HasFlags() {
+- if x.flags.Lookup(f.Name) == nil {
+- c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [P]")
+- }
+- } else {
+- c.Println(" -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, " [P]")
+- }
+- })
+- }
+- c.Println(x.flagErrorBuf)
+- if x.HasSubCommands() {
+- for _, y := range x.commands {
+- debugflags(y)
+- }
+- }
+- }
+-
+- debugflags(c)
+-}
+-
+-// Name returns the command's name: the first word in the use line.
+-func (c *Command) Name() string {
+- if c.name != "" {
+- return c.name
+- }
+- name := c.Use
+- i := strings.Index(name, " ")
+- if i >= 0 {
+- name = name[:i]
+- }
+- return name
+-}
+-
+-// Determine if a given string is an alias of the command.
+-func (c *Command) HasAlias(s string) bool {
+- for _, a := range c.Aliases {
+- if a == s {
+- return true
+- }
+- }
+- return false
+-}
+-
+-func (c *Command) NameAndAliases() string {
+- return strings.Join(append([]string{c.Name()}, c.Aliases...), ", ")
+-}
+-
+-// Determine if the command is itself runnable
+-func (c *Command) Runnable() bool {
+- return c.Run != nil
+-}
+-
+-// Determine if the command has children commands
+-func (c *Command) HasSubCommands() bool {
+- return len(c.commands) > 0
+-}
+-
+-// Determine if the command is a child command
+-func (c *Command) HasParent() bool {
+- return c.parent != nil
+-}
+-
+-// Get the Commands FlagSet
+-func (c *Command) Flags() *flag.FlagSet {
+- if c.flags == nil {
+- c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
+- if c.flagErrorBuf == nil {
+- c.flagErrorBuf = new(bytes.Buffer)
+- }
+- c.flags.SetOutput(c.flagErrorBuf)
+- c.PersistentFlags().BoolVarP(&c.helpFlagVal, "help", "h", false, "help for "+c.Name())
+- }
+- return c.flags
+-}
+-
+-// Get the Commands Persistent FlagSet
+-func (c *Command) PersistentFlags() *flag.FlagSet {
+- if c.pflags == nil {
+- c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
+- if c.flagErrorBuf == nil {
+- c.flagErrorBuf = new(bytes.Buffer)
+- }
+- c.pflags.SetOutput(c.flagErrorBuf)
+- }
+- return c.pflags
+-}
+-
+-// For use in testing
+-func (c *Command) ResetFlags() {
+- c.flagErrorBuf = new(bytes.Buffer)
+- c.flagErrorBuf.Reset()
+- c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
+- c.flags.SetOutput(c.flagErrorBuf)
+- c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
+- c.pflags.SetOutput(c.flagErrorBuf)
+-}
+-
+-// Does the command contain flags (local not persistent)
+-func (c *Command) HasFlags() bool {
+- return c.Flags().HasFlags()
+-}
+-
+-// Does the command contain persistent flags
+-func (c *Command) HasPersistentFlags() bool {
+- return c.PersistentFlags().HasFlags()
+-}
+-
+-// Climbs up the command tree looking for matching flag
+-func (c *Command) Flag(name string) (flag *flag.Flag) {
+- flag = c.Flags().Lookup(name)
+-
+- if flag == nil {
+- flag = c.persistentFlag(name)
+- }
+-
+- return
+-}
+-
+-// recursively find matching persistent flag
+-func (c *Command) persistentFlag(name string) (flag *flag.Flag) {
+- if c.HasPersistentFlags() {
+- flag = c.PersistentFlags().Lookup(name)
+- }
+-
+- if flag == nil && c.HasParent() {
+- flag = c.parent.persistentFlag(name)
+- }
+- return
+-}
+-
+-// Parses persistent flag tree & local flags
+-func (c *Command) ParseFlags(args []string) (err error) {
+- c.mergePersistentFlags()
+- err = c.Flags().Parse(args)
+-
+- // The upstream library adds spaces to the error
+- // response regardless of success.
+- // Handling it here until fixing upstream
+- if len(strings.TrimSpace(c.flagErrorBuf.String())) > 1 {
+- return fmt.Errorf("%s", c.flagErrorBuf.String())
+- }
+-
+- //always return nil because upstream library is inconsistent & we always check the error buffer anyway
+- return nil
+-}
+-
+-func (c *Command) mergePersistentFlags() {
+- var rmerge func(x *Command)
+-
+- rmerge = func(x *Command) {
+- if x.HasPersistentFlags() {
+- x.PersistentFlags().VisitAll(func(f *flag.Flag) {
+- if c.Flags().Lookup(f.Name) == nil {
+- c.Flags().AddFlag(f)
+- }
+- })
+- }
+- if x.HasParent() {
+- rmerge(x.parent)
+- }
+- }
+-
+- rmerge(c)
+-}
+-
+-func (c *Command) Parent() *Command {
+- return c.parent
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE
+deleted file mode 100644
+index 63ed1cf..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE
++++ /dev/null
+@@ -1,28 +0,0 @@
+-Copyright (c) 2012 Alex Ogier. All rights reserved.
+-Copyright (c) 2012 The Go Authors. All rights reserved.
+-
+-Redistribution and use in source and binary forms, with or without
+-modification, are permitted provided that the following conditions are
+-met:
+-
+- * Redistributions of source code must retain the above copyright
+-notice, this list of conditions and the following disclaimer.
+- * Redistributions in binary form must reproduce the above
+-copyright notice, this list of conditions and the following disclaimer
+-in the documentation and/or other materials provided with the
+-distribution.
+- * Neither the name of Google Inc. nor the names of its
+-contributors may be used to endorse or promote products derived from
+-this software without specific prior written permission.
+-
+-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/README.md b/Godeps/_workspace/src/github.com/spf13/pflag/README.md
+deleted file mode 100644
+index a12d94d..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/README.md
++++ /dev/null
+@@ -1,155 +0,0 @@
+-## Description
+-
+-pflag is a drop-in replacement for Go's flag package, implementing
+-POSIX/GNU-style --flags.
+-
+-pflag is compatible with the [GNU extensions to the POSIX recommendations
+-for command-line options][1]. For a more precise description, see the
+-"Command-line flag syntax" section below.
+-
+-[1]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
+-
+-pflag is available under the same style of BSD license as the Go language,
+-which can be found in the LICENSE file.
+-
+-## Installation
+-
+-pflag is available using the standard `go get` command.
+-
+-Install by running:
+-
+- go get github.com/ogier/pflag
+-
+-Run tests by running:
+-
+- go test github.com/ogier/pflag
+-
+-## Usage
+-
+-pflag is a drop-in replacement of Go's native flag package. If you import
+-pflag under the name "flag" then all code should continue to function
+-with no changes.
+-
+-``` go
+-import flag "github.com/ogier/pflag"
+-```
+-
+-There is one exception to this: if you directly instantiate the Flag struct
+-there is one more field "Shorthand" that you will need to set.
+-Most code never instantiates this struct directly, and instead uses
+-functions such as String(), BoolVar(), and Var(), and is therefore
+-unaffected.
+-
+-Define flags using flag.String(), Bool(), Int(), etc.
+-
+-This declares an integer flag, -flagname, stored in the pointer ip, with type *int.
+-
+-``` go
+-var ip *int = flag.Int("flagname", 1234, "help message for flagname")
+-```
+-
+-If you like, you can bind the flag to a variable using the Var() functions.
+-
+-``` go
+-var flagvar int
+-func init() {
+- flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname")
+-}
+-```
+-
+-Or you can create custom flags that satisfy the Value interface (with
+-pointer receivers) and couple them to flag parsing by
+-
+-``` go
+-flag.Var(&flagVal, "name", "help message for flagname")
+-```
+-
+-For such flags, the default value is just the initial value of the variable.
+-
+-After all flags are defined, call
+-
+-``` go
+-flag.Parse()
+-```
+-
+-to parse the command line into the defined flags.
+-
+-Flags may then be used directly. If you're using the flags themselves,
+-they are all pointers; if you bind to variables, they're values.
+-
+-``` go
+-fmt.Println("ip has value ", *ip)
+-fmt.Println("flagvar has value ", flagvar)
+-```
+-
+-After parsing, the arguments after the flag are available as the
+-slice flag.Args() or individually as flag.Arg(i).
+-The arguments are indexed from 0 through flag.NArg()-1.
+-
+-The pflag package also defines some new functions that are not in flag,
+-that give one-letter shorthands for flags. You can use these by appending
+-'P' to the name of any function that defines a flag.
+-
+-``` go
+-var ip = flag.IntP("flagname", "f", 1234, "help message")
+-var flagvar bool
+-func init() {
+- flag.BoolVarP("boolname", "b", true, "help message")
+-}
+-flag.VarP(&flagVar, "varname", "v", 1234, "help message")
+-```
+-
+-Shorthand letters can be used with single dashes on the command line.
+-Boolean shorthand flags can be combined with other shorthand flags.
+-
+-The default set of command-line flags is controlled by
+-top-level functions. The FlagSet type allows one to define
+-independent sets of flags, such as to implement subcommands
+-in a command-line interface. The methods of FlagSet are
+-analogous to the top-level functions for the command-line
+-flag set.
+-
+-## Command line flag syntax
+-
+-```
+---flag // boolean flags only
+---flag=x
+-```
+-
+-Unlike the flag package, a single dash before an option means something
+-different than a double dash. Single dashes signify a series of shorthand
+-letters for flags. All but the last shorthand letter must be boolean flags.
+-
+-```
+-// boolean flags
+--f
+--abc
+-
+-// non-boolean flags
+--n 1234
+--Ifile
+-
+-// mixed
+--abcs "hello"
+--abcn1234
+-```
+-
+-Flag parsing stops after the terminator "--". Unlike the flag package,
+-flags can be interspersed with arguments anywhere on the command line
+-before this terminator.
+-
+-Integer flags accept 1234, 0664, 0x1234 and may be negative.
+-Boolean flags (in their long form) accept 1, 0, t, f, true, false,
+-TRUE, FALSE, True, False.
+-Duration flags accept any input valid for time.ParseDuration.
+-
+-## More info
+-
+-You can see the full reference documentation of the pflag package
+-[at godoc.org][3], or through go's standard documentation system by
+-running `godoc -http=:6060` and browsing to
+-[http://localhost:6060/pkg/github.com/ogier/pflag][2] after
+-installation.
+-
+-[2]: http://localhost:6060/pkg/github.com/ogier/pflag
+-[3]: http://godoc.org/github.com/ogier/pflag
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/bool.go b/Godeps/_workspace/src/github.com/spf13/pflag/bool.go
+deleted file mode 100644
+index 010576c..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/bool.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- bool Value
+-type boolValue bool
+-
+-func newBoolValue(val bool, p *bool) *boolValue {
+- *p = val
+- return (*boolValue)(p)
+-}
+-
+-func (b *boolValue) Set(s string) error {
+- v, err := strconv.ParseBool(s)
+- *b = boolValue(v)
+- return err
+-}
+-
+-func (b *boolValue) Type() string {
+- return "bool"
+-}
+-
+-func (b *boolValue) String() string { return fmt.Sprintf("%v", *b) }
+-
+-// BoolVar defines a bool flag with specified name, default value, and usage string.
+-// The argument p points to a bool variable in which to store the value of the flag.
+-func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string) {
+- f.VarP(newBoolValue(value, p), name, "", usage)
+-}
+-
+-// Like BoolVar, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) {
+- f.VarP(newBoolValue(value, p), name, shorthand, usage)
+-}
+-
+-// BoolVar defines a bool flag with specified name, default value, and usage string.
+-// The argument p points to a bool variable in which to store the value of the flag.
+-func BoolVar(p *bool, name string, value bool, usage string) {
+- CommandLine.VarP(newBoolValue(value, p), name, "", usage)
+-}
+-
+-// Like BoolVar, but accepts a shorthand letter that can be used after a single dash.
+-func BoolVarP(p *bool, name, shorthand string, value bool, usage string) {
+- CommandLine.VarP(newBoolValue(value, p), name, shorthand, usage)
+-}
+-
+-// Bool defines a bool flag with specified name, default value, and usage string.
+-// The return value is the address of a bool variable that stores the value of the flag.
+-func (f *FlagSet) Bool(name string, value bool, usage string) *bool {
+- p := new(bool)
+- f.BoolVarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Bool, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool {
+- p := new(bool)
+- f.BoolVarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Bool defines a bool flag with specified name, default value, and usage string.
+-// The return value is the address of a bool variable that stores the value of the flag.
+-func Bool(name string, value bool, usage string) *bool {
+- return CommandLine.BoolP(name, "", value, usage)
+-}
+-
+-// Like Bool, but accepts a shorthand letter that can be used after a single dash.
+-func BoolP(name, shorthand string, value bool, usage string) *bool {
+- return CommandLine.BoolP(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/duration.go b/Godeps/_workspace/src/github.com/spf13/pflag/duration.go
+deleted file mode 100644
+index 66ed7ac..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/duration.go
++++ /dev/null
+@@ -1,71 +0,0 @@
+-package pflag
+-
+-import "time"
+-
+-// -- time.Duration Value
+-type durationValue time.Duration
+-
+-func newDurationValue(val time.Duration, p *time.Duration) *durationValue {
+- *p = val
+- return (*durationValue)(p)
+-}
+-
+-func (d *durationValue) Set(s string) error {
+- v, err := time.ParseDuration(s)
+- *d = durationValue(v)
+- return err
+-}
+-
+-func (d *durationValue) Type() string {
+- return "duration"
+-}
+-
+-func (d *durationValue) String() string { return (*time.Duration)(d).String() }
+-
+-// DurationVar defines a time.Duration flag with specified name, default value, and usage string.
+-// The argument p points to a time.Duration variable in which to store the value of the flag.
+-func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) {
+- f.VarP(newDurationValue(value, p), name, "", usage)
+-}
+-
+-// Like DurationVar, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) {
+- f.VarP(newDurationValue(value, p), name, shorthand, usage)
+-}
+-
+-// DurationVar defines a time.Duration flag with specified name, default value, and usage string.
+-// The argument p points to a time.Duration variable in which to store the value of the flag.
+-func DurationVar(p *time.Duration, name string, value time.Duration, usage string) {
+- CommandLine.VarP(newDurationValue(value, p), name, "", usage)
+-}
+-
+-// Like DurationVar, but accepts a shorthand letter that can be used after a single dash.
+-func DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) {
+- CommandLine.VarP(newDurationValue(value, p), name, shorthand, usage)
+-}
+-
+-// Duration defines a time.Duration flag with specified name, default value, and usage string.
+-// The return value is the address of a time.Duration variable that stores the value of the flag.
+-func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration {
+- p := new(time.Duration)
+- f.DurationVarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Duration, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration {
+- p := new(time.Duration)
+- f.DurationVarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Duration defines a time.Duration flag with specified name, default value, and usage string.
+-// The return value is the address of a time.Duration variable that stores the value of the flag.
+-func Duration(name string, value time.Duration, usage string) *time.Duration {
+- return CommandLine.DurationP(name, "", value, usage)
+-}
+-
+-// Like Duration, but accepts a shorthand letter that can be used after a single dash.
+-func DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration {
+- return CommandLine.DurationP(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/example_test.go b/Godeps/_workspace/src/github.com/spf13/pflag/example_test.go
+deleted file mode 100644
+index 03ebeaa..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/example_test.go
++++ /dev/null
+@@ -1,73 +0,0 @@
+-// Copyright 2012 The Go Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style
+-// license that can be found in the LICENSE file.
+-
+-// These examples demonstrate more intricate uses of the flag package.
+-package pflag_test
+-
+-import (
+- "errors"
+- "fmt"
+- "strings"
+- "time"
+-
+- flag "github.com/ogier/pflag"
+-)
+-
+-// Example 1: A single string flag called "species" with default value "gopher".
+-var species = flag.String("species", "gopher", "the species we are studying")
+-
+-// Example 2: A flag with a shorthand letter.
+-var gopherType = flag.StringP("gopher_type", "g", "pocket", "the variety of gopher")
+-
+-// Example 3: A user-defined flag type, a slice of durations.
+-type interval []time.Duration
+-
+-// String is the method to format the flag's value, part of the flag.Value interface.
+-// The String method's output will be used in diagnostics.
+-func (i *interval) String() string {
+- return fmt.Sprint(*i)
+-}
+-
+-// Set is the method to set the flag value, part of the flag.Value interface.
+-// Set's argument is a string to be parsed to set the flag.
+-// It's a comma-separated list, so we split it.
+-func (i *interval) Set(value string) error {
+- // If we wanted to allow the flag to be set multiple times,
+- // accumulating values, we would delete this if statement.
+- // That would permit usages such as
+- // -deltaT 10s -deltaT 15s
+- // and other combinations.
+- if len(*i) > 0 {
+- return errors.New("interval flag already set")
+- }
+- for _, dt := range strings.Split(value, ",") {
+- duration, err := time.ParseDuration(dt)
+- if err != nil {
+- return err
+- }
+- *i = append(*i, duration)
+- }
+- return nil
+-}
+-
+-// Define a flag to accumulate durations. Because it has a special type,
+-// we need to use the Var function and therefore create the flag during
+-// init.
+-
+-var intervalFlag interval
+-
+-func init() {
+- // Tie the command-line flag to the intervalFlag variable and
+- // set a usage message.
+- flag.Var(&intervalFlag, "deltaT", "comma-separated list of intervals to use between events")
+-}
+-
+-func Example() {
+- // All the interesting pieces are with the variables declared above, but
+- // to enable the flag package to see the flags defined there, one must
+- // execute, typically at the start of main (not init!):
+- // flag.Parse()
+- // We don't run it here because this is not a main function and
+- // the testing suite has already parsed the flags.
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/export_test.go b/Godeps/_workspace/src/github.com/spf13/pflag/export_test.go
+deleted file mode 100644
+index 9318fee..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/export_test.go
++++ /dev/null
+@@ -1,29 +0,0 @@
+-// Copyright 2010 The Go Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style
+-// license that can be found in the LICENSE file.
+-
+-package pflag
+-
+-import (
+- "io/ioutil"
+- "os"
+-)
+-
+-// Additional routines compiled into the package only during testing.
+-
+-// ResetForTesting clears all flag state and sets the usage function as directed.
+-// After calling ResetForTesting, parse errors in flag handling will not
+-// exit the program.
+-func ResetForTesting(usage func()) {
+- CommandLine = &FlagSet{
+- name: os.Args[0],
+- errorHandling: ContinueOnError,
+- output: ioutil.Discard,
+- }
+- Usage = usage
+-}
+-
+-// GetCommandLine returns the default FlagSet.
+-func GetCommandLine() *FlagSet {
+- return CommandLine
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/flag.go b/Godeps/_workspace/src/github.com/spf13/pflag/flag.go
+deleted file mode 100644
+index 47761a0..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/flag.go
++++ /dev/null
+@@ -1,621 +0,0 @@
+-// Copyright 2009 The Go Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style
+-// license that can be found in the LICENSE file.
+-
+-/*
+- pflag is a drop-in replacement for Go's flag package, implementing
+- POSIX/GNU-style --flags.
+-
+- pflag is compatible with the GNU extensions to the POSIX recommendations
+- for command-line options. See
+- http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
+-
+- Usage:
+-
+- pflag is a drop-in replacement of Go's native flag package. If you import
+- pflag under the name "flag" then all code should continue to function
+- with no changes.
+-
+- import flag "github.com/ogier/pflag"
+-
+- There is one exception to this: if you directly instantiate the Flag struct
+- there is one more field "Shorthand" that you will need to set.
+- Most code never instantiates this struct directly, and instead uses
+- functions such as String(), BoolVar(), and Var(), and is therefore
+- unaffected.
+-
+- Define flags using flag.String(), Bool(), Int(), etc.
+-
+- This declares an integer flag, -flagname, stored in the pointer ip, with type *int.
+- var ip = flag.Int("flagname", 1234, "help message for flagname")
+- If you like, you can bind the flag to a variable using the Var() functions.
+- var flagvar int
+- func init() {
+- flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname")
+- }
+- Or you can create custom flags that satisfy the Value interface (with
+- pointer receivers) and couple them to flag parsing by
+- flag.Var(&flagVal, "name", "help message for flagname")
+- For such flags, the default value is just the initial value of the variable.
+-
+- After all flags are defined, call
+- flag.Parse()
+- to parse the command line into the defined flags.
+-
+- Flags may then be used directly. If you're using the flags themselves,
+- they are all pointers; if you bind to variables, they're values.
+- fmt.Println("ip has value ", *ip)
+- fmt.Println("flagvar has value ", flagvar)
+-
+- After parsing, the arguments after the flag are available as the
+- slice flag.Args() or individually as flag.Arg(i).
+- The arguments are indexed from 0 through flag.NArg()-1.
+-
+- The pflag package also defines some new functions that are not in flag,
+- that give one-letter shorthands for flags. You can use these by appending
+- 'P' to the name of any function that defines a flag.
+- var ip = flag.IntP("flagname", "f", 1234, "help message")
+- var flagvar bool
+- func init() {
+- flag.BoolVarP("boolname", "b", true, "help message")
+- }
+- flag.VarP(&flagVar, "varname", "v", 1234, "help message")
+- Shorthand letters can be used with single dashes on the command line.
+- Boolean shorthand flags can be combined with other shorthand flags.
+-
+- Command line flag syntax:
+- --flag // boolean flags only
+- --flag=x
+-
+- Unlike the flag package, a single dash before an option means something
+- different than a double dash. Single dashes signify a series of shorthand
+- letters for flags. All but the last shorthand letter must be boolean flags.
+- // boolean flags
+- -f
+- -abc
+- // non-boolean flags
+- -n 1234
+- -Ifile
+- // mixed
+- -abcs "hello"
+- -abcn1234
+-
+- Flag parsing stops after the terminator "--". Unlike the flag package,
+- flags can be interspersed with arguments anywhere on the command line
+- before this terminator.
+-
+- Integer flags accept 1234, 0664, 0x1234 and may be negative.
+- Boolean flags (in their long form) accept 1, 0, t, f, true, false,
+- TRUE, FALSE, True, False.
+- Duration flags accept any input valid for time.ParseDuration.
+-
+- The default set of command-line flags is controlled by
+- top-level functions. The FlagSet type allows one to define
+- independent sets of flags, such as to implement subcommands
+- in a command-line interface. The methods of FlagSet are
+- analogous to the top-level functions for the command-line
+- flag set.
+-*/
+-package pflag
+-
+-import (
+- "bytes"
+- "errors"
+- "fmt"
+- "io"
+- "os"
+- "sort"
+- "strings"
+-)
+-
+-// ErrHelp is the error returned if the flag -help is invoked but no such flag is defined.
+-var ErrHelp = errors.New("pflag: help requested")
+-
+-// ErrorHandling defines how to handle flag parsing errors.
+-type ErrorHandling int
+-
+-const (
+- ContinueOnError ErrorHandling = iota
+- ExitOnError
+- PanicOnError
+-)
+-
+-// A FlagSet represents a set of defined flags.
+-type FlagSet struct {
+- // Usage is the function called when an error occurs while parsing flags.
+- // The field is a function (not a method) that may be changed to point to
+- // a custom error handler.
+- Usage func()
+-
+- name string
+- parsed bool
+- actual map[string]*Flag
+- formal map[string]*Flag
+- shorthands map[byte]*Flag
+- args []string // arguments after flags
+- exitOnError bool // does the program exit if there's an error?
+- errorHandling ErrorHandling
+- output io.Writer // nil means stderr; use out() accessor
+- interspersed bool // allow interspersed option/non-option args
+-}
+-
+-// A Flag represents the state of a flag.
+-type Flag struct {
+- Name string // name as it appears on command line
+- Shorthand string // one-letter abbreviated flag
+- Usage string // help message
+- Value Value // value as set
+- DefValue string // default value (as text); for usage message
+- Changed bool // If the user set the value (or if left to default)
+-}
+-
+-// Value is the interface to the dynamic value stored in a flag.
+-// (The default value is represented as a string.)
+-type Value interface {
+- String() string
+- Set(string) error
+- Type() string
+-}
+-
+-// sortFlags returns the flags as a slice in lexicographical sorted order.
+-func sortFlags(flags map[string]*Flag) []*Flag {
+- list := make(sort.StringSlice, len(flags))
+- i := 0
+- for _, f := range flags {
+- list[i] = f.Name
+- i++
+- }
+- list.Sort()
+- result := make([]*Flag, len(list))
+- for i, name := range list {
+- result[i] = flags[name]
+- }
+- return result
+-}
+-
+-func (f *FlagSet) out() io.Writer {
+- if f.output == nil {
+- return os.Stderr
+- }
+- return f.output
+-}
+-
+-// SetOutput sets the destination for usage and error messages.
+-// If output is nil, os.Stderr is used.
+-func (f *FlagSet) SetOutput(output io.Writer) {
+- f.output = output
+-}
+-
+-// VisitAll visits the flags in lexicographical order, calling fn for each.
+-// It visits all flags, even those not set.
+-func (f *FlagSet) VisitAll(fn func(*Flag)) {
+- for _, flag := range sortFlags(f.formal) {
+- fn(flag)
+- }
+-}
+-
+-func (f *FlagSet) HasFlags() bool {
+- return len(f.formal) > 0
+-}
+-
+-// VisitAll visits the command-line flags in lexicographical order, calling
+-// fn for each. It visits all flags, even those not set.
+-func VisitAll(fn func(*Flag)) {
+- CommandLine.VisitAll(fn)
+-}
+-
+-// Visit visits the flags in lexicographical order, calling fn for each.
+-// It visits only those flags that have been set.
+-func (f *FlagSet) Visit(fn func(*Flag)) {
+- for _, flag := range sortFlags(f.actual) {
+- fn(flag)
+- }
+-}
+-
+-// Visit visits the command-line flags in lexicographical order, calling fn
+-// for each. It visits only those flags that have been set.
+-func Visit(fn func(*Flag)) {
+- CommandLine.Visit(fn)
+-}
+-
+-// Lookup returns the Flag structure of the named flag, returning nil if none exists.
+-func (f *FlagSet) Lookup(name string) *Flag {
+- return f.formal[name]
+-}
+-
+-// Lookup returns the Flag structure of the named command-line flag,
+-// returning nil if none exists.
+-func Lookup(name string) *Flag {
+- return CommandLine.formal[name]
+-}
+-
+-// Set sets the value of the named flag.
+-func (f *FlagSet) Set(name, value string) error {
+- flag, ok := f.formal[name]
+- if !ok {
+- return fmt.Errorf("no such flag -%v", name)
+- }
+- err := flag.Value.Set(value)
+- if err != nil {
+- return err
+- }
+- if f.actual == nil {
+- f.actual = make(map[string]*Flag)
+- }
+- f.actual[name] = flag
+- f.Lookup(name).Changed = true
+- return nil
+-}
+-
+-// Set sets the value of the named command-line flag.
+-func Set(name, value string) error {
+- return CommandLine.Set(name, value)
+-}
+-
+-// PrintDefaults prints, to standard error unless configured
+-// otherwise, the default values of all defined flags in the set.
+-func (f *FlagSet) PrintDefaults() {
+- f.VisitAll(func(flag *Flag) {
+- format := "--%s=%s: %s\n"
+- if _, ok := flag.Value.(*stringValue); ok {
+- // put quotes on the value
+- format = "--%s=%q: %s\n"
+- }
+- if len(flag.Shorthand) > 0 {
+- format = " -%s, " + format
+- } else {
+- format = " %s " + format
+- }
+- fmt.Fprintf(f.out(), format, flag.Shorthand, flag.Name, flag.DefValue, flag.Usage)
+- })
+-}
+-
+-func (f *FlagSet) FlagUsages() string {
+- x := new(bytes.Buffer)
+-
+- f.VisitAll(func(flag *Flag) {
+- format := "--%s=%s: %s\n"
+- if _, ok := flag.Value.(*stringValue); ok {
+- // put quotes on the value
+- format = "--%s=%q: %s\n"
+- }
+- if len(flag.Shorthand) > 0 {
+- format = " -%s, " + format
+- } else {
+- format = " %s " + format
+- }
+- fmt.Fprintf(x, format, flag.Shorthand, flag.Name, flag.DefValue, flag.Usage)
+- })
+-
+- return x.String()
+-}
+-
+-// PrintDefaults prints to standard error the default values of all defined command-line flags.
+-func PrintDefaults() {
+- CommandLine.PrintDefaults()
+-}
+-
+-// defaultUsage is the default function to print a usage message.
+-func defaultUsage(f *FlagSet) {
+- fmt.Fprintf(f.out(), "Usage of %s:\n", f.name)
+- f.PrintDefaults()
+-}
+-
+-// NOTE: Usage is not just defaultUsage(CommandLine)
+-// because it serves (via godoc flag Usage) as the example
+-// for how to write your own usage function.
+-
+-// Usage prints to standard error a usage message documenting all defined command-line flags.
+-// The function is a variable that may be changed to point to a custom function.
+-var Usage = func() {
+- fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
+- PrintDefaults()
+-}
+-
+-// NFlag returns the number of flags that have been set.
+-func (f *FlagSet) NFlag() int { return len(f.actual) }
+-
+-// NFlag returns the number of command-line flags that have been set.
+-func NFlag() int { return len(CommandLine.actual) }
+-
+-// Arg returns the i'th argument. Arg(0) is the first remaining argument
+-// after flags have been processed.
+-func (f *FlagSet) Arg(i int) string {
+- if i < 0 || i >= len(f.args) {
+- return ""
+- }
+- return f.args[i]
+-}
+-
+-// Arg returns the i'th command-line argument. Arg(0) is the first remaining argument
+-// after flags have been processed.
+-func Arg(i int) string {
+- return CommandLine.Arg(i)
+-}
+-
+-// NArg is the number of arguments remaining after flags have been processed.
+-func (f *FlagSet) NArg() int { return len(f.args) }
+-
+-// NArg is the number of arguments remaining after flags have been processed.
+-func NArg() int { return len(CommandLine.args) }
+-
+-// Args returns the non-flag arguments.
+-func (f *FlagSet) Args() []string { return f.args }
+-
+-// Args returns the non-flag command-line arguments.
+-func Args() []string { return CommandLine.args }
+-
+-// Var defines a flag with the specified name and usage string. The type and
+-// value of the flag are represented by the first argument, of type Value, which
+-// typically holds a user-defined implementation of Value. For instance, the
+-// caller could create a flag that turns a comma-separated string into a slice
+-// of strings by giving the slice the methods of Value; in particular, Set would
+-// decompose the comma-separated string into the slice.
+-func (f *FlagSet) Var(value Value, name string, usage string) {
+- f.VarP(value, name, "", usage)
+-}
+-
+-// Like Var, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) VarP(value Value, name, shorthand, usage string) {
+- // Remember the default value as a string; it won't change.
+- flag := &Flag{name, shorthand, usage, value, value.String(), false}
+- f.AddFlag(flag)
+-}
+-
+-func (f *FlagSet) AddFlag(flag *Flag) {
+- _, alreadythere := f.formal[flag.Name]
+- if alreadythere {
+- msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name)
+- fmt.Fprintln(f.out(), msg)
+- panic(msg) // Happens only if flags are declared with identical names
+- }
+- if f.formal == nil {
+- f.formal = make(map[string]*Flag)
+- }
+- f.formal[flag.Name] = flag
+-
+- if len(flag.Shorthand) == 0 {
+- return
+- }
+- if len(flag.Shorthand) > 1 {
+- fmt.Fprintf(f.out(), "%s shorthand more than ASCII character: %s\n", f.name, flag.Shorthand)
+- panic("shorthand is more than one character")
+- }
+- if f.shorthands == nil {
+- f.shorthands = make(map[byte]*Flag)
+- }
+- c := flag.Shorthand[0]
+- old, alreadythere := f.shorthands[c]
+- if alreadythere {
+- fmt.Fprintf(f.out(), "%s shorthand reused: %q for %s already used for %s\n", f.name, c, flag.Name, old.Name)
+- panic("shorthand redefinition")
+- }
+- f.shorthands[c] = flag
+-}
+-
+-// Var defines a flag with the specified name and usage string. The type and
+-// value of the flag are represented by the first argument, of type Value, which
+-// typically holds a user-defined implementation of Value. For instance, the
+-// caller could create a flag that turns a comma-separated string into a slice
+-// of strings by giving the slice the methods of Value; in particular, Set would
+-// decompose the comma-separated string into the slice.
+-func Var(value Value, name string, usage string) {
+- CommandLine.VarP(value, name, "", usage)
+-}
+-
+-// Like Var, but accepts a shorthand letter that can be used after a single dash.
+-func VarP(value Value, name, shorthand, usage string) {
+- CommandLine.VarP(value, name, shorthand, usage)
+-}
+-
+-// failf prints to standard error a formatted error and usage message and
+-// returns the error.
+-func (f *FlagSet) failf(format string, a ...interface{}) error {
+- err := fmt.Errorf(format, a...)
+- fmt.Fprintln(f.out(), err)
+- f.usage()
+- return err
+-}
+-
+-// usage calls the Usage method for the flag set, or the usage function if
+-// the flag set is CommandLine.
+-func (f *FlagSet) usage() {
+- if f == CommandLine {
+- Usage()
+- } else if f.Usage == nil {
+- defaultUsage(f)
+- } else {
+- f.Usage()
+- }
+-}
+-
+-func (f *FlagSet) setFlag(flag *Flag, value string, origArg string) error {
+- if err := flag.Value.Set(value); err != nil {
+- return f.failf("invalid argument %q for %s: %v", value, origArg, err)
+- }
+- // mark as visited for Visit()
+- if f.actual == nil {
+- f.actual = make(map[string]*Flag)
+- }
+- f.actual[flag.Name] = flag
+- flag.Changed = true
+- return nil
+-}
+-
+-func (f *FlagSet) parseLongArg(s string, args []string) (a []string, err error) {
+- a = args
+- if len(s) == 2 { // "--" terminates the flags
+- f.args = append(f.args, args...)
+- return
+- }
+- name := s[2:]
+- if len(name) == 0 || name[0] == '-' || name[0] == '=' {
+- err = f.failf("bad flag syntax: %s", s)
+- return
+- }
+- split := strings.SplitN(name, "=", 2)
+- name = split[0]
+- m := f.formal
+- flag, alreadythere := m[name] // BUG
+- if !alreadythere {
+- if name == "help" { // special case for nice help message.
+- f.usage()
+- return args, ErrHelp
+- }
+- err = f.failf("unknown flag: --%s", name)
+- return
+- }
+- if len(split) == 1 {
+- if _, ok := flag.Value.(*boolValue); !ok {
+- err = f.failf("flag needs an argument: %s", s)
+- return
+- }
+- f.setFlag(flag, "true", s)
+- } else {
+- if e := f.setFlag(flag, split[1], s); e != nil {
+- err = e
+- return
+- }
+- }
+- return args, nil
+-}
+-
+-func (f *FlagSet) parseShortArg(s string, args []string) (a []string, err error) {
+- a = args
+- shorthands := s[1:]
+-
+- for i := 0; i < len(shorthands); i++ {
+- c := shorthands[i]
+- flag, alreadythere := f.shorthands[c]
+- if !alreadythere {
+- if c == 'h' { // special case for nice help message.
+- f.usage()
+- err = ErrHelp
+- return
+- }
+- //TODO continue on error
+- err = f.failf("unknown shorthand flag: %q in -%s", c, shorthands)
+- if len(args) == 0 {
+- return
+- }
+- }
+- if alreadythere {
+- if _, ok := flag.Value.(*boolValue); ok {
+- f.setFlag(flag, "true", s)
+- continue
+- }
+- if i < len(shorthands)-1 {
+- if e := f.setFlag(flag, shorthands[i+1:], s); e != nil {
+- err = e
+- return
+- }
+- break
+- }
+- if len(args) == 0 {
+- err = f.failf("flag needs an argument: %q in -%s", c, shorthands)
+- return
+- }
+- if e := f.setFlag(flag, args[0], s); e != nil {
+- err = e
+- return
+- }
+- }
+- a = args[1:]
+- break // should be unnecessary
+- }
+-
+- return
+-}
+-
+-func (f *FlagSet) parseArgs(args []string) (err error) {
+- for len(args) > 0 {
+- s := args[0]
+- args = args[1:]
+- if len(s) == 0 || s[0] != '-' || len(s) == 1 {
+- if !f.interspersed {
+- f.args = append(f.args, s)
+- f.args = append(f.args, args...)
+- return nil
+- }
+- f.args = append(f.args, s)
+- continue
+- }
+-
+- if s[1] == '-' {
+- args, err = f.parseLongArg(s, args)
+- } else {
+- args, err = f.parseShortArg(s, args)
+- }
+- }
+- return
+-}
+-
+-// Parse parses flag definitions from the argument list, which should not
+-// include the command name. Must be called after all flags in the FlagSet
+-// are defined and before flags are accessed by the program.
+-// The return value will be ErrHelp if -help was set but not defined.
+-func (f *FlagSet) Parse(arguments []string) error {
+- f.parsed = true
+- f.args = make([]string, 0, len(arguments))
+- err := f.parseArgs(arguments)
+- if err != nil {
+- switch f.errorHandling {
+- case ContinueOnError:
+- return err
+- case ExitOnError:
+- os.Exit(2)
+- case PanicOnError:
+- panic(err)
+- }
+- }
+- return nil
+-}
+-
+-// Parsed reports whether f.Parse has been called.
+-func (f *FlagSet) Parsed() bool {
+- return f.parsed
+-}
+-
+-// Parse parses the command-line flags from os.Args[1:]. Must be called
+-// after all flags are defined and before flags are accessed by the program.
+-func Parse() {
+- // Ignore errors; CommandLine is set for ExitOnError.
+- CommandLine.Parse(os.Args[1:])
+-}
+-
+-// Whether to support interspersed option/non-option arguments.
+-func SetInterspersed(interspersed bool) {
+- CommandLine.SetInterspersed(interspersed)
+-}
+-
+-// Parsed returns true if the command-line flags have been parsed.
+-func Parsed() bool {
+- return CommandLine.Parsed()
+-}
+-
+-// The default set of command-line flags, parsed from os.Args.
+-var CommandLine = NewFlagSet(os.Args[0], ExitOnError)
+-
+-// NewFlagSet returns a new, empty flag set with the specified name and
+-// error handling property.
+-func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet {
+- f := &FlagSet{
+- name: name,
+- errorHandling: errorHandling,
+- interspersed: true,
+- }
+- return f
+-}
+-
+-// Whether to support interspersed option/non-option arguments.
+-func (f *FlagSet) SetInterspersed(interspersed bool) {
+- f.interspersed = interspersed
+-}
+-
+-// Init sets the name and error handling property for a flag set.
+-// By default, the zero FlagSet uses an empty name and the
+-// ContinueOnError error handling policy.
+-func (f *FlagSet) Init(name string, errorHandling ErrorHandling) {
+- f.name = name
+- f.errorHandling = errorHandling
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/flag_test.go b/Godeps/_workspace/src/github.com/spf13/pflag/flag_test.go
+deleted file mode 100644
+index 4d95b15..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/flag_test.go
++++ /dev/null
+@@ -1,354 +0,0 @@
+-// Copyright 2009 The Go Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style
+-// license that can be found in the LICENSE file.
+-
+-package pflag_test
+-
+-import (
+- "bytes"
+- "fmt"
+- "io/ioutil"
+- "os"
+- "sort"
+- "strings"
+- "testing"
+- "time"
+-
+- . "github.com/spf13/pflag"
+-)
+-
+-var (
+- test_bool = Bool("test_bool", false, "bool value")
+- test_int = Int("test_int", 0, "int value")
+- test_int64 = Int64("test_int64", 0, "int64 value")
+- test_uint = Uint("test_uint", 0, "uint value")
+- test_uint64 = Uint64("test_uint64", 0, "uint64 value")
+- test_string = String("test_string", "0", "string value")
+- test_float64 = Float64("test_float64", 0, "float64 value")
+- test_duration = Duration("test_duration", 0, "time.Duration value")
+-)
+-
+-func boolString(s string) string {
+- if s == "0" {
+- return "false"
+- }
+- return "true"
+-}
+-
+-func TestEverything(t *testing.T) {
+- m := make(map[string]*Flag)
+- desired := "0"
+- visitor := func(f *Flag) {
+- if len(f.Name) > 5 && f.Name[0:5] == "test_" {
+- m[f.Name] = f
+- ok := false
+- switch {
+- case f.Value.String() == desired:
+- ok = true
+- case f.Name == "test_bool" && f.Value.String() == boolString(desired):
+- ok = true
+- case f.Name == "test_duration" && f.Value.String() == desired+"s":
+- ok = true
+- }
+- if !ok {
+- t.Error("Visit: bad value", f.Value.String(), "for", f.Name)
+- }
+- }
+- }
+- VisitAll(visitor)
+- if len(m) != 8 {
+- t.Error("VisitAll misses some flags")
+- for k, v := range m {
+- t.Log(k, *v)
+- }
+- }
+- m = make(map[string]*Flag)
+- Visit(visitor)
+- if len(m) != 0 {
+- t.Errorf("Visit sees unset flags")
+- for k, v := range m {
+- t.Log(k, *v)
+- }
+- }
+- // Now set all flags
+- Set("test_bool", "true")
+- Set("test_int", "1")
+- Set("test_int64", "1")
+- Set("test_uint", "1")
+- Set("test_uint64", "1")
+- Set("test_string", "1")
+- Set("test_float64", "1")
+- Set("test_duration", "1s")
+- desired = "1"
+- Visit(visitor)
+- if len(m) != 8 {
+- t.Error("Visit fails after set")
+- for k, v := range m {
+- t.Log(k, *v)
+- }
+- }
+- // Now test they're visited in sort order.
+- var flagNames []string
+- Visit(func(f *Flag) { flagNames = append(flagNames, f.Name) })
+- if !sort.StringsAreSorted(flagNames) {
+- t.Errorf("flag names not sorted: %v", flagNames)
+- }
+-}
+-
+-func TestUsage(t *testing.T) {
+- called := false
+- ResetForTesting(func() { called = true })
+- if GetCommandLine().Parse([]string{"--x"}) == nil {
+- t.Error("parse did not fail for unknown flag")
+- }
+- if !called {
+- t.Error("did not call Usage for unknown flag")
+- }
+-}
+-
+-func testParse(f *FlagSet, t *testing.T) {
+- if f.Parsed() {
+- t.Error("f.Parse() = true before Parse")
+- }
+- boolFlag := f.Bool("bool", false, "bool value")
+- bool2Flag := f.Bool("bool2", false, "bool2 value")
+- bool3Flag := f.Bool("bool3", false, "bool3 value")
+- intFlag := f.Int("int", 0, "int value")
+- int64Flag := f.Int64("int64", 0, "int64 value")
+- uintFlag := f.Uint("uint", 0, "uint value")
+- uint64Flag := f.Uint64("uint64", 0, "uint64 value")
+- stringFlag := f.String("string", "0", "string value")
+- float64Flag := f.Float64("float64", 0, "float64 value")
+- durationFlag := f.Duration("duration", 5*time.Second, "time.Duration value")
+- extra := "one-extra-argument"
+- args := []string{
+- "--bool",
+- "--bool2=true",
+- "--bool3=false",
+- "--int=22",
+- "--int64=0x23",
+- "--uint=24",
+- "--uint64=25",
+- "--string=hello",
+- "--float64=2718e28",
+- "--duration=2m",
+- extra,
+- }
+- if err := f.Parse(args); err != nil {
+- t.Fatal(err)
+- }
+- if !f.Parsed() {
+- t.Error("f.Parse() = false after Parse")
+- }
+- if *boolFlag != true {
+- t.Error("bool flag should be true, is ", *boolFlag)
+- }
+- if *bool2Flag != true {
+- t.Error("bool2 flag should be true, is ", *bool2Flag)
+- }
+- if *bool3Flag != false {
+- t.Error("bool3 flag should be false, is ", *bool2Flag)
+- }
+- if *intFlag != 22 {
+- t.Error("int flag should be 22, is ", *intFlag)
+- }
+- if *int64Flag != 0x23 {
+- t.Error("int64 flag should be 0x23, is ", *int64Flag)
+- }
+- if *uintFlag != 24 {
+- t.Error("uint flag should be 24, is ", *uintFlag)
+- }
+- if *uint64Flag != 25 {
+- t.Error("uint64 flag should be 25, is ", *uint64Flag)
+- }
+- if *stringFlag != "hello" {
+- t.Error("string flag should be `hello`, is ", *stringFlag)
+- }
+- if *float64Flag != 2718e28 {
+- t.Error("float64 flag should be 2718e28, is ", *float64Flag)
+- }
+- if *durationFlag != 2*time.Minute {
+- t.Error("duration flag should be 2m, is ", *durationFlag)
+- }
+- if len(f.Args()) != 1 {
+- t.Error("expected one argument, got", len(f.Args()))
+- } else if f.Args()[0] != extra {
+- t.Errorf("expected argument %q got %q", extra, f.Args()[0])
+- }
+-}
+-
+-func TestShorthand(t *testing.T) {
+- f := NewFlagSet("shorthand", ContinueOnError)
+- if f.Parsed() {
+- t.Error("f.Parse() = true before Parse")
+- }
+- boolaFlag := f.BoolP("boola", "a", false, "bool value")
+- boolbFlag := f.BoolP("boolb", "b", false, "bool2 value")
+- boolcFlag := f.BoolP("boolc", "c", false, "bool3 value")
+- stringFlag := f.StringP("string", "s", "0", "string value")
+- extra := "interspersed-argument"
+- notaflag := "--i-look-like-a-flag"
+- args := []string{
+- "-ab",
+- extra,
+- "-cs",
+- "hello",
+- "--",
+- notaflag,
+- }
+- f.SetOutput(ioutil.Discard)
+- if err := f.Parse(args); err == nil {
+- t.Error("--i-look-like-a-flag should throw an error")
+- }
+- if !f.Parsed() {
+- t.Error("f.Parse() = false after Parse")
+- }
+- if *boolaFlag != true {
+- t.Error("boola flag should be true, is ", *boolaFlag)
+- }
+- if *boolbFlag != true {
+- t.Error("boolb flag should be true, is ", *boolbFlag)
+- }
+- if *boolcFlag != true {
+- t.Error("boolc flag should be true, is ", *boolcFlag)
+- }
+- if *stringFlag != "hello" {
+- t.Error("string flag should be `hello`, is ", *stringFlag)
+- }
+- if len(f.Args()) != 2 {
+- t.Error("expected one argument, got", len(f.Args()))
+- } else if f.Args()[0] != extra {
+- t.Errorf("expected argument %q got %q", extra, f.Args()[0])
+- } else if f.Args()[1] != notaflag {
+- t.Errorf("expected argument %q got %q", notaflag, f.Args()[1])
+- }
+-}
+-
+-func TestParse(t *testing.T) {
+- ResetForTesting(func() { t.Error("bad parse") })
+- testParse(GetCommandLine(), t)
+-}
+-
+-func TestFlagSetParse(t *testing.T) {
+- testParse(NewFlagSet("test", ContinueOnError), t)
+-}
+-
+-// Declare a user-defined flag type.
+-type flagVar []string
+-
+-func (f *flagVar) String() string {
+- return fmt.Sprint([]string(*f))
+-}
+-
+-func (f *flagVar) Set(value string) error {
+- *f = append(*f, value)
+- return nil
+-}
+-
+-func TestUserDefined(t *testing.T) {
+- var flags FlagSet
+- flags.Init("test", ContinueOnError)
+- var v flagVar
+- flags.VarP(&v, "v", "v", "usage")
+- if err := flags.Parse([]string{"--v=1", "-v2", "-v", "3"}); err != nil {
+- t.Error(err)
+- }
+- if len(v) != 3 {
+- t.Fatal("expected 3 args; got ", len(v))
+- }
+- expect := "[1 2 3]"
+- if v.String() != expect {
+- t.Errorf("expected value %q got %q", expect, v.String())
+- }
+-}
+-
+-func TestSetOutput(t *testing.T) {
+- var flags FlagSet
+- var buf bytes.Buffer
+- flags.SetOutput(&buf)
+- flags.Init("test", ContinueOnError)
+- flags.Parse([]string{"--unknown"})
+- if out := buf.String(); !strings.Contains(out, "--unknown") {
+- t.Logf("expected output mentioning unknown; got %q", out)
+- }
+-}
+-
+-// This tests that one can reset the flags. This still works but not well, and is
+-// superseded by FlagSet.
+-func TestChangingArgs(t *testing.T) {
+- ResetForTesting(func() { t.Fatal("bad parse") })
+- oldArgs := os.Args
+- defer func() { os.Args = oldArgs }()
+- os.Args = []string{"cmd", "--before", "subcmd"}
+- before := Bool("before", false, "")
+- if err := GetCommandLine().Parse(os.Args[1:]); err != nil {
+- t.Fatal(err)
+- }
+- cmd := Arg(0)
+- os.Args = []string{"subcmd", "--after", "args"}
+- after := Bool("after", false, "")
+- Parse()
+- args := Args()
+-
+- if !*before || cmd != "subcmd" || !*after || len(args) != 1 || args[0] != "args" {
+- t.Fatalf("expected true subcmd true [args] got %v %v %v %v", *before, cmd, *after, args)
+- }
+-}
+-
+-// Test that -help invokes the usage message and returns ErrHelp.
+-func TestHelp(t *testing.T) {
+- var helpCalled = false
+- fs := NewFlagSet("help test", ContinueOnError)
+- fs.Usage = func() { helpCalled = true }
+- var flag bool
+- fs.BoolVar(&flag, "flag", false, "regular flag")
+- // Regular flag invocation should work
+- err := fs.Parse([]string{"--flag=true"})
+- if err != nil {
+- t.Fatal("expected no error; got ", err)
+- }
+- if !flag {
+- t.Error("flag was not set by --flag")
+- }
+- if helpCalled {
+- t.Error("help called for regular flag")
+- helpCalled = false // reset for next test
+- }
+- // Help flag should work as expected.
+- err = fs.Parse([]string{"--help"})
+- if err == nil {
+- t.Fatal("error expected")
+- }
+- if err != ErrHelp {
+- t.Fatal("expected ErrHelp; got ", err)
+- }
+- if !helpCalled {
+- t.Fatal("help was not called")
+- }
+- // If we define a help flag, that should override.
+- var help bool
+- fs.BoolVar(&help, "help", false, "help flag")
+- helpCalled = false
+- err = fs.Parse([]string{"--help"})
+- if err != nil {
+- t.Fatal("expected no error for defined --help; got ", err)
+- }
+- if helpCalled {
+- t.Fatal("help was called; should not have been for defined help flag")
+- }
+-}
+-
+-func TestNoInterspersed(t *testing.T) {
+- f := NewFlagSet("test", ContinueOnError)
+- f.SetInterspersed(false)
+- f.Bool("true", true, "always true")
+- f.Bool("false", false, "always false")
+- err := f.Parse([]string{"--true", "break", "--false"})
+- if err != nil {
+- t.Fatal("expected no error; got ", err)
+- }
+- args := f.Args()
+- if len(args) != 2 || args[0] != "break" || args[1] != "--false" {
+- t.Fatal("expected interspersed options/non-options to fail")
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/float32.go b/Godeps/_workspace/src/github.com/spf13/pflag/float32.go
+deleted file mode 100644
+index b7ad67d..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/float32.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- float32 Value
+-type float32Value float32
+-
+-func newFloat32Value(val float32, p *float32) *float32Value {
+- *p = val
+- return (*float32Value)(p)
+-}
+-
+-func (f *float32Value) Set(s string) error {
+- v, err := strconv.ParseFloat(s, 32)
+- *f = float32Value(v)
+- return err
+-}
+-
+-func (f *float32Value) Type() string {
+- return "float32"
+-}
+-
+-func (f *float32Value) String() string { return fmt.Sprintf("%v", *f) }
+-
+-// Float32Var defines a float32 flag with specified name, default value, and usage string.
+-// The argument p points to a float32 variable in which to store the value of the flag.
+-func (f *FlagSet) Float32Var(p *float32, name string, value float32, usage string) {
+- f.VarP(newFloat32Value(value, p), name, "", usage)
+-}
+-
+-// Like Float32Var, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Float32VarP(p *float32, name, shorthand string, value float32, usage string) {
+- f.VarP(newFloat32Value(value, p), name, shorthand, usage)
+-}
+-
+-// Float32Var defines a float32 flag with specified name, default value, and usage string.
+-// The argument p points to a float32 variable in which to store the value of the flag.
+-func Float32Var(p *float32, name string, value float32, usage string) {
+- CommandLine.VarP(newFloat32Value(value, p), name, "", usage)
+-}
+-
+-// Like Float32Var, but accepts a shorthand letter that can be used after a single dash.
+-func Float32VarP(p *float32, name, shorthand string, value float32, usage string) {
+- CommandLine.VarP(newFloat32Value(value, p), name, shorthand, usage)
+-}
+-
+-// Float32 defines a float32 flag with specified name, default value, and usage string.
+-// The return value is the address of a float32 variable that stores the value of the flag.
+-func (f *FlagSet) Float32(name string, value float32, usage string) *float32 {
+- p := new(float32)
+- f.Float32VarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Float32, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Float32P(name, shorthand string, value float32, usage string) *float32 {
+- p := new(float32)
+- f.Float32VarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Float32 defines a float32 flag with specified name, default value, and usage string.
+-// The return value is the address of a float32 variable that stores the value of the flag.
+-func Float32(name string, value float32, usage string) *float32 {
+- return CommandLine.Float32P(name, "", value, usage)
+-}
+-
+-// Like Float32, but accepts a shorthand letter that can be used after a single dash.
+-func Float32P(name, shorthand string, value float32, usage string) *float32 {
+- return CommandLine.Float32P(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/float64.go b/Godeps/_workspace/src/github.com/spf13/pflag/float64.go
+deleted file mode 100644
+index 0315512..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/float64.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- float64 Value
+-type float64Value float64
+-
+-func newFloat64Value(val float64, p *float64) *float64Value {
+- *p = val
+- return (*float64Value)(p)
+-}
+-
+-func (f *float64Value) Set(s string) error {
+- v, err := strconv.ParseFloat(s, 64)
+- *f = float64Value(v)
+- return err
+-}
+-
+-func (f *float64Value) Type() string {
+- return "float64"
+-}
+-
+-func (f *float64Value) String() string { return fmt.Sprintf("%v", *f) }
+-
+-// Float64Var defines a float64 flag with specified name, default value, and usage string.
+-// The argument p points to a float64 variable in which to store the value of the flag.
+-func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string) {
+- f.VarP(newFloat64Value(value, p), name, "", usage)
+-}
+-
+-// Like Float64Var, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string) {
+- f.VarP(newFloat64Value(value, p), name, shorthand, usage)
+-}
+-
+-// Float64Var defines a float64 flag with specified name, default value, and usage string.
+-// The argument p points to a float64 variable in which to store the value of the flag.
+-func Float64Var(p *float64, name string, value float64, usage string) {
+- CommandLine.VarP(newFloat64Value(value, p), name, "", usage)
+-}
+-
+-// Like Float64Var, but accepts a shorthand letter that can be used after a single dash.
+-func Float64VarP(p *float64, name, shorthand string, value float64, usage string) {
+- CommandLine.VarP(newFloat64Value(value, p), name, shorthand, usage)
+-}
+-
+-// Float64 defines a float64 flag with specified name, default value, and usage string.
+-// The return value is the address of a float64 variable that stores the value of the flag.
+-func (f *FlagSet) Float64(name string, value float64, usage string) *float64 {
+- p := new(float64)
+- f.Float64VarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Float64, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64 {
+- p := new(float64)
+- f.Float64VarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Float64 defines a float64 flag with specified name, default value, and usage string.
+-// The return value is the address of a float64 variable that stores the value of the flag.
+-func Float64(name string, value float64, usage string) *float64 {
+- return CommandLine.Float64P(name, "", value, usage)
+-}
+-
+-// Like Float64, but accepts a shorthand letter that can be used after a single dash.
+-func Float64P(name, shorthand string, value float64, usage string) *float64 {
+- return CommandLine.Float64P(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/int.go b/Godeps/_workspace/src/github.com/spf13/pflag/int.go
+deleted file mode 100644
+index dca9da6..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/int.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- int Value
+-type intValue int
+-
+-func newIntValue(val int, p *int) *intValue {
+- *p = val
+- return (*intValue)(p)
+-}
+-
+-func (i *intValue) Set(s string) error {
+- v, err := strconv.ParseInt(s, 0, 64)
+- *i = intValue(v)
+- return err
+-}
+-
+-func (i *intValue) Type() string {
+- return "int"
+-}
+-
+-func (i *intValue) String() string { return fmt.Sprintf("%v", *i) }
+-
+-// IntVar defines an int flag with specified name, default value, and usage string.
+-// The argument p points to an int variable in which to store the value of the flag.
+-func (f *FlagSet) IntVar(p *int, name string, value int, usage string) {
+- f.VarP(newIntValue(value, p), name, "", usage)
+-}
+-
+-// Like IntVar, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string) {
+- f.VarP(newIntValue(value, p), name, shorthand, usage)
+-}
+-
+-// IntVar defines an int flag with specified name, default value, and usage string.
+-// The argument p points to an int variable in which to store the value of the flag.
+-func IntVar(p *int, name string, value int, usage string) {
+- CommandLine.VarP(newIntValue(value, p), name, "", usage)
+-}
+-
+-// Like IntVar, but accepts a shorthand letter that can be used after a single dash.
+-func IntVarP(p *int, name, shorthand string, value int, usage string) {
+- CommandLine.VarP(newIntValue(value, p), name, shorthand, usage)
+-}
+-
+-// Int defines an int flag with specified name, default value, and usage string.
+-// The return value is the address of an int variable that stores the value of the flag.
+-func (f *FlagSet) Int(name string, value int, usage string) *int {
+- p := new(int)
+- f.IntVarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Int, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) IntP(name, shorthand string, value int, usage string) *int {
+- p := new(int)
+- f.IntVarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Int defines an int flag with specified name, default value, and usage string.
+-// The return value is the address of an int variable that stores the value of the flag.
+-func Int(name string, value int, usage string) *int {
+- return CommandLine.IntP(name, "", value, usage)
+-}
+-
+-// Like Int, but accepts a shorthand letter that can be used after a single dash.
+-func IntP(name, shorthand string, value int, usage string) *int {
+- return CommandLine.IntP(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/int32.go b/Godeps/_workspace/src/github.com/spf13/pflag/int32.go
+deleted file mode 100644
+index 18eaacd..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/int32.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- int32 Value
+-type int32Value int32
+-
+-func newInt32Value(val int32, p *int32) *int32Value {
+- *p = val
+- return (*int32Value)(p)
+-}
+-
+-func (i *int32Value) Set(s string) error {
+- v, err := strconv.ParseInt(s, 0, 32)
+- *i = int32Value(v)
+- return err
+-}
+-
+-func (i *int32Value) Type() string {
+- return "int32"
+-}
+-
+-func (i *int32Value) String() string { return fmt.Sprintf("%v", *i) }
+-
+-// Int32Var defines an int32 flag with specified name, default value, and usage string.
+-// The argument p points to an int32 variable in which to store the value of the flag.
+-func (f *FlagSet) Int32Var(p *int32, name string, value int32, usage string) {
+- f.VarP(newInt32Value(value, p), name, "", usage)
+-}
+-
+-// Like Int32Var, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Int32VarP(p *int32, name, shorthand string, value int32, usage string) {
+- f.VarP(newInt32Value(value, p), name, shorthand, usage)
+-}
+-
+-// Int32Var defines an int32 flag with specified name, default value, and usage string.
+-// The argument p points to an int32 variable in which to store the value of the flag.
+-func Int32Var(p *int32, name string, value int32, usage string) {
+- CommandLine.VarP(newInt32Value(value, p), name, "", usage)
+-}
+-
+-// Like Int32Var, but accepts a shorthand letter that can be used after a single dash.
+-func Int32VarP(p *int32, name, shorthand string, value int32, usage string) {
+- CommandLine.VarP(newInt32Value(value, p), name, shorthand, usage)
+-}
+-
+-// Int32 defines an int32 flag with specified name, default value, and usage string.
+-// The return value is the address of an int32 variable that stores the value of the flag.
+-func (f *FlagSet) Int32(name string, value int32, usage string) *int32 {
+- p := new(int32)
+- f.Int32VarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Int32, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Int32P(name, shorthand string, value int32, usage string) *int32 {
+- p := new(int32)
+- f.Int32VarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Int32 defines an int32 flag with specified name, default value, and usage string.
+-// The return value is the address of an int32 variable that stores the value of the flag.
+-func Int32(name string, value int32, usage string) *int32 {
+- return CommandLine.Int32P(name, "", value, usage)
+-}
+-
+-// Like Int32, but accepts a shorthand letter that can be used after a single dash.
+-func Int32P(name, shorthand string, value int32, usage string) *int32 {
+- return CommandLine.Int32P(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/int64.go b/Godeps/_workspace/src/github.com/spf13/pflag/int64.go
+deleted file mode 100644
+index 0114aaa..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/int64.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- int64 Value
+-type int64Value int64
+-
+-func newInt64Value(val int64, p *int64) *int64Value {
+- *p = val
+- return (*int64Value)(p)
+-}
+-
+-func (i *int64Value) Set(s string) error {
+- v, err := strconv.ParseInt(s, 0, 64)
+- *i = int64Value(v)
+- return err
+-}
+-
+-func (i *int64Value) Type() string {
+- return "int64"
+-}
+-
+-func (i *int64Value) String() string { return fmt.Sprintf("%v", *i) }
+-
+-// Int64Var defines an int64 flag with specified name, default value, and usage string.
+-// The argument p points to an int64 variable in which to store the value of the flag.
+-func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) {
+- f.VarP(newInt64Value(value, p), name, "", usage)
+-}
+-
+-// Like Int64Var, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Int64VarP(p *int64, name, shorthand string, value int64, usage string) {
+- f.VarP(newInt64Value(value, p), name, shorthand, usage)
+-}
+-
+-// Int64Var defines an int64 flag with specified name, default value, and usage string.
+-// The argument p points to an int64 variable in which to store the value of the flag.
+-func Int64Var(p *int64, name string, value int64, usage string) {
+- CommandLine.VarP(newInt64Value(value, p), name, "", usage)
+-}
+-
+-// Like Int64Var, but accepts a shorthand letter that can be used after a single dash.
+-func Int64VarP(p *int64, name, shorthand string, value int64, usage string) {
+- CommandLine.VarP(newInt64Value(value, p), name, shorthand, usage)
+-}
+-
+-// Int64 defines an int64 flag with specified name, default value, and usage string.
+-// The return value is the address of an int64 variable that stores the value of the flag.
+-func (f *FlagSet) Int64(name string, value int64, usage string) *int64 {
+- p := new(int64)
+- f.Int64VarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Int64, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Int64P(name, shorthand string, value int64, usage string) *int64 {
+- p := new(int64)
+- f.Int64VarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Int64 defines an int64 flag with specified name, default value, and usage string.
+-// The return value is the address of an int64 variable that stores the value of the flag.
+-func Int64(name string, value int64, usage string) *int64 {
+- return CommandLine.Int64P(name, "", value, usage)
+-}
+-
+-// Like Int64, but accepts a shorthand letter that can be used after a single dash.
+-func Int64P(name, shorthand string, value int64, usage string) *int64 {
+- return CommandLine.Int64P(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/int8.go b/Godeps/_workspace/src/github.com/spf13/pflag/int8.go
+deleted file mode 100644
+index aab1022..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/int8.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- int8 Value
+-type int8Value int8
+-
+-func newInt8Value(val int8, p *int8) *int8Value {
+- *p = val
+- return (*int8Value)(p)
+-}
+-
+-func (i *int8Value) Set(s string) error {
+- v, err := strconv.ParseInt(s, 0, 8)
+- *i = int8Value(v)
+- return err
+-}
+-
+-func (i *int8Value) Type() string {
+- return "int8"
+-}
+-
+-func (i *int8Value) String() string { return fmt.Sprintf("%v", *i) }
+-
+-// Int8Var defines an int8 flag with specified name, default value, and usage string.
+-// The argument p points to an int8 variable in which to store the value of the flag.
+-func (f *FlagSet) Int8Var(p *int8, name string, value int8, usage string) {
+- f.VarP(newInt8Value(value, p), name, "", usage)
+-}
+-
+-// Like Int8Var, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Int8VarP(p *int8, name, shorthand string, value int8, usage string) {
+- f.VarP(newInt8Value(value, p), name, shorthand, usage)
+-}
+-
+-// Int8Var defines an int8 flag with specified name, default value, and usage string.
+-// The argument p points to an int8 variable in which to store the value of the flag.
+-func Int8Var(p *int8, name string, value int8, usage string) {
+- CommandLine.VarP(newInt8Value(value, p), name, "", usage)
+-}
+-
+-// Like Int8Var, but accepts a shorthand letter that can be used after a single dash.
+-func Int8VarP(p *int8, name, shorthand string, value int8, usage string) {
+- CommandLine.VarP(newInt8Value(value, p), name, shorthand, usage)
+-}
+-
+-// Int8 defines an int8 flag with specified name, default value, and usage string.
+-// The return value is the address of an int8 variable that stores the value of the flag.
+-func (f *FlagSet) Int8(name string, value int8, usage string) *int8 {
+- p := new(int8)
+- f.Int8VarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Int8, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Int8P(name, shorthand string, value int8, usage string) *int8 {
+- p := new(int8)
+- f.Int8VarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Int8 defines an int8 flag with specified name, default value, and usage string.
+-// The return value is the address of an int8 variable that stores the value of the flag.
+-func Int8(name string, value int8, usage string) *int8 {
+- return CommandLine.Int8P(name, "", value, usage)
+-}
+-
+-// Like Int8, but accepts a shorthand letter that can be used after a single dash.
+-func Int8P(name, shorthand string, value int8, usage string) *int8 {
+- return CommandLine.Int8P(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/ip.go b/Godeps/_workspace/src/github.com/spf13/pflag/ip.go
+deleted file mode 100644
+index 9d53bd3..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/ip.go
++++ /dev/null
+@@ -1,79 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "net"
+-)
+-
+-// -- net.IP value
+-type ipValue net.IP
+-
+-func newIPValue(val net.IP, p *net.IP) *ipValue {
+- *p = val
+- return (*ipValue)(p)
+-}
+-
+-func (i *ipValue) String() string { return net.IP(*i).String() }
+-func (i *ipValue) Set(s string) error {
+- ip := net.ParseIP(s)
+- if ip == nil {
+- return fmt.Errorf("failed to parse IP: %q", s)
+- }
+- *i = ipValue(ip)
+- return nil
+-}
+-func (i *ipValue) Get() interface{} {
+- return net.IP(*i)
+-}
+-
+-func (i *ipValue) Type() string {
+- return "ip"
+-}
+-
+-// IPVar defines an net.IP flag with specified name, default value, and usage string.
+-// The argument p points to an net.IP variable in which to store the value of the flag.
+-func (f *FlagSet) IPVar(p *net.IP, name string, value net.IP, usage string) {
+- f.VarP(newIPValue(value, p), name, "", usage)
+-}
+-
+-// Like IPVar, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) {
+- f.VarP(newIPValue(value, p), name, shorthand, usage)
+-}
+-
+-// IPVar defines an net.IP flag with specified name, default value, and usage string.
+-// The argument p points to an net.IP variable in which to store the value of the flag.
+-func IPVar(p *net.IP, name string, value net.IP, usage string) {
+- CommandLine.VarP(newIPValue(value, p), name, "", usage)
+-}
+-
+-// Like IPVar, but accepts a shorthand letter that can be used after a single dash.
+-func IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) {
+- CommandLine.VarP(newIPValue(value, p), name, shorthand, usage)
+-}
+-
+-// IP defines an net.IP flag with specified name, default value, and usage string.
+-// The return value is the address of an net.IP variable that stores the value of the flag.
+-func (f *FlagSet) IP(name string, value net.IP, usage string) *net.IP {
+- p := new(net.IP)
+- f.IPVarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like IP, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) IPP(name, shorthand string, value net.IP, usage string) *net.IP {
+- p := new(net.IP)
+- f.IPVarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// IP defines an net.IP flag with specified name, default value, and usage string.
+-// The return value is the address of an net.IP variable that stores the value of the flag.
+-func IP(name string, value net.IP, usage string) *net.IP {
+- return CommandLine.IPP(name, "", value, usage)
+-}
+-
+-// Like IP, but accepts a shorthand letter that can be used after a single dash.
+-func IPP(name, shorthand string, value net.IP, usage string) *net.IP {
+- return CommandLine.IPP(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/ipmask.go b/Godeps/_workspace/src/github.com/spf13/pflag/ipmask.go
+deleted file mode 100644
+index 6f85be9..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/ipmask.go
++++ /dev/null
+@@ -1,89 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "net"
+-)
+-
+-// -- net.IPMask value
+-type ipMaskValue net.IPMask
+-
+-func newIPMaskValue(val net.IPMask, p *net.IPMask) *ipMaskValue {
+- *p = val
+- return (*ipMaskValue)(p)
+-}
+-
+-func (i *ipMaskValue) String() string { return net.IPMask(*i).String() }
+-func (i *ipMaskValue) Set(s string) error {
+- ip := ParseIPv4Mask(s)
+- if ip == nil {
+- return fmt.Errorf("failed to parse IP mask: %q", s)
+- }
+- *i = ipMaskValue(ip)
+- return nil
+-}
+-func (i *ipMaskValue) Get() interface{} {
+- return net.IPMask(*i)
+-}
+-
+-func (i *ipMaskValue) Type() string {
+- return "ipMask"
+-}
+-
+-// Parse IPv4 netmask written in IP form (e.g. 255.255.255.0).
+-// This function should really belong to the net package.
+-func ParseIPv4Mask(s string) net.IPMask {
+- mask := net.ParseIP(s)
+- if mask == nil {
+- return nil
+- }
+- return net.IPv4Mask(mask[12], mask[13], mask[14], mask[15])
+-}
+-
+-// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string.
+-// The argument p points to an net.IPMask variable in which to store the value of the flag.
+-func (f *FlagSet) IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) {
+- f.VarP(newIPMaskValue(value, p), name, "", usage)
+-}
+-
+-// Like IPMaskVar, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) {
+- f.VarP(newIPMaskValue(value, p), name, shorthand, usage)
+-}
+-
+-// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string.
+-// The argument p points to an net.IPMask variable in which to store the value of the flag.
+-func IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) {
+- CommandLine.VarP(newIPMaskValue(value, p), name, "", usage)
+-}
+-
+-// Like IPMaskVar, but accepts a shorthand letter that can be used after a single dash.
+-func IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) {
+- CommandLine.VarP(newIPMaskValue(value, p), name, shorthand, usage)
+-}
+-
+-// IPMask defines an net.IPMask flag with specified name, default value, and usage string.
+-// The return value is the address of an net.IPMask variable that stores the value of the flag.
+-func (f *FlagSet) IPMask(name string, value net.IPMask, usage string) *net.IPMask {
+- p := new(net.IPMask)
+- f.IPMaskVarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like IPMask, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask {
+- p := new(net.IPMask)
+- f.IPMaskVarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// IPMask defines an net.IPMask flag with specified name, default value, and usage string.
+-// The return value is the address of an net.IPMask variable that stores the value of the flag.
+-func IPMask(name string, value net.IPMask, usage string) *net.IPMask {
+- return CommandLine.IPMaskP(name, "", value, usage)
+-}
+-
+-// Like IP, but accepts a shorthand letter that can be used after a single dash.
+-func IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask {
+- return CommandLine.IPMaskP(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/string.go b/Godeps/_workspace/src/github.com/spf13/pflag/string.go
+deleted file mode 100644
+index 362fbf8..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/string.go
++++ /dev/null
+@@ -1,69 +0,0 @@
+-package pflag
+-
+-import "fmt"
+-
+-// -- string Value
+-type stringValue string
+-
+-func newStringValue(val string, p *string) *stringValue {
+- *p = val
+- return (*stringValue)(p)
+-}
+-
+-func (s *stringValue) Set(val string) error {
+- *s = stringValue(val)
+- return nil
+-}
+-func (s *stringValue) Type() string {
+- return "string"
+-}
+-
+-func (s *stringValue) String() string { return fmt.Sprintf("%s", *s) }
+-
+-// StringVar defines a string flag with specified name, default value, and usage string.
+-// The argument p points to a string variable in which to store the value of the flag.
+-func (f *FlagSet) StringVar(p *string, name string, value string, usage string) {
+- f.VarP(newStringValue(value, p), name, "", usage)
+-}
+-
+-// Like StringVar, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string) {
+- f.VarP(newStringValue(value, p), name, shorthand, usage)
+-}
+-
+-// StringVar defines a string flag with specified name, default value, and usage string.
+-// The argument p points to a string variable in which to store the value of the flag.
+-func StringVar(p *string, name string, value string, usage string) {
+- CommandLine.VarP(newStringValue(value, p), name, "", usage)
+-}
+-
+-// Like StringVar, but accepts a shorthand letter that can be used after a single dash.
+-func StringVarP(p *string, name, shorthand string, value string, usage string) {
+- CommandLine.VarP(newStringValue(value, p), name, shorthand, usage)
+-}
+-
+-// String defines a string flag with specified name, default value, and usage string.
+-// The return value is the address of a string variable that stores the value of the flag.
+-func (f *FlagSet) String(name string, value string, usage string) *string {
+- p := new(string)
+- f.StringVarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like String, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string {
+- p := new(string)
+- f.StringVarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// String defines a string flag with specified name, default value, and usage string.
+-// The return value is the address of a string variable that stores the value of the flag.
+-func String(name string, value string, usage string) *string {
+- return CommandLine.StringP(name, "", value, usage)
+-}
+-
+-// Like String, but accepts a shorthand letter that can be used after a single dash.
+-func StringP(name, shorthand string, value string, usage string) *string {
+- return CommandLine.StringP(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/uint.go b/Godeps/_workspace/src/github.com/spf13/pflag/uint.go
+deleted file mode 100644
+index c063fe7..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/uint.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- uint Value
+-type uintValue uint
+-
+-func newUintValue(val uint, p *uint) *uintValue {
+- *p = val
+- return (*uintValue)(p)
+-}
+-
+-func (i *uintValue) Set(s string) error {
+- v, err := strconv.ParseUint(s, 0, 64)
+- *i = uintValue(v)
+- return err
+-}
+-
+-func (i *uintValue) Type() string {
+- return "uint"
+-}
+-
+-func (i *uintValue) String() string { return fmt.Sprintf("%v", *i) }
+-
+-// UintVar defines a uint flag with specified name, default value, and usage string.
+-// The argument p points to a uint variable in which to store the value of the flag.
+-func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) {
+- f.VarP(newUintValue(value, p), name, "", usage)
+-}
+-
+-// Like UintVar, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string) {
+- f.VarP(newUintValue(value, p), name, shorthand, usage)
+-}
+-
+-// UintVar defines a uint flag with specified name, default value, and usage string.
+-// The argument p points to a uint variable in which to store the value of the flag.
+-func UintVar(p *uint, name string, value uint, usage string) {
+- CommandLine.VarP(newUintValue(value, p), name, "", usage)
+-}
+-
+-// Like UintVar, but accepts a shorthand letter that can be used after a single dash.
+-func UintVarP(p *uint, name, shorthand string, value uint, usage string) {
+- CommandLine.VarP(newUintValue(value, p), name, shorthand, usage)
+-}
+-
+-// Uint defines a uint flag with specified name, default value, and usage string.
+-// The return value is the address of a uint variable that stores the value of the flag.
+-func (f *FlagSet) Uint(name string, value uint, usage string) *uint {
+- p := new(uint)
+- f.UintVarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Uint, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint {
+- p := new(uint)
+- f.UintVarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Uint defines a uint flag with specified name, default value, and usage string.
+-// The return value is the address of a uint variable that stores the value of the flag.
+-func Uint(name string, value uint, usage string) *uint {
+- return CommandLine.UintP(name, "", value, usage)
+-}
+-
+-// Like Uint, but accepts a shorthand letter that can be used after a single dash.
+-func UintP(name, shorthand string, value uint, usage string) *uint {
+- return CommandLine.UintP(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/uint16.go b/Godeps/_workspace/src/github.com/spf13/pflag/uint16.go
+deleted file mode 100644
+index ec14ab0..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/uint16.go
++++ /dev/null
+@@ -1,76 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- uint16 value
+-type uint16Value uint16
+-
+-func newUint16Value(val uint16, p *uint16) *uint16Value {
+- *p = val
+- return (*uint16Value)(p)
+-}
+-func (i *uint16Value) String() string { return fmt.Sprintf("%d", *i) }
+-func (i *uint16Value) Set(s string) error {
+- v, err := strconv.ParseUint(s, 0, 16)
+- *i = uint16Value(v)
+- return err
+-}
+-
+-func (i *uint16Value) Get() interface{} {
+- return uint16(*i)
+-}
+-
+-func (i *uint16Value) Type() string {
+- return "uint16"
+-}
+-
+-// Uint16Var defines a uint flag with specified name, default value, and usage string.
+-// The argument p points to a uint variable in which to store the value of the flag.
+-func (f *FlagSet) Uint16Var(p *uint16, name string, value uint16, usage string) {
+- f.VarP(newUint16Value(value, p), name, "", usage)
+-}
+-
+-// Like Uint16Var, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) {
+- f.VarP(newUint16Value(value, p), name, shorthand, usage)
+-}
+-
+-// Uint16Var defines a uint flag with specified name, default value, and usage string.
+-// The argument p points to a uint variable in which to store the value of the flag.
+-func Uint16Var(p *uint16, name string, value uint16, usage string) {
+- CommandLine.VarP(newUint16Value(value, p), name, "", usage)
+-}
+-
+-// Like Uint16Var, but accepts a shorthand letter that can be used after a single dash.
+-func Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) {
+- CommandLine.VarP(newUint16Value(value, p), name, shorthand, usage)
+-}
+-
+-// Uint16 defines a uint flag with specified name, default value, and usage string.
+-// The return value is the address of a uint variable that stores the value of the flag.
+-func (f *FlagSet) Uint16(name string, value uint16, usage string) *uint16 {
+- p := new(uint16)
+- f.Uint16VarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Uint16, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Uint16P(name, shorthand string, value uint16, usage string) *uint16 {
+- p := new(uint16)
+- f.Uint16VarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Uint16 defines a uint flag with specified name, default value, and usage string.
+-// The return value is the address of a uint variable that stores the value of the flag.
+-func Uint16(name string, value uint16, usage string) *uint16 {
+- return CommandLine.Uint16P(name, "", value, usage)
+-}
+-
+-// Like Uint16, but accepts a shorthand letter that can be used after a single dash.
+-func Uint16P(name, shorthand string, value uint16, usage string) *uint16 {
+- return CommandLine.Uint16P(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/uint32.go b/Godeps/_workspace/src/github.com/spf13/pflag/uint32.go
+deleted file mode 100644
+index 05bc3bd..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/uint32.go
++++ /dev/null
+@@ -1,75 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- uint16 value
+-type uint32Value uint32
+-
+-func newUint32Value(val uint32, p *uint32) *uint32Value {
+- *p = val
+- return (*uint32Value)(p)
+-}
+-func (i *uint32Value) String() string { return fmt.Sprintf("%d", *i) }
+-func (i *uint32Value) Set(s string) error {
+- v, err := strconv.ParseUint(s, 0, 32)
+- *i = uint32Value(v)
+- return err
+-}
+-func (i *uint32Value) Get() interface{} {
+- return uint32(*i)
+-}
+-
+-func (i *uint32Value) Type() string {
+- return "uint32"
+-}
+-
+-// Uint32Var defines a uint32 flag with specified name, default value, and usage string.
+-// The argument p points to a uint32 variable in which to store the value of the flag.
+-func (f *FlagSet) Uint32Var(p *uint32, name string, value uint32, usage string) {
+- f.VarP(newUint32Value(value, p), name, "", usage)
+-}
+-
+-// Like Uint32Var, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) {
+- f.VarP(newUint32Value(value, p), name, shorthand, usage)
+-}
+-
+-// Uint32Var defines a uint32 flag with specified name, default value, and usage string.
+-// The argument p points to a uint32 variable in which to store the value of the flag.
+-func Uint32Var(p *uint32, name string, value uint32, usage string) {
+- CommandLine.VarP(newUint32Value(value, p), name, "", usage)
+-}
+-
+-// Like Uint32Var, but accepts a shorthand letter that can be used after a single dash.
+-func Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) {
+- CommandLine.VarP(newUint32Value(value, p), name, shorthand, usage)
+-}
+-
+-// Uint32 defines a uint32 flag with specified name, default value, and usage string.
+-// The return value is the address of a uint32 variable that stores the value of the flag.
+-func (f *FlagSet) Uint32(name string, value uint32, usage string) *uint32 {
+- p := new(uint32)
+- f.Uint32VarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Uint32, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Uint32P(name, shorthand string, value uint32, usage string) *uint32 {
+- p := new(uint32)
+- f.Uint32VarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Uint32 defines a uint32 flag with specified name, default value, and usage string.
+-// The return value is the address of a uint32 variable that stores the value of the flag.
+-func Uint32(name string, value uint32, usage string) *uint32 {
+- return CommandLine.Uint32P(name, "", value, usage)
+-}
+-
+-// Like Uint32, but accepts a shorthand letter that can be used after a single dash.
+-func Uint32P(name, shorthand string, value uint32, usage string) *uint32 {
+- return CommandLine.Uint32P(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/uint64.go b/Godeps/_workspace/src/github.com/spf13/pflag/uint64.go
+deleted file mode 100644
+index 99c7e80..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/uint64.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- uint64 Value
+-type uint64Value uint64
+-
+-func newUint64Value(val uint64, p *uint64) *uint64Value {
+- *p = val
+- return (*uint64Value)(p)
+-}
+-
+-func (i *uint64Value) Set(s string) error {
+- v, err := strconv.ParseUint(s, 0, 64)
+- *i = uint64Value(v)
+- return err
+-}
+-
+-func (i *uint64Value) Type() string {
+- return "uint64"
+-}
+-
+-func (i *uint64Value) String() string { return fmt.Sprintf("%v", *i) }
+-
+-// Uint64Var defines a uint64 flag with specified name, default value, and usage string.
+-// The argument p points to a uint64 variable in which to store the value of the flag.
+-func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string) {
+- f.VarP(newUint64Value(value, p), name, "", usage)
+-}
+-
+-// Like Uint64Var, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) {
+- f.VarP(newUint64Value(value, p), name, shorthand, usage)
+-}
+-
+-// Uint64Var defines a uint64 flag with specified name, default value, and usage string.
+-// The argument p points to a uint64 variable in which to store the value of the flag.
+-func Uint64Var(p *uint64, name string, value uint64, usage string) {
+- CommandLine.VarP(newUint64Value(value, p), name, "", usage)
+-}
+-
+-// Like Uint64Var, but accepts a shorthand letter that can be used after a single dash.
+-func Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) {
+- CommandLine.VarP(newUint64Value(value, p), name, shorthand, usage)
+-}
+-
+-// Uint64 defines a uint64 flag with specified name, default value, and usage string.
+-// The return value is the address of a uint64 variable that stores the value of the flag.
+-func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64 {
+- p := new(uint64)
+- f.Uint64VarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Uint64, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Uint64P(name, shorthand string, value uint64, usage string) *uint64 {
+- p := new(uint64)
+- f.Uint64VarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Uint64 defines a uint64 flag with specified name, default value, and usage string.
+-// The return value is the address of a uint64 variable that stores the value of the flag.
+-func Uint64(name string, value uint64, usage string) *uint64 {
+- return CommandLine.Uint64P(name, "", value, usage)
+-}
+-
+-// Like Uint64, but accepts a shorthand letter that can be used after a single dash.
+-func Uint64P(name, shorthand string, value uint64, usage string) *uint64 {
+- return CommandLine.Uint64P(name, shorthand, value, usage)
+-}
+diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/uint8.go b/Godeps/_workspace/src/github.com/spf13/pflag/uint8.go
+deleted file mode 100644
+index 6fef508..0000000
+--- a/Godeps/_workspace/src/github.com/spf13/pflag/uint8.go
++++ /dev/null
+@@ -1,74 +0,0 @@
+-package pflag
+-
+-import (
+- "fmt"
+- "strconv"
+-)
+-
+-// -- uint8 Value
+-type uint8Value uint8
+-
+-func newUint8Value(val uint8, p *uint8) *uint8Value {
+- *p = val
+- return (*uint8Value)(p)
+-}
+-
+-func (i *uint8Value) Set(s string) error {
+- v, err := strconv.ParseUint(s, 0, 8)
+- *i = uint8Value(v)
+- return err
+-}
+-
+-func (i *uint8Value) Type() string {
+- return "uint8"
+-}
+-
+-func (i *uint8Value) String() string { return fmt.Sprintf("%v", *i) }
+-
+-// Uint8Var defines a uint8 flag with specified name, default value, and usage string.
+-// The argument p points to a uint8 variable in which to store the value of the flag.
+-func (f *FlagSet) Uint8Var(p *uint8, name string, value uint8, usage string) {
+- f.VarP(newUint8Value(value, p), name, "", usage)
+-}
+-
+-// Like Uint8Var, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) {
+- f.VarP(newUint8Value(value, p), name, shorthand, usage)
+-}
+-
+-// Uint8Var defines a uint8 flag with specified name, default value, and usage string.
+-// The argument p points to a uint8 variable in which to store the value of the flag.
+-func Uint8Var(p *uint8, name string, value uint8, usage string) {
+- CommandLine.VarP(newUint8Value(value, p), name, "", usage)
+-}
+-
+-// Like Uint8Var, but accepts a shorthand letter that can be used after a single dash.
+-func Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) {
+- CommandLine.VarP(newUint8Value(value, p), name, shorthand, usage)
+-}
+-
+-// Uint8 defines a uint8 flag with specified name, default value, and usage string.
+-// The return value is the address of a uint8 variable that stores the value of the flag.
+-func (f *FlagSet) Uint8(name string, value uint8, usage string) *uint8 {
+- p := new(uint8)
+- f.Uint8VarP(p, name, "", value, usage)
+- return p
+-}
+-
+-// Like Uint8, but accepts a shorthand letter that can be used after a single dash.
+-func (f *FlagSet) Uint8P(name, shorthand string, value uint8, usage string) *uint8 {
+- p := new(uint8)
+- f.Uint8VarP(p, name, shorthand, value, usage)
+- return p
+-}
+-
+-// Uint8 defines a uint8 flag with specified name, default value, and usage string.
+-// The return value is the address of a uint8 variable that stores the value of the flag.
+-func Uint8(name string, value uint8, usage string) *uint8 {
+- return CommandLine.Uint8P(name, "", value, usage)
+-}
+-
+-// Like Uint8, but accepts a shorthand letter that can be used after a single dash.
+-func Uint8P(name, shorthand string, value uint8, usage string) *uint8 {
+- return CommandLine.Uint8P(name, shorthand, value, usage)
-}
diff --git a/Godeps/_workspace/src/github.com/stretchr/objx/.gitignore b/Godeps/_workspace/src/github.com/stretchr/objx/.gitignore
deleted file mode 100644
@@ -99142,6 +113627,1037 @@ index cd06451..0000000
- assert.Equal(t, true, args.Bool(2))
-
-}
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/.gitignore b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/.gitignore
+deleted file mode 100644
+index 1f0a99f..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/.gitignore
++++ /dev/null
+@@ -1,4 +0,0 @@
+-[568].out
+-_go*
+-_test*
+-_obj
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/License b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/License
+deleted file mode 100644
+index 480a328..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/License
++++ /dev/null
+@@ -1,19 +0,0 @@
+-Copyright 2012 Keith Rarick
+-
+-Permission is hereby granted, free of charge, to any person obtaining a copy
+-of this software and associated documentation files (the "Software"), to deal
+-in the Software without restriction, including without limitation the rights
+-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+-copies of the Software, and to permit persons to whom the Software is
+-furnished to do so, subject to the following conditions:
+-
+-The above copyright notice and this permission notice shall be included in
+-all copies or substantial portions of the Software.
+-
+-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+-THE SOFTWARE.
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/Readme b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/Readme
+deleted file mode 100644
+index c589fc6..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/Readme
++++ /dev/null
+@@ -1,9 +0,0 @@
+-package pretty
+-
+- import "github.com/kr/pretty"
+-
+- Package pretty provides pretty-printing for Go values.
+-
+-Documentation
+-
+- http://godoc.org/github.com/kr/pretty
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/changelog b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/changelog
+deleted file mode 100644
+index 9350c05..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/changelog
++++ /dev/null
+@@ -1,5 +0,0 @@
+-golang-pretty (0.0~git20130613-1) unstable; urgency=low
+-
+- * Initial release. Closes: #722983
+-
+- -- Tonnerre Lombard <tonnerre at ancient-solutions.com> Wed, 11 Sep 2013 02:36:12 +0200
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/compat b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/compat
+deleted file mode 100644
+index ec63514..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/compat
++++ /dev/null
+@@ -1 +0,0 @@
+-9
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/control b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/control
+deleted file mode 100644
+index a852fe7..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/control
++++ /dev/null
+@@ -1,22 +0,0 @@
+-Source: golang-pretty
+-Section: devel
+-Priority: extra
+-Maintainer: Tonnerre Lombard <tonnerre at ancient-solutions.com>
+-Build-Depends: debhelper (>= 9), golang-go, dh-golang,
+- golang-text-dev
+-Standards-Version: 3.9.4
+-Homepage: https://github.com/kr/pretty/
+-Vcs-Git: git://anonscm.debian.org/pkg-go/packages/golang-pretty.git
+-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-go/packages/golang-pretty.git;a=summary
+-
+-Package: golang-pretty-dev
+-Architecture: all
+-Depends: ${shlibs:Depends}, ${misc:Depends}, golang-text-dev
+-Description: Pretty printing for go values
+- Package pretty provides pretty-printing for Go values. This is useful
+- during debugging, to avoid wrapping long output lines in the
+- terminal.
+- .
+- It provides a function, Formatter, that can be used with any function
+- that accepts a format string. It also provides convenience wrappers
+- for functions in packages fmt and log.
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/copyright b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/copyright
+deleted file mode 100644
+index 80b0807..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/copyright
++++ /dev/null
+@@ -1,30 +0,0 @@
+-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+-Upstream-Name: golang-pretty
+-Source: https://github.com/kr/pretty/
+-
+-Files: *
+-Copyright: 2011, 2012, 2013 Keith Rarick <kr at xph.us>
+-License: Expat
+-
+-Files: debian/*
+-Copyright: 2013 Tonnerre Lombard <tonnerre at ancient-solutions.com>
+-License: Expat
+-
+-License: Expat
+- Permission is hereby granted, free of charge, to any person obtaining a copy
+- of this software and associated documentation files (the "Software"), to deal
+- in the Software without restriction, including without limitation the rights
+- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+- copies of the Software, and to permit persons to whom the Software is
+- furnished to do so, subject to the following conditions:
+- .
+- The above copyright notice and this permission notice shall be included in
+- all copies or substantial portions of the Software.
+- .
+- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+- THE SOFTWARE.
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/docs b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/docs
+deleted file mode 100644
+index 304360c..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/docs
++++ /dev/null
+@@ -1 +0,0 @@
+-Readme
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/rules b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/rules
+deleted file mode 100644
+index c48a3ad..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/rules
++++ /dev/null
+@@ -1,11 +0,0 @@
+-#!/usr/bin/make -f
+-
+-# Uncomment this to turn on verbose mode.
+-export DH_VERBOSE=1
+-
+-# DH_GOPKG is the upstream path which you would normally “go get”.
+-# Using it allows us to build applications without patching locations.
+-export DH_GOPKG := github.com/kr/pretty
+-
+-%:
+- dh $@ --buildsystem=golang --with=golang
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/source/format b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/source/format
+deleted file mode 100644
+index 163aaf8..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/debian/source/format
++++ /dev/null
+@@ -1 +0,0 @@
+-3.0 (quilt)
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/diff.go b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/diff.go
+deleted file mode 100644
+index 64fac64..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/diff.go
++++ /dev/null
+@@ -1,148 +0,0 @@
+-package pretty
+-
+-import (
+- "fmt"
+- "io"
+- "reflect"
+-)
+-
+-type sbuf []string
+-
+-func (s *sbuf) Write(b []byte) (int, error) {
+- *s = append(*s, string(b))
+- return len(b), nil
+-}
+-
+-// Diff returns a slice where each element describes
+-// a difference between a and b.
+-func Diff(a, b interface{}) (desc []string) {
+- Fdiff((*sbuf)(&desc), a, b)
+- return desc
+-}
+-
+-// Fdiff writes to w a description of the differences between a and b.
+-func Fdiff(w io.Writer, a, b interface{}) {
+- diffWriter{w: w}.diff(reflect.ValueOf(a), reflect.ValueOf(b))
+-}
+-
+-type diffWriter struct {
+- w io.Writer
+- l string // label
+-}
+-
+-func (w diffWriter) printf(f string, a ...interface{}) {
+- var l string
+- if w.l != "" {
+- l = w.l + ": "
+- }
+- fmt.Fprintf(w.w, l+f, a...)
+-}
+-
+-func (w diffWriter) diff(av, bv reflect.Value) {
+- if !av.IsValid() && bv.IsValid() {
+- w.printf("nil != %#v", bv.Interface())
+- return
+- }
+- if av.IsValid() && !bv.IsValid() {
+- w.printf("%#v != nil", av.Interface())
+- return
+- }
+- if !av.IsValid() && !bv.IsValid() {
+- return
+- }
+-
+- at := av.Type()
+- bt := bv.Type()
+- if at != bt {
+- w.printf("%v != %v", at, bt)
+- return
+- }
+-
+- // numeric types, including bool
+- if at.Kind() < reflect.Array {
+- a, b := av.Interface(), bv.Interface()
+- if a != b {
+- w.printf("%#v != %#v", a, b)
+- }
+- return
+- }
+-
+- switch at.Kind() {
+- case reflect.String:
+- a, b := av.Interface(), bv.Interface()
+- if a != b {
+- w.printf("%q != %q", a, b)
+- }
+- case reflect.Ptr:
+- switch {
+- case av.IsNil() && !bv.IsNil():
+- w.printf("nil != %v", bv.Interface())
+- case !av.IsNil() && bv.IsNil():
+- w.printf("%v != nil", av.Interface())
+- case !av.IsNil() && !bv.IsNil():
+- w.diff(av.Elem(), bv.Elem())
+- }
+- case reflect.Struct:
+- for i := 0; i < av.NumField(); i++ {
+- w.relabel(at.Field(i).Name).diff(av.Field(i), bv.Field(i))
+- }
+- case reflect.Map:
+- ak, both, bk := keyDiff(av.MapKeys(), bv.MapKeys())
+- for _, k := range ak {
+- w := w.relabel(fmt.Sprintf("[%#v]", k.Interface()))
+- w.printf("%q != (missing)", av.MapIndex(k))
+- }
+- for _, k := range both {
+- w := w.relabel(fmt.Sprintf("[%#v]", k.Interface()))
+- w.diff(av.MapIndex(k), bv.MapIndex(k))
+- }
+- for _, k := range bk {
+- w := w.relabel(fmt.Sprintf("[%#v]", k.Interface()))
+- w.printf("(missing) != %q", bv.MapIndex(k))
+- }
+- case reflect.Interface:
+- w.diff(reflect.ValueOf(av.Interface()), reflect.ValueOf(bv.Interface()))
+- default:
+- if !reflect.DeepEqual(av.Interface(), bv.Interface()) {
+- w.printf("%# v != %# v", Formatter(av.Interface()), Formatter(bv.Interface()))
+- }
+- }
+-}
+-
+-func (d diffWriter) relabel(name string) (d1 diffWriter) {
+- d1 = d
+- if d.l != "" && name[0] != '[' {
+- d1.l += "."
+- }
+- d1.l += name
+- return d1
+-}
+-
+-func keyDiff(a, b []reflect.Value) (ak, both, bk []reflect.Value) {
+- for _, av := range a {
+- inBoth := false
+- for _, bv := range b {
+- if reflect.DeepEqual(av.Interface(), bv.Interface()) {
+- inBoth = true
+- both = append(both, av)
+- break
+- }
+- }
+- if !inBoth {
+- ak = append(ak, av)
+- }
+- }
+- for _, bv := range b {
+- inBoth := false
+- for _, av := range a {
+- if reflect.DeepEqual(av.Interface(), bv.Interface()) {
+- inBoth = true
+- break
+- }
+- }
+- if !inBoth {
+- bk = append(bk, bv)
+- }
+- }
+- return
+-}
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/diff_test.go b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/diff_test.go
+deleted file mode 100644
+index 02d1953..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/diff_test.go
++++ /dev/null
+@@ -1,73 +0,0 @@
+-package pretty
+-
+-import (
+- "testing"
+-)
+-
+-type difftest struct {
+- a interface{}
+- b interface{}
+- exp []string
+-}
+-
+-type S struct {
+- A int
+- S *S
+- I interface{}
+- C []int
+-}
+-
+-var diffs = []difftest{
+- {a: nil, b: nil},
+- {a: S{A: 1}, b: S{A: 1}},
+-
+- {0, "", []string{`int != string`}},
+- {0, 1, []string{`0 != 1`}},
+- {S{}, new(S), []string{`pretty.S != *pretty.S`}},
+- {"a", "b", []string{`"a" != "b"`}},
+- {S{}, S{A: 1}, []string{`A: 0 != 1`}},
+- {new(S), &S{A: 1}, []string{`A: 0 != 1`}},
+- {S{S: new(S)}, S{S: &S{A: 1}}, []string{`S.A: 0 != 1`}},
+- {S{}, S{I: 0}, []string{`I: nil != 0`}},
+- {S{I: 1}, S{I: "x"}, []string{`I: int != string`}},
+- {S{}, S{C: []int{1}}, []string{`C: []int(nil) != []int{1}`}},
+- {S{C: []int{}}, S{C: []int{1}}, []string{`C: []int{} != []int{1}`}},
+- {S{}, S{A: 1, S: new(S)}, []string{`A: 0 != 1`, `S: nil != &{0 <nil> <nil> []}`}},
+-}
+-
+-func TestDiff(t *testing.T) {
+- for _, tt := range diffs {
+- got := Diff(tt.a, tt.b)
+- eq := len(got) == len(tt.exp)
+- if eq {
+- for i := range got {
+- eq = eq && got[i] == tt.exp[i]
+- }
+- }
+- if !eq {
+- t.Errorf("diffing % #v", tt.a)
+- t.Errorf("with % #v", tt.b)
+- diffdiff(t, got, tt.exp)
+- continue
+- }
+- }
+-}
+-
+-func diffdiff(t *testing.T, got, exp []string) {
+- minus(t, "unexpected:", got, exp)
+- minus(t, "missing:", exp, got)
+-}
+-
+-func minus(t *testing.T, s string, a, b []string) {
+- var i, j int
+- for i = 0; i < len(a); i++ {
+- for j = 0; j < len(b); j++ {
+- if a[i] == b[j] {
+- break
+- }
+- }
+- if j == len(b) {
+- t.Error(s, a[i])
+- }
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/example_test.go b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/example_test.go
+deleted file mode 100644
+index ecf40f3..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/example_test.go
++++ /dev/null
+@@ -1,20 +0,0 @@
+-package pretty_test
+-
+-import (
+- "fmt"
+- "github.com/kr/pretty"
+-)
+-
+-func Example() {
+- type myType struct {
+- a, b int
+- }
+- var x = []myType{{1, 2}, {3, 4}, {5, 6}}
+- fmt.Printf("%# v", pretty.Formatter(x))
+- // output:
+- // []pretty_test.myType{
+- // {a:1, b:2},
+- // {a:3, b:4},
+- // {a:5, b:6},
+- // }
+-}
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/formatter.go b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/formatter.go
+deleted file mode 100644
+index 1161de7..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/formatter.go
++++ /dev/null
+@@ -1,300 +0,0 @@
+-package pretty
+-
+-import (
+- "fmt"
+- "github.com/kr/text"
+- "io"
+- "reflect"
+- "strconv"
+- "text/tabwriter"
+-)
+-
+-const (
+- limit = 50
+-)
+-
+-type formatter struct {
+- x interface{}
+- force bool
+- quote bool
+-}
+-
+-// Formatter makes a wrapper, f, that will format x as go source with line
+-// breaks and tabs. Object f responds to the "%v" formatting verb when both the
+-// "#" and " " (space) flags are set, for example:
+-//
+-// fmt.Sprintf("%# v", Formatter(x))
+-//
+-// If one of these two flags is not set, or any other verb is used, f will
+-// format x according to the usual rules of package fmt.
+-// In particular, if x satisfies fmt.Formatter, then x.Format will be called.
+-func Formatter(x interface{}) (f fmt.Formatter) {
+- return formatter{x: x, quote: true}
+-}
+-
+-func (fo formatter) String() string {
+- return fmt.Sprint(fo.x) // unwrap it
+-}
+-
+-func (fo formatter) passThrough(f fmt.State, c rune) {
+- s := "%"
+- for i := 0; i < 128; i++ {
+- if f.Flag(i) {
+- s += string(i)
+- }
+- }
+- if w, ok := f.Width(); ok {
+- s += fmt.Sprintf("%d", w)
+- }
+- if p, ok := f.Precision(); ok {
+- s += fmt.Sprintf(".%d", p)
+- }
+- s += string(c)
+- fmt.Fprintf(f, s, fo.x)
+-}
+-
+-func (fo formatter) Format(f fmt.State, c rune) {
+- if fo.force || c == 'v' && f.Flag('#') && f.Flag(' ') {
+- w := tabwriter.NewWriter(f, 4, 4, 1, ' ', 0)
+- p := &printer{tw: w, Writer: w}
+- p.printValue(reflect.ValueOf(fo.x), true, fo.quote)
+- w.Flush()
+- return
+- }
+- fo.passThrough(f, c)
+-}
+-
+-type printer struct {
+- io.Writer
+- tw *tabwriter.Writer
+-}
+-
+-func (p *printer) indent() *printer {
+- q := *p
+- q.tw = tabwriter.NewWriter(p.Writer, 4, 4, 1, ' ', 0)
+- q.Writer = text.NewIndentWriter(q.tw, []byte{'\t'})
+- return &q
+-}
+-
+-func (p *printer) printInline(v reflect.Value, x interface{}, showType bool) {
+- if showType {
+- io.WriteString(p, v.Type().String())
+- fmt.Fprintf(p, "(%#v)", x)
+- } else {
+- fmt.Fprintf(p, "%#v", x)
+- }
+-}
+-
+-func (p *printer) printValue(v reflect.Value, showType, quote bool) {
+- switch v.Kind() {
+- case reflect.Bool:
+- p.printInline(v, v.Bool(), showType)
+- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+- p.printInline(v, v.Int(), showType)
+- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+- p.printInline(v, v.Uint(), showType)
+- case reflect.Float32, reflect.Float64:
+- p.printInline(v, v.Float(), showType)
+- case reflect.Complex64, reflect.Complex128:
+- fmt.Fprintf(p, "%#v", v.Complex())
+- case reflect.String:
+- p.fmtString(v.String(), quote)
+- case reflect.Map:
+- t := v.Type()
+- if showType {
+- io.WriteString(p, t.String())
+- }
+- writeByte(p, '{')
+- if nonzero(v) {
+- expand := !canInline(v.Type())
+- pp := p
+- if expand {
+- writeByte(p, '\n')
+- pp = p.indent()
+- }
+- keys := v.MapKeys()
+- for i := 0; i < v.Len(); i++ {
+- showTypeInStruct := true
+- k := keys[i]
+- mv := v.MapIndex(k)
+- pp.printValue(k, false, true)
+- writeByte(pp, ':')
+- if expand {
+- writeByte(pp, '\t')
+- }
+- showTypeInStruct = t.Elem().Kind() == reflect.Interface
+- pp.printValue(mv, showTypeInStruct, true)
+- if expand {
+- io.WriteString(pp, ",\n")
+- } else if i < v.Len()-1 {
+- io.WriteString(pp, ", ")
+- }
+- }
+- if expand {
+- pp.tw.Flush()
+- }
+- }
+- writeByte(p, '}')
+- case reflect.Struct:
+- t := v.Type()
+- if showType {
+- io.WriteString(p, t.String())
+- }
+- writeByte(p, '{')
+- if nonzero(v) {
+- expand := !canInline(v.Type())
+- pp := p
+- if expand {
+- writeByte(p, '\n')
+- pp = p.indent()
+- }
+- for i := 0; i < v.NumField(); i++ {
+- showTypeInStruct := true
+- if f := t.Field(i); f.Name != "" {
+- io.WriteString(pp, f.Name)
+- writeByte(pp, ':')
+- if expand {
+- writeByte(pp, '\t')
+- }
+- showTypeInStruct = f.Type.Kind() == reflect.Interface
+- }
+- pp.printValue(getField(v, i), showTypeInStruct, true)
+- if expand {
+- io.WriteString(pp, ",\n")
+- } else if i < v.NumField()-1 {
+- io.WriteString(pp, ", ")
+- }
+- }
+- if expand {
+- pp.tw.Flush()
+- }
+- }
+- writeByte(p, '}')
+- case reflect.Interface:
+- switch e := v.Elem(); {
+- case e.Kind() == reflect.Invalid:
+- io.WriteString(p, "nil")
+- case e.IsValid():
+- p.printValue(e, showType, true)
+- default:
+- io.WriteString(p, v.Type().String())
+- io.WriteString(p, "(nil)")
+- }
+- case reflect.Array, reflect.Slice:
+- t := v.Type()
+- if showType {
+- io.WriteString(p, t.String())
+- }
+- if v.Kind() == reflect.Slice && v.IsNil() && showType {
+- io.WriteString(p, "(nil)")
+- break
+- }
+- if v.Kind() == reflect.Slice && v.IsNil() {
+- io.WriteString(p, "nil")
+- break
+- }
+- writeByte(p, '{')
+- expand := !canInline(v.Type())
+- pp := p
+- if expand {
+- writeByte(p, '\n')
+- pp = p.indent()
+- }
+- for i := 0; i < v.Len(); i++ {
+- showTypeInSlice := t.Elem().Kind() == reflect.Interface
+- pp.printValue(v.Index(i), showTypeInSlice, true)
+- if expand {
+- io.WriteString(pp, ",\n")
+- } else if i < v.Len()-1 {
+- io.WriteString(pp, ", ")
+- }
+- }
+- if expand {
+- pp.tw.Flush()
+- }
+- writeByte(p, '}')
+- case reflect.Ptr:
+- e := v.Elem()
+- if !e.IsValid() {
+- writeByte(p, '(')
+- io.WriteString(p, v.Type().String())
+- io.WriteString(p, ")(nil)")
+- } else {
+- writeByte(p, '&')
+- p.printValue(e, true, true)
+- }
+- case reflect.Chan:
+- x := v.Pointer()
+- if showType {
+- writeByte(p, '(')
+- io.WriteString(p, v.Type().String())
+- fmt.Fprintf(p, ")(%#v)", x)
+- } else {
+- fmt.Fprintf(p, "%#v", x)
+- }
+- case reflect.Func:
+- io.WriteString(p, v.Type().String())
+- io.WriteString(p, " {...}")
+- case reflect.UnsafePointer:
+- p.printInline(v, v.Pointer(), showType)
+- case reflect.Invalid:
+- io.WriteString(p, "nil")
+- }
+-}
+-
+-func canInline(t reflect.Type) bool {
+- switch t.Kind() {
+- case reflect.Map:
+- return !canExpand(t.Elem())
+- case reflect.Struct:
+- for i := 0; i < t.NumField(); i++ {
+- if canExpand(t.Field(i).Type) {
+- return false
+- }
+- }
+- return true
+- case reflect.Interface:
+- return false
+- case reflect.Array, reflect.Slice:
+- return !canExpand(t.Elem())
+- case reflect.Ptr:
+- return false
+- case reflect.Chan, reflect.Func, reflect.UnsafePointer:
+- return false
+- }
+- return true
+-}
+-
+-func canExpand(t reflect.Type) bool {
+- switch t.Kind() {
+- case reflect.Map, reflect.Struct,
+- reflect.Interface, reflect.Array, reflect.Slice,
+- reflect.Ptr:
+- return true
+- }
+- return false
+-}
+-
+-func (p *printer) fmtString(s string, quote bool) {
+- if quote {
+- s = strconv.Quote(s)
+- }
+- io.WriteString(p, s)
+-}
+-
+-func tryDeepEqual(a, b interface{}) bool {
+- defer func() { recover() }()
+- return reflect.DeepEqual(a, b)
+-}
+-
+-func writeByte(w io.Writer, b byte) {
+- w.Write([]byte{b})
+-}
+-
+-func getField(v reflect.Value, i int) reflect.Value {
+- val := v.Field(i)
+- if val.Kind() == reflect.Interface && !val.IsNil() {
+- val = val.Elem()
+- }
+- return val
+-}
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/formatter_test.go b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/formatter_test.go
+deleted file mode 100644
+index 303f033..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/formatter_test.go
++++ /dev/null
+@@ -1,146 +0,0 @@
+-package pretty
+-
+-import (
+- "fmt"
+- "io"
+- "testing"
+- "unsafe"
+-)
+-
+-type test struct {
+- v interface{}
+- s string
+-}
+-
+-type LongStructTypeName struct {
+- longFieldName interface{}
+- otherLongFieldName interface{}
+-}
+-
+-type SA struct {
+- t *T
+-}
+-
+-type T struct {
+- x, y int
+-}
+-
+-type F int
+-
+-func (f F) Format(s fmt.State, c rune) {
+- fmt.Fprintf(s, "F(%d)", int(f))
+-}
+-
+-var long = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
+-
+-var gosyntax = []test{
+- {nil, `nil`},
+- {"", `""`},
+- {"a", `"a"`},
+- {1, "int(1)"},
+- {1.0, "float64(1)"},
+- {[]int(nil), "[]int(nil)"},
+- {[0]int{}, "[0]int{}"},
+- {complex(1, 0), "(1+0i)"},
+- //{make(chan int), "(chan int)(0x1234)"},
+- {unsafe.Pointer(uintptr(1)), "unsafe.Pointer(0x1)"},
+- {func(int) {}, "func(int) {...}"},
+- {map[int]int{1: 1}, "map[int]int{1:1}"},
+- {int32(1), "int32(1)"},
+- {io.EOF, `&errors.errorString{s:"EOF"}`},
+- {[]string{"a"}, `[]string{"a"}`},
+- {
+- []string{long},
+- `[]string{"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"}`,
+- },
+- {F(5), "pretty.F(5)"},
+- {
+- SA{&T{1, 2}},
+- `pretty.SA{
+- t: &pretty.T{x:1, y:2},
+-}`,
+- },
+- {
+- map[int][]byte{1: []byte{}},
+- `map[int][]uint8{
+- 1: {},
+-}`,
+- },
+- {
+- map[int]T{1: T{}},
+- `map[int]pretty.T{
+- 1: {},
+-}`,
+- },
+- {
+- long,
+- `"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"`,
+- },
+- {
+- LongStructTypeName{
+- longFieldName: LongStructTypeName{},
+- otherLongFieldName: long,
+- },
+- `pretty.LongStructTypeName{
+- longFieldName: pretty.LongStructTypeName{},
+- otherLongFieldName: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
+-}`,
+- },
+- {
+- &LongStructTypeName{
+- longFieldName: &LongStructTypeName{},
+- otherLongFieldName: (*LongStructTypeName)(nil),
+- },
+- `&pretty.LongStructTypeName{
+- longFieldName: &pretty.LongStructTypeName{},
+- otherLongFieldName: (*pretty.LongStructTypeName)(nil),
+-}`,
+- },
+- {
+- []LongStructTypeName{
+- {nil, nil},
+- {3, 3},
+- {long, nil},
+- },
+- `[]pretty.LongStructTypeName{
+- {},
+- {
+- longFieldName: int(3),
+- otherLongFieldName: int(3),
+- },
+- {
+- longFieldName: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
+- otherLongFieldName: nil,
+- },
+-}`,
+- },
+- {
+- []interface{}{
+- LongStructTypeName{nil, nil},
+- []byte{1, 2, 3},
+- T{3, 4},
+- LongStructTypeName{long, nil},
+- },
+- `[]interface {}{
+- pretty.LongStructTypeName{},
+- []uint8{0x1, 0x2, 0x3},
+- pretty.T{x:3, y:4},
+- pretty.LongStructTypeName{
+- longFieldName: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
+- otherLongFieldName: nil,
+- },
+-}`,
+- },
+-}
+-
+-func TestGoSyntax(t *testing.T) {
+- for _, tt := range gosyntax {
+- s := fmt.Sprintf("%# v", Formatter(tt.v))
+- if tt.s != s {
+- t.Errorf("expected %q", tt.s)
+- t.Errorf("got %q", s)
+- t.Errorf("expraw\n%s", tt.s)
+- t.Errorf("gotraw\n%s", s)
+- }
+- }
+-}
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/pretty.go b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/pretty.go
+deleted file mode 100644
+index d3df868..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/pretty.go
++++ /dev/null
+@@ -1,98 +0,0 @@
+-// Package pretty provides pretty-printing for Go values. This is
+-// useful during debugging, to avoid wrapping long output lines in
+-// the terminal.
+-//
+-// It provides a function, Formatter, that can be used with any
+-// function that accepts a format string. It also provides
+-// convenience wrappers for functions in packages fmt and log.
+-package pretty
+-
+-import (
+- "fmt"
+- "io"
+- "log"
+-)
+-
+-// Errorf is a convenience wrapper for fmt.Errorf.
+-//
+-// Calling Errorf(f, x, y) is equivalent to
+-// fmt.Errorf(f, Formatter(x), Formatter(y)).
+-func Errorf(format string, a ...interface{}) error {
+- return fmt.Errorf(format, wrap(a, false)...)
+-}
+-
+-// Fprintf is a convenience wrapper for fmt.Fprintf.
+-//
+-// Calling Fprintf(w, f, x, y) is equivalent to
+-// fmt.Fprintf(w, f, Formatter(x), Formatter(y)).
+-func Fprintf(w io.Writer, format string, a ...interface{}) (n int, error error) {
+- return fmt.Fprintf(w, format, wrap(a, false)...)
+-}
+-
+-// Log is a convenience wrapper for log.Printf.
+-//
+-// Calling Log(x, y) is equivalent to
+-// log.Print(Formatter(x), Formatter(y)), but each operand is
+-// formatted with "%# v".
+-func Log(a ...interface{}) {
+- log.Print(wrap(a, true)...)
+-}
+-
+-// Logf is a convenience wrapper for log.Printf.
+-//
+-// Calling Logf(f, x, y) is equivalent to
+-// log.Printf(f, Formatter(x), Formatter(y)).
+-func Logf(format string, a ...interface{}) {
+- log.Printf(format, wrap(a, false)...)
+-}
+-
+-// Logln is a convenience wrapper for log.Printf.
+-//
+-// Calling Logln(x, y) is equivalent to
+-// log.Println(Formatter(x), Formatter(y)), but each operand is
+-// formatted with "%# v".
+-func Logln(a ...interface{}) {
+- log.Println(wrap(a, true)...)
+-}
+-
+-// Print pretty-prints its operands and writes to standard output.
+-//
+-// Calling Print(x, y) is equivalent to
+-// fmt.Print(Formatter(x), Formatter(y)), but each operand is
+-// formatted with "%# v".
+-func Print(a ...interface{}) (n int, errno error) {
+- return fmt.Print(wrap(a, true)...)
+-}
+-
+-// Printf is a convenience wrapper for fmt.Printf.
+-//
+-// Calling Printf(f, x, y) is equivalent to
+-// fmt.Printf(f, Formatter(x), Formatter(y)).
+-func Printf(format string, a ...interface{}) (n int, errno error) {
+- return fmt.Printf(format, wrap(a, false)...)
+-}
+-
+-// Println pretty-prints its operands and writes to standard output.
+-//
+-// Calling Print(x, y) is equivalent to
+-// fmt.Println(Formatter(x), Formatter(y)), but each operand is
+-// formatted with "%# v".
+-func Println(a ...interface{}) (n int, errno error) {
+- return fmt.Println(wrap(a, true)...)
+-}
+-
+-// Sprintf is a convenience wrapper for fmt.Sprintf.
+-//
+-// Calling Sprintf(f, x, y) is equivalent to
+-// fmt.Sprintf(f, Formatter(x), Formatter(y)).
+-func Sprintf(format string, a ...interface{}) string {
+- return fmt.Sprintf(format, wrap(a, false)...)
+-}
+-
+-func wrap(a []interface{}, force bool) []interface{} {
+- w := make([]interface{}, len(a))
+- for i, x := range a {
+- w[i] = formatter{x: x, force: force}
+- }
+- return w
+-}
+diff --git a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/zero.go b/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/zero.go
+deleted file mode 100644
+index abb5b6f..0000000
+--- a/Godeps/_workspace/src/github.com/tonnerre/golang-pretty/zero.go
++++ /dev/null
+@@ -1,41 +0,0 @@
+-package pretty
+-
+-import (
+- "reflect"
+-)
+-
+-func nonzero(v reflect.Value) bool {
+- switch v.Kind() {
+- case reflect.Bool:
+- return v.Bool()
+- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+- return v.Int() != 0
+- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+- return v.Uint() != 0
+- case reflect.Float32, reflect.Float64:
+- return v.Float() != 0
+- case reflect.Complex64, reflect.Complex128:
+- return v.Complex() != complex(0, 0)
+- case reflect.String:
+- return v.String() != ""
+- case reflect.Struct:
+- for i := 0; i < v.NumField(); i++ {
+- if nonzero(getField(v, i)) {
+- return true
+- }
+- }
+- return false
+- case reflect.Array:
+- for i := 0; i < v.Len(); i++ {
+- if nonzero(v.Index(i)) {
+- return true
+- }
+- }
+- return false
+- case reflect.Map, reflect.Interface, reflect.Slice, reflect.Ptr, reflect.Chan, reflect.Func:
+- return !v.IsNil()
+- case reflect.UnsafePointer:
+- return v.Pointer() != 0
+- }
+- return true
+-}
diff --git a/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE b/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE
deleted file mode 100644
index 968b453..0000000
diff --git a/apiserver b/apiserver
index e24e724..204fe57 100644
--- a/apiserver
+++ b/apiserver
@@ -5,16 +5,22 @@
#
# The address on the local server to listen to.
-KUBE_API_ADDRESS="127.0.0.1"
+KUBE_API_ADDRESS="--address=127.0.0.1"
# The port on the local server to listen on.
-KUBE_API_PORT="8080"
+KUBE_API_PORT="--port=8080"
# How the replication controller and scheduler find the apiserver
-KUBE_MASTER="127.0.0.1:8080"
+KUBE_MASTER="--master=127.0.0.1:8080"
# Comma seperated list of minions
-MINION_ADDRESSES="127.0.0.1"
+MINION_ADDRESSES="--machines=127.0.0.1"
# Port minions listen on
-MINION_PORT="10250"
+MINION_PORT="--minion_port=10250"
+
+# Address range to use for services
+KUBE_SERVICE_ADDRESSES="--portal_net=10.254.0.0/16"
+
+# Add you own!
+KUBE_API_ARGS=""
diff --git a/config b/config
index 5dddcc1..c96170c 100644
--- a/config
+++ b/config
@@ -6,17 +6,18 @@
#
# kubernetes-apiserver.service
# kubernetes-controller-manager.service
-# kubernetes-kubelet.service
+# kubernetes-scheduler.service
+# kubelet.service
# kubernetes-proxy.service
# Comma seperated list of nodes in the etcd cluster
-KUBE_ETCD_SERVERS="http://127.0.0.1:4001"
+KUBE_ETCD_SERVERS="--etcd_servers=http://127.0.0.1:4001"
# logging to stderr means we get it in the systemd journal
-KUBE_LOGTOSTDERR="true"
+KUBE_LOGTOSTDERR="--logtostderr=true"
# journal message level, 0 is debug
-KUBE_LOG_LEVEL=0
+KUBE_LOG_LEVEL="--v=0"
# Should this cluster be allowed to run privleged docker containers
-KUBE_ALLOW_PRIV="true"
+KUBE_ALLOW_PRIV="--allow_privileged=false"
diff --git a/controller-manager b/controller-manager
index a631838..8d8f491 100644
--- a/controller-manager
+++ b/controller-manager
@@ -2,3 +2,6 @@
# The following values are used to configure the kubernetes controller-manager
# defaults from config and apiserver should be adequate
+
+# Add you own!
+KUBE_CONTROLLER_MANAGER_ARGS=""
diff --git a/getsource.sh b/getsource.sh
new file mode 100755
index 0000000..b45b064
--- /dev/null
+++ b/getsource.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+SPEC=kubernetes.spec
+
+wget https://github.com/GoogleCloudPlatform/kubernetes/archive/$1/kubernetes-${1:0:7}.tar.gz
+
+#put the git hash in there
+sed -i -e "s/%global commit\t\t[[:xdigit:]]\{40\}/%global commit\t\t$1/" ${SPEC}
+
+#increment the version number
+rpmdev-bumpspec --comment="Bump to upstream ${1}" --userstring="Eric Paris <eparis at redhat.com" ${SPEC}
+
+echo "****Don't forget to run: fedpkg new-sources kubernetes-${1:0:7}.tar.gz"
diff --git a/kube-apiserver.service b/kube-apiserver.service
index 5f9e49c..cbd6ca4 100644
--- a/kube-apiserver.service
+++ b/kube-apiserver.service
@@ -1,21 +1,23 @@
[Unit]
Description=Kubernetes API Server
+Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
-EnvironmentFile=/etc/kubernetes/config
-EnvironmentFile=/etc/kubernetes/apiserver
+EnvironmentFile=-/etc/kubernetes/config
+EnvironmentFile=-/etc/kubernetes/apiserver
User=kube
ExecStart=/usr/bin/kube-apiserver \
- --logtostderr=${KUBE_LOGTOSTDERR} \
- --v=${KUBE_LOG_LEVEL} \
- --etcd_servers=${KUBE_ETCD_SERVERS} \
- --address=${KUBE_API_ADDRESS} \
- --port=${KUBE_API_PORT} \
- --machines=${MINION_ADDRESSES} \
- --minion_port=${MINION_PORT} \
- --allow_privileged=${KUBE_ALLOW_PRIV}
+ ${KUBE_LOGTOSTDERR} \
+ ${KUBE_LOG_LEVEL} \
+ ${KUBE_ETCD_SERVERS} \
+ ${KUBE_API_ADDRESS} \
+ ${KUBE_API_PORT} \
+ ${MINION_ADDRESSES} \
+ ${MINION_PORT} \
+ ${KUBE_ALLOW_PRIV} \
+ ${KUBE_SERVICE_ADDRESSES} \
+ ${KUBE_API_ARGS}
Restart=on-failure
[Install]
WantedBy=multi-user.target
-
diff --git a/kube-controller-manager.service b/kube-controller-manager.service
index 287c45b..6c2bfb2 100644
--- a/kube-controller-manager.service
+++ b/kube-controller-manager.service
@@ -1,15 +1,17 @@
[Unit]
Description=Kubernetes Controller Manager
+Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
-EnvironmentFile=/etc/kubernetes/config
-EnvironmentFile=/etc/kubernetes/apiserver
-EnvironmentFile=/etc/kubernetes/controller-manager
+EnvironmentFile=-/etc/kubernetes/config
+EnvironmentFile=-/etc/kubernetes/apiserver
+EnvironmentFile=-/etc/kubernetes/controller-manager
User=kube
ExecStart=/usr/bin/kube-controller-manager \
- --logtostderr=${KUBE_LOGTOSTDERR} \
- --v=${KUBE_LOG_LEVEL} \
- --master=${KUBE_MASTER}
+ ${KUBE_LOGTOSTDERR} \
+ ${KUBE_LOG_LEVEL} \
+ ${KUBE_MASTER} \
+ ${KUBE_CONTROLLER_MANAGER_ARGS}
Restart=on-failure
[Install]
diff --git a/kube-proxy.service b/kube-proxy.service
index 595c7cd..fcfc2e2 100644
--- a/kube-proxy.service
+++ b/kube-proxy.service
@@ -1,16 +1,15 @@
[Unit]
-Description=Kubernetes Proxy
-# the proxy crashes if etcd isn't reachable.
-# https://github.com/GoogleCloudPlatform/kubernetes/issues/1206
-After=network.target
+Description=Kubernetes Kube-Proxy Server
+Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
-EnvironmentFile=/etc/kubernetes/config
-EnvironmentFile=/etc/kubernetes/proxy
+EnvironmentFile=-/etc/kubernetes/config
+EnvironmentFile=-/etc/kubernetes/proxy
ExecStart=/usr/bin/kube-proxy \
- --logtostderr=${KUBE_LOGTOSTDERR} \
- --v=${KUBE_LOG_LEVEL} \
- --etcd_servers=${KUBE_ETCD_SERVERS}
+ ${KUBE_LOGTOSTDERR} \
+ ${KUBE_LOG_LEVEL} \
+ ${KUBE_ETCD_SERVERS} \
+ ${KUBE_PROXY_ARGS}
Restart=on-failure
[Install]
diff --git a/kube-scheduler.service b/kube-scheduler.service
index 76d4036..6d123ed 100644
--- a/kube-scheduler.service
+++ b/kube-scheduler.service
@@ -1,14 +1,16 @@
[Unit]
-Description=Kubernetes Scheduler
+Description=Kubernetes Scheduler Plugin
+Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service]
-EnvironmentFile=/etc/kubernetes/config
-EnvironmentFile=/etc/kubernetes/apiserver
-EnvironmentFile=/etc/kubernetes/scheduler
+EnvironmentFile=-/etc/kubernetes/config
+EnvironmentFile=-/etc/kubernetes/apiserver
+EnvironmentFile=-/etc/kubernetes/scheduler
ExecStart=/usr/bin/kube-scheduler \
- --logtostderr=${KUBE_LOGTOSTDERR} \
- --v=${KUBE_LOG_LEVEL} \
- --master=${KUBE_MASTER}
+ ${KUBE_LOGTOSTDERR} \
+ ${KUBE_LOG_LEVEL} \
+ ${KUBE_MASTER} \
+ ${KUBE_SCHEDULER_ARGS}
Restart=on-failure
[Install]
diff --git a/kubelet b/kubelet
index cc38cee..1208038 100644
--- a/kubelet
+++ b/kubelet
@@ -1,11 +1,14 @@
###
# kubernetes kublet (minion) config
-# The address for the info server to serve on
-MINION_ADDRESS="127.0.0.1"
+# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
+MINION_ADDRESS="--address=127.0.0.1"
# The port for the info server to serve on
-MINION_PORT="10250"
+MINION_PORT="--port=10250"
# You may leave this blank to use the actual hostname
-MINION_HOSTNAME="127.0.0.1"
+MINION_HOSTNAME="--hostname_override=127.0.0.1"
+
+# Add your own!
+MINION_ARGS=""
diff --git a/kubelet.service b/kubelet.service
index de09249..6b26473 100644
--- a/kubelet.service
+++ b/kubelet.service
@@ -1,19 +1,21 @@
[Unit]
-Description=Kubernetes Kubelet
+Description=Kubernetes Kubelet Server
+Documentation=https://github.com/GoogleCloudPlatform/kubernetes
After=docker.socket cadvisor.service
-Requires=docker.socket cadvisor.service
+Requires=docker.socket
[Service]
-EnvironmentFile=/etc/kubernetes/config
-EnvironmentFile=/etc/kubernetes/kubelet
+EnvironmentFile=-/etc/kubernetes/config
+EnvironmentFile=-/etc/kubernetes/kubelet
ExecStart=/usr/bin/kubelet \
- --logtostderr=${KUBE_LOGTOSTDERR} \
- --v=${KUBE_LOG_LEVEL} \
- --etcd_servers=${KUBE_ETCD_SERVERS} \
- --address=${MINION_ADDRESS} \
- --port=${MINION_PORT} \
- --hostname_override=${MINION_HOSTNAME} \
- --allow_privileged=${KUBE_ALLOW_PRIV}
+ ${KUBE_LOGTOSTDERR} \
+ ${KUBE_LOG_LEVEL} \
+ ${KUBE_ETCD_SERVERS} \
+ ${MINION_ADDRESS} \
+ ${MINION_PORT} \
+ ${MINION_HOSTNAME} \
+ ${KUBE_ALLOW_PRIV} \
+ ${MINION_ARGS}
Restart=on-failure
[Install]
diff --git a/kubernetes.spec b/kubernetes.spec
index 3062fb0..4de307e 100644
--- a/kubernetes.spec
+++ b/kubernetes.spec
@@ -1,13 +1,13 @@
#debuginfo not supported with Go
%global debug_package %{nil}
%global import_path github.com/GoogleCloudPlatform/kubernetes
-%global commit 4452163ffde9dc58382f313b724ddf3bad8ea13f
+%global commit b01126322b826a15db06f6eeefeeb56dc06db7af
%global shortcommit %(c=%{commit}; echo ${c:0:7})
#binaries which should be called kube-*
%global prefixed_binaries proxy apiserver controller-manager scheduler
#binaries which should not be renamed at all
-%global nonprefixed_binaries kubelet kubecfg
+%global nonprefixed_binaries kubelet kubectl
#all of the above
%global binaries %{prefixed_binaries} %{nonprefixed_binaries}
@@ -18,7 +18,7 @@
Name: kubernetes
Version: 0.4
-Release: 0.0.git%{shortcommit}%{?dist}
+Release: 0.1.git%{shortcommit}%{?dist}
Summary: Container cluster management
License: ASL 2.0
URL: https://github.com/GoogleCloudPlatform/kubernetes
@@ -58,28 +58,36 @@ BuildRequires: systemd
BuildRequires: golang-cover
BuildRequires: etcd
BuildRequires: golang(bitbucket.org/kardianos/osext)
-BuildRequires: golang(github.com/coreos/go-log/log)
-BuildRequires: golang(github.com/coreos/go-systemd)
-BuildRequires: golang(github.com/coreos/go-etcd/etcd)
-BuildRequires: golang(github.com/google/gofuzz)
-BuildRequires: golang(code.google.com/p/go.net/context)
-BuildRequires: golang(code.google.com/p/go.net/html)
-BuildRequires: golang(code.google.com/p/go.net/websocket)
+BuildRequires: golang(code.google.com/p/gcfg)
BuildRequires: golang(code.google.com/p/goauth2)
-BuildRequires: golang(code.google.com/p/go-uuid)
+BuildRequires: golang(code.google.com/p/go.net/context)
+BuildRequires: golang(code.google.com/p/go.net/html)
+BuildRequires: golang(code.google.com/p/go.net/websocket)
BuildRequires: golang(code.google.com/p/google-api-go-client)
+BuildRequires: golang(code.google.com/p/go-uuid)
+BuildRequires: golang(github.com/coreos/go-etcd/etcd)
+BuildRequires: golang(github.com/coreos/go-log/log)
+BuildRequires: golang(github.com/coreos/go-systemd)
+BuildRequires: golang(github.com/elazarl/go-bindata-assetfs)
BuildRequires: golang(github.com/fsouza/go-dockerclient) > 0-0.6
BuildRequires: golang(github.com/golang/glog)
-BuildRequires: golang(github.com/stretchr/objx)
-BuildRequires: golang(github.com/stretchr/testify)
-BuildRequires: golang(gopkg.in/v1/yaml)
BuildRequires: golang(github.com/google/cadvisor)
-BuildRequires: golang(code.google.com/p/gcfg)
+BuildRequires: golang(github.com/google/gofuzz)
+BuildRequires: golang(github.com/kr/text)
BuildRequires: golang(github.com/mitchellh/goamz/aws)
BuildRequires: golang(github.com/mitchellh/goamz/ec2)
-BuildRequires: golang(github.com/vaughan0/go-ini)
-BuildRequires: golang(github.com/elazarl/go-bindata-assetfs)
+BuildRequires: golang(github.com/mitchellh/mapstructure)
+BuildRequires: golang(github.com/racker/perigee)
+BuildRequires: golang(github.com/rackspace/gophercloud)
BuildRequires: golang(github.com/skratchdot/open-golang/open)
+BuildRequires: golang(github.com/spf13/cobra)
+BuildRequires: golang(github.com/spf13/pflag)
+BuildRequires: golang(github.com/stretchr/objx)
+BuildRequires: golang(github.com/stretchr/testify)
+BuildRequires: golang(github.com/tonnerre/golang-pretty)
+BuildRequires: golang(github.com/vaughan0/go-ini)
+BuildRequires: golang(gopkg.in/v1/yaml)
+
%description
%{summary}
@@ -165,7 +173,7 @@ install -d %{buildroot}/var/lib/kubelet
%doc README.md LICENSE CONTRIB.md CONTRIBUTING.md DESIGN.md
%{_mandir}/man1/*
%{_bindir}/kube-apiserver
-%{_bindir}/kubecfg
+%{_bindir}/kubectl
%{_bindir}/kube-controller-manager
%{_bindir}/kubelet
%{_bindir}/kube-proxy
@@ -199,6 +207,10 @@ getent passwd kube >/dev/null || useradd -r -g kube -d / -s /sbin/nologin \
%systemd_postun
%changelog
+* Fri Oct 17 2014 Eric Paris <eparis at redhat.com - 0.4-0.1.gitb011263
+- Bump to upstream b01126322b826a15db06f6eeefeeb56dc06db7af
+- This is a major non backward compatible change.
+
* Thu Oct 16 2014 Eric Paris <eparis at redhat.com> - 0.4-0.0.git4452163
- rebase to v0.4
- include man pages
diff --git a/proxy b/proxy
index 50dda83..0342768 100644
--- a/proxy
+++ b/proxy
@@ -2,3 +2,6 @@
# kubernetes proxy config
# default config should be adequate
+
+# Add your own!
+KUBE_PROXY_ARGS=""
diff --git a/scheduler b/scheduler
index ae87ea1..f6fc507 100644
--- a/scheduler
+++ b/scheduler
@@ -2,3 +2,6 @@
# kubernetes scheduler config
# default config should be adequate
+
+# Add your own!
+KUBE_SCHEDULER_ARGS=""
diff --git a/sources b/sources
index 90225da..996d449 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7f5af1b39a5de3c8dff2e647fe619ffe kubernetes-4452163.tar.gz
+6dfac48ac66d5752dacdc8c24c37702d kubernetes-b011263.tar.gz
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/kubernetes.git/commit/?h=f20&id=81df690e967cd152547192c135ed447d30b1c695
More information about the scm-commits
mailing list