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

#[], #[]=, add_instantiation_name_list, #destroy, friendly_attributes, #id, #initialize, instantiation?, map_attribute_to_attribute, map_attribute_to_resource, map_attribute_to_resources, map_attributes_to_time, #to_hash, #update

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

#projectYao::Resources::Tenant Also known as: tenant



14
15
16
17
18
# File 'lib/yao/resources/loadbalancer.rb', line 14

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

#vip_networkYao::Resources::Network



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

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

#vip_portYao::Resources::Port



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

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

#vip_subnetYao::Resources::Subnet



36
37
38
39
40
# File 'lib/yao/resources/loadbalancer.rb', line 36

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