Class: Runcible::Extensions::ExportDistributor

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

Instance Attribute Summary collapse

Attributes inherited from Distributor

#auto_publish, #id

Instance Method Summary collapse

Constructor Details

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

Instantiates a export distributor

Parameters:

  • http (boolean)

    serve the contents over http

  • https (boolean)

    serve the contents over https



38
39
40
41
42
43
# File 'lib/runcible/extensions/export_distributor.rb', line 38

def initialize(http, https)
  @http = http
  @https = https
  # Pulp seems to expect the ID to be export_distributor, not a random
  super({:id => self.type_id})
end

Instance Attribute Details

#httpObject

required



31
32
33
# File 'lib/runcible/extensions/export_distributor.rb', line 31

def http
  @http
end

#httpsObject

required



31
32
33
# File 'lib/runcible/extensions/export_distributor.rb', line 31

def https
  @https
end

Instance Method Details

#configHash

generate the pulp config for the export distributor

Returns:

  • (Hash)


55
56
57
58
59
60
# File 'lib/runcible/extensions/export_distributor.rb', line 55

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

#type_idstring

Distributor Type id

Returns:

  • (string)


48
49
50
# File 'lib/runcible/extensions/export_distributor.rb', line 48

def type_id
  'export_distributor'
end