Project

General

Profile

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

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

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

    
4
module Runcible
5
  module Models
6
    class YumDistributor < Distributor
7
      #required attributes
8
      attr_accessor 'relative_url', 'http', 'https'
9
      #optional attributes
10
      attr_accessor 'protected', 'auth_cert', 'auth_ca',
11
                    'https_ca', 'gpgkey', 'generate_metadata',
12
                    'checksum_type', 'skip', 'https_publish_dir', 'http_publish_dir'
13

    
14
      def initialize(relative_url, http, https, params = {})
15
        @relative_url = relative_url
16
        @http = http
17
        @https = https
18
        super(params)
19
      end
20

    
21
      def self.type_id
22
        'yum_distributor'
23
      end
24

    
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