Project

General

Profile

Download (732 Bytes) Statistics
| Branch: | Tag: | Revision:

runcible / lib / runcible / models / nodes_http_distributor.rb @ c0df0f4c

1
require 'active_support/json'
2
require 'securerandom'
3

    
4
module Runcible
5
  module Models
6
    class NodesHttpDistributor < Distributor
7
      # Instantiates an nodes distributor
8
      #
9
      # @param  [Hash]         params  Distributor options
10
      # @return [Runcible::Extensions::NodesHttpDistributor]
11
      def initialize(params)
12
        super(params)
13
      end
14

    
15
      # Distributor Type id
16
      #
17
      # @return [string]
18
      def self.type_id
19
        'nodes_http_distributor'
20
      end
21

    
22
      # generate the pulp config for the nodes distributor
23
      #
24
      # @return [Hash]
25
      def config
26
        to_ret = as_json
27
        to_ret.delete('auto_publish')
28
        to_ret.delete('id')
29
        to_ret
30
      end
31
    end
32
  end
33
end