Module: GClouder::Resources::Compute::ForwardingRules

Includes:
Logging, GClouder::Resource::Cleaner
Defined in:
lib/gclouder/resources/compute/forwarding_rules.rb

Defined Under Namespace

Modules: Local, Remote, Rule

Class Method Summary collapse

Methods included from GClouder::Resource::Cleaner

#clean, #cleaner, included, #undefined

Methods included from Logging

#add, #bad, #change, #debug, #error, #fatal, #good, included, #info, log, loggers, #remove, report, #resource_state, setup, #warn, #warning

Class Method Details

.checkObject



32
33
# File 'lib/gclouder/resources/compute/forwarding_rules.rb', line 32

def self.check
end

.ensureObject



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/gclouder/resources/compute/forwarding_rules.rb', line 14

def self.ensure
  return if Local.list.empty?
  header
  Local.list.each do |region, rules|
    info region, heading: true, indent: 2
    info
    rules.each do |rule|
      Rule.ensure(rule["name"], rule)
    end
  end
end

.header(stage = :ensure) ⇒ Object



10
11
12
# File 'lib/gclouder/resources/compute/forwarding_rules.rb', line 10

def self.header(stage = :ensure)
  info "[#{stage}] compute / forwarding-rules", indent: 1, title: true
end

.validateObject



26
27
28
29
30
# File 'lib/gclouder/resources/compute/forwarding_rules.rb', line 26

def self.validate
  return if Local.list.empty?
  header :validate
  Local.validate
end