Class: Runcible::Models::GroupExportDistributor

Inherits:
Distributor
  • Object
show all
Defined in:
lib/runcible/models/group_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 = false, https = false, params = {}) ⇒ Runcible::Extensions::GroupExportDistributor

Instantiates a group export distributor.

Parameters:

  • http (boolean) (defaults to: false)

    serve the contents over http

  • https (boolean) (defaults to: false)

    serve the contents over https

  • params (hash) (defaults to: {})

    additional parameters to send in request



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

def initialize(http = false, https = false, params = {})
  @http = http
  @https = https
  # these two fields are helpful when instantiating a group export
  # distributor via group creation. It saves a few pulp API calls.
  @distributor_type_id = type_id
  @distributor_config = {:http => http, :https => https}
  super(params)
end

Instance Attribute Details

#httpObject

required attributes



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

def http
  @http
end

#httpsObject

required attributes



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

def https
  @https
end

Class Method Details

.type_idstring

Distributor Type id

Returns:

  • (string)


29
30
31
# File 'lib/runcible/models/group_export_distributor.rb', line 29

def self.type_id
  'group_export_distributor'
end

Instance Method Details

#configHash

generate the pulp config for the export distributor

Returns:

  • (Hash)


36
37
38
39
40
41
# File 'lib/runcible/models/group_export_distributor.rb', line 36

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