Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #422 from crawford/vendor
Browse files Browse the repository at this point in the history
vendor: move from Godeps
  • Loading branch information
crawford committed Apr 2, 2016
2 parents c3894a1 + daf8cc8 commit d17c76c
Show file tree
Hide file tree
Showing 133 changed files with 142 additions and 203 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
language: go
sudo: false
matrix:
include:
- go: 1.4
install:
- go get golang.org/x/tools/cmd/cover
- go get golang.org/x/tools/cmd/vet
- go: 1.5
env: GO15VENDOREXPERIMENT=1
- go: 1.6

script:
- ./test
46 changes: 0 additions & 46 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

2 changes: 0 additions & 2 deletions Godeps/_workspace/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"
"unicode"

"github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/coreos/yaml"
"github.com/coreos/yaml"
)

// CloudConfig encapsulates the entire cloud-config configuration file and maps
Expand Down
12 changes: 6 additions & 6 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ func TestNewCloudConfig(t *testing.T) {
{},
{
contents: "#cloud-config\nwrite_files:\n - path: underscore",
config: CloudConfig{WriteFiles: []File{File{Path: "underscore"}}},
config: CloudConfig{WriteFiles: []File{{Path: "underscore"}}},
},
{
contents: "#cloud-config\nwrite-files:\n - path: hyphen",
config: CloudConfig{WriteFiles: []File{File{Path: "hyphen"}}},
config: CloudConfig{WriteFiles: []File{{Path: "hyphen"}}},
},
{
contents: "#cloud-config\ncoreos:\n update:\n reboot-strategy: off",
Expand All @@ -46,19 +46,19 @@ func TestNewCloudConfig(t *testing.T) {
},
{
contents: "#cloud-config\nwrite_files:\n - permissions: 0744",
config: CloudConfig{WriteFiles: []File{File{RawFilePermissions: "0744"}}},
config: CloudConfig{WriteFiles: []File{{RawFilePermissions: "0744"}}},
},
{
contents: "#cloud-config\nwrite_files:\n - permissions: 744",
config: CloudConfig{WriteFiles: []File{File{RawFilePermissions: "744"}}},
config: CloudConfig{WriteFiles: []File{{RawFilePermissions: "744"}}},
},
{
contents: "#cloud-config\nwrite_files:\n - permissions: '0744'",
config: CloudConfig{WriteFiles: []File{File{RawFilePermissions: "0744"}}},
config: CloudConfig{WriteFiles: []File{{RawFilePermissions: "0744"}}},
},
{
contents: "#cloud-config\nwrite_files:\n - permissions: '744'",
config: CloudConfig{WriteFiles: []File{File{RawFilePermissions: "744"}}},
config: CloudConfig{WriteFiles: []File{{RawFilePermissions: "744"}}},
},
}

Expand Down
28 changes: 14 additions & 14 deletions config/validate/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ func TestChild(t *testing.T) {
{
parent: node{
children: []node{
node{name: "c1"},
node{name: "c2"},
node{name: "c3"},
{name: "c1"},
{name: "c2"},
{name: "c3"},
},
},
},
{
parent: node{
children: []node{
node{name: "c1"},
node{name: "c2"},
node{name: "c3"},
{name: "c1"},
{name: "c2"},
{name: "c3"},
},
},
name: "c2",
Expand Down Expand Up @@ -76,8 +76,8 @@ func TestHumanType(t *testing.T) {
node: node{
Value: reflect.ValueOf([]int{1, 2}),
children: []node{
node{Value: reflect.ValueOf(1)},
node{Value: reflect.ValueOf(2)},
{Value: reflect.ValueOf(1)},
{Value: reflect.ValueOf(2)},
}},
humanType: "[]int",
},
Expand Down Expand Up @@ -108,7 +108,7 @@ func TestToNode(t *testing.T) {
}{},
node: node{
children: []node{
node{
{
name: "a",
field: reflect.TypeOf(struct {
A int `yaml:"a"`
Expand All @@ -123,7 +123,7 @@ func TestToNode(t *testing.T) {
}{},
node: node{
children: []node{
node{
{
name: "a",
field: reflect.TypeOf(struct {
A []int `yaml:"a"`
Expand All @@ -141,11 +141,11 @@ func TestToNode(t *testing.T) {
context: NewContext([]byte("a:\n b: 2")),
node: node{
children: []node{
node{
{
line: 1,
name: "a",
children: []node{
node{name: "b", line: 2},
{name: "b", line: 2},
},
},
},
Expand All @@ -159,10 +159,10 @@ func TestToNode(t *testing.T) {
}{},
node: node{
children: []node{
node{
{
name: "a",
children: []node{
node{
{
name: "b",
field: reflect.TypeOf(struct {
Jon bool `yaml:"b"`
Expand Down
6 changes: 3 additions & 3 deletions config/validate/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ func TestReport(t *testing.T) {
{(*Report).Info, 10, "test info 10"},
},
[]Entry{
Entry{entryWarning, "test warning 1", 1},
Entry{entryError, "test error 2", 2},
Entry{entryInfo, "test info 10", 10},
{entryWarning, "test warning 1", 1},
{entryError, "test error 2", 2},
{entryInfo, "test info 10", 10},
},
},
}
Expand Down
4 changes: 2 additions & 2 deletions config/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/coreos/coreos-cloudinit/config"

"github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/coreos/yaml"
"github.com/coreos/yaml"
)

var (
Expand All @@ -46,7 +46,7 @@ func Validate(userdataBytes []byte) (Report, error) {
return validateCloudConfig(userdataBytes, Rules)
default:
return Report{entries: []Entry{
Entry{kind: entryError, message: `must be "#cloud-config" or begin with "#!"`, line: 1},
{kind: entryError, message: `must be "#cloud-config" or begin with "#!"`, line: 1},
}}, nil
}
}
Expand Down
14 changes: 7 additions & 7 deletions coreos-cloudinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,28 +104,28 @@ type oemConfig map[string]string

var (
oemConfigs = map[string]oemConfig{
"digitalocean": oemConfig{
"digitalocean": {
"from-digitalocean-metadata": "http://169.254.169.254/",
"convert-netconf": "digitalocean",
},
"ec2-compat": oemConfig{
"ec2-compat": {
"from-ec2-metadata": "http://169.254.169.254/",
"from-configdrive": "/media/configdrive",
},
"rackspace-onmetal": oemConfig{
"rackspace-onmetal": {
"from-configdrive": "/media/configdrive",
"convert-netconf": "debian",
},
"azure": oemConfig{
"azure": {
"from-waagent": "/var/lib/waagent",
},
"cloudsigma": oemConfig{
"cloudsigma": {
"from-cloudsigma-metadata": "true",
},
"packet": oemConfig{
"packet": {
"from-packet-metadata": "https://metadata.packet.net/",
},
"vmware": oemConfig{
"vmware": {
"from-vmware-guestinfo": "true",
"convert-netconf": "vmware",
},
Expand Down
2 changes: 1 addition & 1 deletion datasource/metadata/cloudsigma/server_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/coreos/coreos-cloudinit/datasource"

"github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/cloudsigma/cepgo"
"github.com/cloudsigma/cepgo"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion datasource/metadata/digitalocean/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestFetchMetadata(t *testing.T) {
NetworkConfig: Metadata{
Interfaces: Interfaces{
Public: []Interface{
Interface{
{
IPv4: &Address{
IPAddress: "192.168.1.2",
Netmask: "255.255.255.0",
Expand Down
10 changes: 5 additions & 5 deletions datasource/test/filesystem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,34 +70,34 @@ func TestNewMockFilesystem(t *testing.T) {
filesystem: MockFilesystem{},
},
{
files: []File{File{Path: "file"}},
files: []File{{Path: "file"}},
filesystem: MockFilesystem{
"file": File{Path: "file"},
},
},
{
files: []File{File{Path: "/file"}},
files: []File{{Path: "/file"}},
filesystem: MockFilesystem{
"/file": File{Path: "/file"},
},
},
{
files: []File{File{Path: "/dir/file"}},
files: []File{{Path: "/dir/file"}},
filesystem: MockFilesystem{
"/dir": File{Path: "/dir", Directory: true},
"/dir/file": File{Path: "/dir/file"},
},
},
{
files: []File{File{Path: "/dir/dir/file"}},
files: []File{{Path: "/dir/dir/file"}},
filesystem: MockFilesystem{
"/dir": File{Path: "/dir", Directory: true},
"/dir/dir": File{Path: "/dir/dir", Directory: true},
"/dir/dir/file": File{Path: "/dir/dir/file"},
},
},
{
files: []File{File{Path: "/dir/dir/dir", Directory: true}},
files: []File{{Path: "/dir/dir/dir", Directory: true}},
filesystem: MockFilesystem{
"/dir": File{Path: "/dir", Directory: true},
"/dir/dir": File{Path: "/dir/dir", Directory: true},
Expand Down
8 changes: 4 additions & 4 deletions datasource/vmware/vmware_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (

"github.com/coreos/coreos-cloudinit/pkg"

"github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/sigma/vmw-guestinfo/rpcvmx"
"github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/sigma/vmw-guestinfo/vmcheck"
"github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/sigma/vmw-ovflib"
"github.com/sigma/vmw-guestinfo/rpcvmx"
"github.com/sigma/vmw-guestinfo/vmcheck"
"github.com/sigma/vmw-ovflib"
)

type ovfWrapper struct {
Expand Down Expand Up @@ -85,7 +85,7 @@ func readConfig(key string) (string, error) {
return data, err
}

func getOvfReadConfig (ovfEnv []byte) readConfigFunction {
func getOvfReadConfig(ovfEnv []byte) readConfigFunction {
env := &ovf.OvfEnvironment{}
if len(ovfEnv) != 0 {
env = ovf.ReadEnvironment(ovfEnv)
Expand Down
Loading

0 comments on commit d17c76c

Please sign in to comment.