Class: Yao::Resources::LoadBalancer

Inherits:
Base
  • Object
show all
Defined in:
lib/yao/resources/loadbalancer.rb

Instance Attribute Summary

Attributes included from RestfullyAccessible

#service

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

Methods included from RestfullyAccessible

#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

Constructor Details

This class inherits a constructor from Yao::Resources::Base

Instance Method Details

#projectObject Also known as: tenant



9
10
11
12
13
# File 'lib/yao/resources/loadbalancer.rb', line 9

def project
  if project_id = self["project_id"]
    Yao::Tenant.find project_id
  end
end

#vip_networkObject



16
17
18
19
20
# File 'lib/yao/resources/loadbalancer.rb', line 16

def vip_network
  if vip_network_id = self["vip_network_id"]
    Yao::Network.find vip_network_id
  end
end

#vip_portObject



22
23
24
25
26
# File 'lib/yao/resources/loadbalancer.rb', line 22

def vip_port
  if vip_port_id = self["vip_port_id"]
    Yao::Port.find vip_port_id
  end
end

#vip_subnetObject



28
29
30
31
32
# File 'lib/yao/resources/loadbalancer.rb', line 28

def vip_subnet
  if vip_subnet_id = self["vip_subnet_id"]
    Yao::Subnet.find vip_subnet_id
  end
end