Sha256: d3e65f70ad69a5b781d66c9f5cce2a3c31e62b6469eed668b5a8e4112cc6628b
Contents?: true
Size: 1.28 KB
Versions: 46
Compression:
Stored size: 1.28 KB
Contents
module Fog module Network class AzureRM # LoadBalancers collection class for Network Service class LoadBalancers < Fog::Collection model Fog::Network::AzureRM::LoadBalancer attribute :resource_group def all load_balancers = [] if !resource_group.nil? requires :resource_group l_balancers = service.list_load_balancers(resource_group) else l_balancers = service.list_load_balancers_in_subscription end l_balancers.each do |load_balancer| load_balancers << Fog::Network::AzureRM::LoadBalancer.parse(load_balancer) end load(load_balancers) end def get(resource_group_name, load_balancer_name) load_balancer = service.get_load_balancer(resource_group_name, load_balancer_name) load_balancer_fog = Fog::Network::AzureRM::LoadBalancer.new(service: service) load_balancer_fog.merge_attributes(Fog::Network::AzureRM::LoadBalancer.parse(load_balancer)) end def check_load_balancer_exists(resource_group_name, load_balancer_name) service.check_load_balancer_exists(resource_group_name, load_balancer_name) end end end end end
Version data entries
46 entries across 46 versions & 4 rubygems