ovirt_metrics 1.4.0 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +0 -1
  3. data/lib/active_record/connection_adapters/ovirt_postgresql_adapter.rb +30 -0
  4. data/lib/ovirt_metrics.rb +9 -9
  5. data/lib/ovirt_metrics/column_definitions.rb +4 -4
  6. data/lib/ovirt_metrics/models/host_configuration.rb +0 -14
  7. data/lib/ovirt_metrics/models/host_samples_history.rb +1 -1
  8. data/lib/ovirt_metrics/models/vm_device_history.rb +1 -0
  9. data/lib/ovirt_metrics/models/vm_samples_history.rb +1 -1
  10. data/lib/ovirt_metrics/version.rb +1 -1
  11. data/spec/models/host_samples_history_spec.rb +10 -10
  12. data/spec/models/vm_disk_samples_history_spec.rb +4 -4
  13. data/spec/models/vm_samples_history_spec.rb +3 -8
  14. data/spec/ovirt_metrics_spec.rb +30 -0
  15. data/spec/support/active_record.rb +0 -6
  16. metadata +15 -58
  17. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/column.rb +0 -15
  18. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/database_statements.rb +0 -170
  19. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/explain_pretty_printer.rb +0 -42
  20. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid.rb +0 -31
  21. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/array.rb +0 -70
  22. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/bit.rb +0 -52
  23. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/bit_varying.rb +0 -13
  24. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/bytea.rb +0 -15
  25. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/cidr.rb +0 -48
  26. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/date_time.rb +0 -21
  27. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/decimal.rb +0 -13
  28. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/enum.rb +0 -19
  29. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/hstore.rb +0 -59
  30. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/inet.rb +0 -13
  31. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/json.rb +0 -10
  32. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/jsonb.rb +0 -23
  33. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/money.rb +0 -39
  34. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/point.rb +0 -43
  35. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/rails_5_1_point.rb +0 -50
  36. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/range.rb +0 -93
  37. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/specialized_string.rb +0 -15
  38. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/type_map_initializer.rb +0 -109
  39. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/uuid.rb +0 -21
  40. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/vector.rb +0 -26
  41. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/oid/xml.rb +0 -28
  42. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/quoting.rb +0 -116
  43. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/referential_integrity.rb +0 -49
  44. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/schema_definitions.rb +0 -180
  45. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/schema_dumper.rb +0 -47
  46. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/schema_statements.rb +0 -682
  47. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/type_metadata.rb +0 -35
  48. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql/utils.rb +0 -77
  49. data/lib/active_record/connection_adapters/ovirt_legacy_postgresql_adapter.rb +0 -856
  50. data/spec/models/host_configuration_spec.rb +0 -31
  51. data/spec/schemas/schema_rhev30.rb +0 -655
