Sha256: 3b695c3237a9697a895af7eb18dafc332b07a6e611ea89be4aaa25cc42b04881
Contents?: true
Size: 697 Bytes
Versions: 11
Compression:
Stored size: 697 Bytes
Contents
require 'chef/knife/joyent_base' class Chef class Knife class JoyentServerFwDisable < Knife include Knife::JoyentBase banner "knife joyent server fw disable <server_id>" def run unless name_args.size === 1 show_usage exit 1 end id = name_args.first path = "/my/machines/#{id}" res = self.connection.request( :method => "POST", :path => path, :query => {"action" => "disable_firewall"} ) if (res.status == 202) puts ui.color("Firewall Disabled for server #{id}", :cyan) else output_error(res) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems