Module: GClouder::Resources::Compute::Networks::Subnets::Local
- Includes:
- Logging
- Defined in:
- lib/gclouder/resources/compute/networks/subnets.rb
Class Method Summary
collapse
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
.instances ⇒ Object
64
65
66
|
# File 'lib/gclouder/resources/compute/networks/subnets.rb', line 64
def self.instances
Resources::Region.instances(path: ["subnets"])
end
|
.list ⇒ Object
52
53
54
|
# File 'lib/gclouder/resources/compute/networks/subnets.rb', line 52
def self.list
instances
end
|
.networks ⇒ Object
68
69
70
71
72
|
# File 'lib/gclouder/resources/compute/networks/subnets.rb', line 68
def self.networks
collection = { "global" => [] }
list.each { |_region, subnets| subnets.each { |subnet| collection["global"].push({ "name" => subnet["network"] }) } }
collection.delete_if { |_k, v| v.empty? }
end
|
.section ⇒ Object
48
49
50
|
# File 'lib/gclouder/resources/compute/networks/subnets.rb', line 48
def self.section
["compute", "networks", "subnets"]
end
|