@@ -1,31 +0,0 @@
1
- describe OvirtMetrics::HostConfiguration do
2
- shared_examples_for "HostConfiguration" do
3
- context "#speed_in_mhz" do
4
- it "when cpu_model is nil" do
5
- expect(described_class.new(:cpu_model => nil).speed_in_mhz).to be_nil
6
- end
7
-
8
- it "when cpu_model is in GHz" do
9
- expect(described_class.new(:cpu_model => "Intel(R) Xeon(R) CPU E5506 @ 2.00GHz").speed_in_mhz).to eq(2048.0)
10
- end
11
-
12
- it "when cpu_model is in MHz" do
13
- expect(described_class.new(:cpu_model => "Intel(R) Xeon(R) CPU E5506 @ 2.00MHz").speed_in_mhz).to eq(2.0)
14
- end
15
-
16
- it "when cpu_model is some other string" do
17
- expect(described_class.new(:cpu_model => "XXX").speed_in_mhz).to be_nil
18
- end
19
- end
20
- end
21
-
22
- context "RHEV 3.0" do
23
- before(:each) { load_rhev_30 }
24
- it_should_behave_like "HostConfiguration"
25
- end
26
-
27
- context "RHEV 3.1" do
28
- before(:each) { load_rhev_31 }
29
- it_should_behave_like "HostConfiguration"
30
- end
31
- end
@@ -1,655 +0,0 @@
1
- # encoding: UTF-8
2
- # This file is auto-generated from the current state of the database. Instead
3
- # of editing this file, please use the migrations feature of Active Record to
4
- # incrementally modify your database, and then regenerate this schema definition.
5
- #
6
- # Note that this schema.rb definition is the authoritative source for your
7
- # database schema. If you need to create the application database on another
8
- # system, you should be using db:schema:load, not running all the migrations
9
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
- # you'll amass, the slower it'll run and the greater likelihood for issues).
11
- #
12
- # It's strongly recommended to check this file into your version control system.
13
-
14
- ActiveRecord::Schema.define(:version => 20130115171747) do
15
-
16
- create_table "calendar", :id => false, :force => true do |t|
17
- t.datetime "the_datetime", :null => false
18
- t.date "the_date", :null => false
19
- t.integer "the_year", :limit => 2, :null => false
20
- t.integer "the_month", :limit => 2, :null => false
21
- t.string "month_name", :limit => 9, :null => false
22
- t.integer "the_day", :limit => 2, :null => false
23
- t.string "day_name", :limit => 9, :null => false
24
- t.time "the_hour", :null => false
25
- end
26
-
27
- add_index "calendar", ["the_date"], :name => "calendar_table_index"
28
-
29
- create_table "cluster_configuration", :primary_key => "history_id", :force => true do |t|
30
- t.string "cluster_id", :limit => nil, :null => false
31
- t.string "cluster_name", :limit => 40, :null => false
32
- t.string "cluster_description", :limit => 4000
33
- t.string "datacenter_id", :limit => nil
34
- t.string "cpu_name"
35
- t.string "compatibility_version", :limit => 40, :default => "2.2", :null => false
36
- t.integer "datacenter_configuration_version"
37
- t.datetime "create_date"
38
- t.datetime "update_date"
39
- t.datetime "delete_date"
40
- end
41
-
42
- add_index "cluster_configuration", ["cluster_id"], :name => "cluster_configuration_cluster_id_idx"
43
- add_index "cluster_configuration", ["datacenter_id"], :name => "cluster_configuration_datacenter_id_idx"
44
-
45
- create_table "datacenter_configuration", :primary_key => "history_id", :force => true do |t|
46
- t.string "datacenter_id", :limit => nil, :null => false
47
- t.string "datacenter_name", :limit => 40, :null => false
48
- t.string "datacenter_description", :limit => 4000, :null => false
49
- t.integer "storage_type", :limit => 2, :null => false
50
- t.datetime "create_date"
51
- t.datetime "update_date"
52
- t.datetime "delete_date"
53
- end
54
-
55
- add_index "datacenter_configuration", ["datacenter_id"], :name => "datacenter_configuration_datacenter_id_idx"
56
-
57
- create_table "datacenter_daily_history", :primary_key => "history_id", :force => true do |t|
58
- t.datetime "history_datetime", :null => false
59
- t.string "datacenter_id", :limit => nil, :null => false
60
- t.integer "datacenter_status", :limit => 2, :null => false
61
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
62
- t.integer "datacenter_configuration_version", :null => false
63
- end
64
-
65
- add_index "datacenter_daily_history", ["datacenter_configuration_version"], :name => "idx_datacenter_configuration_version_daily"
66
- add_index "datacenter_daily_history", ["datacenter_id"], :name => "datacenter_daily_history_datacenter_id_idx"
67
- add_index "datacenter_daily_history", ["history_datetime"], :name => "idx_datacenter_history_datetime_daily"
68
-
69
- create_table "datacenter_hourly_history", :primary_key => "history_id", :force => true do |t|
70
- t.datetime "history_datetime", :null => false
71
- t.string "datacenter_id", :limit => nil, :null => false
72
- t.integer "datacenter_status", :limit => 2, :null => false
73
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
74
- t.integer "datacenter_configuration_version", :null => false
75
- end
76
-
77
- add_index "datacenter_hourly_history", ["datacenter_configuration_version"], :name => "idx_datacenter_configuration_version_hourly"
78
- add_index "datacenter_hourly_history", ["datacenter_id"], :name => "datacenter_hourly_history_datacenter_id_idx"
79
- add_index "datacenter_hourly_history", ["history_datetime"], :name => "idx_datacenter_history_datetime_hourly"
80
-
81
- create_table "datacenter_samples_history", :primary_key => "history_id", :force => true do |t|
82
- t.datetime "history_datetime", :null => false
83
- t.string "datacenter_id", :limit => nil, :null => false
84
- t.integer "datacenter_status", :limit => 2, :null => false
85
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
86
- t.integer "datacenter_configuration_version", :null => false
87
- end
88
-
89
- add_index "datacenter_samples_history", ["datacenter_configuration_version"], :name => "idx_datacenter_configuration_version_samples"
90
- add_index "datacenter_samples_history", ["datacenter_id"], :name => "datacenter_samples_history_datacenter_id_idx"
91
- add_index "datacenter_samples_history", ["history_datetime"], :name => "idx_datacenter_history_datetime_samples"
92
-
93
- create_table "datacenter_storage_domain_map", :primary_key => "history_id", :force => true do |t|
94
- t.string "storage_domain_id", :limit => nil, :null => false
95
- t.string "datacenter_id", :limit => nil, :null => false
96
- t.datetime "attach_date", :null => false
97
- t.datetime "detach_date"
98
- end
99
-
100
- add_index "datacenter_storage_domain_map", ["datacenter_id"], :name => "datacenter_storage_domain_map_datacenter_id_idx"
101
- add_index "datacenter_storage_domain_map", ["storage_domain_id"], :name => "datacenter_storage_domain_map_storage_domain_id_idx"
102
-
103
- create_table "disks_vm_map", :primary_key => "history_id", :force => true do |t|
104
- t.string "vm_disk_id", :limit => nil, :null => false
105
- t.string "vm_id", :limit => nil, :null => false
106
- t.datetime "attach_date", :null => false
107
- t.datetime "detach_date"
108
- end
109
-
110
- add_index "disks_vm_map", ["vm_disk_id"], :name => "disks_vm_map_vm_disk_id_idx"
111
- add_index "disks_vm_map", ["vm_id"], :name => "disks_vm_map_vm_id_idx"
112
-
113
- create_table "enum_translator", :id => false, :force => true do |t|
114
- t.string "enum_type", :limit => 40, :null => false
115
- t.integer "enum_key", :limit => 2, :null => false
116
- t.string "language_code", :limit => 40, :null => false
117
- t.string "value", :limit => 40, :null => false
118
- end
119
-
120
- create_table "history_configuration", :id => false, :force => true do |t|
121
- t.string "var_name", :limit => 50, :null => false
122
- t.string "var_value"
123
- t.datetime "var_datetime"
124
- end
125
-
126
- create_table "host_configuration", :primary_key => "history_id", :force => true do |t|
127
- t.string "host_id", :limit => nil, :null => false
128
- t.string "host_unique_id", :limit => 128
129
- t.string "host_name", :null => false
130
- t.string "cluster_id", :limit => nil, :null => false
131
- t.integer "host_type", :limit => 2, :default => 0, :null => false
132
- t.string "fqn_or_ip", :null => false
133
- t.integer "memory_size_mb"
134
- t.integer "swap_size_mb"
135
- t.string "cpu_model"
136
- t.integer "number_of_cores", :limit => 2
137
- t.string "host_os"
138
- t.string "pm_ip_address"
139
- t.string "kernel_version"
140
- t.string "kvm_version"
141
- t.string "vdsm_version", :limit => 40
142
- t.integer "vdsm_port", :null => false
143
- t.integer "cluster_configuration_version"
144
- t.datetime "create_date"
145
- t.datetime "update_date"
146
- t.datetime "delete_date"
147
- end
148
-
149
- add_index "host_configuration", ["cluster_id"], :name => "host_configuration_cluster_id_idx"
150
- add_index "host_configuration", ["host_id"], :name => "host_configuration_host_id_idx"
151
-
152
- create_table "host_daily_history", :primary_key => "history_id", :force => true do |t|
153
- t.datetime "history_datetime", :null => false
154
- t.string "host_id", :limit => nil, :null => false
155
- t.integer "host_status", :limit => 2, :null => false
156
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
157
- t.integer "memory_usage_percent", :limit => 2, :default => 0
158
- t.integer "max_memory_usage", :limit => 2
159
- t.integer "cpu_usage_percent", :limit => 2
160
- t.integer "max_cpu_usage", :limit => 2
161
- t.integer "ksm_cpu_percent", :limit => 2, :default => 0
162
- t.integer "max_ksm_cpu_percent", :limit => 2, :default => 0
163
- t.integer "active_vms", :limit => 2, :default => 0
164
- t.integer "max_active_vms", :limit => 2, :default => 0
165
- t.integer "total_vms", :limit => 2, :default => 0
166
- t.integer "max_total_vms", :limit => 2, :default => 0
167
- t.integer "total_vms_vcpus", :default => 0
168
- t.integer "max_total_vms_vcpus", :default => 0
169
- t.integer "cpu_load", :default => 0
170
- t.integer "max_cpu_load", :default => 0
171
- t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
172
- t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
173
- t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
174
- t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
175
- t.integer "swap_used_mb"
176
- t.integer "max_swap_used_mb"
177
- t.integer "host_configuration_version"
178
- end
179
-
180
- add_index "host_daily_history", ["history_datetime"], :name => "idx_host_history_datetime_daily"
181
- add_index "host_daily_history", ["host_configuration_version"], :name => "idx_host_configuration_version_daily"
182
- add_index "host_daily_history", ["host_id"], :name => "host_daily_history_host_id_idx"
183
-
184
- create_table "host_hourly_history", :primary_key => "history_id", :force => true do |t|
185
- t.datetime "history_datetime", :null => false
186
- t.string "host_id", :limit => nil, :null => false
187
- t.integer "host_status", :limit => 2, :null => false
188
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
189
- t.integer "memory_usage_percent", :limit => 2, :default => 0
190
- t.integer "max_memory_usage", :limit => 2
191
- t.integer "cpu_usage_percent", :limit => 2
192
- t.integer "max_cpu_usage", :limit => 2
193
- t.integer "ksm_cpu_percent", :limit => 2, :default => 0
194
- t.integer "max_ksm_cpu_percent", :limit => 2, :default => 0
195
- t.integer "active_vms", :limit => 2, :default => 0
196
- t.integer "max_active_vms", :limit => 2, :default => 0
197
- t.integer "total_vms", :limit => 2, :default => 0
198
- t.integer "max_total_vms", :limit => 2, :default => 0
199
- t.integer "total_vms_vcpus", :default => 0
200
- t.integer "max_total_vms_vcpus", :default => 0
201
- t.integer "cpu_load", :default => 0
202
- t.integer "max_cpu_load", :default => 0
203
- t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
204
- t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
205
- t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
206
- t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
207
- t.integer "swap_used_mb"
208
- t.integer "max_swap_used_mb"
209
- t.integer "host_configuration_version"
210
- end
211
-
212
- add_index "host_hourly_history", ["history_datetime"], :name => "idx_host_history_datetime_hourly"
213
- add_index "host_hourly_history", ["host_configuration_version"], :name => "idx_host_configuration_version_hourly"
214
- add_index "host_hourly_history", ["host_id"], :name => "host_hourly_history_host_id_idx"
215
-
216
- create_table "host_interface_configuration", :primary_key => "history_id", :force => true do |t|
217
- t.string "host_interface_id", :limit => nil, :null => false
218
- t.string "host_interface_name", :limit => 50, :null => false
219
- t.string "host_id", :limit => nil, :null => false
220
- t.integer "host_interface_type", :limit => 2
221
- t.integer "host_interface_speed_bps"
222
- t.string "mac_address", :limit => 20
223
- t.string "network_name", :limit => 50
224
- t.string "ip_address", :limit => 20
225
- t.string "gateway", :limit => 20
226
- t.boolean "bond"
227
- t.string "bond_name", :limit => 50
228
- t.integer "vlan_id"
229
- t.integer "host_configuration_version"
230
- t.datetime "create_date"
231
- t.datetime "update_date"
232
- t.datetime "delete_date"
233
- end
234
-
235
- add_index "host_interface_configuration", ["host_id"], :name => "host_interface_configuration_host_id_idx"
236
- add_index "host_interface_configuration", ["host_interface_id"], :name => "host_interface_configuration_host_interface_id_idx"
237
-
238
- create_table "host_interface_daily_history", :primary_key => "history_id", :force => true do |t|
239
- t.datetime "history_datetime", :null => false
240
- t.string "host_interface_id", :limit => nil, :null => false
241
- t.integer "receive_rate_percent", :limit => 2
242
- t.integer "max_receive_rate_percent", :limit => 2
243
- t.integer "transmit_rate_percent", :limit => 2
244
- t.integer "max_transmit_rate_percent", :limit => 2
245
- t.integer "host_interface_configuration_version"
246
- end
247
-
248
- add_index "host_interface_daily_history", ["history_datetime"], :name => "idx_host_interface_history_datetime_daily"
249
- add_index "host_interface_daily_history", ["host_interface_configuration_version"], :name => "idx_host_interface_configuration_version_daily"
250
- add_index "host_interface_daily_history", ["host_interface_id"], :name => "host_interface_daily_history_host_interface_id_idx"
251
-
252
- create_table "host_interface_hourly_history", :primary_key => "history_id", :force => true do |t|
253
- t.datetime "history_datetime", :null => false
254
- t.string "host_interface_id", :limit => nil, :null => false
255
- t.integer "receive_rate_percent", :limit => 2
256
- t.integer "max_receive_rate_percent", :limit => 2
257
- t.integer "transmit_rate_percent", :limit => 2
258
- t.integer "max_transmit_rate_percent", :limit => 2
259
- t.integer "host_interface_configuration_version"
260
- end
261
-
262
- add_index "host_interface_hourly_history", ["history_datetime"], :name => "idx_host_interface_history_datetime_hourly"
263
- add_index "host_interface_hourly_history", ["host_interface_configuration_version"], :name => "idx_host_interface_configuration_version_hourly"
264
- add_index "host_interface_hourly_history", ["host_interface_id"], :name => "host_interface_hourly_history_host_interface_id_idx"
265
-
266
- create_table "host_interface_samples_history", :primary_key => "history_id", :force => true do |t|
267
- t.datetime "history_datetime", :null => false
268
- t.string "host_interface_id", :limit => nil, :null => false
269
- t.integer "receive_rate_percent", :limit => 2
270
- t.integer "transmit_rate_percent", :limit => 2
271
- t.integer "host_interface_configuration_version"
272
- end
273
-
274
- add_index "host_interface_samples_history", ["history_datetime"], :name => "idx_host_interface_history_datetime_samples"
275
- add_index "host_interface_samples_history", ["host_interface_configuration_version"], :name => "idx_host_interface_configuration_version_samples"
276
- add_index "host_interface_samples_history", ["host_interface_id"], :name => "host_interface_samples_history_host_interface_id_idx"
277
-
278
- create_table "host_samples_history", :primary_key => "history_id", :force => true do |t|
279
- t.datetime "history_datetime", :null => false
280
- t.string "host_id", :limit => nil, :null => false
281
- t.integer "host_status", :limit => 2, :null => false
282
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
283
- t.integer "memory_usage_percent", :limit => 2, :default => 0
284
- t.integer "cpu_usage_percent", :limit => 2
285
- t.integer "ksm_cpu_percent", :limit => 2, :default => 0
286
- t.integer "active_vms", :limit => 2, :default => 0
287
- t.integer "total_vms", :limit => 2, :default => 0
288
- t.integer "total_vms_vcpus", :default => 0
289
- t.integer "cpu_load", :default => 0
290
- t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
291
- t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
292
- t.integer "swap_used_mb"
293
- t.integer "host_configuration_version"
294
- end
295
-
296
- add_index "host_samples_history", ["history_datetime"], :name => "idx_host_history_datetime_samples"
297
- add_index "host_samples_history", ["host_configuration_version"], :name => "idx_host_configuration_version_samples"
298
- add_index "host_samples_history", ["host_id"], :name => "host_samples_history_host_id_idx"
299
-
300
- create_table "period", :id => false, :force => true do |t|
301
- t.string "month_name", :limit => 20, :null => false
302
- t.date "month_startdate", :null => false
303
- t.date "month_enddate", :null => false
304
- t.date "quarter_enddate", :null => false
305
- end
306
-
307
- create_table "storage_domain_configuration", :primary_key => "history_id", :force => true do |t|
308
- t.string "storage_domain_id", :limit => nil, :null => false
309
- t.string "storage_domain_name", :limit => 250, :null => false
310
- t.integer "storage_domain_type", :limit => 2, :null => false
311
- t.integer "storage_type", :limit => 2, :null => false
312
- t.datetime "create_date"
313
- t.datetime "update_date"
314
- t.datetime "delete_date"
315
- end
316
-
317
- add_index "storage_domain_configuration", ["storage_domain_id"], :name => "storage_domain_configuration_storage_domain_id_idx"
318
-
319
- create_table "storage_domain_daily_history", :primary_key => "history_id", :force => true do |t|
320
- t.datetime "history_datetime", :null => false
321
- t.string "storage_domain_id", :limit => nil, :null => false
322
- t.integer "available_disk_size_gb"
323
- t.integer "used_disk_size_gb"
324
- t.integer "storage_configuration_version"
325
- end
326
-
327
- add_index "storage_domain_daily_history", ["history_datetime"], :name => "idx_storage_domain_history_datetime_daily"
328
- add_index "storage_domain_daily_history", ["storage_configuration_version"], :name => "idx_storage_configuration_version_daily"
329
- add_index "storage_domain_daily_history", ["storage_domain_id"], :name => "storage_domain_daily_history_storage_domain_id_idx"
330
-
331
- create_table "storage_domain_hourly_history", :primary_key => "history_id", :force => true do |t|
332
- t.datetime "history_datetime", :null => false
333
- t.string "storage_domain_id", :limit => nil, :null => false
334
- t.integer "available_disk_size_gb"
335
- t.integer "used_disk_size_gb"
336
- t.integer "storage_configuration_version"
337
- end
338
-
339
- add_index "storage_domain_hourly_history", ["history_datetime"], :name => "idx_storage_history_datetime_hourly"
340
- add_index "storage_domain_hourly_history", ["storage_configuration_version"], :name => "idx_storage_configuration_version_hourly"
341
- add_index "storage_domain_hourly_history", ["storage_domain_id"], :name => "storage_domain_hourly_history_storage_domain_id_idx"
342
-
343
- create_table "storage_domain_samples_history", :primary_key => "history_id", :force => true do |t|
344
- t.datetime "history_datetime", :null => false
345
- t.string "storage_domain_id", :limit => nil, :null => false
346
- t.integer "available_disk_size_gb"
347
- t.integer "used_disk_size_gb"
348
- t.integer "storage_configuration_version"
349
- end
350
-
351
- add_index "storage_domain_samples_history", ["history_datetime"], :name => "idx_storage_history_datetime_samples"
352
- add_index "storage_domain_samples_history", ["storage_configuration_version"], :name => "idx_storage_configuration_version_samples"
353
- add_index "storage_domain_samples_history", ["storage_domain_id"], :name => "storage_domain_samples_history_storage_domain_id_idx"
354
-
355
- create_table "tag_details", :primary_key => "history_id", :force => true do |t|
356
- t.string "tag_id", :limit => nil, :null => false
357
- t.string "tag_name", :limit => 50, :null => false
358
- t.string "tag_description", :limit => 4000
359
- t.string "tag_path", :limit => 4000, :null => false
360
- t.integer "tag_level", :limit => 2, :null => false
361
- t.datetime "create_date", :null => false
362
- t.datetime "update_date"
363
- t.datetime "delete_date"
364
- end
365
-
366
- add_index "tag_details", ["tag_id"], :name => "tag_details_tag_id_idx"
367
- add_index "tag_details", ["tag_level"], :name => "tag_details_tag_level_idx"
368
- add_index "tag_details", ["tag_path"], :name => "tag_details_tag_path_idx"
369
-
370
- create_table "tag_relations_history", :primary_key => "history_id", :force => true do |t|
371
- t.string "entity_id", :limit => nil, :null => false
372
- t.integer "entity_type", :limit => 2, :null => false
373
- t.string "parent_id", :limit => nil
374
- t.datetime "attach_date", :null => false
375
- t.datetime "detach_date"
376
- end
377
-
378
- add_index "tag_relations_history", ["entity_id", "attach_date"], :name => "ix_tag_relations_history"
379
- add_index "tag_relations_history", ["entity_type"], :name => "ix_tag_relations_history_1"
380
- add_index "tag_relations_history", ["parent_id"], :name => "tag_relations_history_parent_id_idx"
381
-
382
- create_table "vm_configuration", :primary_key => "history_id", :force => true do |t|
383
- t.string "vm_id", :limit => nil, :null => false
384
- t.string "vm_name", :null => false
385
- t.string "vm_description", :limit => 4000
386
- t.integer "vm_type", :limit => 2
387
- t.string "cluster_id", :limit => nil, :null => false
388
- t.string "template_id", :limit => nil, :null => false
389
- t.string "template_name", :limit => 40
390
- t.integer "cpu_per_socket", :limit => 2
391
- t.integer "number_of_sockets", :limit => 2
392
- t.integer "memory_size_mb"
393
- t.integer "operating_system", :limit => 2, :default => 0, :null => false
394
- t.string "ad_domain", :limit => 40
395
- t.string "default_host", :limit => nil
396
- t.boolean "high_availability"
397
- t.boolean "initialized"
398
- t.boolean "stateless"
399
- t.boolean "fail_back"
400
- t.boolean "auto_suspend", :default => false
401
- t.integer "usb_policy", :limit => 2
402
- t.string "time_zone", :limit => 40
403
- t.integer "cluster_configuration_version"
404
- t.integer "default_host_configuration_version"
405
- t.datetime "create_date"
406
- t.datetime "update_date"
407
- t.datetime "delete_date"
408
- end
409
-
410
- add_index "vm_configuration", ["cluster_id"], :name => "vm_configuration_cluster_id_idx"
411
- add_index "vm_configuration", ["vm_id"], :name => "vm_configuration_vm_id_idx"
412
-
413
- create_table "vm_daily_history", :primary_key => "history_id", :force => true do |t|
414
- t.datetime "history_datetime", :null => false
415
- t.string "vm_id", :limit => nil, :null => false
416
- t.integer "vm_status", :limit => 2, :null => false
417
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
418
- t.integer "cpu_usage_percent", :limit => 2, :default => 0
419
- t.integer "max_cpu_usage", :limit => 2
420
- t.integer "memory_usage_percent", :limit => 2, :default => 0
421
- t.integer "max_memory_usage", :limit => 2
422
- t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
423
- t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
424
- t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
425
- t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
426
- t.datetime "vm_last_up_time"
427
- t.datetime "vm_last_boot_time"
428
- t.string "vm_ip"
429
- t.string "current_user_name"
430
- t.string "currently_running_on_host", :limit => nil
431
- t.integer "vm_configuration_version"
432
- t.integer "current_host_configuration_version"
433
- end
434
-
435
- add_index "vm_daily_history", ["current_host_configuration_version"], :name => "idx_vm_current_host_configuration_daily"
436
- add_index "vm_daily_history", ["history_datetime"], :name => "idx_vm_history_datetime_daily"
437
- add_index "vm_daily_history", ["vm_configuration_version"], :name => "idx_vm_configuration_version_daily"
438
- add_index "vm_daily_history", ["vm_id"], :name => "vm_daily_history_vm_id_idx"
439
-
440
- create_table "vm_disk_configuration", :primary_key => "history_id", :force => true do |t|
441
- t.string "vm_disk_id", :limit => nil, :null => false
442
- t.string "storage_domain_id", :limit => nil
443
- t.integer "vm_internal_drive_mapping", :limit => 2
444
- t.string "vm_disk_description", :limit => 4000
445
- t.integer "vm_disk_size_mb"
446
- t.integer "vm_disk_type", :limit => 2
447
- t.integer "vm_disk_format", :limit => 2
448
- t.integer "vm_disk_interface", :limit => 2
449
- t.datetime "create_date"
450
- t.datetime "update_date"
451
- t.datetime "delete_date"
452
- end
453
-
454
- add_index "vm_disk_configuration", ["storage_domain_id"], :name => "vm_disk_configuration_storage_domain_id_idx"
455
- add_index "vm_disk_configuration", ["vm_disk_id"], :name => "vm_disk_configuration_vm_disk_id_idx"
456
-
457
- create_table "vm_disk_daily_history", :primary_key => "history_id", :force => true do |t|
458
- t.datetime "history_datetime", :null => false
459
- t.string "vm_disk_id", :limit => nil, :null => false
460
- t.integer "vm_disk_status", :limit => 2
461
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
462
- t.integer "vm_disk_actual_size_mb", :null => false
463
- t.integer "read_rate_bytes_per_second"
464
- t.integer "max_read_rate_bytes_per_second"
465
- t.decimal "read_latency_seconds", :precision => 18, :scale => 9
466
- t.decimal "max_read_latency_seconds", :precision => 18, :scale => 9
467
- t.integer "write_rate_bytes_per_second"
468
- t.integer "max_write_rate_bytes_per_second"
469
- t.decimal "write_latency_seconds", :precision => 18, :scale => 9
470
- t.decimal "max_write_latency_seconds", :precision => 18, :scale => 9
471
- t.decimal "flush_latency_seconds", :precision => 18, :scale => 9
472
- t.decimal "max_flush_latency_seconds", :precision => 18, :scale => 9
473
- t.integer "vm_disk_configuration_version"
474
- end
475
-
476
- add_index "vm_disk_daily_history", ["history_datetime"], :name => "idx_vm_disk_history_datetime_daily"
477
- add_index "vm_disk_daily_history", ["vm_disk_configuration_version"], :name => "idx_vm_disk_configuration_version_daily"
478
- add_index "vm_disk_daily_history", ["vm_disk_id"], :name => "vm_disk_daily_history_vm_disk_id_idx"
479
-
480
- create_table "vm_disk_hourly_history", :primary_key => "history_id", :force => true do |t|
481
- t.datetime "history_datetime", :null => false
482
- t.string "vm_disk_id", :limit => nil, :null => false
483
- t.integer "vm_disk_status", :limit => 2
484
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
485
- t.integer "vm_disk_actual_size_mb", :null => false
486
- t.integer "read_rate_bytes_per_second"
487
- t.integer "max_read_rate_bytes_per_second"
488
- t.decimal "read_latency_seconds", :precision => 18, :scale => 9
489
- t.decimal "max_read_latency_seconds", :precision => 18, :scale => 9
490
- t.integer "write_rate_bytes_per_second"
491
- t.integer "max_write_rate_bytes_per_second"
492
- t.decimal "write_latency_seconds", :precision => 18, :scale => 9
493
- t.decimal "max_write_latency_seconds", :precision => 18, :scale => 9
494
- t.decimal "flush_latency_seconds", :precision => 18, :scale => 9
495
- t.decimal "max_flush_latency_seconds", :precision => 18, :scale => 9
496
- t.integer "vm_disk_configuration_version"
497
- end
498
-
499
- add_index "vm_disk_hourly_history", ["history_datetime"], :name => "idx_vm_disk_history_datetime_hourly"
500
- add_index "vm_disk_hourly_history", ["vm_disk_configuration_version"], :name => "idx_vm_disk_configuration_version_hourly"
501
- add_index "vm_disk_hourly_history", ["vm_disk_id"], :name => "vm_disk_hourly_history_vm_disk_id_idx"
502
-
503
- create_table "vm_disk_samples_history", :primary_key => "history_id", :force => true do |t|
504
- t.datetime "history_datetime", :null => false
505
- t.string "vm_disk_id", :limit => nil, :null => false
506
- t.integer "vm_disk_status", :limit => 2
507
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
508
- t.integer "vm_disk_actual_size_mb", :null => false
509
- t.integer "read_rate_bytes_per_second"
510
- t.decimal "read_latency_seconds", :precision => 18, :scale => 9
511
- t.integer "write_rate_bytes_per_second"
512
- t.decimal "write_latency_seconds", :precision => 18, :scale => 9
513
- t.decimal "flush_latency_seconds", :precision => 18, :scale => 9
514
- t.integer "vm_disk_configuration_version"
515
- end
516
-
517
- add_index "vm_disk_samples_history", ["history_datetime"], :name => "idx_vm_disk_history_datetime_samples"
518
- add_index "vm_disk_samples_history", ["vm_disk_configuration_version"], :name => "idx_vm_disk_configuration_version_samples"
519
- add_index "vm_disk_samples_history", ["vm_disk_id"], :name => "vm_disk_samples_history_vm_disk_id_idx"
520
-
521
- create_table "vm_disks_usage_daily_history", :primary_key => "history_id", :force => true do |t|
522
- t.datetime "history_datetime", :null => false
523
- t.string "vm_id", :limit => nil, :null => false
524
- t.text "disks_usage"
525
- end
526
-
527
- add_index "vm_disks_usage_daily_history", ["history_datetime"], :name => "idx_disks_usage_history_datetime_daily"
528
- add_index "vm_disks_usage_daily_history", ["vm_id"], :name => "idx_disks_usage_vm_id_daily"
529
-
530
- create_table "vm_disks_usage_hourly_history", :primary_key => "history_id", :force => true do |t|
531
- t.datetime "history_datetime", :null => false
532
- t.string "vm_id", :limit => nil, :null => false
533
- t.text "disks_usage"
534
- end
535
-
536
- add_index "vm_disks_usage_hourly_history", ["history_datetime"], :name => "idx_disks_usage_history_datetime_hourly"
537
- add_index "vm_disks_usage_hourly_history", ["vm_id"], :name => "idx_disks_usage_vm_id_hourly"
538
-
539
- create_table "vm_disks_usage_samples_history", :primary_key => "history_id", :force => true do |t|
540
- t.datetime "history_datetime", :null => false
541
- t.string "vm_id", :limit => nil, :null => false
542
- t.text "disks_usage"
543
- end
544
-
545
- add_index "vm_disks_usage_samples_history", ["history_datetime"], :name => "idx_disks_usage_history_datetime_samples"
546
- add_index "vm_disks_usage_samples_history", ["vm_id"], :name => "idx_disks_usage_vm_id_samples"
547
-
548
- create_table "vm_hourly_history", :primary_key => "history_id", :force => true do |t|
549
- t.datetime "history_datetime", :null => false
550
- t.string "vm_id", :limit => nil, :null => false
551
- t.integer "vm_status", :limit => 2, :null => false
552
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
553
- t.integer "cpu_usage_percent", :limit => 2, :default => 0
554
- t.integer "max_cpu_usage", :limit => 2
555
- t.integer "memory_usage_percent", :limit => 2, :default => 0
556
- t.integer "max_memory_usage", :limit => 2
557
- t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
558
- t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
559
- t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
560
- t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
561
- t.datetime "vm_last_up_time"
562
- t.datetime "vm_last_boot_time"
563
- t.string "vm_ip"
564
- t.string "current_user_name"
565
- t.string "currently_running_on_host", :limit => nil
566
- t.integer "vm_configuration_version"
567
- t.integer "current_host_configuration_version"
568
- end
569
-
570
- add_index "vm_hourly_history", ["current_host_configuration_version"], :name => "idx_vm_current_host_configuration_hourly"
571
- add_index "vm_hourly_history", ["history_datetime"], :name => "idx_vm_history_datetime_hourly"
572
- add_index "vm_hourly_history", ["vm_configuration_version"], :name => "idx_vm_configuration_version_hourly"
573
- add_index "vm_hourly_history", ["vm_id"], :name => "vm_hourly_history_vm_id_idx"
574
-
575
- create_table "vm_interface_configuration", :primary_key => "history_id", :force => true do |t|
576
- t.string "vm_interface_id", :limit => nil, :null => false
577
- t.string "vm_interface_name", :limit => 50, :null => false
578
- t.string "vm_id", :limit => nil
579
- t.integer "vm_interface_type", :limit => 2
580
- t.integer "vm_interface_speed_bps"
581
- t.string "mac_address", :limit => 20
582
- t.string "network_name", :limit => 50
583
- t.integer "vm_configuration_version"
584
- t.datetime "create_date"
585
- t.datetime "update_date"
586
- t.datetime "delete_date"
587
- end
588
-
589
- add_index "vm_interface_configuration", ["vm_id"], :name => "vm_interface_configuration_vm_id_idx"
590
- add_index "vm_interface_configuration", ["vm_interface_id"], :name => "vm_interface_configuration_vm_interface_id_idx"
591
-
592
- create_table "vm_interface_daily_history", :primary_key => "history_id", :force => true do |t|
593
- t.datetime "history_datetime", :null => false
594
- t.string "vm_interface_id", :limit => nil, :null => false
595
- t.integer "receive_rate_percent", :limit => 2
596
- t.integer "max_receive_rate_percent", :limit => 2
597
- t.integer "transmit_rate_percent", :limit => 2
598
- t.integer "max_transmit_rate_percent", :limit => 2
599
- t.integer "vm_interface_configuration_version"
600
- end
601
-
602
- add_index "vm_interface_daily_history", ["history_datetime"], :name => "idx_vm_interface_history_datetime_daily"
603
- add_index "vm_interface_daily_history", ["vm_interface_configuration_version"], :name => "idx_vm_interface_configuration_version_daily"
604
- add_index "vm_interface_daily_history", ["vm_interface_id"], :name => "vm_interface_daily_history_vm_interface_id_idx"
605
-
606
- create_table "vm_interface_hourly_history", :primary_key => "history_id", :force => true do |t|
607
- t.datetime "history_datetime", :null => false
608
- t.string "vm_interface_id", :limit => nil, :null => false
609
- t.integer "receive_rate_percent", :limit => 2
610
- t.integer "max_receive_rate_percent", :limit => 2
611
- t.integer "transmit_rate_percent", :limit => 2
612
- t.integer "max_transmit_rate_percent", :limit => 2
613
- t.integer "vm_interface_configuration_version"
614
- end
615
-
616
- add_index "vm_interface_hourly_history", ["history_datetime"], :name => "idx_vm_interface_history_datetime_hourly"
617
- add_index "vm_interface_hourly_history", ["vm_interface_configuration_version"], :name => "idx_vm_interface_configuration_version_hourly"
618
- add_index "vm_interface_hourly_history", ["vm_interface_id"], :name => "vm_interface_hourly_history_vm_interface_id_idx"
619
-
620
- create_table "vm_interface_samples_history", :primary_key => "history_id", :force => true do |t|
621
- t.datetime "history_datetime", :null => false
622
- t.string "vm_interface_id", :limit => nil, :null => false
623
- t.integer "receive_rate_percent", :limit => 2
624
- t.integer "transmit_rate_percent", :limit => 2
625
- t.integer "vm_interface_configuration_version"
626
- end
627
-
628
- add_index "vm_interface_samples_history", ["history_datetime"], :name => "idx_vm_interface_history_datetime_samples"
629
- add_index "vm_interface_samples_history", ["vm_interface_configuration_version"], :name => "idx_vm_interface_configuration_version_samples"
630
- add_index "vm_interface_samples_history", ["vm_interface_id"], :name => "vm_interface_samples_history_vm_interface_id_idx"
631
-
632
- create_table "vm_samples_history", :primary_key => "history_id", :force => true do |t|
633
- t.datetime "history_datetime", :null => false
634
- t.string "vm_id", :limit => nil, :null => false
635
- t.integer "vm_status", :limit => 2, :null => false
636
- t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
637
- t.integer "cpu_usage_percent", :limit => 2, :default => 0
638
- t.integer "memory_usage_percent", :limit => 2, :default => 0
639
- t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
640
- t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
641
- t.datetime "vm_last_up_time"
642
- t.datetime "vm_last_boot_time"
643
- t.string "vm_ip"
644
- t.string "current_user_name"
645
- t.string "currently_running_on_host", :limit => nil
646
- t.integer "vm_configuration_version"
647
- t.integer "current_host_configuration_version"
648
- end
649
-
650
- add_index "vm_samples_history", ["current_host_configuration_version"], :name => "idx_vm_current_host_configuration_samples"
651
- add_index "vm_samples_history", ["history_datetime"], :name => "idx_vm_history_datetime_samples"
652
- add_index "vm_samples_history", ["vm_configuration_version"], :name => "idx_vm_configuration_version_samples"
653
- add_index "vm_samples_history", ["vm_id"], :name => "vm_samples_history_vm_id_idx"
654
-
655
- end