Module: GClouder::Resources::Container::NodePools::Local
- Defined in:
- lib/gclouder/resources/container/node_pools.rb
Class Method Summary collapse
Class Method Details
.list(cluster) ⇒ Object
94 95 96 97 |
# File 'lib/gclouder/resources/container/node_pools.rb', line 94 def self.list(cluster) return {} unless cluster.key?("node_pools") { cluster["zone"].gsub(/-.$/, "") => cluster["node_pools"] } end |
.section ⇒ Object
99 100 101 |
# File 'lib/gclouder/resources/container/node_pools.rb', line 99 def self.section %w(container node-pools) end |
.validate(cluster) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/gclouder/resources/container/node_pools.rb', line 103 def self.validate(cluster) Resources::Validate::Region.instances( list(cluster), required_keys: GClouder::Config::Arguments.required(section).merge({ "zone" => { "type" => "String", "required" => "true" }}), permitted_keys: GClouder::Config::Arguments.permitted(section).merge({ "additional_zones" => { "type" => "Array", "required" => "false" } }), # FIXME: num_nodes has wrong type in assets arguments file.. ignore_keys: ["size", "num_nodes"], skip_region: true, indent: 1, ) end |