Sha256: 0f4d21b744bbb3edf0d17f8a611f7b4f49add402cc5fc5d9848e66cc35f761fd
Contents?: true
Size: 667 Bytes
Versions: 9
Compression:
Stored size: 667 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/base') module KnifeJoyent class JoyentServerReboot < Chef::Knife include KnifeJoyent::Base banner 'knife joyent server reboot <server_id>' def run 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 server.reboot puts ui.color("Rebooted Server #{id}", :cyan) exit 0 else puts ui.error("Reboot server failed") exit 1 end end end end
Version data entries
9 entries across 9 versions & 1 rubygems