Sha256: 313b08174014cb2ca5dc20bba866295dcde7e2d80f7050b84c1e936acedc14d2

Contents?: true

Size: 828 Bytes

Versions: 1

Compression:

Stored size: 828 Bytes

Contents

require 'chef/sugar'

class Chef
  module Sugar
    module Rackconnect
      extend self

      def rackconnect_v2?(node)
        return node['rackspace']['rackconnect']['version'] == 2
      end

      def rackconnect_v3?(node)
        return node['rackspace']['rackconnect']['version'] == 3
      end

      def rackconnected?(node)
        return true if
          node['rackspace'] &&
          node['rackspace']['rackconnect'] &&
          node['rackspace']['rackconnect']['enabled']
        false
      end
    end

    module DSL
      def rackconnected?
        Chef::Sugar::Rackconnect.rackconnected?(node)
      end

      def rackconnect_v2?
        Chef::Sugar::Rackconnect.rackconnect_v2?(node)
      end

      def rackconnect_v3?
        Chef::Sugar::Rackconnect.rackconnect_v3?(node)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chef-sugar-rackspace-0.4.0 lib/chef/sugar/rackspace/rackconnect.rb