Class: Fog::DNS::AzureRM::RecordSets
- Inherits:
-
Collection
- Object
- Collection
- Fog::DNS::AzureRM::RecordSets
- Defined in:
- lib/fog/azurerm/models/dns/record_sets.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fog/azurerm/models/dns/record_sets.rb', line 15 def all requires :resource_group requires :zone_name record_sets = [] exclude = false service.list_record_sets(resource_group, zone_name).each do |r| hash = {} r.each do |k, v| if (k == 'name' && v == '@') exclude = true end hash[k] = v hash['zone_name'] = zone_name hash['resource_group'] = resource_group end record_sets << hash if !exclude exclude = false end load(record_sets) end |
#get(identity, type) ⇒ Object
36 37 38 |
# File 'lib/fog/azurerm/models/dns/record_sets.rb', line 36 def get(identity, type) all.find { |f| f.name == identity && f.type == "Microsoft.Network/dnszones/#{type}"} end |