1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Feature #863: Add new vn_mad to ruby oca and onehost command

This commit is contained in:
Carlos Martín 2011-11-10 18:27:04 +01:00
parent fc848e2727
commit 1788425c94
3 changed files with 12 additions and 10 deletions

View File

@ -59,6 +59,7 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
puts str % ["STATE", host.state_str]
puts str % ["IM_MAD", host['IM_MAD']]
puts str % ["VM_MAD", host['VM_MAD']]
puts str % ["VN_MAD", host['VN_MAD']]
puts str % ["TM_MAD", host['TM_MAD']]
puts

View File

@ -60,9 +60,10 @@ cmd=CommandParser::CmdParser.new(ARGV) do
Creates a new Host
EOT
command :create, create_desc, :hostname, :im_mad, :vmm_mad, :tm_mad do
command :create, create_desc, :hostname, :im_mad, :vmm_mad, :vnm_mad,
:tm_mad do
helper.create_resource(options) do |host|
host.allocate(args[0], args[1], args[2], args[3])
host.allocate(args[0], args[1], args[2], args[3], args[4])
end
end

View File

@ -78,15 +78,15 @@ module OpenNebula
# Allocates a new Host in OpenNebula
#
# +hostname+ A string containing the name of the new Host.
# @param hostname [String] Name of the new Host.
# @param im [String] Name of the im_driver
# @param vmm [String] Name of the vmm_driver
# @param tm [String] Name of the tm_driver
#
# +im+ A string containing the name of the im_driver
#
# +vmm+ A string containing the name of the vmm_driver
#
# +tm+ A string containing the name of the tm_driver
def allocate(hostname,im,vmm,tm)
super(HOST_METHODS[:allocate],hostname,im,vmm,tm)
# @return [Integer, OpenNebula::Error] the new VM ID in case of
# success, error otherwise
def allocate(hostname,im,vmm,vnm,tm)
super(HOST_METHODS[:allocate],hostname,im,vmm,vnm,tm)
end
# Deletes the Host