Sha256: 9ea8b933843c29f646069e363e5f55ab06eb137717a7a97e9fd79a751be69d40

Contents?: true

Size: 812 Bytes

Versions: 45

Compression:

Stored size: 812 Bytes

Contents

require 'chef/chef_fs/data_handler/data_handler_base'

class Chef
  module ChefFS
    module DataHandler
      class OrganizationDataHandler < DataHandlerBase
        def normalize(organization, entry)
          result = normalize_hash(organization, {
            'name' => entry.org,
            'full_name' => entry.org,
            'org_type' => 'Business',
            'clientname' => "#{entry.org}-validator",
            'billing_plan' => 'platform-free',
          })
          result
        end

        def preserve_key?(key)
          return key == 'name'
        end

        def verify_integrity(object, entry, &on_error)
          if entry.org != object['name']
            on_error.call("Name must be '#{entry.org}' (is '#{object['name']}')")
          end
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
chef-12.6.0 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.6.0-universal-mingw32 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.5.1-universal-mingw32 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.5.1 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.3-universal-mingw32 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.3 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.2-universal-mingw32 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.2 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.5.0.alpha.1 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.1-universal-mingw32 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.1 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.0 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.0-universal-mingw32 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.0.rc.2 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.0.rc.2-universal-mingw32 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.0.rc.0 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.4.0.rc.0-universal-mingw32 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.3.0-x86-mingw32 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.3.0 lib/chef/chef_fs/data_handler/organization_data_handler.rb
chef-12.3.0.rc.0-x86-mingw32 lib/chef/chef_fs/data_handler/organization_data_handler.rb