Sha256: 29bf3edb815a884574a4f4cdb6579d658fbafab878e52f0ab63228ad506ad998

Contents?: true

Size: 596 Bytes

Versions: 256

Compression:

Stored size: 596 Bytes

Contents

module Specinfra
  module Command
    module Module
      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

        def get_property(zfs)
          "zfs get -Hp -o property,value all #{escape(zfs)}"
        end
      end
    end
  end
end

Version data entries

256 entries across 256 versions & 3 rubygems

Version Path
specinfra-2.91.0 lib/specinfra/command/module/zfs.rb
specinfra-2.90.1 lib/specinfra/command/module/zfs.rb
specinfra-2.90.0 lib/specinfra/command/module/zfs.rb
specinfra-2.89.0 lib/specinfra/command/module/zfs.rb
specinfra-2.88.2 lib/specinfra/command/module/zfs.rb
specinfra-2.88.1 lib/specinfra/command/module/zfs.rb
specinfra-2.88.0 lib/specinfra/command/module/zfs.rb
specinfra-2.87.2 lib/specinfra/command/module/zfs.rb
specinfra-2.87.1 lib/specinfra/command/module/zfs.rb
specinfra-2.87.0 lib/specinfra/command/module/zfs.rb
specinfra-2.86.0 lib/specinfra/command/module/zfs.rb
specinfra-2.85.1 lib/specinfra/command/module/zfs.rb
specinfra-2.85.0 lib/specinfra/command/module/zfs.rb
specinfra-2.84.1 lib/specinfra/command/module/zfs.rb
specinfra-2.84.0 lib/specinfra/command/module/zfs.rb
specinfra-2.83.4 lib/specinfra/command/module/zfs.rb
specinfra-2.83.3 lib/specinfra/command/module/zfs.rb
specinfra-2.83.2 lib/specinfra/command/module/zfs.rb
specinfra-2.83.1 lib/specinfra/command/module/zfs.rb
specinfra-2.83.0 lib/specinfra/command/module/zfs.rb