Module: GClouder::Resources::Compute::Networks::Remote

Defined in:
lib/gclouder/resources/compute/networks.rb

Class Method Summary collapse

Class Method Details

.instancesObject



87
88
89
90
91
92
93
# File 'lib/gclouder/resources/compute/networks.rb', line 87

def self.instances
  Resources::Remote.instances(
    path:           ["compute", "networks"],
    ignore_keys:    ["auto_create_subnetworks", "subnetworks", "x_gcloud_mode", "range"],
    skip_instances: { "name" => /^default$/ },
  )
end

.listObject



83
84
85
# File 'lib/gclouder/resources/compute/networks.rb', line 83

def self.list
  { "global" => instances.fetch("global", []).map { |network| { "name" => network["name"]  } } }.delete_if { |_k, v| v.empty? }
end