Sha256: b36f52fcc4bc111656225eb66d633f2b373c2d8381d3756904d755e619996e35
Contents?: true
Size: 1.01 KB
Versions: 7
Compression:
Stored size: 1.01 KB
Contents
module Fog module DNS class Google ## # Deletes a previously created Managed Zone. # # @see https://developers.google.com/cloud-dns/api/v1/managedZones/delete class Real def delete_managed_zone(name_or_id) api_method = @dns.managed_zones.delete parameters = { 'project' => @project, 'managedZone' => name_or_id, } request(api_method, parameters) end end class Mock def delete_managed_zone(name_or_id) if self.data[:managed_zones].has_key?(name_or_id) self.data[:managed_zones].delete(name_or_id) elsif zone = self.data[:managed_zones].values.find { |zone| zone['name'] = name_or_id } self.data[:managed_zones].delete(zone['id']) else raise Fog::Errors::NotFound, "The 'parameters.managedZone' resource named '#{name_or_id}' does not exist." end build_excon_response(nil) end end end end end
Version data entries
7 entries across 5 versions & 2 rubygems