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) ⇒ 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/models/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 => type_id})
end

Instance Attribute Details

#httpObject

required



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

def http
  @http
end

#httpsObject

required



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

def https
  @https
end

Class Method Details

.type_idstring

Distributor Type id

Returns:

  • (string)


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

def self.type_id
  'export_distributor'
end

Instance Method Details

#configHash

generate the pulp config for the export distributor

Returns:

  • (Hash)


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

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