Class: Runcible::Models::NodesHttpDistributor

Inherits:
Distributor
  • Object
show all
Defined in:
lib/runcible/models/nodes_http_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

#initializeRuncible::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
# File 'lib/runcible/models/nodes_http_distributor.rb', line 38

def initialize()
  # 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/nodes_http_distributor.rb', line 31

def http
  @http
end

#httpsObject

required



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

def https
  @https
end

Class Method Details

.type_idstring

Distributor Type id

Returns:

  • (string)


46
47
48
# File 'lib/runcible/models/nodes_http_distributor.rb', line 46

def self.type_id
  'nodes_http_distributor'
end

Instance Method Details

#configHash

generate the pulp config for the export distributor

Returns:

  • (Hash)


53
54
55
56
57
58
# File 'lib/runcible/models/nodes_http_distributor.rb', line 53

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