Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-fog-libvirt for 
openSUSE:Factory checked in at 2021-01-21 21:55:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-fog-libvirt (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-fog-libvirt.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-fog-libvirt"

Thu Jan 21 21:55:38 2021 rev:3 rq:865190 version:0.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-fog-libvirt/rubygem-fog-libvirt.changes  
2019-10-28 17:00:27.821764880 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-fog-libvirt.new.28504/rubygem-fog-libvirt.changes
       2021-01-21 21:55:39.989806931 +0100
@@ -1,0 +2,6 @@
+Wed Jan 20 12:38:32 UTC 2021 - Stephan Kulow <[email protected]>
+
+updated to version 0.8.0
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  fog-libvirt-0.7.0.gem

New:
----
  fog-libvirt-0.8.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-fog-libvirt.spec ++++++
--- /var/tmp/diff_new_pack.c5FedD/_old  2021-01-21 21:55:40.665807402 +0100
+++ /var/tmp/diff_new_pack.c5FedD/_new  2021-01-21 21:55:40.669807404 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-fog-libvirt
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-fog-libvirt
-Version:        0.7.0
+Version:        0.8.0
 Release:        0
 %define mod_name fog-libvirt
 %define mod_full_name %{mod_name}-%{version}
@@ -33,7 +33,7 @@
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  %{rubygem rdoc > 3.10}
 BuildRequires:  ruby-macros >= 5
-Url:            https://github.com/fog/fog-libvirt
+URL:            http://github.com/fog/fog-libvirt
 Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        Module for the 'fog' gem to support libvirt

++++++ fog-libvirt-0.7.0.gem -> fog-libvirt-0.8.0.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/fog/libvirt/compute.rb 
new/lib/fog/libvirt/compute.rb
--- old/lib/fog/libvirt/compute.rb      2019-10-28 13:28:37.000000000 +0100
+++ new/lib/fog/libvirt/compute.rb      2021-01-10 00:24:59.000000000 +0100
@@ -44,6 +44,7 @@
       request :list_interfaces
       request :destroy_interface
       request :get_node_info
+      request :update_autostart
       request :update_display
       request :libversion
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/fog/libvirt/models/compute/README.md 
new/lib/fog/libvirt/models/compute/README.md
--- old/lib/fog/libvirt/models/compute/README.md        2019-10-28 
13:28:37.000000000 +0100
+++ new/lib/fog/libvirt/models/compute/README.md        2021-01-10 
00:24:59.000000000 +0100
@@ -35,10 +35,13 @@
 libvirt_ceph_pool=rbd_pool_name
 auth_username=libvirt
 auth_uuid=uuid_of_libvirt_secret
+bus_type=virtio
 ```
 For more recent versions of libvirt which support using the secret by name 
(`usage` attribute in the `secret` tag),
 you can also drop `auth_uuid` and specify `auth_usage` instead. If both are 
specified, `auth_uuid` will be preferred for maximum compatibility.
 
+The `bus_type` can be set to `virtio` or `scsi`. If it is ommited, the default 
is `scsi`.
+
 ## Configuration
 
 The URI can be configured in two ways:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/fog/libvirt/models/compute/server.rb 
new/lib/fog/libvirt/models/compute/server.rb
--- old/lib/fog/libvirt/models/compute/server.rb        2019-10-28 
13:28:37.000000000 +0100
+++ new/lib/fog/libvirt/models/compute/server.rb        2021-01-10 
00:24:59.000000000 +0100
@@ -30,6 +30,7 @@
         attribute :cpu
         attribute :hugepages
         attribute :guest_agent
+        attribute :virtio_rng
 
         attribute :state
 
@@ -77,6 +78,10 @@
           action_status
         end
 
+        def update_autostart(value)
+          service.update_autostart(uuid, value)
+        end
+
         def mac
           nics.first.mac if nics && nics.first
         end
@@ -131,9 +136,10 @@
         end
 
         #alias methods
-        alias_method :halt,    :poweroff
-        alias_method :stop,    :shutdown
-        alias_method :active?, :active
+        alias_method :halt,       :poweroff
+        alias_method :stop,       :shutdown
+        alias_method :active?,    :active
+        alias_method :autostart?, :autostart
 
         def volumes
           # lazy loading of volumes
@@ -473,6 +479,7 @@
             :os_type                => "hvm",
             :arch                   => "x86_64",
             :domain_type            => "kvm",
+            :autostart              => false,
             :iso_dir                => default_iso_dir,
             :network_interface_type => "network",
             :network_nat_network    => "default",
@@ -482,6 +489,7 @@
             :cpu                    => {},
             :hugepages              => false,
             :guest_agent            => true,
+            :virtio_rng             => {},
           }
         end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/fog/libvirt/models/compute/templates/server.xml.erb 
new/lib/fog/libvirt/models/compute/templates/server.xml.erb
--- old/lib/fog/libvirt/models/compute/templates/server.xml.erb 2019-10-28 
13:28:37.000000000 +0100
+++ new/lib/fog/libvirt/models/compute/templates/server.xml.erb 2021-01-10 
00:24:59.000000000 +0100
@@ -52,9 +52,11 @@
     <disk type='network' device='disk'>
       <driver name='qemu' type='<%= vol.format_type %>' cache='writeback' 
discard='unmap'/>
       <source protocol='rbd' name='<%= vol.path %>'>
+      <% if args.key?("monitor") -%>
         <% args["monitor"].split(",").each do |mon| %>
         <host name='<%= mon %>' port='<%= args["port"] %>'/>
         <% end %>
+      <% end %>
       </source>
       <auth username='<%= args["auth_username"] %>'>
        <% if args.key?("auth_uuid") -%>
@@ -63,7 +65,11 @@
         <secret type='ceph' usage='<%= args["auth_usage"] %>'/>
        <% end -%>
       </auth>
-      <target dev='sd<%= ('a'..'z').to_a[volumes.index(vol)] %>' bus='scsi'/>
+      <% if args['bus_type'] == 'virtio' %>
+        <target dev='vd<%= ('a'..'z').to_a[volumes.index(vol)] %>' 
bus='virtio'/>
+      <% else %>
+        <target dev='sd<%= ('a'..'z').to_a[volumes.index(vol)] %>' bus='scsi'/>
+      <% end %>
     </disk>
   <% else %>
     <disk type='file' device='disk'>
@@ -94,6 +100,16 @@
       <target type='virtio' name='org.qemu.guest_agent.0'/>
     </channel>
 <% end -%>
+    <rng model='virtio'>
+<%
+  rng_backend_model = virtio_rng[:backend_model] ? virtio_rng[:backend_model] 
: 'random'
+-%>
+<% if virtio_rng[:backend_path] -%>
+      <backend model='<%= rng_backend_model %>'><%= virtio_rng[:backend_path] 
%></backend>
+<% else -%>
+      <backend model='<%= rng_backend_model %>'/>
+<% end -%>
+    </rng>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/fog/libvirt/requests/compute/list_networks.rb 
new/lib/fog/libvirt/requests/compute/list_networks.rb
--- old/lib/fog/libvirt/requests/compute/list_networks.rb       2019-10-28 
13:28:37.000000000 +0100
+++ new/lib/fog/libvirt/requests/compute/list_networks.rb       2021-01-10 
00:24:59.000000000 +0100
@@ -25,12 +25,20 @@
           end
         end
 
+        # bridge name may not be defined in some networks, we should skip that 
in such case
         def network_to_attributes(net)
           return if net.nil?
+
+          begin
+            bridge_name = net.bridge_name
+          rescue Libvirt::Error
+            bridge_name = ''
+          end
+
           {
             :uuid        => net.uuid,
             :name        => net.name,
-            :bridge_name => net.bridge_name
+            :bridge_name => bridge_name
           }
         end
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/fog/libvirt/requests/compute/list_volumes.rb 
new/lib/fog/libvirt/requests/compute/list_volumes.rb
--- old/lib/fog/libvirt/requests/compute/list_volumes.rb        2019-10-28 
13:28:37.000000000 +0100
+++ new/lib/fog/libvirt/requests/compute/list_volumes.rb        2021-01-10 
00:24:59.000000000 +0100
@@ -17,7 +17,7 @@
               end
             end
           else
-            return [get_volume(filter)]
+            data << get_volume(filter)
           end
           data.compact
         end
@@ -69,7 +69,8 @@
               return raw ? vol : volume_to_attributes(vol)
             end
           end
-          { }
+
+          nil
         end
       end
 
@@ -77,15 +78,22 @@
         def list_volumes(filters={ })
           vol1 = mock_volume 'vol1'
           vol2 = mock_volume 'vol2'
-          [vol1, vol2]
+          vols = [vol1, vol2]
+
+          if filters.keys.empty?
+            return vols
+          end
+
+          key = filters.keys.first
+          vols.select { |v| v[key] == filters[key] }
         end
 
         def mock_volume name
           {
               :pool_name   => 'vol.pool.name',
-              :key         => 'vol.key',
-              :id          => 'vol.key',
-              :path        => 'vol.path',
+              :key         => "vol.#{name}", # needs to match id
+              :id          => "vol.#{name}",
+              :path        => "path/to/disk", # used by in 
mock_files/domain.xml
               :name        => name,
               :format_type => 'raw',
               :allocation  => 123,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/fog/libvirt/requests/compute/update_autostart.rb 
new/lib/fog/libvirt/requests/compute/update_autostart.rb
--- old/lib/fog/libvirt/requests/compute/update_autostart.rb    1970-01-01 
01:00:00.000000000 +0100
+++ new/lib/fog/libvirt/requests/compute/update_autostart.rb    2021-01-10 
00:24:59.000000000 +0100
@@ -0,0 +1,18 @@
+module Fog
+  module Libvirt
+    class Compute
+      class Real
+        def update_autostart(uuid, value)
+          domain = client.lookup_domain_by_uuid(uuid)
+          domain.autostart = value
+        end
+      end
+
+      class Mock
+        def update_autostart(uuid, value)
+          value
+        end
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/fog/libvirt/version.rb 
new/lib/fog/libvirt/version.rb
--- old/lib/fog/libvirt/version.rb      2019-10-28 13:28:37.000000000 +0100
+++ new/lib/fog/libvirt/version.rb      2021-01-10 00:24:59.000000000 +0100
@@ -1,5 +1,5 @@
 module Fog
   module Libvirt
-    VERSION = '0.7.0'
+    VERSION = '0.8.0'
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2019-10-28 13:28:37.000000000 +0100
+++ new/metadata        2021-01-10 00:24:59.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: fog-libvirt
 version: !ruby/object:Gem::Version
-  version: 0.7.0
+  version: 0.8.0
 platform: ruby
 authors:
 - geemus (Wesley Beary)
-autorequire: 
+autorequire:
 bindir: bin
 cert_chain: []
-date: 2019-10-28 00:00:00.000000000 Z
+date: 2021-01-09 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: fog-core
@@ -276,6 +276,7 @@
 - lib/fog/libvirt/requests/compute/list_volumes.rb
 - lib/fog/libvirt/requests/compute/mock_files/domain.xml
 - lib/fog/libvirt/requests/compute/pool_action.rb
+- lib/fog/libvirt/requests/compute/update_autostart.rb
 - lib/fog/libvirt/requests/compute/update_display.rb
 - lib/fog/libvirt/requests/compute/upload_volume.rb
 - lib/fog/libvirt/requests/compute/vm_action.rb
@@ -305,12 +306,13 @@
 - tests/libvirt/requests/compute/create_domain_tests.rb
 - tests/libvirt/requests/compute/define_domain_tests.rb
 - tests/libvirt/requests/compute/dhcp_leases_tests.rb
+- tests/libvirt/requests/compute/update_autostart_tests.rb
 - tests/libvirt/requests/compute/update_display.rb
 homepage: http://github.com/fog/fog-libvirt
 licenses:
 - MIT
 metadata: {}
-post_install_message: 
+post_install_message:
 rdoc_options:
 - "--charset=UTF-8"
 require_paths:
@@ -326,8 +328,8 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.0.3
-signing_key: 
+rubygems_version: 3.1.4
+signing_key:
 specification_version: 2
 summary: Module for the 'fog' gem to support libvirt
 test_files:
@@ -352,4 +354,5 @@
 - tests/libvirt/requests/compute/create_domain_tests.rb
 - tests/libvirt/requests/compute/define_domain_tests.rb
 - tests/libvirt/requests/compute/dhcp_leases_tests.rb
+- tests/libvirt/requests/compute/update_autostart_tests.rb
 - tests/libvirt/requests/compute/update_display.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/libvirt/compute_tests.rb 
new/tests/libvirt/compute_tests.rb
--- old/tests/libvirt/compute_tests.rb  2019-10-28 13:28:37.000000000 +0100
+++ new/tests/libvirt/compute_tests.rb  2021-01-10 00:24:59.000000000 +0100
@@ -9,7 +9,8 @@
   end
 
   tests("Compute requests") do
-    %w{ create_domain create_volume define_domain define_pool 
destroy_interface destroy_network get_node_info list_domains
+    %w{ create_domain create_volume define_domain define_pool 
destroy_interface destroy_network get_node_info
+        update_autostart list_domains
         list_interfaces list_networks list_pools list_pool_volumes 
list_volumes pool_action vm_action volume_action
         dhcp_leases }.each do |request|
       test("it should respond to #{request}") { compute.respond_to? request }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/libvirt/models/compute/server_tests.rb 
new/tests/libvirt/models/compute/server_tests.rb
--- old/tests/libvirt/models/compute/server_tests.rb    2019-10-28 
13:28:37.000000000 +0100
+++ new/tests/libvirt/models/compute/server_tests.rb    2021-01-10 
00:24:59.000000000 +0100
@@ -5,6 +5,8 @@
 
   tests('The server model should') do
     tests('have the action') do
+      test('autostart') { server.respond_to? 'autostart' }
+      test('update_autostart') { server.respond_to? 'update_autostart' }
       test('reload') { server.respond_to? 'reload' }
       %w{ start stop destroy reboot suspend }.each do |action|
         test(action) { server.respond_to? action }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/libvirt/models/compute/volumes_tests.rb 
new/tests/libvirt/models/compute/volumes_tests.rb
--- old/tests/libvirt/models/compute/volumes_tests.rb   2019-10-28 
13:28:37.000000000 +0100
+++ new/tests/libvirt/models/compute/volumes_tests.rb   2021-01-10 
00:24:59.000000000 +0100
@@ -9,6 +9,7 @@
     tests('should be able to get a model') do
       tests('by instance uuid').succeeds { volumes.get volumes.first.id }
     end
+    test('filtered should be empty') { volumes.all(:name => 
"does-not-exist").empty? }
   end
 
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tests/libvirt/requests/compute/update_autostart_tests.rb 
new/tests/libvirt/requests/compute/update_autostart_tests.rb
--- old/tests/libvirt/requests/compute/update_autostart_tests.rb        
1970-01-01 01:00:00.000000000 +0100
+++ new/tests/libvirt/requests/compute/update_autostart_tests.rb        
2021-01-10 00:24:59.000000000 +0100
@@ -0,0 +1,12 @@
+Shindo.tests('Fog::Compute[:libvirt] | update_autostart request', ['libvirt']) 
do
+
+  servers = Fog::Compute[:libvirt].servers
+
+  tests('The response should') do
+    test('should not be empty') { not servers.empty? }
+    server = servers.first
+    tests('should be false').succeeds { server.autostart == false }
+    server.update_autostart(true)
+  end
+
+end

Reply via email to