kanrisuru 0.3.2 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +13 -0
  3. data/lib/kanrisuru/command.rb +8 -3
  4. data/lib/kanrisuru/core.rb +6 -0
  5. data/lib/kanrisuru/core/apt.rb +6 -6
  6. data/lib/kanrisuru/core/dmi.rb +533 -0
  7. data/lib/kanrisuru/core/path.rb +0 -1
  8. data/lib/kanrisuru/core/socket.rb +16 -16
  9. data/lib/kanrisuru/core/system.rb +80 -0
  10. data/lib/kanrisuru/core/yum.rb +8 -8
  11. data/lib/kanrisuru/core/zypper.rb +1094 -0
  12. data/lib/kanrisuru/remote/cpu.rb +4 -0
  13. data/lib/kanrisuru/remote/fstab.rb +3 -3
  14. data/lib/kanrisuru/remote/host.rb +2 -2
  15. data/lib/kanrisuru/util.rb +1 -0
  16. data/lib/kanrisuru/util/bits.rb +3 -3
  17. data/lib/kanrisuru/util/dmi_type.rb +1366 -0
  18. data/lib/kanrisuru/util/os_family.rb +1 -1
  19. data/lib/kanrisuru/version.rb +1 -1
  20. data/spec/functional/core/apt_spec.rb +97 -158
  21. data/spec/functional/core/dmi_spec.rb +37 -0
  22. data/spec/functional/core/file_spec.rb +5 -12
  23. data/spec/functional/core/system_spec.rb +21 -0
  24. data/spec/functional/core/yum_spec.rb +38 -80
  25. data/spec/functional/core/zypper_spec.rb +193 -0
  26. data/spec/functional/remote/fstab_spec.rb +1 -1
  27. data/spec/functional/remote/os_spec.rb +1 -1
  28. data/spec/helper/test_hosts.rb +7 -1
  29. data/spec/unit/core/apt_spec.rb +42 -0
  30. data/spec/unit/core/archive_spec.rb +11 -0
  31. data/spec/unit/core/disk_spec.rb +21 -0
  32. data/spec/unit/core/dmi_spec.rb +271 -0
  33. data/spec/unit/core/file_spec.rb +9 -0
  34. data/spec/unit/core/find_spec.rb +9 -0
  35. data/spec/unit/core/group_spec.rb +10 -0
  36. data/spec/unit/core/ip_spec.rb +59 -0
  37. data/spec/unit/core/path_spec.rb +16 -0
  38. data/spec/unit/core/socket_spec.rb +38 -0
  39. data/spec/unit/core/stat_spec.rb +14 -0
  40. data/spec/unit/core/system_spec.rb +79 -0
  41. data/spec/unit/core/transfer_spec.rb +15 -0
  42. data/spec/unit/core/user_spec.rb +11 -0
  43. data/spec/unit/core/yum_spec.rb +47 -0
  44. data/spec/unit/core/zypper_spec.rb +121 -0
  45. data/spec/unit/util_spec.rb +224 -0
  46. metadata +23 -2
