Class: Runcible::Models::ExportDistributor

Inherits:
Distributor
  • Object
show all
Defined in:
lib/runcible/models/export_distributor.rb

Instance Attribute Summary collapse

Attributes inherited from Distributor

#auto_publish, #id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Distributor

#type_id

Constructor Details

#initialize(http, https, relative_url = nil) ⇒ Runcible::Extensions::ExportDistributor

Instantiates a export distributor

Parameters:

  • http (boolean)

    serve the contents over http

  • https (boolean)

    serve the contents over https

  • relative_url (string) (defaults to: nil)

    relative url (aka relative path)



16
17
18
19
20
21
22
# File 'lib/runcible/models/export_distributor.rb', line 16

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

Instance Attribute Details

#httpObject

required attributes



8
9
10
# File 'lib/runcible/models/export_distributor.rb', line 8

def http
  @http
end

#httpsObject

required attributes



8
9
10
# File 'lib/runcible/models/export_distributor.rb', line 8

def https
  @https
end

#relative_urlObject

required attributes



8
9
10
# File 'lib/runcible/models/export_distributor.rb', line 8

def relative_url
  @relative_url
end

Class Method Details

.type_idstring

Distributor Type id

Returns:

  • (string)


27
28
29
# File 'lib/runcible/models/export_distributor.rb', line 27

def self.type_id
  'export_distributor'
end

Instance Method Details

#configHash

generate the pulp config for the export distributor

Returns:

  • (Hash)


34
35
36
37
38
39
# File 'lib/runcible/models/export_distributor.rb', line 34

def config
  to_ret = as_json
  to_ret.delete('auto_publish')
  to_ret.delete('id')
  to_ret
end