module GClouder::Resources::Compute::Disks
Public Class Methods
check()
click to toggle source
# File lib/gclouder/resources/compute/disks.rb, line 31 def self.check Remote.list.each do |region, disks| disks.each do |disk, config| local_config = Local.list[region][disk] next unless local_config next if local_config == config info "[compute disks] local resource definition differs from immutable remote resource: #{disk}" info "# local config" ap local_config info "# remote config" ap config fatal "" end end end
ensure()
click to toggle source
# File lib/gclouder/resources/compute/disks.rb, line 17 def self.ensure return if Local.list.empty? header Local.list.each do |region, disks| next if disks.empty? info region, indent: 2, heading: true info disks.each do |disk| Disk.ensure(disk["name"], disk["zone"], disk["size"], disk["type"]) end end end
header(stage = :ensure)
click to toggle source
# File lib/gclouder/resources/compute/disks.rb, line 13 def self.header(stage = :ensure) info "[#{stage}] compute / disks", title: true, indent: 1 end
validate()
click to toggle source
# File lib/gclouder/resources/compute/disks.rb, line 47 def self.validate return if Local.list.empty? header :validate Local.validate end