class CORL::Machine::Physical
Public Instance Methods
create(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 75 def create(options = {}) 76 super do 77 logger.warn("Damn! We can't create new instances of physical machines") 78 true 79 end 80 end
create_image(name, options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 145 def create_image(name, options = {}) 146 super do 147 logger.warn("Creating images of local machines not supported yet") 148 true 149 end 150 end
created?()
click to toggle source
# File lib/CORL/machine/physical.rb 17 def created? 18 true 19 end
destroy(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 162 def destroy(options = {}) 163 super do 164 logger.warn("If you want to destroy your physical machine, grab a hammer") 165 true 166 end 167 end
download(remote_path, local_path, options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 84 def download(remote_path, local_path, options = {}) 85 super do |config, success| 86 logger.debug("Executing SCP downloads not yet supported on physical machines") 87 true 88 end 89 end
exec(commands, options = {}, &code)
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 102 def exec(commands, options = {}, &code) 103 super do |config, results| 104 logger.debug("Executing shell commands ( #{commands.inspect} ) on machine #{plugin_name}") 105 106 commands.each do |command| 107 result = CORL.cli_run(command, config) do |op, command_str, data| 108 code ? code.call(op, command_str, data) : true 109 end 110 results << result 111 end 112 results 113 end 114 end
hostname()
click to toggle source
# File lib/CORL/machine/physical.rb 36 def hostname 37 fact(:fqdn) 38 end
image()
click to toggle source
# File lib/CORL/machine/physical.rb 60 def image 61 nil 62 end
load()
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 67 def load 68 super do 69 true 70 end 71 end
machine_type()
click to toggle source
# File lib/CORL/machine/physical.rb 54 def machine_type 55 'physical' 56 end
normalize(reload)
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 9 def normalize(reload) 10 super 11 myself.plugin_name = hostname 12 end
private_ip()
click to toggle source
# File lib/CORL/machine/physical.rb 48 def private_ip 49 nil 50 end
public_ip()
click to toggle source
# File lib/CORL/machine/physical.rb 42 def public_ip 43 CORL.public_ip 44 end
reload(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 136 def reload(options = {}) 137 super do 138 logger.warn("Reloading not currently supported on physical machines") 139 true 140 end 141 end
running?()
click to toggle source
# File lib/CORL/machine/physical.rb 23 def running? 24 true 25 end
start(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 127 def start(options = {}) 128 super do 129 logger.warn("This machine is already running so can not be started") 130 true 131 end 132 end
state()
click to toggle source
# File lib/CORL/machine/physical.rb 30 def state 31 translate_state('RUNNING') 32 end
stop(options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 153 def stop(options = {}) 154 super do 155 logger.warn("Stopping the machine we are operating is not supported right now") 156 true 157 end 158 end
terminal(user, options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 118 def terminal(user, options = {}) 119 super do |config| 120 logger.debug("Launching terminals on the local machine is not currently supported") 121 1 122 end 123 end
upload(local_path, remote_path, options = {})
click to toggle source
Calls superclass method
# File lib/CORL/machine/physical.rb 93 def upload(local_path, remote_path, options = {}) 94 super do |config, success| 95 logger.debug("Executing SCP uploads not yet supported on physical machines") 96 true 97 end 98 end