Skip to content

Commit

Permalink
storage: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Oct 22, 2024
1 parent 150b11d commit 9db35dd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions service/lib/y2storage/proposal/agama_device_planner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ def grow?(device, config)
config.size.max.unlimited? || config.size.max > device.size
end

# @param planned [Planned::Disk, Planned::Partition]
# @param planned [Planned::Disk, Planned::Partition, Planned::LvmLv]
# @param config [#encryption, #filesystem]
def configure_block_device(planned, config)
configure_encryption(planned, config.encryption) if config.encryption
configure_filesystem(planned, config.filesystem) if config.filesystem
end

# @param planned [Planned::Disk, Planned::Partition]
# @param planned [Planned::Disk, Planned::Partition, Planned::LvmLv]
# @param config [Agama::Storage::Configs::Filesystem]
def configure_filesystem(planned, config)
planned.mount_point = config.path
Expand All @@ -105,14 +105,14 @@ def configure_filesystem(planned, config)
configure_filesystem_type(planned, config.type) if config.type
end

# @param planned [Planned::Disk, Planned::Partition]
# @param planned [Planned::Disk, Planned::Partition, Planned::LvmLv]
# @param config [Agama::Storage::Configs::FilesystemType]
def configure_filesystem_type(planned, config)
planned.filesystem_type = config.fs_type
configure_btrfs(planned, config.btrfs) if config.btrfs
end

# @param planned [Planned::Disk, Planned::Partition]
# @param planned [Planned::Disk, Planned::Partition, Planned::LvmLv]
# @param config [Agama::Storage::Configs::Btrfs]
def configure_btrfs(planned, config)
# TODO: we need to discuss what to do with transactional systems and the read_only
Expand All @@ -123,7 +123,7 @@ def configure_btrfs(planned, config)
planned.subvolumes = config.subvolumes
end

# @param planned [Planned::Disk, Planned::Partition]
# @param planned [Planned::Disk, Planned::Partition, Planned::LvmLv]
# @param config [Agama::Storage::Configs::Encryption]
def configure_encryption(planned, config)
planned.encryption_password = config.password
Expand All @@ -134,7 +134,7 @@ def configure_encryption(planned, config)
planned.encryption_key_size = config.key_size
end

# @param planned [Planned::Partition]
# @param planned [Planned::Partition, Planned::LvmLv]
# @param config [Agama::Storage::Configs::Size]
def configure_size(planned, config)
planned.min_size = config.min
Expand Down

0 comments on commit 9db35dd

Please sign in to comment.