Class: RedhatAccess::Telemetry::PortalClient

Inherits:
RedHatSupportLib::TelemetryApi::Client
  • Object
show all
Extended by:
Forwardable
Includes:
LookUps
Defined in:
app/services/redhat_access/telemetry/portal_client.rb

Constant Summary collapse

UPLOAD_HOST =
REDHAT_ACCESS_CONFIG[:telemetry_upload_host]
API_HOST =
REDHAT_ACCESS_CONFIG[:telemetry_api_host]
UPLOAD_URL =
"#{UPLOAD_HOST}/r/insights/uploads"
STRATA_URL =
"#{API_HOST}/r/insights"

Instance Method Summary collapse

Methods included from LookUps

#can_mask_rules, #can_unregister_system, #current_organization, #disconnected_org?, #get_basic_auth_options, #get_branch_id_for_org, #get_branch_id_for_uuid, #get_content_host, #get_content_hosts, #get_default_ssl_ca_file, #get_http_options, #get_http_user_agent, #get_leaf_id, #get_mutual_tls_auth_options, #get_organization, #get_plugin_parent_name, #get_plugin_parent_version, #get_portal_http_proxy, #get_rha_plugin_name, #get_rha_plugin_rpm_name, #get_rha_plugin_version, #get_ssl_options_for_org, #get_ssl_options_for_uuid, #get_telemetry_config, #is_org_selected?, #is_susbcribed_to_redhat?, #telemetry_enabled?, #telemetry_enabled_for_uuid?, #use_basic_auth?, #user_login_to_hash

Constructor Details

#initialize(upload_url, strata_url, creds, context, optional) ⇒ PortalClient

Returns a new instance of PortalClient.



16
17
18
19
20
21
# File 'app/services/redhat_access/telemetry/portal_client.rb', line 16

def initialize(upload_url, strata_url, creds, context, optional)
  upload_url = UPLOAD_URL if upload_url.nil?
  strata_url = STRATA_URL if strata_url.nil?
  super(upload_url, strata_url, creds, optional)
  @context = context
end

Instance Method Details

#get_branch_idObject

Returns the branch id of the current org/account



24
25
26
27
# File 'app/services/redhat_access/telemetry/portal_client.rb', line 24

def get_branch_id
  organization = get_current_organization
  return get_branch_id_for_org(organization)
end