From 7c61e115bdc99bb400210290a1a787bcf5719159 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Tue, 25 Oct 2016 16:05:37 -0700 Subject: [PATCH] Moved tlsutil into helpers --- client/client.go | 2 +- client/config/config.go | 2 +- command/agent/http.go | 2 +- {tlsutil => helper/tlsutil}/config.go | 0 {tlsutil => helper/tlsutil}/config_test.go | 0 {tlsutil => helper/tlsutil}/test/ca/certindex | 0 {tlsutil => helper/tlsutil}/test/ca/myca.conf | 0 {tlsutil => helper/tlsutil}/test/ca/privkey.pem | 0 {tlsutil => helper/tlsutil}/test/ca/root.cer | 0 {tlsutil => helper/tlsutil}/test/ca/serialfile | 0 {tlsutil => helper/tlsutil}/test/hostname/Alice.crt | 0 {tlsutil => helper/tlsutil}/test/hostname/Alice.key | 0 {tlsutil => helper/tlsutil}/test/hostname/CertAuth.crt | 0 {tlsutil => helper/tlsutil}/test/key/ourdomain.cer | 0 {tlsutil => helper/tlsutil}/test/key/ourdomain.csr | 0 {tlsutil => helper/tlsutil}/test/key/ourdomain.key | 0 {tlsutil => helper/tlsutil}/test/key/ssl-cert-snakeoil.key | 0 {tlsutil => helper/tlsutil}/test/key/ssl-cert-snakeoil.pem | 0 {tlsutil => helper/tlsutil}/test/notes.txt | 0 nomad/config.go | 2 +- nomad/pool.go | 2 +- nomad/raft_rpc.go | 2 +- nomad/server.go | 2 +- 23 files changed, 7 insertions(+), 7 deletions(-) rename {tlsutil => helper/tlsutil}/config.go (100%) rename {tlsutil => helper/tlsutil}/config_test.go (100%) rename {tlsutil => helper/tlsutil}/test/ca/certindex (100%) rename {tlsutil => helper/tlsutil}/test/ca/myca.conf (100%) rename {tlsutil => helper/tlsutil}/test/ca/privkey.pem (100%) rename {tlsutil => helper/tlsutil}/test/ca/root.cer (100%) rename {tlsutil => helper/tlsutil}/test/ca/serialfile (100%) rename {tlsutil => helper/tlsutil}/test/hostname/Alice.crt (100%) rename {tlsutil => helper/tlsutil}/test/hostname/Alice.key (100%) rename {tlsutil => helper/tlsutil}/test/hostname/CertAuth.crt (100%) rename {tlsutil => helper/tlsutil}/test/key/ourdomain.cer (100%) rename {tlsutil => helper/tlsutil}/test/key/ourdomain.csr (100%) rename {tlsutil => helper/tlsutil}/test/key/ourdomain.key (100%) rename {tlsutil => helper/tlsutil}/test/key/ssl-cert-snakeoil.key (100%) rename {tlsutil => helper/tlsutil}/test/key/ssl-cert-snakeoil.pem (100%) rename {tlsutil => helper/tlsutil}/test/notes.txt (100%) diff --git a/client/client.go b/client/client.go index 1d56cbe37..89e1918c5 100644 --- a/client/client.go +++ b/client/client.go @@ -27,9 +27,9 @@ import ( "github.com/hashicorp/nomad/client/stats" "github.com/hashicorp/nomad/client/vaultclient" "github.com/hashicorp/nomad/command/agent/consul" + "github.com/hashicorp/nomad/helper/tlsutil" "github.com/hashicorp/nomad/nomad" "github.com/hashicorp/nomad/nomad/structs" - "github.com/hashicorp/nomad/tlsutil" vaultapi "github.com/hashicorp/vault/api" "github.com/mitchellh/hashstructure" ) diff --git a/client/config/config.go b/client/config/config.go index 2cf6d8de4..d31f61466 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -8,9 +8,9 @@ import ( "strings" "time" + "github.com/hashicorp/nomad/helper/tlsutil" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" - "github.com/hashicorp/nomad/tlsutil" ) var ( diff --git a/command/agent/http.go b/command/agent/http.go index 050a59406..7b69ff902 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -14,8 +14,8 @@ import ( "time" "github.com/NYTimes/gziphandler" + "github.com/hashicorp/nomad/helper/tlsutil" "github.com/hashicorp/nomad/nomad/structs" - "github.com/hashicorp/nomad/tlsutil" "github.com/ugorji/go/codec" ) diff --git a/tlsutil/config.go b/helper/tlsutil/config.go similarity index 100% rename from tlsutil/config.go rename to helper/tlsutil/config.go diff --git a/tlsutil/config_test.go b/helper/tlsutil/config_test.go similarity index 100% rename from tlsutil/config_test.go rename to helper/tlsutil/config_test.go diff --git a/tlsutil/test/ca/certindex b/helper/tlsutil/test/ca/certindex similarity index 100% rename from tlsutil/test/ca/certindex rename to helper/tlsutil/test/ca/certindex diff --git a/tlsutil/test/ca/myca.conf b/helper/tlsutil/test/ca/myca.conf similarity index 100% rename from tlsutil/test/ca/myca.conf rename to helper/tlsutil/test/ca/myca.conf diff --git a/tlsutil/test/ca/privkey.pem b/helper/tlsutil/test/ca/privkey.pem similarity index 100% rename from tlsutil/test/ca/privkey.pem rename to helper/tlsutil/test/ca/privkey.pem diff --git a/tlsutil/test/ca/root.cer b/helper/tlsutil/test/ca/root.cer similarity index 100% rename from tlsutil/test/ca/root.cer rename to helper/tlsutil/test/ca/root.cer diff --git a/tlsutil/test/ca/serialfile b/helper/tlsutil/test/ca/serialfile similarity index 100% rename from tlsutil/test/ca/serialfile rename to helper/tlsutil/test/ca/serialfile diff --git a/tlsutil/test/hostname/Alice.crt b/helper/tlsutil/test/hostname/Alice.crt similarity index 100% rename from tlsutil/test/hostname/Alice.crt rename to helper/tlsutil/test/hostname/Alice.crt diff --git a/tlsutil/test/hostname/Alice.key b/helper/tlsutil/test/hostname/Alice.key similarity index 100% rename from tlsutil/test/hostname/Alice.key rename to helper/tlsutil/test/hostname/Alice.key diff --git a/tlsutil/test/hostname/CertAuth.crt b/helper/tlsutil/test/hostname/CertAuth.crt similarity index 100% rename from tlsutil/test/hostname/CertAuth.crt rename to helper/tlsutil/test/hostname/CertAuth.crt diff --git a/tlsutil/test/key/ourdomain.cer b/helper/tlsutil/test/key/ourdomain.cer similarity index 100% rename from tlsutil/test/key/ourdomain.cer rename to helper/tlsutil/test/key/ourdomain.cer diff --git a/tlsutil/test/key/ourdomain.csr b/helper/tlsutil/test/key/ourdomain.csr similarity index 100% rename from tlsutil/test/key/ourdomain.csr rename to helper/tlsutil/test/key/ourdomain.csr diff --git a/tlsutil/test/key/ourdomain.key b/helper/tlsutil/test/key/ourdomain.key similarity index 100% rename from tlsutil/test/key/ourdomain.key rename to helper/tlsutil/test/key/ourdomain.key diff --git a/tlsutil/test/key/ssl-cert-snakeoil.key b/helper/tlsutil/test/key/ssl-cert-snakeoil.key similarity index 100% rename from tlsutil/test/key/ssl-cert-snakeoil.key rename to helper/tlsutil/test/key/ssl-cert-snakeoil.key diff --git a/tlsutil/test/key/ssl-cert-snakeoil.pem b/helper/tlsutil/test/key/ssl-cert-snakeoil.pem similarity index 100% rename from tlsutil/test/key/ssl-cert-snakeoil.pem rename to helper/tlsutil/test/key/ssl-cert-snakeoil.pem diff --git a/tlsutil/test/notes.txt b/helper/tlsutil/test/notes.txt similarity index 100% rename from tlsutil/test/notes.txt rename to helper/tlsutil/test/notes.txt diff --git a/nomad/config.go b/nomad/config.go index 37d57bc43..68722f566 100644 --- a/nomad/config.go +++ b/nomad/config.go @@ -9,10 +9,10 @@ import ( "time" "github.com/hashicorp/memberlist" + "github.com/hashicorp/nomad/helper/tlsutil" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" "github.com/hashicorp/nomad/scheduler" - "github.com/hashicorp/nomad/tlsutil" "github.com/hashicorp/raft" "github.com/hashicorp/serf/serf" ) diff --git a/nomad/pool.go b/nomad/pool.go index 71269efbf..7b65dbc03 100644 --- a/nomad/pool.go +++ b/nomad/pool.go @@ -11,7 +11,7 @@ import ( "time" "github.com/hashicorp/net-rpc-msgpackrpc" - "github.com/hashicorp/nomad/tlsutil" + "github.com/hashicorp/nomad/helper/tlsutil" "github.com/hashicorp/yamux" ) diff --git a/nomad/raft_rpc.go b/nomad/raft_rpc.go index 4ed9ee4d3..59315cc38 100644 --- a/nomad/raft_rpc.go +++ b/nomad/raft_rpc.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/hashicorp/nomad/tlsutil" + "github.com/hashicorp/nomad/helper/tlsutil" ) // RaftLayer implements the raft.StreamLayer interface, diff --git a/nomad/server.go b/nomad/server.go index 9617ebfc8..39bceeff0 100644 --- a/nomad/server.go +++ b/nomad/server.go @@ -20,9 +20,9 @@ import ( "github.com/hashicorp/consul/lib" "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/command/agent/consul" + "github.com/hashicorp/nomad/helper/tlsutil" "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" - "github.com/hashicorp/nomad/tlsutil" "github.com/hashicorp/raft" "github.com/hashicorp/raft-boltdb" "github.com/hashicorp/serf/serf"