Sha256: b4b8ed08abff002981be3d9f2cb7db9789f3a004ea6548023e743dea9301b011

Contents?: true

Size: 1.03 KB

Versions: 12

Compression:

Stored size: 1.03 KB

Contents

require 'active_support/json'
require 'securerandom'

module Runcible
  module Models
    class IsoDistributor < Distributor
      #required attributes
      attr_accessor 'relative_url', 'serve_http', 'serve_https'

      # Instantiates an iso distributor
      #
      # @param  [path]            relative URL
      # @param  [boolean]         http  serve the contents over http
      # @param  [boolean]         https serve the contents over https
      # @return [Runcible::Extensions::IsoDistributor]
      def initialize(relative_url, http, https, options = {})
        @relative_url = relative_url
        @serve_http = http
        @serve_https = https
        super(options)
      end

      # Distributor Type id
      #
      # @return [string]
      def self.type_id
        'iso_distributor'
      end

      # generate the pulp config for the iso distributor
      #
      # @return [Hash]
      def config
        to_ret = as_json
        to_ret.delete('auto_publish')
        to_ret.delete('id')
        to_ret
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
runcible-2.13.1 lib/runcible/models/iso_distributor.rb
runcible-2.13.0 lib/runcible/models/iso_distributor.rb
runcible-2.12.1 lib/runcible/models/iso_distributor.rb
runcible-2.12.0 lib/runcible/models/iso_distributor.rb
runcible-2.11.1 lib/runcible/models/iso_distributor.rb
runcible-2.11.0 lib/runcible/models/iso_distributor.rb
runcible-2.10.1 lib/runcible/models/iso_distributor.rb
runcible-2.10.0 lib/runcible/models/iso_distributor.rb
runcible-2.9.0 lib/runcible/models/iso_distributor.rb
runcible-2.8.1 lib/runcible/models/iso_distributor.rb
runcible-2.8.0 lib/runcible/models/iso_distributor.rb
runcible-2.7.0 lib/runcible/models/iso_distributor.rb