Class: Fog::DNS::AzureRM::Zones

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/azurerm/models/dns/zones.rb

Overview

This class is giving implementation of all/get for Zones.

Instance Method Summary collapse

Instance Method Details

#allObject



9
10
11
12
13
14
15
# File 'lib/fog/azurerm/models/dns/zones.rb', line 9

def all
  zones = []
  service.list_zones.each do |z|
    zones << Fog::DNS::AzureRM::Zone.parse(z)
  end
  load(zones)
end

#check_zone_exists(resource_group, name) ⇒ Object



23
24
25
# File 'lib/fog/azurerm/models/dns/zones.rb', line 23

def check_zone_exists(resource_group, name)
  service.check_zone_exists(resource_group, name)
end

#get(resource_group, name) ⇒ Object



17
18
19
20
21
# File 'lib/fog/azurerm/models/dns/zones.rb', line 17

def get(resource_group, name)
  zone = service.get_zone(resource_group, name)
  zone_fog = Fog::DNS::AzureRM::Zone.new(service: service)
  zone_fog.merge_attributes(Fog::DNS::AzureRM::Zone.parse(zone))
end