mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09:00
Feature #1686: Add rename methods to ruby OCA and CLI
This commit is contained in:
1 parent
9061812849
commit
e1b033f8cc
9 files changed
+88
-4
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user