Class: Yao::Resources::LoadBalancerPoolMember
- Inherits:
-
Base
- Object
- Base
- Yao::Resources::LoadBalancerPoolMember
show all
- Defined in:
- lib/yao/resources/loadbalancer_pool_member.rb
Instance Attribute Summary
#service
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#[], #[]=, #created, friendly_attributes, #id, #initialize, map_attribute_to_attribute, map_attribute_to_resource, map_attribute_to_resources, #to_hash, #updated
#admin=, #api_version, #api_version=, #as_member, #client, #create, #destroy, extended, #find_by_name, #get, #get!, #list, #resources_path, #resources_path=, #return_single_on_querying, #return_single_on_querying=, #update
Class Method Details
.create(pool, resource_params) ⇒ Object
39
40
41
42
|
# File 'lib/yao/resources/loadbalancer_pool_member.rb', line 39
def create(pool, resource_params)
self.resources_path = member_resources_path(pool)
super(resource_params)
end
|
.destroy(pool, id) ⇒ Object
49
50
51
52
|
# File 'lib/yao/resources/loadbalancer_pool_member.rb', line 49
def destroy(pool, id)
self.resources_path = member_resources_path(pool)
super(id)
end
|
.get(pool, id_or_permalink, query = {}) ⇒ Object
Also known as:
find
33
34
35
36
|
# File 'lib/yao/resources/loadbalancer_pool_member.rb', line 33
def get(pool, id_or_permalink, query={})
self.resources_path = member_resources_path(pool)
super(id_or_permalink, query)
end
|
.list(pool, query = {}) ⇒ Object
28
29
30
31
|
# File 'lib/yao/resources/loadbalancer_pool_member.rb', line 28
def list(pool, query={})
self.resources_path = member_resources_path(pool)
super(query)
end
|
.update(pool, id, resource_params) ⇒ Object
44
45
46
47
|
# File 'lib/yao/resources/loadbalancer_pool_member.rb', line 44
def update(pool, id, resource_params)
self.resources_path = member_resources_path(pool)
super(id, resource_params)
end
|
Instance Method Details
#project ⇒ Object
Also known as:
tenant
8
9
10
11
12
|
# File 'lib/yao/resources/loadbalancer_pool_member.rb', line 8
def project
if project_id = self["project_id"]
Yao::Tenant.find project_id
end
end
|
#subnet ⇒ Object
15
16
17
18
19
|
# File 'lib/yao/resources/loadbalancer_pool_member.rb', line 15
def subnet
if subnet_id = self["subnet_id"]
Yao::Subnet.find subnet_id
end
end
|