@@ -0,0 +1,193 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe Kanrisuru::Core::Zypper do
6
+ TestHosts.each_os(only: %w[sles opensuse]) do |os_name|
7
+ context "with #{os_name}" do
8
+ let(:host_json) { TestHosts.host(os_name) }
9
+ let(:host) do
10
+ Kanrisuru::Remote::Host.new(
11
+ host: host_json['hostname'],
12
+ username: host_json['username'],
13
+ keys: [host_json['ssh_key']]
14
+ )
15
+ end
16
+
17
+ after do
18
+ host.disconnect
19
+ end
20
+
21
+ def find_repo(host, repo_name)
22
+ repos = host.zypper('repos').data
23
+ repos.find { |repo| repo.alias == repo_name }
24
+ end
25
+
26
+ it 'lists repos' do
27
+ result = host.zypper('repos')
28
+ expect(result).to be_success
29
+ end
30
+
31
+ it 'installs a package' do
32
+ host.su('root')
33
+ result = host.zypper('install', packages: 'ffmpeg')
34
+ expect(result).to be_success
35
+ end
36
+
37
+ it 'installs multiple packages' do
38
+ host.su('root')
39
+ result = host.zypper('install', packages: %w[curl ffmpeg])
40
+ expect(result).to be_success
41
+ end
42
+
43
+ it 'lists updates' do
44
+ result = host.zypper('list-updates')
45
+ expect(result).to be_success
46
+ end
47
+
48
+ it 'lists patches' do
49
+ result = host.zypper('list-patches')
50
+ expect(result).to be_success
51
+ end
52
+
53
+ it 'lists important and secure patches' do
54
+ result = host.zypper('list-patches', category: ['security'], severity: %w[important moderate])
55
+ expect(result).to be_success
56
+ end
57
+
58
+ it 'lists patch check counts' do
59
+ result = host.zypper('patch-check')
60
+ expect(result).to be_success
61
+ end
62
+
63
+ it 'updates a package' do
64
+ host.su('root')
65
+ result = host.zypper('update', packages: 'curl')
66
+ expect(result).to be_success
67
+ end
68
+
69
+ it 'gets info for one package' do
70
+ result = host.zypper('info', packages: 'curl')
71
+ expect(result).to be_success
72
+ end
73
+
74
+ it 'gets info for multiple packages' do
75
+ result = host.zypper('info', packages: %w[curl wget git sudo])
76
+ expect(result).to be_success
77
+ end
78
+
79
+ it 'gets info for type' do
80
+ result = host.zypper('info', type: 'package', packages: 'gc*')
81
+ expect(result).to be_success
82
+ end
83
+
84
+ it 'patches system' do
85
+ host.su('root')
86
+ result = host.zypper('patch', severity: 'moderate')
87
+ expect(result).to be_success
88
+ end
89
+
90
+ it 'performs a dist-upgrade' do
91
+ case os_name
92
+ when 'opensuse'
93
+ host.su('root')
94
+ result = host.zypper('dist-upgrade', dry_run: true)
95
+ expect(result).to be_success
96
+ when 'sles'
97
+ host.su('root')
98
+ result = host.zypper('dist-upgrade', dry_run: true, auto_agree_with_licenses: true)
99
+ expect(result).to be_success
100
+ end
101
+ end
102
+
103
+ it 'searches for single package with match' do
104
+ result = host.zypper('search', packages: 'gc*', sort_by_name: true)
105
+ expect(result).to be_success
106
+ end
107
+
108
+ it 'searches for multiple packages' do
109
+ result = host.zypper('search', packages: %w[nginx ffmpeg], sort_by_repo: true)
110
+ expect(result).to be_success
111
+ end
112
+
113
+ it 'manages a repo' do
114
+ repo_alias = 'graphics'
115
+ if os_name == 'opensuse'
116
+ repo_name = 'Graphics Project (openSUSE_Leap_15.2)'
117
+ repo_uri = 'https://download.opensuse.org/repositories/graphics/openSUSE_Leap_15.2/'
118
+ else
119
+ repo_name = 'Graphics Project (openSUSE_Leap_15.3)'
120
+ repo_uri = 'https://download.opensuse.org/repositories/graphics/openSUSE_Leap_15.3/'
121
+ end
122
+
123
+ url = "#{repo_uri}/#{repo_alias}.repo"
124
+
125
+ host.su('root')
126
+ result = host.zypper('addrepo', repos: url)
127
+ expect(result).to be_success
128
+
129
+ repo = find_repo(host, repo_alias)
130
+
131
+ expect(repo).to be_instance_of(Kanrisuru::Core::Zypper::Repo)
132
+ expect(repo.uri).to eq(repo_uri)
133
+ expect(repo.name).to eq(repo_name)
134
+
135
+ new_repo_alias = 'graphics-repo'
136
+ result = host.zypper('renamerepo', repo: repo_alias, alias: new_repo_alias)
137
+ expect(result).to be_success
138
+ repo = find_repo(host, new_repo_alias)
139
+ expect(repo.alias).to eq(new_repo_alias)
140
+
141
+ result = host.zypper('modifyrepo', repos: new_repo_alias, disable: true)
142
+ expect(result).to be_success
143
+ repo = find_repo(host, new_repo_alias)
144
+ expect(repo.enabled).to be_falsey
145
+
146
+ result = host.zypper('removerepo', repos: new_repo_alias)
147
+ expect(result).to be_success
148
+
149
+ repo = find_repo(host, new_repo_alias)
150
+ expect(repo).to be_nil
151
+ end
152
+
153
+ it 'refreshes repos' do
154
+ host.su('root')
155
+ result = host.zypper('refresh')
156
+ expect(result).to be_success
157
+ end
158
+
159
+ it 'cleans repo caches' do
160
+ host.su('root')
161
+ result = host.zypper('clean')
162
+ expect(result).to be_success
163
+ end
164
+
165
+ it 'lists services' do
166
+ result = host.zypper('services')
167
+ expect(result).to be_success
168
+ end
169
+
170
+ it 'refreshes services' do
171
+ host.su('root')
172
+ result = host.zypper('refresh-services')
173
+ expect(result).to be_success
174
+ end
175
+
176
+ it 'manages locks' do
177
+ host.su('root')
178
+ result = host.zypper('addlock', lock: 'nginx', type: 'package')
179
+ expect(result).to be_success
180
+
181
+ result = host.zypper('locks')
182
+ expect(result).to be_success
183
+
184
+ lock = result.first
185
+ expect(lock.name).to eq('nginx')
186
+ expect(lock.type).to eq('package')
187
+
188
+ result = host.zypper('removelock', lock: 'nginx')
189
+ expect(result).to be_success
190
+ end
191
+ end
192
+ end
193
+ end
@@ -82,7 +82,7 @@ RSpec.describe Kanrisuru::Remote::Fstab do
82
82
  entry.mount_point = '/mnt/test3'
83
83
 
84
84
  expect(fstab['/dev/vda14'].to_s).to eq '/dev/vda14 /mnt/test3 ext4 ' \
85
- 'user,exec,rw,auto,relatime,async,nodev,nosuid,owner,group 0 0'
85
+ 'user,exec,rw,auto,relatime,async,nodev,nosuid,owner,group 0 0'
86
86
 
87
87
  fstab << '/dev/vda16 /mnt/test2 fat defaults,user,uid=1000,gid=1000 0 0'
88
88
  expect(fstab['/dev/vda16'].to_s).to eq('/dev/vda16 /mnt/test2 fat defaults,user,uid=1000,gid=1000 0 0')
@@ -24,7 +24,7 @@ RSpec.describe Kanrisuru::Remote::Os do
24
24
 
25
25
  case os_name
26
26
  when 'opensuse'
27
- expect(host.os.release).to eq('opensuse-leap')
27
+ expect(host.os.release).to eq('opensuse_leap')
28
28
  else
29
29
  expect(host.os.release).to eq(os_name)
30
30
  end
@@ -2,9 +2,10 @@
2
2
 
3
3
  class TestHosts
4
4
  class << self
5
- def each_os(&block)
5
+ def each_os(opts = {}, &block)
6
6
  %w[debian ubuntu fedora centos rhel opensuse sles].each do |os_name|
7
7
  next unless test?(os_name)
8
+ next if opts[:only] && !only?(opts, os_name)
8
9
 
9
10
  block.call(os_name)
10
11
  end
@@ -14,6 +15,11 @@ class TestHosts
14
15
  hosts(name)
15
16
  end
16
17
 
18
+ def only?(opts, name)
19
+ ((opts[:only].instance_of?(Array) && opts[:only].include?(name)) ||
20
+ (opts[:only].instance_of?(String) && opts[:only] == name))
21
+ end
22
+
17
23
  def test?(name)
18
24
  return false if host(name).nil?
