Sha256: 9250f38518e8fbeda1608e26037c7abe02a34bff28fed3a34463e0b74867110d

Contents?: true

Size: 1.13 KB

Versions: 32

Compression:

Stored size: 1.13 KB

Contents

require 'active_support/json'
require 'securerandom'

module Runcible
  module Models
    class ExportDistributor < Distributor
      #required attributes
      attr_accessor 'http', 'https', 'relative_url'

      # Instantiates a export distributor
      #
      # @param  [boolean]         http  serve the contents over http
      # @param  [boolean]         https serve the contents over https
      # @param  [string]          relative_url relative url (aka relative path)
      # @return [Runcible::Extensions::ExportDistributor]
      def initialize(http, https, relative_url = nil)
        @http = http
        @https = https
        @relative_url = relative_url
        # Pulp seems to expect the ID to be export_distributor, not a random
        super({:id => type_id})
      end

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

      # generate the pulp config for the export 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

32 entries across 32 versions & 1 rubygems

Version Path
runcible-2.13.1 lib/runcible/models/export_distributor.rb
runcible-2.13.0 lib/runcible/models/export_distributor.rb
runcible-2.12.1 lib/runcible/models/export_distributor.rb
runcible-2.12.0 lib/runcible/models/export_distributor.rb
runcible-2.11.1 lib/runcible/models/export_distributor.rb
runcible-2.11.0 lib/runcible/models/export_distributor.rb
runcible-2.10.1 lib/runcible/models/export_distributor.rb
runcible-2.10.0 lib/runcible/models/export_distributor.rb
runcible-2.9.0 lib/runcible/models/export_distributor.rb
runcible-2.8.1 lib/runcible/models/export_distributor.rb
runcible-2.8.0 lib/runcible/models/export_distributor.rb
runcible-2.7.0 lib/runcible/models/export_distributor.rb
runcible-2.6.0 lib/runcible/models/export_distributor.rb
runcible-2.5.0 lib/runcible/models/export_distributor.rb
runcible-2.4.0 lib/runcible/models/export_distributor.rb
runcible-2.3.0 lib/runcible/models/export_distributor.rb
runcible-2.2.0 lib/runcible/models/export_distributor.rb
runcible-1.12.0 lib/runcible/models/export_distributor.rb
runcible-2.1.0 lib/runcible/models/export_distributor.rb
runcible-2.0.1 lib/runcible/models/export_distributor.rb