Hello community,

here is the log from the commit of package yast2-storage-ng for 
openSUSE:Factory checked in at 2020-09-03 01:09:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-storage-ng"

Thu Sep  3 01:09:24 2020 rev:88 rq:829789 version:4.3.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes        
2020-08-14 13:07:23.981166094 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-storage-ng.new.3399/yast2-storage-ng.changes  
    2020-09-03 01:09:48.772380160 +0200
@@ -1,0 +2,6 @@
+Wed Aug 26 10:08:03 UTC 2020 - Imobach Gonzalez Sosa <[email protected]>
+
+- Unify profile element paths (bsc#1175680).
+- 4.3.15
+
+-------------------------------------------------------------------
@@ -233,0 +240,2 @@
+- AutoYaST: do not append a suffix to LVM Volume Group names unless it
+  is needed (bsc#1115749).

Old:
----
  yast2-storage-ng-4.3.14.tar.bz2

New:
----
  yast2-storage-ng-4.3.15.tar.bz2

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

Other differences:
------------------
++++++ yast2-storage-ng.spec ++++++
--- /var/tmp/diff_new_pack.WYRRSH/_old  2020-09-03 01:09:50.560380756 +0200
+++ /var/tmp/diff_new_pack.WYRRSH/_new  2020-09-03 01:09:50.564380757 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-storage-ng
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,25 +12,25 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           yast2-storage-ng
-Version:        4.3.14
+Version:        4.3.15
 Release:        0
 Summary:        YaST2 - Storage Configuration
 License:        GPL-2.0-only OR GPL-3.0-only
 Group:          System/YaST
-Url:            https://github.com/yast/yast-storage-ng
+URL:            https://github.com/yast/yast-storage-ng
 
 Source:         %{name}-%{version}.tar.bz2
 
 # UF_PMEM and UF_NVME
 BuildRequires:  libstorage-ng-ruby >= 4.3.30
 BuildRequires:  update-desktop-files
-# AutoYaST issue handling
-BuildRequires:  yast2 >= 4.3.2
+# AutoYaST ElementPath class
+BuildRequires:  yast2 >= 4.3.20
 BuildRequires:  yast2-devtools >= 4.2.2
 # for AbortException and handle direct abort
 BuildRequires:  yast2-ruby-bindings >= 4.0.6
@@ -50,8 +50,9 @@
 Requires:       findutils
 # UF_PMEM and UF_NVME
 Requires:       libstorage-ng-ruby >= 4.3.30
-# Updated Xen detection
-Requires:       yast2 >= 4.3.6
+# AutoYaST issue handling
+Requires:       yast2 >= 4.3.20
+
 # Y2Packager::Repository
 Requires:       yast2-packager >= 3.3.7
 # for AbortException and handle direct abort

++++++ yast2-storage-ng-4.3.14.tar.bz2 -> yast2-storage-ng-4.3.15.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/package/yast2-storage-ng.changes 
new/yast2-storage-ng-4.3.15/package/yast2-storage-ng.changes
--- old/yast2-storage-ng-4.3.14/package/yast2-storage-ng.changes        
2020-08-07 10:12:49.000000000 +0200
+++ new/yast2-storage-ng-4.3.15/package/yast2-storage-ng.changes        
2020-08-26 16:42:50.000000000 +0200
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Wed Aug 26 10:08:03 UTC 2020 - Imobach Gonzalez Sosa <[email protected]>
+
+- Unify profile element paths (bsc#1175680).
+- 4.3.15
+
+-------------------------------------------------------------------
 Thu Aug  6 12:00:08 UTC 2020 - Ancor Gonzalez Sosa <[email protected]>
 
 - AutoinstProposal now properly reports the proposal as failed when
@@ -231,6 +237,8 @@
 
 - AutoYaST: show an error when no suitable physical volumes are
   found for a given volume group (bsc#1162043).
+- AutoYaST: do not append a suffix to LVM Volume Group names unless it
+  is needed (bsc#1115749).
 - 4.2.94
 
 -------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/package/yast2-storage-ng.spec 
new/yast2-storage-ng-4.3.15/package/yast2-storage-ng.spec
--- old/yast2-storage-ng-4.3.14/package/yast2-storage-ng.spec   2020-08-07 
10:12:49.000000000 +0200
+++ new/yast2-storage-ng-4.3.15/package/yast2-storage-ng.spec   2020-08-26 
16:42:50.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           yast2-storage-ng
-Version:        4.3.14
+Version:        4.3.15
 Release:        0
 Summary:        YaST2 - Storage Configuration
 License:        GPL-2.0-only OR GPL-3.0-only
@@ -28,8 +28,8 @@
 # UF_PMEM and UF_NVME
 BuildRequires: libstorage-ng-ruby >= 4.3.30
 BuildRequires:  update-desktop-files
-# AutoYaST issue handling
-BuildRequires:  yast2 >= 4.3.2
+# AutoYaST ElementPath class
+BuildRequires:  yast2 >= 4.3.20
 BuildRequires:  yast2-devtools >= 4.2.2
 # for AbortException and handle direct abort
 BuildRequires:  yast2-ruby-bindings >= 4.0.6
@@ -49,8 +49,9 @@
 Requires:       findutils
 # UF_PMEM and UF_NVME
 Requires:       libstorage-ng-ruby >= 4.3.30
-# Updated Xen detection
-Requires:       yast2 >= 4.3.6
+# AutoYaST issue handling
+Requires:  yast2 >= 4.3.20
+
 # Y2Packager::Repository
 Requires:       yast2-packager >= 3.3.7
 # for AbortException and handle direct abort
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/bcache_options_section.rb
 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/bcache_options_section.rb
--- 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/bcache_options_section.rb
    2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/bcache_options_section.rb
    2020-08-26 16:42:50.000000000 +0200
@@ -43,9 +43,10 @@
       # Clones Bcache device options into an AutoYaST <bcache_options> profile 
section
       #
       # @param device [Bcache] bcache device
+      # @param parent [SectionWithAttributes,nil] Parent section
       # @return [BcacheOptionsSection] bcache options section
-      def self.new_from_storage(device)
-        result = new
+      def self.new_from_storage(device, parent = nil)
+        result = new(parent)
         result.init_from_bcache(device)
         result
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/btrfs_options_section.rb
 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/btrfs_options_section.rb
--- 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/btrfs_options_section.rb
     2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/btrfs_options_section.rb
     2020-08-26 16:42:50.000000000 +0200
@@ -46,9 +46,10 @@
       # Clones Btrfs options into an AutoYaST <btrfs_options> profile section
       #
       # @param filesystem [Filesystems::Btrfs]
+      # @param parent [SectionWithAttributes,nil]
       # @return [BtrfsOptionsSection] Btrfs options section
-      def self.new_from_storage(filesystem)
-        section = new
+      def self.new_from_storage(filesystem, parent = nil)
+        section = new(parent)
         section.init_from_btrfs(filesystem)
         section
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/drive_section.rb 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/drive_section.rb
--- 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/drive_section.rb 
    2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/drive_section.rb 
    2020-08-26 16:42:50.000000000 +0200
@@ -19,6 +19,7 @@
 
 require "yast"
 require "installation/autoinst_profile/section_with_attributes"
+require "installation/autoinst_profile/element_path"
 require "y2storage/autoinst_profile/skip_list_section"
 require "y2storage/autoinst_profile/partition_section"
 require "y2storage/autoinst_profile/raid_options_section"
@@ -180,9 +181,10 @@
       #
       # @param device [BlkDevice] a block device that can be cloned into a
       #   <drive> section, like a disk, a DASD or an LVM volume group.
+      # @param parent [SectionWithAttributes,nil] Parent section
       # @return [DriveSection, nil] nil if the device cannot be exported
-      def self.new_from_storage(device)
-        result = new
+      def self.new_from_storage(device, parent = nil)
+        result = new(parent)
         # So far, only disks (and DASD) are supported
         initialized = result.init_from_device(device)
         initialized ? result : nil
@@ -241,11 +243,18 @@
         hash
       end
 
-      # Return section name
+      # Returns the section path
       #
-      # @return [String] "drives"
-      def section_name
-        "drives"
+      # The <drive> section is an special case of a collection, so
+      # we need to redefine the #section_path method completely.
+      #
+      # @return [Installation::AutoinstProfile::ElementPath] Section path or
+      #   nil if the parent is not set
+      def section_path
+        return nil unless parent
+
+        idx = parent.drives.index(self)
+        parent.section_path.join(idx)
       end
 
       # @return [String] disklabel value which indicates that no partition 
table is wanted.
@@ -422,7 +431,7 @@
         @enabled_snapshots = enabled_snapshots?([device.filesystem]) if 
device.filesystem
         @use = "all"
         @disklabel = "none"
-        @partitions = [PartitionSection.new_from_storage(device)]
+        @partitions = [PartitionSection.new_from_storage(device, self)]
 
         true
       end
@@ -435,7 +444,7 @@
         @type = :CT_BTRFS
         @use = "all"
         @disklabel = "none"
-        @partitions = [PartitionSection.new_from_storage(filesystem)]
+        @partitions = [PartitionSection.new_from_storage(filesystem, self)]
         @device = @partitions.first.name_for_btrfs(filesystem)
         @enable_snapshots = enabled_snapshots?([filesystem])
         @btrfs_options = BtrfsOptionsSection.new_from_storage(filesystem)
@@ -452,7 +461,7 @@
         @device = device.share
         @use = "all"
         @disklabel = "none"
-        @partitions = [PartitionSection.new_from_storage(device)]
+        @partitions = [PartitionSection.new_from_storage(device, self)]
 
         true
       end
@@ -474,13 +483,13 @@
           collection = disk.partitions.reject { |p| skip_partition?(p) }
           partitions_from_collection(collection.sort_by(&:number))
         else
-          [PartitionSection.new_from_storage(disk)]
+          [PartitionSection.new_from_storage(disk, self)]
         end
       end
 
       def partitions_from_collection(collection)
         collection.each_with_object([]) do |storage_partition, result|
-          partition = PartitionSection.new_from_storage(storage_partition)
+          partition = PartitionSection.new_from_storage(storage_partition, 
self)
           next unless partition
 
           result << partition
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/partition_section.rb
 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/partition_section.rb
--- 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/partition_section.rb
 2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/partition_section.rb
 2020-08-26 16:42:50.000000000 +0200
@@ -194,8 +194,8 @@
       # @param device [Device] a device that can be cloned into a <partition> 
section,
       #   like a partition, an LVM logical volume, an MD RAID or a NFS 
filesystem.
       # @return [PartitionSection]
-      def self.new_from_storage(device)
-        result = new
+      def self.new_from_storage(device, parent = nil)
+        result = new(parent)
         result.init_from_device(device)
         result
       end
@@ -307,7 +307,7 @@
       # Return section name
       #
       # @return [String] "partitions"
-      def section_name
+      def collection_name
         "partitions"
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/partitioning_section.rb
 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/partitioning_section.rb
--- 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/partitioning_section.rb
      2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/partitioning_section.rb
      2020-08-26 16:42:50.000000000 +0200
@@ -18,6 +18,7 @@
 # find current contact information at www.suse.com.
 
 require "yast"
+require "installation/autoinst_profile/section_with_attributes"
 require "y2storage/autoinst_profile/drive_section"
 
 module Y2Storage
@@ -27,7 +28,7 @@
     #
     # More information can be found in the 'Partitioning' section of the 
AutoYaST documentation:
     # 
https://www.suse.com/documentation/sles-12/singlehtml/book_autoyast/book_autoyast.html#CreateProfile.Partitioning
-    class PartitioningSection
+    class PartitioningSection < 
::Installation::AutoinstProfile::SectionWithAttributes
       # @return [Array<DriveSection] drives whithin the <partitioning> section
       attr_accessor :drives
 
@@ -138,13 +139,6 @@
         drives.select { |d| d.type == :CT_BTRFS }
       end
 
-      # Return section name
-      #
-      # @return [String] "partitioning"
-      def section_name
-        "partitioning"
-      end
-
       # All drive sections generated from a given devicegraph
       #
       # It creates a drive section for each exportable device, see 
{#exportable_devices}.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/raid_options_section.rb
 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/raid_options_section.rb
--- 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/autoinst_profile/raid_options_section.rb
      2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/autoinst_profile/raid_options_section.rb
      2020-08-26 16:42:50.000000000 +0200
@@ -75,9 +75,10 @@
       # Clones RAID device options into an AutoYaST <raid_options> profile 
section
       #
       # @param device [Md] RAID device
+      # @param parent [SectionWithAttributes,nil] Parent section
       # @return [RaidOptionsSection] RAID options section
-      def self.new_from_storage(device)
-        result = new
+      def self.new_from_storage(device, parent = nil)
+        result = new(parent)
         result.init_from_raid(device)
         result
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/proposal/autoinst_space_maker.rb 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/proposal/autoinst_space_maker.rb
--- 
old/yast2-storage-ng-4.3.14/src/lib/y2storage/proposal/autoinst_space_maker.rb  
    2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/src/lib/y2storage/proposal/autoinst_space_maker.rb  
    2020-08-26 16:42:50.000000000 +0200
@@ -72,7 +72,7 @@
       # @param devicegraph    [Devicegraph]
       # @param disk           [Disk]
       # @param drive_spec     [AutoinstProfile::DriveSection]
-      # @param reused_devices [Array<String>] Reused disks and partitions names
+      # @param reused_devices [Array<String>,nil] Reused disks and partitions 
names
       def delete_stuff(devicegraph, disk, drive_spec, reused_devices)
         reused_devices ||= []
         if drive_spec.initialize_attr && reused_devices.empty?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_issues/issues_presenter_test.rb
 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_issues/issues_presenter_test.rb
--- 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_issues/issues_presenter_test.rb
 2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_issues/issues_presenter_test.rb
 2020-08-26 16:42:50.000000000 +0200
@@ -85,8 +85,9 @@
       end
 
       it "includes the location information" do
+        section = list.first.section
         expect(presenter.to_html).to include(
-          "<li>partitioning > drives[1] > partitions[2] > raid_options:<ul>"
+          "<li>#{section.section_path}:<ul>"
         )
       end
     end
@@ -134,8 +135,9 @@
       end
 
       it "includes the location information" do
+        section = list.first.section
         expect(presenter.to_plain).to include(
-          "* partitioning > drives[1] > partitions[2] > raid_options:"
+          "* #{section.section_path}:"
         )
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_profile/bcache_options_section_test.rb
 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_profile/bcache_options_section_test.rb
--- 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_profile/bcache_options_section_test.rb
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_profile/bcache_options_section_test.rb
  2020-08-26 16:42:50.000000000 +0200
@@ -0,0 +1,42 @@
+# Copyright (c) [2020] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require_relative "../spec_helper"
+require_relative "#{TEST_PATH}/support/autoinst_profile_sections_examples"
+require "y2storage"
+
+describe Y2Storage::AutoinstProfile::BcacheOptionsSection do
+  include_examples "autoinst section"
+
+  describe "#section_path" do
+    let(:partitioning) do
+      Y2Storage::AutoinstProfile::PartitioningSection.new_from_hashes(
+        [{ "device" => "/dev/vda", "bcache_options" => { "cache_mode" => 
"writethrough" } }]
+      )
+    end
+
+    let(:drive) { partitioning.drives.first }
+
+    subject(:section) { drive.bcache_options }
+
+    it "returns the section path" do
+      expect(section.section_path.to_s).to eq("partitioning,0,bcache_options")
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_profile/btrfs_options_section_test.rb
 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_profile/btrfs_options_section_test.rb
--- 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_profile/btrfs_options_section_test.rb
   2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_profile/btrfs_options_section_test.rb
   2020-08-26 16:42:50.000000000 +0200
@@ -71,6 +71,8 @@
       )
     end
 
+    let(:parent) { 
double("Installation::AutoinstProfile::SectionWithAttributes") }
+
     it "initializes data_raid_level" do
       expect(section.data_raid_level).to eq("raid1")
     end
@@ -78,5 +80,26 @@
     it "initializes metadata_raid_level" do
       expect(section.metadata_raid_level).to eq("single")
     end
+
+    it "sets the parent section" do
+      section = described_class.new_from_storage(filesystem, parent)
+      expect(section.parent).to eq(parent)
+    end
+  end
+
+  describe "#section_path" do
+    let(:partitioning) do
+      Y2Storage::AutoinstProfile::PartitioningSection.new_from_hashes(
+        [{ "device" => "/dev/vda", "btrfs_options" => { "data_raid_level" => 
"SINGLE" } }]
+      )
+    end
+
+    let(:drive) { partitioning.drives.first }
+
+    subject(:section) { drive.btrfs_options }
+
+    it "returns the section path" do
+      expect(section.section_path.to_s).to eq("partitioning,0,btrfs_options")
+    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_profile/drive_section_test.rb
 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_profile/drive_section_test.rb
--- 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_profile/drive_section_test.rb
   2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_profile/drive_section_test.rb
   2020-08-26 16:42:50.000000000 +0200
@@ -179,6 +179,8 @@
   end
 
   describe ".new_from_storage" do
+    let(:parent) { 
double("Installation::AutoinstProfile::SectionWithAttributes") }
+
     it "returns nil for a disk or DASD with no partitions" do
       expect(described_class.new_from_storage(device("dasda"))).to eq nil
       expect(described_class.new_from_storage(device("sda"))).to eq nil
@@ -223,6 +225,11 @@
       expect(described_class.new_from_storage(btrfs)).to be_a described_class
     end
 
+    it "sets the parent section" do
+      section = described_class.new_from_storage(device("sdc"), parent)
+      expect(section.parent).to eq(parent)
+    end
+
     it "stores the exportable partitions as PartitionSection objects" do
       section = described_class.new_from_storage(device("dasdb"))
       expect(section.partitions).to 
all(be_a(Y2Storage::AutoinstProfile::PartitionSection))
@@ -922,12 +929,6 @@
     end
   end
 
-  describe "#section_name" do
-    it "returns 'drives'" do
-      expect(section.section_name).to eq("drives")
-    end
-  end
-
   describe "#name_for_md" do
     let(:part1) do
       instance_double(
@@ -1097,4 +1098,18 @@
       end
     end
   end
+
+  describe "#section_path" do
+    let(:partitioning) do
+      Y2Storage::AutoinstProfile::PartitioningSection.new_from_hashes(
+        [{ "device" => "/dev/vda", "partitions" => [{ "mount" => "/" }] }]
+      )
+    end
+
+    subject(:section) { partitioning.drives.first }
+
+    it "returns 'partitioning,index'" do
+      expect(section.section_path.to_s).to eq("partitioning,0")
+    end
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_profile/partition_section_test.rb
 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_profile/partition_section_test.rb
--- 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_profile/partition_section_test.rb
       2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_profile/partition_section_test.rb
       2020-08-26 16:42:50.000000000 +0200
@@ -38,6 +38,8 @@
   end
 
   describe ".new_from_storage" do
+    let(:parent) { 
double("Installation::AutoinstProfile::SectionWithAttributes") }
+
     def section_for(name)
       described_class.new_from_storage(device(name))
     end
@@ -46,6 +48,11 @@
       expect(section_for("dasdb1")).to be_a 
Y2Storage::AutoinstProfile::PartitionSection
     end
 
+    it "sets the parent section" do
+      section = described_class.new_from_storage(device("dasdb1"), parent)
+      expect(section.parent).to eq(parent)
+    end
+
     context "given a partition" do
       it "correctly initializes #partition_nr" do
         expect(section_for("dasdb1").partition_nr).to eq 1
@@ -1170,9 +1177,19 @@
     end
   end
 
-  describe "#section_name" do
-    it "returns 'partitions'" do
-      expect(section.section_name).to eq("partitions")
+  describe "#section_path" do
+    let(:partitioning) do
+      Y2Storage::AutoinstProfile::PartitioningSection.new_from_hashes(
+        [{ "device" => "/dev/vda", "partitions" => [{ "mount" => "/" }] }]
+      )
+    end
+
+    let(:drive) { partitioning.drives.first }
+
+    subject(:section) { drive.partitions.first }
+
+    it "returns the section path" do
+      expect(section.section_path.to_s).to eq("partitioning,0,partitions,0")
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_profile/raid_options_section_test.rb
 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_profile/raid_options_section_test.rb
--- 
old/yast2-storage-ng-4.3.14/test/y2storage/autoinst_profile/raid_options_section_test.rb
    2020-08-07 10:12:49.000000000 +0200
+++ 
new/yast2-storage-ng-4.3.15/test/y2storage/autoinst_profile/raid_options_section_test.rb
    2020-08-26 16:42:50.000000000 +0200
@@ -100,6 +100,7 @@
 
   describe ".new_from_storage" do
     let(:numeric?) { false }
+    let(:parent) { 
double("Installation::AutoinstProfile::SectionWithAttributes") }
 
     let(:sda1) do
       instance_double(
@@ -160,5 +161,26 @@
         expect(raid_options.raid_name).to be_nil
       end
     end
+
+    it "sets the parent section" do
+      section = described_class.new_from_storage(md, parent)
+      expect(section.parent).to eq(parent)
+    end
+  end
+
+  describe "#section_path" do
+    let(:partitioning) do
+      Y2Storage::AutoinstProfile::PartitioningSection.new_from_hashes(
+        [{ "device" => "/dev/vda", "raid_options" => { "raid_name" => 
"/dev/md0" } }]
+      )
+    end
+
+    let(:drive) { partitioning.drives.first }
+
+    subject(:section) { drive.raid_options }
+
+    it "returns the section path" do
+      expect(section.section_path.to_s).to eq("partitioning,0,raid_options")
+    end
   end
 end


Reply via email to