Class: Chef::Knife::OvmcliVmEdit
- Inherits:
-
BaseOraclevmCommand
- Object
- Chef::Knife
- BaseOraclevmCommand
- Chef::Knife::OvmcliVmEdit
- Defined in:
- lib/chef/knife/ovmcli_vm_edit.rb
Overview
Add vnic on a virtual machine
Instance Method Summary collapse
Methods inherited from BaseOraclevmCommand
#add_vdisk, #add_vnic, #clone_vm, #create_vdisk, #delete_vdisk, #delete_vm, #edit_vm, #fatal_exit, #get_cli_connection, get_common_options, #get_config, #get_host, #get_password, #get_vm, #kill_vm, #list_serverpool, #list_tag, #list_vm, #migrate_vm, #remove_vdisk, #restart_vm, #resume_vm, #send_message, #show_vm_status, #start_vm, #stop_vm, #suspend_vm, #tcp_test_port
Instance Method Details
#run ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/chef/knife/ovmcli_vm_edit.rb', line 39 def run $stdout.sync = true vmname = @name_args[0] memory=get_config(:memory) memorylimit=get_config(:memorylimit) cpucount=get_config(:cpucount) cpucountlimit=get_config(:cpucountlimit) current=edit_vm(vmname, memory, memorylimit, cpucount, cpucountlimit) Chef::Log.debug("Status = #{current[:status]}. Time = #{current[:time]}. VM Status = #{current[:vmstatus]}.") if current[:status]!="Success" puts "Call to OVM CLI Failed with #{current[:errormsg]}" end end |