Permalink
Browse files

[aws|beanstalk] Added #load_balancer method.

Added a convenience method to get the load balancer model associated
with the beanstalk environment.
  • Loading branch information...
scogeo committed Mar 30, 2012
1 parent 12f539c commit 1f80a347d2c7f4519f818fc78a66d262f452d32a
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/fog/aws/models/beanstalk/environment.rb
@@ -45,6 +45,12 @@ def live_resources
data
end
+ # Returns the load balancer object associated with the environment.
+ def load_balancer(elb_connection = Fog::AWS[:elb])
+ requires :resources
+ elb_connection.load_balancers.get(resources['LoadBalancer']['LoadBalancerName'])
+ end
+
# Return events related to this version
def events
requires :id

0 comments on commit 1f80a34

Please sign in to comment.