Skip to content

Commit

Permalink
f5 does not error if virtual server does not exist, instead check for…
Browse files Browse the repository at this point in the history
… nil object
  • Loading branch information
Prachi Damle authored and Prachi Damle committed Apr 25, 2016
1 parent 96a2740 commit fe30e09
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 fe30e09

Please sign in to comment.