On Sat, Jan 23, 2021 at 06:16:33PM +0800, Cao Xueliang wrote:
On Sat, Jan 23, 2021 at 02:40:02PM +0800, Xiao Shenwei wrote:
libvirt is a vm management tool, it based on a domain.xml to run vm each element of xml can be parsed qemu-kvm parameter. so we can configure xml file to run different type of vm
Your change log doesn't seem to have something with your code.
ok
Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com
providers/libvirt/client.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 providers/libvirt/client.rb
diff --git a/providers/libvirt/client.rb b/providers/libvirt/client.rb new file mode 100755 index 0000000..29cdaf3 --- /dev/null +++ b/providers/libvirt/client.rb @@ -0,0 +1,23 @@ +#!/usr/bin/env ruby +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true
+require_relative 'lib/mylog' +require_relative 'lib/consumer'
+def main(hostname, queues)
- puts "cat #{hostname}.log"
- logger = Mylog.new("#{hostname}.log")
- consumer = Consumer.new(hostname, queues, logger)
- response = consumer.connect
The connect is not clear, in general, you need to do something after connecting.
right, have some other patch do it
Thanks, Shenwei
Thanks, Xueliang
- if response.nil? || response['job_id'].empty?
- logger.warn('no job now')
- puts '----------'
- puts 'no job now'
- puts '----------'
- return
- end
- ## clean env
- consumer.clean_info
+end
2.23.0