F #6723: Remove onehost importvm (#3231)

* Remove vm_import table from DB
* Remove imported vms actions
* Fix fsck for image and network
* onedb fsck fix running_vms only for non-backup images
This commit is contained in:
Pavel Czerný authored and GitHub committed 2024-11-21 17:31:47 +01:00
1 parent f4616d0c1f
commit fa73142e7d
40 files changed
+68 -1300

No files matched your search

+4 -3
View File
@@ -700,7 +700,7 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
format = '%-30.30s %36s %4s %10s'
CLIHelper.print_header(format(format, 'NAME',
'IMPORT_ID', 'CPU', 'MEMORY'),
'DEPLOY_ID', 'CPU', 'MEMORY'),
true)
wilds.each do |wild|
@@ -718,8 +718,9 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
line[/CPU/]
end[0].split('=')[1].tr('"', ' ').strip
else
name = wild['DEPLOY_ID']
import = memory = cpu = '-'
name = wild['VM_NAME']
import = wild['DEPLOY_ID']
memory = cpu = '-'
end
puts format(format, name, import, cpu, memory)
-17
View File
@@ -354,23 +354,6 @@ CommandParser::CmdParser.new(ARGV) do
end
end
importvm_desc = <<-EOT.unindent
Import VM to OpenNebula
EOT
command :importvm,
importvm_desc,
:hostid,
:name,
:options => [IPV4, IPV6] do
helper.perform_action(args[0], options, 'imported') do |o|
rc = o.info
next rc if OpenNebula.is_error?(rc)
o.import_wild(args[1], options[:ipv4], options[:ipv6])
end
end
forceupdate_desc = <<-EOT.unindent
Forces host monitoring update
Examples:
+1 -1
View File
@@ -403,7 +403,7 @@ CommandParser::CmdParser.new(ARGV) do
vmid = args[0]
remove_str = "\n onevm recover --delete-db #{vmid}" \
"\n\nAfter a monitoring cycle, the VM will appear "\
'as a Wild VM for reimport.'
'as a Wild VM.'
print 'Extracting information from VM ' + vmid