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.11.4 lib/specinfra/command/module/zfs.rb
specinfra-2.11.3 lib/specinfra/command/module/zfs.rb
specinfra-2.11.2 lib/specinfra/command/module/zfs.rb
specinfra-2.11.1 lib/specinfra/command/module/zfs.rb
specinfra-2.11.0 lib/specinfra/command/module/zfs.rb
specinfra-2.10.4 lib/specinfra/command/module/zfs.rb
specinfra-2.10.3 lib/specinfra/command/module/zfs.rb
specinfra-2.10.2 lib/specinfra/command/module/zfs.rb
specinfra-2.10.1 lib/specinfra/command/module/zfs.rb
specinfra-2.10.0 lib/specinfra/command/module/zfs.rb
specinfra-2.9.3 lib/specinfra/command/module/zfs.rb
specinfra-2.9.2 lib/specinfra/command/module/zfs.rb
specinfra-2.9.1 lib/specinfra/command/module/zfs.rb
specinfra-2.9.0 lib/specinfra/command/module/zfs.rb
specinfra-2.8.0 lib/specinfra/command/module/zfs.rb
specinfra-2.7.0 lib/specinfra/command/module/zfs.rb
specinfra-2.6.0 lib/specinfra/command/module/zfs.rb
specinfra-2.5.0 lib/specinfra/command/module/zfs.rb
specinfra-2.4.5 lib/specinfra/command/module/zfs.rb
specinfra-2.4.4 lib/specinfra/command/module/zfs.rb