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.4.3 lib/specinfra/command/module/zfs.rb
specinfra-2.4.2 lib/specinfra/command/module/zfs.rb
specinfra-2.4.1 lib/specinfra/command/module/zfs.rb
specinfra-2.4.0 lib/specinfra/command/module/zfs.rb
specinfra-2.3.2 lib/specinfra/command/module/zfs.rb
specinfra-2.3.1 lib/specinfra/command/module/zfs.rb
specinfra-2.3.0 lib/specinfra/command/module/zfs.rb
specinfra-2.2.4 lib/specinfra/command/module/zfs.rb
specinfra-2.2.3 lib/specinfra/command/module/zfs.rb
specinfra-2.2.2 lib/specinfra/command/module/zfs.rb
specinfra-2.2.1 lib/specinfra/command/module/zfs.rb
specinfra-2.2.0 lib/specinfra/command/module/zfs.rb
specinfra-2.1.1 lib/specinfra/command/module/zfs.rb
specinfra-2.1.0 lib/specinfra/command/module/zfs.rb
specinfra-2.0.4 lib/specinfra/command/module/zfs.rb
specinfra-2.0.3 lib/specinfra/command/module/zfs.rb
specinfra-2.0.2 lib/specinfra/command/module/zfs.rb
specinfra-2.0.1 lib/specinfra/command/module/zfs.rb
specinfra-2.0.0 lib/specinfra/command/module/zfs.rb
specinfra-2.0.0.beta52 lib/specinfra/command/module/zfs.rb