mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
fix(elb): override #all_associations_and_attributes
ListenerDescriptions and BackendServerDescriptions are used to build ad-hoc collections but are not registered as attributes of the LoadBalancer model.
This commit is contained in:
parent
ec620d8e4b
commit
199cbf8e40
2 changed files with 11 additions and 3 deletions
|
@ -12,7 +12,7 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
def get(instance_port)
|
def get(instance_port)
|
||||||
all.find{|e| e.instance_port == instance_port}
|
all.find { |e| e.instance_port == instance_port }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -223,16 +223,24 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
def reload
|
def reload
|
||||||
super
|
|
||||||
@instance_health = nil
|
@instance_health = nil
|
||||||
@policy_descriptions = nil
|
@policy_descriptions = nil
|
||||||
self
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
requires :id
|
requires :id
|
||||||
service.delete_load_balancer(id)
|
service.delete_load_balancer(id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
protected
|
||||||
|
|
||||||
|
def all_associations_and_attributes
|
||||||
|
super.merge(
|
||||||
|
'ListenerDescriptions' => attributes['ListenerDescriptions'],
|
||||||
|
'BackendServerDescriptions' => attributes['BackendServerDescriptions'],
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue