Module: XClarityClient::Mixins::UpdateRepoMixin

Included in:
Client
Defined in:
lib/xclarity_client/mixins/update_repo_mixin.rb

Overview

Exposes UpdateRepoManagement features

Instance Method Summary collapse

Instance Method Details

#acquire_firmware_updates(machine_types, fixids) ⇒ Object



43
44
45
46
47
48
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 43

def acquire_firmware_updates(machine_types, fixids)
  mt = machine_types
  msg = 'Parameter machine_types & fixids should be of type Array'
  raise msg unless mt.kind_of?(Array) || fixids.kind_of?(Array)
  UpdateRepoManagement.new(@config).acquire_firmware_updates(mt, fixids)
end

#delete_firmware_updates(file_types, fixids = []) ⇒ Object



50
51
52
53
54
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 50

def delete_firmware_updates(file_types, fixids = [])
  validate_inputs(file_types, fixids)
  UpdateRepoManagement.new(@config).delete_firmware_updates(file_types,
                                                            fixids)
end

#discover_update_repo(opts = {}) ⇒ Object



6
7
8
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 6

def discover_update_repo(opts = {})
  UpdateRepoManagement.new(@config).fetch_all(opts)
end

#download_exported_compliance_policies(file_name, dir_path_for_download) ⇒ Object



97
98
99
100
101
102
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 97

def download_exported_compliance_policies(file_name, dir_path_for_download)
  dir = dir_path_for_download
  validate_file_name_dir_path(file_name, dir)
  UpdateRepoManagement.new(@config)\
                      .download_exported_compliance_policies(file_name, dir)
end

#download_exported_firmware_updates(file_name, dir_path_for_download) ⇒ Object



62
63
64
65
66
67
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 62

def download_exported_firmware_updates(file_name, dir_path_for_download)
  dir = dir_path_for_download
  validate_file_name_dir_path(file_name, dir)
  UpdateRepoManagement.new(@config)
                      .download_exported_firmware_updates(file_name, dir)
end

#export_compliance_policies(policy_names) ⇒ Object



91
92
93
94
95
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 91

def export_compliance_policies(policy_names)
  msg = 'Parameter policy_names should be of type Array'
  raise msg unless policy_names.kind_of?(Array)
  UpdateRepoManagement.new(@config).export_compliance_policies(policy_names)
end

#export_firmware_updates(file_types, fixids = []) ⇒ Object



56
57
58
59
60
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 56

def export_firmware_updates(file_types, fixids = [])
  validate_inputs(file_types, fixids)
  UpdateRepoManagement.new(@config).export_firmware_updates(file_types,
                                                            fixids)
end

#import_compliance_policies(file_path) ⇒ Object



104
105
106
107
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 104

def import_compliance_policies(file_path)
  validate_file_path(file_path)
  UpdateRepoManagement.new(@config).import_compliance_policies(file_path)
end

#import_firmware_updates(file_path) ⇒ Object



74
75
76
77
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 74

def import_firmware_updates(file_path)
  validate_file_path(file_path)
  UpdateRepoManagement.new(@config).import_firmware_updates(file_path)
end

#read_update_repoObject



10
11
12
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 10

def read_update_repo
  UpdateRepoManagement.new(@config).read_update_repo
end

#refresh_update_repo_catalog(scope, machine_types) ⇒ Object



14
15
16
17
18
19
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 14

def refresh_update_repo_catalog(scope, machine_types)
  mt = machine_types
  msg = 'Parameter machine_types should be of type Array'
  raise msg unless mt.kind_of?(Array)
  UpdateRepoManagement.new(@config).refresh_update_repo_catalog(scope, mt)
end

#refresh_uxsp_update_repo_catalog(scope, machine_types) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 21

def refresh_uxsp_update_repo_catalog(scope, machine_types)
  mt = machine_types
  msg = 'Parameter machine_types should be of type Array'
  raise msg unless mt.kind_of?(Array)
  UpdateRepoManagement.new(@config).refresh_uxsp_update_repo_catalog(scope,
                                                                     mt)
end

#retrieve_compliance_policy_listObject



87
88
89
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 87

def retrieve_compliance_policy_list
  UpdateRepoManagement.new(@config).retrieve_compliance_policy_list
end

#supported_machine_types_detailObject



83
84
85
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 83

def supported_machine_types_detail
  UpdateRepoManagement.new(@config).supported_machine_types_detail
end

#track_task_status(taskid, tasktype) ⇒ Object



79
80
81
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 79

def track_task_status(taskid, tasktype)
  UpdateRepoManagement.new(@config).track_task_status(taskid, tasktype)
end

#updates_info_by_machine_types(machine_types) ⇒ Object



29
30
31
32
33
34
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 29

def updates_info_by_machine_types(machine_types)
  mt = machine_types
  msg = 'Parameter machine_types should be of type Array'
  raise msg unless mt.kind_of?(Array)
  UpdateRepoManagement.new(@config).updates_info_by_machine_types(mt)
end

#uxsp_updates_info_by_machine_types(machine_types) ⇒ Object



36
37
38
39
40
41
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 36

def uxsp_updates_info_by_machine_types(machine_types)
  mt = machine_types
  msg = 'Parameter machine_types should be of type Array'
  raise msg unless mt.kind_of?(Array)
  UpdateRepoManagement.new(@config).uxsp_updates_info_by_machine_types(mt)
end

#validate_import_updates(file_path) ⇒ Object



69
70
71
72
# File 'lib/xclarity_client/mixins/update_repo_mixin.rb', line 69

def validate_import_updates(file_path)
  validate_file_path(file_path)
  UpdateRepoManagement.new(@config).validate_import_updates(file_path)
end