summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2018-09-10 02:19:43 -0700
committerVictor Morales <victor.morales@intel.com>2018-09-10 02:24:08 -0700
commite7a7b50f6fc0f036eeb116f95e8e5fb8d56aa4ef (patch)
treeddb30ce6aae8e593f8c6d03f51e2c2058bd6bf21
parent5b6f0c4efbfdc0c9bcb440c8da132bdaee4e518d (diff)
Add no_proxy config value to docker-compose.yml
The no_proxy configuration value was missing in the docker-compose.yml this was causing a different behaviour when the functional tests were running and consuming the services on the container. Change-Id: Ie88e88d50e0ec9c4aa0d03367f2a9d25edccb753 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
-rw-r--r--deployments/docker-compose.yml1
-rw-r--r--src/k8splugin/Gopkg.lock97
-rw-r--r--src/k8splugin/api/handler.go4
-rw-r--r--src/k8splugin/db/consul.go3
-rwxr-xr-xvagrant/installer.sh4
-rwxr-xr-xvagrant/tests/plugin.sh2
6 files changed, 95 insertions, 16 deletions
diff --git a/deployments/docker-compose.yml b/deployments/docker-compose.yml
index 5147d35a..d1b78990 100644
--- a/deployments/docker-compose.yml
+++ b/deployments/docker-compose.yml
@@ -19,6 +19,7 @@ services:
args:
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
+ - NO_PROXY=$NO_PROXY
ports:
- "8081:8081"
environment:
diff --git a/src/k8splugin/Gopkg.lock b/src/k8splugin/Gopkg.lock
index e0276839..0fc98853 100644
--- a/src/k8splugin/Gopkg.lock
+++ b/src/k8splugin/Gopkg.lock
@@ -2,178 +2,229 @@
[[projects]]
+ digest = "1:2cd7915ab26ede7d95b8749e6b1f933f1c6d5398030684e6505940a10f31cfda"
name = "github.com/ghodss/yaml"
packages = ["."]
+ pruneopts = "UT"
revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7"
version = "v1.0.0"
[[projects]]
+ digest = "1:a7534feda0f15b5fd691e59e4fb6b7547e27df4b415a62e02c7cb71b3439c1b1"
name = "github.com/gogo/protobuf"
packages = [
"proto",
- "sortkeys"
+ "sortkeys",
]
+ pruneopts = "UT"
revision = "1adfc126b41513cc696b209667c8656ea7aac67c"
version = "v1.0.0"
[[projects]]
branch = "master"
+ digest = "1:1ba1d79f2810270045c328ae5d674321db34e3aae468eb4233883b473c5c0467"
name = "github.com/golang/glog"
packages = ["."]
+ pruneopts = "UT"
revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998"
[[projects]]
+ digest = "1:17fe264ee908afc795734e8c4e63db2accabaf57326dbf21763a7d6b86096260"
name = "github.com/golang/protobuf"
packages = [
"proto",
"ptypes",
"ptypes/any",
"ptypes/duration",
- "ptypes/timestamp"
+ "ptypes/timestamp",
]
+ pruneopts = "UT"
revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265"
version = "v1.1.0"
[[projects]]
branch = "master"
+ digest = "1:3ee90c0d94da31b442dde97c99635aaafec68d0b8a3c12ee2075c6bdabeec6bb"
name = "github.com/google/gofuzz"
packages = ["."]
+ pruneopts = "UT"
revision = "24818f796faf91cd76ec7bddd72458fbced7a6c1"
[[projects]]
+ digest = "1:65c4414eeb350c47b8de71110150d0ea8a281835b1f386eacaa3ad7325929c21"
name = "github.com/googleapis/gnostic"
packages = [
"OpenAPIv2",
"compiler",
- "extensions"
+ "extensions",
]
+ pruneopts = "UT"
revision = "7c663266750e7d82587642f65e60bc4083f1f84e"
version = "v0.2.0"
[[projects]]
+ digest = "1:c79fb010be38a59d657c48c6ba1d003a8aa651fa56b579d959d74573b7dff8e1"
name = "github.com/gorilla/context"
packages = ["."]
+ pruneopts = "UT"
revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42"
version = "v1.1.1"
[[projects]]
+ digest = "1:185a43b59a1f4e7ad4e7ccafb8a1538193d897a2a75be16dda093ec42ad231cf"
name = "github.com/gorilla/handlers"
packages = ["."]
+ pruneopts = "UT"
revision = "90663712d74cb411cbef281bc1e08c19d1a76145"
version = "v1.3.0"
[[projects]]
+ digest = "1:e73f5b0152105f18bc131fba127d9949305c8693f8a762588a82a48f61756f5f"
name = "github.com/gorilla/mux"
packages = ["."]
+ pruneopts = "UT"
revision = "e3702bed27f0d39777b0b37b664b6280e8ef8fbf"
version = "v1.6.2"
[[projects]]
+ digest = "1:f8cb7c367c825e0c0be75f17e9b003d39b1240a1535fbbf095a18d7bb0d0c9c9"
name = "github.com/hashicorp/consul"
packages = ["api"]
+ pruneopts = "UT"
revision = "e716d1b5f8be252b3e53906c6d5632e0228f30fa"
version = "v1.2.2"
[[projects]]
branch = "master"
+ digest = "1:77cb3be9b21ba7f1a4701e870c84ea8b66e7d74c7c8951c58155fdadae9414ec"
name = "github.com/hashicorp/go-cleanhttp"
packages = ["."]
+ pruneopts = "UT"
revision = "d5fe4b57a186c716b0e00b8c301cbd9b4182694d"
[[projects]]
branch = "master"
+ digest = "1:45aad874d3c7d5e8610427c81870fb54970b981692930ec2a319ce4cb89d7a00"
name = "github.com/hashicorp/go-rootcerts"
packages = ["."]
+ pruneopts = "UT"
revision = "6bb64b370b90e7ef1fa532be9e591a81c3493e00"
[[projects]]
+ digest = "1:0dd7b7b01769f9df356dc99f9e4144bdbabf6c79041ea7c0892379c5737f3c44"
name = "github.com/hashicorp/serf"
packages = ["coordinate"]
+ pruneopts = "UT"
revision = "d6574a5bb1226678d7010325fb6c985db20ee458"
version = "v0.8.1"
[[projects]]
branch = "master"
+ digest = "1:0778dc7fce1b4669a8bfa7ae506ec1f595b6ab0f8989c1c0d22a8ca1144e9972"
name = "github.com/howeyc/gopass"
packages = ["."]
+ pruneopts = "UT"
revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8"
[[projects]]
+ digest = "1:3e260afa138eab6492b531a3b3d10ab4cb70512d423faa78b8949dec76e66a21"
name = "github.com/imdario/mergo"
packages = ["."]
+ pruneopts = "UT"
revision = "9316a62528ac99aaecb4e47eadd6dc8aa6533d58"
version = "v0.3.5"
[[projects]]
+ digest = "1:b1d4df033414c1a0d85fa7037b9aaf03746314811c860a95ea2d5fd481cd6c35"
name = "github.com/json-iterator/go"
packages = ["."]
+ pruneopts = "UT"
revision = "ca39e5af3ece67bbcda3d0f4f56a8e24d9f2dad4"
version = "1.1.3"
[[projects]]
branch = "master"
+ digest = "1:c7354463195544b1ab3c1f1fadb41430947f5d28dfbf2cdbd38268c5717a5a03"
name = "github.com/mitchellh/go-homedir"
packages = ["."]
+ pruneopts = "UT"
revision = "58046073cbffe2f25d425fe1331102f55cf719de"
[[projects]]
branch = "master"
+ digest = "1:5ab79470a1d0fb19b041a624415612f8236b3c06070161a910562f2b2d064355"
name = "github.com/mitchellh/mapstructure"
packages = ["."]
+ pruneopts = "UT"
revision = "f15292f7a699fcc1a38a80977f80a046874ba8ac"
[[projects]]
+ digest = "1:33422d238f147d247752996a26574ac48dcf472976eda7f5134015f06bf16563"
name = "github.com/modern-go/concurrent"
packages = ["."]
+ pruneopts = "UT"
revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94"
version = "1.0.3"
[[projects]]
+ digest = "1:d711dfcf661439f1ef0b202a02e8a1ff4deac48f26f34253520dcdbecbd7c5f1"
name = "github.com/modern-go/reflect2"
packages = ["."]
+ pruneopts = "UT"
revision = "1df9eeb2bb81f327b96228865c5687bc2194af3f"
version = "1.0.0"
[[projects]]
+ digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747"
name = "github.com/pkg/errors"
packages = ["."]
+ pruneopts = "UT"
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
[[projects]]
+ digest = "1:9424f440bba8f7508b69414634aef3b2b3a877e522d8a4624692412805407bb7"
name = "github.com/spf13/pflag"
packages = ["."]
+ pruneopts = "UT"
revision = "583c0c0531f06d5278b7d917446061adc344b5cd"
version = "v1.0.1"
[[projects]]
branch = "master"
+ digest = "1:3f3a05ae0b95893d90b9b3b5afdb79a9b3d96e4e36e099d841ae602e4aca0da8"
name = "golang.org/x/crypto"
packages = ["ssh/terminal"]
+ pruneopts = "UT"
revision = "8ac0e0d97ce45cd83d1d7243c060cb8461dda5e9"
[[projects]]
branch = "master"
+ digest = "1:744c660df137698628b28f30474e61775bc777adacf8b751c160748be01f17f5"
name = "golang.org/x/net"
packages = [
"context",
"http/httpguts",
"http2",
"http2/hpack",
- "idna"
+ "idna",
]
+ pruneopts = "UT"
revision = "db08ff08e8622530d9ed3a0e8ac279f6d4c02196"
[[projects]]
branch = "master"
+ digest = "1:51c25fd91b64d31919dd9ff63f8d8334d2687b72e5517019e1a9a5e1d55cb6c7"
name = "golang.org/x/sys"
packages = [
"unix",
- "windows"
+ "windows",
]
+ pruneopts = "UT"
revision = "bff228c7b664c5fce602223a05fb708fd8654986"
[[projects]]
+ digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18"
name = "golang.org/x/text"
packages = [
"collate",
@@ -189,31 +240,39 @@
"unicode/bidi",
"unicode/cldr",
"unicode/norm",
- "unicode/rangetable"
+ "unicode/rangetable",
]
+ pruneopts = "UT"
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
version = "v0.3.0"
[[projects]]
branch = "master"
+ digest = "1:c9e7a4b4d47c0ed205d257648b0e5b0440880cb728506e318f8ac7cd36270bc4"
name = "golang.org/x/time"
packages = ["rate"]
+ pruneopts = "UT"
revision = "fbb02b2291d28baffd63558aa44b4b56f178d650"
[[projects]]
+ digest = "1:2d1fbdc6777e5408cabeb02bf336305e724b925ff4546ded0fa8715a7267922a"
name = "gopkg.in/inf.v0"
packages = ["."]
+ pruneopts = "UT"
revision = "d2d2541c53f18d2a059457998ce2876cc8e67cbf"
version = "v0.9.1"
[[projects]]
+ digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202"
name = "gopkg.in/yaml.v2"
packages = ["."]
+ pruneopts = "UT"
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
version = "v2.2.1"
[[projects]]
branch = "master"
+ digest = "1:49f1d14e8a7598add90c73c5a3833fdf8871df947c95dde9ed6f325a35e2ef71"
name = "k8s.io/api"
packages = [
"admissionregistration/v1alpha1",
@@ -243,11 +302,13 @@
"settings/v1alpha1",
"storage/v1",
"storage/v1alpha1",
- "storage/v1beta1"
+ "storage/v1beta1",
]
+ pruneopts = "UT"
revision = "72d6e4405f8143815cbd454ab04b38210a9f32fc"
[[projects]]
+ digest = "1:091cf6a03915f282323094c997f565fef776fce3b5a253cc10b8a5bcbafdfd28"
name = "k8s.io/apimachinery"
packages = [
"pkg/api/errors",
@@ -284,12 +345,14 @@
"pkg/util/yaml",
"pkg/version",
"pkg/watch",
- "third_party/forked/golang/reflect"
+ "third_party/forked/golang/reflect",
]
+ pruneopts = "UT"
revision = "31dade610c053669d8054bfd847da657251e8c1a"
version = "kubernetes-1.10.3"
[[projects]]
+ digest = "1:0a4e3d4f41939942aa81b5900cd8332def6f529f2f286e521cc54d6d7874dbb8"
name = "k8s.io/client-go"
packages = [
"discovery",
@@ -340,14 +403,28 @@
"util/cert",
"util/flowcontrol",
"util/homedir",
- "util/integer"
+ "util/integer",
]
+ pruneopts = "UT"
revision = "23781f4d6632d88e869066eaebb743857aa1ef9b"
version = "v7.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "75cc26f2e82e49abeff97709158caea7f0c088191d8d4eb7a00eea2c88d00297"
+ input-imports = [
+ "github.com/gorilla/handlers",
+ "github.com/gorilla/mux",
+ "github.com/hashicorp/consul/api",
+ "github.com/pkg/errors",
+ "gopkg.in/yaml.v2",
+ "k8s.io/api/apps/v1",
+ "k8s.io/api/core/v1",
+ "k8s.io/apimachinery/pkg/apis/meta/v1",
+ "k8s.io/client-go/kubernetes",
+ "k8s.io/client-go/kubernetes/scheme",
+ "k8s.io/client-go/tools/clientcmd",
+ "k8s.io/client-go/util/homedir",
+ ]
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/src/k8splugin/api/handler.go b/src/k8splugin/api/handler.go
index 27d060aa..4635e7ba 100644
--- a/src/k8splugin/api/handler.go
+++ b/src/k8splugin/api/handler.go
@@ -120,7 +120,7 @@ func CreateHandler(w http.ResponseWriter, r *http.Request) {
// "{"deployment":<>,"service":<>}"
out, err := json.Marshal(resourceNameMap)
if err != nil {
- werr := pkgerrors.Wrap(err, "Create VNF deployment error")
+ werr := pkgerrors.Wrap(err, "Create VNF deployment JSON Marshalling error")
http.Error(w, werr.Error(), http.StatusInternalServerError)
return
}
@@ -130,7 +130,7 @@ func CreateHandler(w http.ResponseWriter, r *http.Request) {
// value: "{"deployment":<>,"service":<>}"
err = db.DBconn.CreateEntry(internalVNFID, serializedResourceNameMap)
if err != nil {
- werr := pkgerrors.Wrap(err, "Create VNF deployment error")
+ werr := pkgerrors.Wrap(err, "Create VNF deployment DB error")
http.Error(w, werr.Error(), http.StatusInternalServerError)
return
}
diff --git a/src/k8splugin/db/consul.go b/src/k8splugin/db/consul.go
index 9ab0d826..686d9348 100644
--- a/src/k8splugin/db/consul.go
+++ b/src/k8splugin/db/consul.go
@@ -26,9 +26,6 @@ type ConsulDB struct {
// InitializeDatabase initialized the initial steps
func (c *ConsulDB) InitializeDatabase() error {
- if os.Getenv("DATABASE_IP") == "" {
- return pkgerrors.New("DATABASE_IP environment variable not set.")
- }
config := consulapi.DefaultConfig()
config.Address = os.Getenv("DATABASE_IP") + ":8500"
diff --git a/vagrant/installer.sh b/vagrant/installer.sh
index 5e3b32d8..5df87e4c 100755
--- a/vagrant/installer.sh
+++ b/vagrant/installer.sh
@@ -171,6 +171,10 @@ function install_plugin {
mkdir -p /opt/{csar,kubeconfig,consul/config}
cp $HOME/.kube/config /opt/kubeconfig/krd
+ export CSAR_DIR=/opt/csar
+ export KUBE_CONFIG_DIR=/opt/kubeconfig
+ echo "export CSAR_DIR=${CSAR_DIR}" >> /etc/environment
+ echo "export KUBE_CONFIG_DIR=${KUBE_CONFIG_DIR}" >> /etc/environment
GOPATH=$(go env GOPATH)
pushd $GOPATH/src/k8-plugin-multicloud/deployments
diff --git a/vagrant/tests/plugin.sh b/vagrant/tests/plugin.sh
index 3ff3a54d..2c01c517 100755
--- a/vagrant/tests/plugin.sh
+++ b/vagrant/tests/plugin.sh
@@ -38,7 +38,7 @@ docker run --name aai -v $(mktemp):/tmp/generic_sim/ -v $(pwd)/generic_simulator
vnf_id_list=$(curl -s "${base_url}${cloud_region_id}/${namespace}" | jq -r '.vnf_id_list')
mkdir -p ${CSAR_DIR}/${csar_id}
-cat << SEQ > ${CSAR_DIR}/${csar_id}/sequence.yaml
+cat << SEQ > ${CSAR_DIR}/${csar_id}/metadata.yaml
deployment:
- deployment.yaml
service: