Skip to content

Commit

Permalink
ensure client logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-deboer committed Mar 20, 2017
1 parent e6015c3 commit 4814f57
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/platform/vsphere/vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ func readConfig(config io.Reader) (VSphereConfig, error) {
func (vs *VSphere) ExpectedMembers(
memberFilter string, clientScheme string, clientPort int, serverScheme string, serverPort int) ([]etcd.Member, error) {

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

err := vSphereLogin(ctx, vs)
if err != nil {
log.Errorf("VCenter login failed; %v", err)
return nil, err
}

members := []etcd.Member{}
names, err := vs.list(memberFilter)
if err != nil {
Expand Down

0 comments on commit 4814f57

Please sign in to comment.