19
25
 
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe Kanrisuru::Core::Apt do
6
+ it 'responds to apt fields' do
7
+ expect(Kanrisuru::Core::Apt::Source.new).to respond_to(
8
+ :url, :dist, :architecture
9
+ )
10
+
11
+ expect(Kanrisuru::Core::Apt::PackageOverview.new).to respond_to(
12
+ :package, :version, :suites, :architecture, :installed, :upgradeable, :automatic
13
+ )
14
+
15
+ expect(Kanrisuru::Core::Apt::PackageDetail.new).to respond_to(
16
+ :package,
17
+ :version,
18
+ :priority,
19
+ :section,
20
+ :origin,
21
+ :maintainer,
22
+ :original_maintainer,
23
+ :bugs,
24
+ :install_size,
25
+ :dependencies,
26
+ :recommends,
27
+ :provides,
28
+ :suggests,
29
+ :breaks,
30
+ :conflicts,
31
+ :replaces,
32
+ :homepage,
33
+ :task,
34
+ :supported,
35
+ :download_size,
36
+ :apt_manual_installed,
37
+ :apt_sources,
38
+ :description,
39
+ :summary
40
+ )
41
+ end
42
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe Kanrisuru::Core::Archive do
6
+ it 'responds to archive fields' do
7
+ expect(Kanrisuru::Core::Archive::FilePath.new).to respond_to(
8
+ :path
9
+ )
10
+ end
11
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe Kanrisuru::Core::Disk do
6
+ it 'responds to disk fields' do
7
+ expect(Kanrisuru::Core::Disk::DiskUsage.new).to respond_to(:fsize, :path)
8
+ expect(Kanrisuru::Core::Disk::DiskFree.new).to respond_to(
9
+ :file_system, :type, :total, :used, :capacity, :mount
10
+ )
11
+ expect(Kanrisuru::Core::Disk::LsblkDevice.new).to respond_to(
12
+ :name, :maj_dev, :min_dev, :removable_device, :readonly_device, :owner, :group,
13
+ :mode, :fsize, :type, :mount_point, :fs_type, :uuid, :children
14
+ )
15
+ expect(Kanrisuru::Core::Disk::BlkidDevice.new).to respond_to(
16
+ :name, :label, :uuid, :type, :uuid_sub, :label_fatboot, :version, :usage,
17
+ :part_uuid, :part_entry_scheme, :part_entry_uuid, :part_entry_type,
18
+ :part_entry_number, :part_entry_offset, :part_entry_size, :part_entry_disk
19
+ )
20
+ end
21
+ end
@@ -0,0 +1,271 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe Kanrisuru::Core::Dmi do
6
+ it 'responds to dmi type fields' do
7
+ expect(Kanrisuru::Core::Dmi::BIOS.new).to respond_to(
8
+ :dmi_type, :dmi_handle, :dmi_size,
9
+ :vendor, :version, :release_date, :address, :runtime_size,
10
+ :rom_size, :characteristics, :bios_revision, :firmware_revision
11
+ )
12
+ expect(Kanrisuru::Core::Dmi::System.new).to respond_to(
13
+ :dmi_type, :dmi_handle, :dmi_size,
14
+ :manufacturer, :product_name, :version, :serial_number,
15
+ :uuid, :wake_up_type, :sku_number, :family
16
+ )
17
+ expect(Kanrisuru::Core::Dmi::Baseboard.new).to respond_to(
18
+ :dmi_type, :dmi_handle, :dmi_size,
19
+ :type, :manufacturer, :product_name, :version, :serial_number, :asset_tag,
20
+ :features, :location_in_chassis, :chassis_handle, :contained_object_handles
21
+ )
22
+ expect(Kanrisuru::Core::Dmi::Chassis.new).to respond_to(
23
+ :dmi_type, :dmi_handle, :dmi_size,
24
+ :manufacturer, :type, :lock, :version, :serial_number,
25
+ :asset_tag, :boot_up_state, :power_supply_state, :thermal_state,
26
+ :security_status, :oem_information, :height, :number_of_power_cords,
27
+ :contained_elements, :sku_number
28
+ )
29
+ expect(Kanrisuru::Core::Dmi::Processor.new).to respond_to(
30
+ :dmi_type, :dmi_handle, :dmi_size,
31
+ :socket_designation, :type, :family, :manufacturer, :id, :signature, :flags,
32
+ :version, :voltage, :external_clock, :max_speed, :current_speed,
33
+ :status, :upgrade, :l1_cache_handle, :l2_cache_handle, :l3_cache_handle,
34
+ :serial_number, :asset_tag, :part_number, :core_count, :core_enabled, :thread_count,
35
+ :characteristics
36
+ )
37
+ expect(Kanrisuru::Core::Dmi::MemoryController.new).to respond_to(
38
+ :dmi_type, :dmi_handle, :dmi_size,
39
+ :error_detecting_method, :error_correcting_capabilities, :supported_interleave,
40
+ :current_interleave, :maximum_memory_module_size, :maximum_total_memory_size,
41
+ :supported_seeds, :supported_memory_types, :memory_module_voltage, :associated_memory_slots,
42
+ :enabled_error_correcting_capabilities
43
+ )
44
+ expect(Kanrisuru::Core::Dmi::MemoryModule.new).to respond_to(
45
+ :dmi_type, :dmi_handle, :dmi_size,
46
+ :socket_designation, :bank_connections, :current_speed, :type, :installed_size, :enabled_size,
47
+ :error_status
48
+ )
49
+ expect(Kanrisuru::Core::Dmi::Cache.new).to respond_to(
50
+ :dmi_type, :dmi_handle, :dmi_size,
51
+ :socket_designation, :configuration, :operational_mode, :location,
52
+ :installed_size, :maximum_size, :supported_sram_types, :installed_sram_type,
53
+ :speed, :error_correction_type, :system_type, :associativity
54
+ )
55
+ expect(Kanrisuru::Core::Dmi::PortConnector.new).to respond_to(
56
+ :dmi_type, :dmi_handle, :dmi_size,
57
+ :internal_reference_designator,
58
+ :internal_connector_type,
59
+ :external_reference_designator,
60
+ :external_connector_type,
61
+ :port_type
62
+ )
63
+ expect(Kanrisuru::Core::Dmi::SystemSlots.new).to respond_to(
64
+ :dmi_type, :dmi_handle, :dmi_size,
65
+ :designation, :type, :current_usage, :slot_length,
66
+ :id, :characteristics, :bus_address,
67
+ :data_bus_width, :peer_devices
68
+ )
69
+ expect(Kanrisuru::Core::Dmi::OnBoardDevice.new).to respond_to(
70
+ :dmi_type, :dmi_handle, :dmi_size,
71
+ :type, :status, :description
72
+ )
73
+ expect(Kanrisuru::Core::Dmi::OEMStrings.new).to respond_to(
74
+ :dmi_type, :dmi_handle, :dmi_size,
75
+ :strings
76
+ )
77
+ expect(Kanrisuru::Core::Dmi::SystemConfigurationOptions.new).to respond_to(
78
+ :dmi_type, :dmi_handle, :dmi_size,
79
+ :options
80
+ )
81
+ expect(Kanrisuru::Core::Dmi::BIOSLanguage.new).to respond_to(
82
+ :dmi_type, :dmi_handle, :dmi_size,
83
+ :language_description_format, :installed_languages, :currently_installed_language
84
+ )
85
+ expect(Kanrisuru::Core::Dmi::GroupAssociation.new).to respond_to(
86
+ :dmi_type, :dmi_handle, :dmi_size,
87
+ :name, :items
88
+ )
89
+ expect(Kanrisuru::Core::Dmi::SystemEventLog.new).to respond_to(
90
+ :dmi_type, :dmi_handle, :dmi_size,
91
+ :area_length, :header_start_offset, :header_length, :data_start_offset,
92
+ :access_method, :change_token, :header_format, :supported_log_type_descriptors,
93
+ :descriptors
94
+ )
95
+ expect(Kanrisuru::Core::Dmi::PhysicalMemoryArray.new).to respond_to(
96
+ :dmi_type, :dmi_handle, :dmi_size,
97
+ :location, :use, :error_correction_type, :maximum_capacity,
98
+ :error_information_handle, :number_of_devices
99
+ )
100
+ expect(Kanrisuru::Core::Dmi::MemoryDevice.new).to respond_to(
101
+ :dmi_type, :dmi_handle, :dmi_size,
102
+ :array_handle, :error_information_handle, :total_width,
103
+ :data_width, :mem_size, :form_factor, :set, :locator,
104
+ :bank_locator, :type, :type_detail, :speed,
105
+ :manufacturer, :serial_number, :asset_tag,
106
+ :part_number, :rank, :configured_clock_speed,
107
+ :minimum_voltage, :maximum_voltage, :configured_voltage,
108
+ :firmware_version, :model_manufacturer_id, :module_product_id,
109
+ :memory_subsystem_controller_manufacturer_id,
110
+ :memory_subsystem_controller_product_id,
111
+ :non_volatile_size, :cache_size, :logical_size
112
+ )
113
+ expect(Kanrisuru::Core::Dmi::MemoryError32Bit.new).to respond_to(
114
+ :dmi_type, :dmi_handle, :dmi_size,
115
+ :type, :granularity, :operation, :vendor_syndrome, :memory_array_address,
116
+ :device_address, :resolution
117
+ )
118
+ expect(Kanrisuru::Core::Dmi::MemoryArrayMappedAddress.new).to respond_to(
119
+ :dmi_type, :dmi_handle, :dmi_size,
120
+ :starting_address, :ending_address, :range_size,
121
+ :physical_array_handle, :partition_width
122
+ )
123
+ expect(Kanrisuru::Core::Dmi::MemoryDeviceMappedAddress.new).to respond_to(
124
+ :dmi_type, :dmi_handle, :dmi_size,
125
+ :starting_address, :ending_address, :range_size,
126
+ :physical_device_handle, :memory_array_mapped_address_handle,
127
+ :partition_row_position, :interleave_position,
128
+ :interleaved_data_depth
129
+ )
130
+ expect(Kanrisuru::Core::Dmi::BuiltInPointingDevice.new).to respond_to(
131
+ :dmi_type, :dmi_handle, :dmi_size,
132
+ :type, :inteface, :buttons
133
+ )
134
+ expect(Kanrisuru::Core::Dmi::PortableBattery.new).to respond_to(
135
+ :dmi_type, :dmi_handle, :dmi_size,
136
+ :location, :manufacturer, :manufacture_date,
137
+ :serial_number, :name, :chemistry,
138
+ :design_capacity, :design_voltage, :maximum_error,
139
+ :sbds_version, :sbds_serial_number, :sbds_manufacturer_date,
140
+ :sbds_chemistry, :oem_specific_information
141
+ )
142
+ expect(Kanrisuru::Core::Dmi::SystemReset.new).to respond_to(
143
+ :dmi_type, :dmi_handle, :dmi_size,
144
+ :status, :watchdog_timer, :boot_option,
145
+ :boot_option_on_limit, :timer_interval,
146
+ :reset_count, :reset_limit, :timeout
147
+ )
148
+ expect(Kanrisuru::Core::Dmi::HardwareSecurity.new).to respond_to(
149
+ :dmi_type, :dmi_handle, :dmi_size,
150
+ :power_on_password_status, :keyboard_password_status,
151
+ :administrator_password_status, :front_panel_reset_status
152
+ )
153
+ expect(Kanrisuru::Core::Dmi::SystemPowerControls.new).to respond_to(
154
+ :dmi_type, :dmi_handle, :dmi_size,
155
+ :next_scheduled_power_on
156
+ )
157
+ expect(Kanrisuru::Core::Dmi::VoltageProbe.new).to respond_to(
158
+ :dmi_type, :dmi_handle, :dmi_size,
159
+ :description, :location, :status, :maximum_value,
160
+ :minimum_value, :resolution, :tolerance, :accuracy,
161
+ :oem_specific_information, :nominal_value
162
+ )
163
+ expect(Kanrisuru::Core::Dmi::CoolingDevice.new).to respond_to(
164
+ :dmi_type, :dmi_handle, :dmi_size,
165
+ :temperature_probe_handle, :type,
166
+ :status, :cooling_unit_group, :oem_specific_information,
167
+ :nominal_speed, :description
168
+ )
169
+ expect(Kanrisuru::Core::Dmi::TemperatureProbe.new).to respond_to(
170
+ :dmi_type, :dmi_handle, :dmi_size,
171
+ :description, :location, :status,
172
+ :maximum_value, :minimum_value, :resolution,
173
+ :tolerance, :accuracy, :oem_specific_information,
174
+ :nominal_value
175
+ )
176
+ expect(Kanrisuru::Core::Dmi::ElectricalCurrentProbe.new).to respond_to(
177
+ :dmi_type, :dmi_handle, :dmi_size,
178
+ :description, :location, :status,
179
+ :maximum_value, :minimum_value, :resolution,
180
+ :tolerance, :accuracy, :oem_specific_information,
181
+ :nominal_value
182
+ )
183
+ expect(Kanrisuru::Core::Dmi::OutOfBandRemoteAccess.new).to respond_to(
184
+ :dmi_type, :dmi_handle, :dmi_size,
185
+ :manufacturer_name, :inbound_connection,
186
+ :outbound_connection
187
+ )
188
+ expect(Kanrisuru::Core::Dmi::BootIntegrityServices.new).to respond_to(
189
+ :dmi_type, :dmi_handle, :dmi_size,
190
+ :checksum,
191
+ :sixteen_bit_entry_point_address,
192
+ :thirty_two_bit_entry_point_address
193
+ )
194
+ expect(Kanrisuru::Core::Dmi::SystemBoot.new).to respond_to(
195
+ :dmi_type, :dmi_handle, :dmi_size,
196
+ :status
197
+ )
198
+ expect(Kanrisuru::Core::Dmi::MemoryError64Bit.new).to respond_to(
199
+ :dmi_type, :dmi_handle, :dmi_size,
200
+ :type, :granularity, :operation, :vendor_syndrome, :memory_array_address,
201
+ :device_address, :resolution
202
+ )
203
+ expect(Kanrisuru::Core::Dmi::ManagementDevice.new).to respond_to(
204
+ :dmi_type, :dmi_handle, :dmi_size,
205
+ :description, :type, :address, :address_type
206
+ )
207
+ expect(Kanrisuru::Core::Dmi::ManagementDeviceComponent.new).to respond_to(
208
+ :dmi_type, :dmi_handle, :dmi_size,
209
+ :description, :management_device_handle, :component_handle,
210
+ :threshold_handle
211
+ )
212
+ expect(Kanrisuru::Core::Dmi::ManagementDeviceThresholdData.new).to respond_to(
213
+ :dmi_type, :dmi_handle, :dmi_size,
214
+ :lower_non_critical_threshold,
215
+ :upper_non_critical_threshold,
216
+ :lower_critical_threshold,
217
+ :upper_critical_threshold,
218
+ :lower_non_recoverable_threshold,
219
+ :upper_non_recoverable_threshold
220
+ )
221
+ expect(Kanrisuru::Core::Dmi::MemoryChannelDevice.new).to respond_to(
222
+ :load,
223
+ :handle
224
+ )
225
+ expect(Kanrisuru::Core::Dmi::MemoryChannel.new).to respond_to(
226
+ :dmi_type, :dmi_handle, :dmi_size,
227
+ :type, :maximal_load, :devices
228
+ )
229
+ expect(Kanrisuru::Core::Dmi::IPMIDevice.new).to respond_to(
230
+ :dmi_type, :dmi_handle, :dmi_size,
231
+ :interface_type, :specification_version, :i2c_slave_address,
232
+ :nv_storage_device_address, :nv_storage_device, :base_address, :register_spacing,
233
+ :interrupt_polarity, :interrupt_trigger_mode, :interrupt_number
234
+ )
235
+ expect(Kanrisuru::Core::Dmi::SystemPowerSupply.new).to respond_to(
236
+ :dmi_type, :dmi_handle, :dmi_size,
237
+ :power_unit_group, :location, :name,
238
+ :manufacturer, :serial_number, :asset_tag, :model_part_number,
239
+ :revision, :max_power_capacity, :status,
240
+ :type, :input_voltage_range_switching,
241
+ :plugged, :hot_replaceable,
242
+ :input_voltage_probe_handle,
243
+ :cooling_device_handle,
244
+ :input_current_probe_handle
245
+ )
246
+ expect(Kanrisuru::Core::Dmi::AdditionalInformation.new).to respond_to(
247
+ :dmi_type, :dmi_handle, :dmi_size,
248
+ :referenced_handle, :referenced_offset,
249
+ :string, :value
250
+ )
251
+ expect(Kanrisuru::Core::Dmi::OnboardDevicesExtendedInformation.new).to respond_to(
252
+ :dmi_type, :dmi_handle, :dmi_size,
253
+ :reference_designation, :type, :status,
254
+ :type_instance, :bus_address
255
+ )
256
+ expect(Kanrisuru::Core::Dmi::ProtocolRecord.new).to respond_to(
257
+ :protocol_id,
258
+ :protocol_type_specific_data
259
+ )
260
+ expect(Kanrisuru::Core::Dmi::ManagementControllerHostInterface.new).to respond_to(
261
+ :dmi_type, :dmi_handle, :dmi_size,
262
+ :interface_type, :vendor_id, :device_type,
263
+ :protocol_records, :host_ip_assignment_type, :host_ip_address_format
264
+ )
265
+ expect(Kanrisuru::Core::Dmi::TPMDevice.new).to respond_to(
266
+ :dmi_type, :dmi_handle, :dmi_size,
267
+ :specification_version, :firmware_revision,
268
+ :description, :characteristics, :oem_specific_information
269
+ )
270
+ end
271
+ end