From 0ef04efe939ccbcfabada3628f474e98510bdbfd Mon Sep 17 00:00:00 2001 From: Thomas Mitchell Date: Tue, 9 Oct 2018 10:26:11 -0400 Subject: [PATCH] BOSH_CLIENT and BOSH_CLIENT_SECRET used The bosh client that communicates with bosh will now use these environment variables. They override that which is in the bosh config. --- helpers.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helpers.go b/helpers.go index 172e7fa..8aa790a 100644 --- a/helpers.go +++ b/helpers.go @@ -97,6 +97,15 @@ func getBoshClient(ctx compContext) (*client, error) { ret.Password = env.Password ret.RefreshToken = env.RefreshToken + //--client and --client-secret flags override config + if client, found := ctx.Flags["--client"]; found { + ret.Username = client[0] + } + + if clientSecret, found := ctx.Flags["--client-secret"]; found { + ret.Password = clientSecret[0] + } + boshClient = ret return boshClient, nil