Module: Staypuft::HostsHelper
- Defined in:
- app/helpers/staypuft/hosts_helper.rb
Instance Method Summary collapse
- #list_subnet_types_for_host(host, subnets) ⇒ Object
- #list_subnet_types_for_nic(nic, subnets) ⇒ Object
Instance Method Details
#list_subnet_types_for_host(host, subnets) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/helpers/staypuft/hosts_helper.rb', line 8 def list_subnet_types_for_host(host, subnets) types = {} return types if host.nil? || host.deployment.nil? subnets.each do |subnet| types[subnet.id] = subnet_types(host.deployment, subnet) end return types end |
#list_subnet_types_for_nic(nic, subnets) ⇒ Object
4 5 6 |
# File 'app/helpers/staypuft/hosts_helper.rb', line 4 def list_subnet_types_for_nic(nic, subnets) list_subnet_types_for_host(nic.host, subnets) end |