Skip to content

Commit

Permalink
Merge pull request #4 from prachidamle/error_invalid_vs
Browse files Browse the repository at this point in the history
f5 does not error if virtual server does not exist, instead check for nil object
  • Loading branch information
prachidamle committed Apr 28, 2016
2 parents 058db1d + fe30e09 commit 2b48f77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions providers/f5/f5_bigip.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ func (*F5BigIPHandler) GetName() string {

func (*F5BigIPHandler) AddLBConfig(config model.LBConfig) error {

_, err := client.GetVirtualServer(config.LBEndpoint)
if err != nil {
logrus.Errorf("f5 AddLBConfig: Error getting f5 virtual server: %v\n", err)
vServer, err := client.GetVirtualServer(config.LBEndpoint)
if err != nil || vServer == nil {
logrus.Errorf("f5 AddLBConfig: Error getting f5 virtual server, cannot add the config: %v\n", err)
return err
} else {
//virtualserver exists, add nodes and pool
Expand Down

0 comments on commit 2b48f77

Please sign in to comment.