Skip to content

Commit

Permalink
fix(storage): avoid error in the old proposal settings
Browse files Browse the repository at this point in the history
- ProposalSettings cannot use Configs::Boot.
  • Loading branch information
joseivanlopez committed Dec 11, 2024
1 parent 455437f commit 8eb1d9a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
43 changes: 43 additions & 0 deletions service/lib/agama/storage/boot_settings.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# frozen_string_literal: true

# Copyright (c) [2024] 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.

module Agama
module Storage
# Boot settings.
class BootSettings
# Whether to configure partitions for booting.
#
# @return [Boolean]
attr_accessor :configure
alias_method :configure?, :configure

# Boot device name.
#
# @return [String]
attr_accessor :device

# Constructor
def initialize
@configure = true
end
end
end
end
6 changes: 3 additions & 3 deletions service/lib/agama/storage/proposal_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

require "agama/storage/configs/boot"
require "agama/storage/boot_settings"
require "agama/storage/device_settings"
require "agama/storage/encryption_settings"
require "agama/storage/proposal_settings_conversions"
Expand All @@ -36,7 +36,7 @@ class ProposalSettings

# Boot config.
#
# @return [Configs::Boot]
# @return [BootSettings]
attr_accessor :boot

# Encryption settings.
Expand All @@ -56,7 +56,7 @@ class ProposalSettings

def initialize
@device = DeviceSettings::Disk.new
@boot = Configs::Boot.new
@boot = BootSettings.new
@encryption = EncryptionSettings.new
@space = SpaceSettings.new
@volumes = []
Expand Down

0 comments on commit 8eb1d9a

Please sign in to comment.