Class: Katello::CdnConfiguration

Inherits:
Model
  • Object
show all
Includes:
Encryptable
Defined in:
app/models/katello/cdn_configuration.rb

Constant Summary collapse

CDN_TYPE =
'redhat_cdn'.freeze
NETWORK_SYNC =
'network_sync'.freeze
EXPORT_SYNC =
'export_sync'.freeze
CUSTOM_CDN_TYPE =
'custom_cdn'.freeze
TYPES =
[CDN_TYPE, NETWORK_SYNC, EXPORT_SYNC, CUSTOM_CDN_TYPE].freeze

Instance Method Summary collapse

Methods inherited from Model

#destroy!

Instance Method Details

#custom_cdn?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'app/models/katello/cdn_configuration.rb', line 36

def custom_cdn?
  type == CUSTOM_CDN_TYPE
end

#export_sync?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'app/models/katello/cdn_configuration.rb', line 44

def export_sync?
  type == EXPORT_SYNC
end

#network_sync?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'app/models/katello/cdn_configuration.rb', line 48

def network_sync?
  type == NETWORK_SYNC
end

#redhat_cdn?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'app/models/katello/cdn_configuration.rb', line 32

def redhat_cdn?
  type == CDN_TYPE
end

#redhat_cdn_url?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'app/models/katello/cdn_configuration.rb', line 40

def redhat_cdn_url?
  Katello::Resources::CDN::CdnResource.redhat_cdn?(url)
end

#ssl_caObject



28
29
30
# File 'app/models/katello/cdn_configuration.rb', line 28

def ssl_ca
  ssl_ca_credential&.content
end