class CORL::Machine::Raspberrypi
Public Instance Methods
create(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 67 def create(options = {}) 68 super do 69 logger.warn("Damn! We can't create new instances of Raspberry Pi machines") 70 true 71 end 72 end
create_image(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 119 def create_image(options = {}) 120 super do 121 logger.warn("Creating images of Raspberry Pi machines not supported yet") 122 true 123 end 124 end
created?()
click to toggle source
# File lib/CORL/machine/raspberrypi.rb 21 def created? 22 true 23 end
destroy(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 146 def destroy(options = {}) 147 super do 148 logger.warn("If you want to destroy your Raspberry Pi machine, grab a hammer") 149 true 150 end 151 end
download(remote_path, local_path, options = {}, &code)
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 76 def download(remote_path, local_path, options = {}, &code) 77 super do |config, success| 78 ssh_download(remote_path, local_path, config, &code) 79 end 80 end
exec(commands, options = {}, &code)
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 92 def exec(commands, options = {}, &code) 93 super do |config| 94 ssh_exec(commands, config, &code) 95 end 96 end
image()
click to toggle source
# File lib/CORL/machine/raspberrypi.rb 52 def image 53 nil 54 end
load()
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 59 def load 60 super do 61 true 62 end 63 end
machine_type()
click to toggle source
# File lib/CORL/machine/raspberrypi.rb 46 def machine_type 47 'raspberrypi' 48 end
normalize(reload)
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 11 def normalize(reload) 12 require 'net/ping' 13 14 super 15 myself.plugin_name = node.plugin_name if node 16 end
public_ip()
click to toggle source
# File lib/CORL/machine/raspberrypi.rb 34 def public_ip 35 node[:public_ip] 36 end
reload(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 108 def reload(options = {}) 109 super do 110 success = node.command('reboot', { :as_admin => true }) 111 sleep 5 112 sleep 1 until running? 113 success 114 end 115 end
running?()
click to toggle source
# File lib/CORL/machine/raspberrypi.rb 27 def running? 28 Net::Ping::TCP.new(public_ip, node.ssh_port).ping? 29 end
start(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 137 def start(options = {}) 138 super do 139 logger.warn("Starting a Raspberry Pi machine is not supported right now") 140 true 141 end 142 end
state()
click to toggle source
# File lib/CORL/machine/raspberrypi.rb 40 def state 41 running? ? :running : :not_running 42 end
stop(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 128 def stop(options = {}) 129 super do 130 logger.warn("Stopping a Raspberry Pi machine is not supported right now") 131 true 132 end 133 end
terminal(user, options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 100 def terminal(user, options = {}) 101 super do |config| 102 ssh_terminal(user, config) 103 end 104 end
upload(local_path, remote_path, options = {}, &code)
click to toggle source
Calls superclass method
# File lib/CORL/machine/raspberrypi.rb 84 def upload(local_path, remote_path, options = {}, &code) 85 super do |config, success| 86 ssh_upload(local_path, remote_path, config, &code) 87 end 88 end