Sha256: 28a585d565b026fa0998434fd4d28219c40b0af2638926d706ac5a5cba7b16d8
Contents?: true
Size: 559 Bytes
Versions: 75
Compression:
Stored size: 559 Bytes
Contents
module Kontena::Cli::Grids::TrustedSubnets class AddCommand < Kontena::Command include Kontena::Cli::Common parameter "NAME", "Grid name" parameter "SUBNET", "Trusted subnet" def execute require_api_url token = require_token grid = client(token).get("grids/#{name}") data = {trusted_subnets: grid['trusted_subnets'] + [self.subnet]} spinner "Adding #{subnet.colorize(:cyan)} as a trusted subnet in #{name.colorize(:cyan)} grid " do client(token).put("grids/#{name}", data) end end end end
Version data entries
75 entries across 75 versions & 1 rubygems