Feature #1686: Add rename methods to ruby OCA and CLI

This commit is contained in:
Carlos Martín committed 2012-12-10 11:46:32 +01:00
1 parent 9061812849
commit e1b033f8cc
9 files changed
+88 -4

No files matched your search

+10
View File
@@ -304,6 +304,16 @@ cmd=CommandParser::CmdParser.new(ARGV) do
end
end
rename_desc = <<-EOT.unindent
Renames the Image
EOT
command :rename, rename_desc, :imageid, :name do
helper.perform_action(args[0],options,"renamed") do |o|
o.rename(args[1])
end
end
list_desc = <<-EOT.unindent
Lists Images in the pool
EOT
+10
View File
@@ -265,6 +265,16 @@ cmd=CommandParser::CmdParser.new(ARGV) do
Lists Templates in the pool
EOT
rename_desc = <<-EOT.unindent
Renames the Template
EOT
command :rename, rename_desc, :templateid, :name do
helper.perform_action(args[0],options,"renamed") do |o|
o.rename(args[1])
end
end
command :list, list_desc, [:filterflag, nil], :options=>list_options do
helper.list_pool(options, false, args[0])
end
+10
View File
@@ -515,6 +515,16 @@ cmd=CommandParser::CmdParser.new(ARGV) do
Lists VMs in the pool
EOT
rename_desc = <<-EOT.unindent
Renames the VM
EOT
command :rename, rename_desc, :vmid, :name do
helper.perform_action(args[0],options,"renamed") do |o|
o.rename(args[1])
end
end
command :list, list_desc, [:filterflag, nil],
:options=>CLIHelper::OPTIONS+OpenNebulaHelper::OPTIONS+
[OpenNebulaHelper::DESCRIBE] do
+10
View File
@@ -228,4 +228,14 @@ cmd=CommandParser::CmdParser.new(ARGV) do
vnet.update(str)
end
end
rename_desc = <<-EOT.unindent
Renames the Virtual Network
EOT
command :rename, rename_desc, :vnetid, :name do
helper.perform_action(args[0],options,"renamed") do |o|
o.rename(args[1])
end
end
end