Sha256: f3c12a7c9aa122345f66d03a4ca5d3848bbb3d2b879221e729d1d0c9f67e79d4

Contents?: true

Size: 371 Bytes

Versions: 125

Compression:

Stored size: 371 Bytes

Contents

module Specinfra::Command::Module::Zfs
  def check_exists(zfs)
      "zfs list -H #{escape(zfs)}"
  end

  def check_has_property(zfs, property=nil)
    commands = []
    property.sort.each do |key, value|
      regexp = "^#{value}$"
      commands << "zfs list -H -o #{escape(key)} #{escape(zfs)} | grep -- #{escape(regexp)}"
    end
    commands.join(' && ')
  end
end

Version data entries

125 entries across 125 versions & 1 rubygems

Version Path
specinfra-2.20.2 lib/specinfra/command/module/zfs.rb
specinfra-2.20.1 lib/specinfra/command/module/zfs.rb
specinfra-2.20.0 lib/specinfra/command/module/zfs.rb
specinfra-2.19.6 lib/specinfra/command/module/zfs.rb
specinfra-2.19.5 lib/specinfra/command/module/zfs.rb
specinfra-2.19.4 lib/specinfra/command/module/zfs.rb
specinfra-2.19.3 lib/specinfra/command/module/zfs.rb
specinfra-2.19.2 lib/specinfra/command/module/zfs.rb
specinfra-2.19.1 lib/specinfra/command/module/zfs.rb
specinfra-2.19.0 lib/specinfra/command/module/zfs.rb
specinfra-2.18.3 lib/specinfra/command/module/zfs.rb
specinfra-2.18.2 lib/specinfra/command/module/zfs.rb
specinfra-2.18.1 lib/specinfra/command/module/zfs.rb
specinfra-2.18.0 lib/specinfra/command/module/zfs.rb
specinfra-2.17.1 lib/specinfra/command/module/zfs.rb
specinfra-2.17.0 lib/specinfra/command/module/zfs.rb
specinfra-2.16.0 lib/specinfra/command/module/zfs.rb
specinfra-2.15.2 lib/specinfra/command/module/zfs.rb
specinfra-2.15.1 lib/specinfra/command/module/zfs.rb
specinfra-2.15.0 lib/specinfra/command/module/zfs.rb