Sha256: 611b1c3cd631c0f54d367c5001d1df3b40f8a3b74cf61bae29fa07f236c271f0
Contents?: true
Size: 938 Bytes
Versions: 9
Compression:
Stored size: 938 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/base') module KnifeJoyent class JoyentServerResize < Chef::Knife include KnifeJoyent::Base banner 'knife joyent server resize <server_id> -f <flavor>' option :flavor, :short => "-f <flavor>", :long => "--flavor <flavor>", :description => "name of flavor/package to resize to" def run unless config[:flavor] show_usage exit 1 end unless name_args.size === 1 show_usage exit 1 end id = name_args.first server = self.connection.servers.get(id) unless server puts ui.error("Server with id: #{id} not found") exit 1 end if self.connection.resize_machine(id, config[:flavor]) puts ui.color("Resized server #{id}", :cyan) exit 0 else puts ui.error("Resize server failed") exit 1 end end end end
Version data entries
9 entries across 9 versions & 1 rubygems