Sha256: 93740341613dbaff6435509851297b4ed8d274cc5e3aa88adc318e4e04bc52ae
Contents?: true
Size: 621 Bytes
Versions: 54
Compression:
Stored size: 621 Bytes
Contents
require_relative 'common' module Kontena::Cli::Grids class CreateCommand < Clamp::Command include Kontena::Cli::Common include Common parameter "NAME", "Grid name" option "--initial-size", "INITIAL_SIZE", "Initial grid size (number of nodes)", default: 1 def execute require_api_url token = require_token payload = { name: name } payload[:initial_size] = initial_size if initial_size grid = client(token).post('grids', payload) if grid self.current_grid = grid puts "Using grid: #{grid['name'].cyan}" end end end end
Version data entries
54 entries across 54 versions & 1 rubygems