ovirt_metrics 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. data/.gitignore +17 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +33 -0
  6. data/Rakefile +6 -0
  7. data/lib/models/calendar.rb +4 -0
  8. data/lib/models/cluster_configuration.rb +4 -0
  9. data/lib/models/datacenter_configuration.rb +4 -0
  10. data/lib/models/datacenter_daily_history.rb +4 -0
  11. data/lib/models/datacenter_hourly_history.rb +4 -0
  12. data/lib/models/datacenter_samples_history.rb +4 -0
  13. data/lib/models/datacenter_storage_domain_map.rb +4 -0
  14. data/lib/models/disks_vm_map.rb +5 -0
  15. data/lib/models/enum_translator.rb +4 -0
  16. data/lib/models/history_configuration.rb +4 -0
  17. data/lib/models/host_configuration.rb +21 -0
  18. data/lib/models/host_daily_history.rb +4 -0
  19. data/lib/models/host_hourly_history.rb +4 -0
  20. data/lib/models/host_interface_configuration.rb +6 -0
  21. data/lib/models/host_interface_daily_history.rb +4 -0
  22. data/lib/models/host_interface_hourly_history.rb +4 -0
  23. data/lib/models/host_interface_samples_history.rb +29 -0
  24. data/lib/models/host_samples_history.rb +10 -0
  25. data/lib/models/ovirt_history.rb +18 -0
  26. data/lib/models/period.rb +4 -0
  27. data/lib/models/storage_domain_configuration.rb +4 -0
  28. data/lib/models/storage_domain_daily_history.rb +4 -0
  29. data/lib/models/storage_domain_hourly_history.rb +4 -0
  30. data/lib/models/storage_domain_samples_history.rb +4 -0
  31. data/lib/models/tag_details.rb +4 -0
  32. data/lib/models/tag_relations_history.rb +4 -0
  33. data/lib/models/vm_configuration.rb +8 -0
  34. data/lib/models/vm_daily_history.rb +4 -0
  35. data/lib/models/vm_disk_configuration.rb +4 -0
  36. data/lib/models/vm_disk_daily_history.rb +4 -0
  37. data/lib/models/vm_disk_hourly_history.rb +4 -0
  38. data/lib/models/vm_disk_samples_history.rb +18 -0
  39. data/lib/models/vm_disks_usage_daily_history.rb +4 -0
  40. data/lib/models/vm_disks_usage_hourly_history.rb +4 -0
  41. data/lib/models/vm_disks_usage_samples_history.rb +4 -0
  42. data/lib/models/vm_hourly_history.rb +4 -0
  43. data/lib/models/vm_interface_configuration.rb +6 -0
  44. data/lib/models/vm_interface_daily_history.rb +4 -0
  45. data/lib/models/vm_interface_hourly_history.rb +4 -0
  46. data/lib/models/vm_interface_samples_history.rb +29 -0
  47. data/lib/models/vm_samples_history.rb +17 -0
  48. data/lib/ovirt_metrics/constants.rb +131 -0
  49. data/lib/ovirt_metrics/version.rb +3 -0
  50. data/lib/ovirt_metrics.rb +149 -0
  51. data/ovirt_metrics.gemspec +28 -0
  52. data/spec/models/host_configuration_spec.rb +35 -0
  53. data/spec/models/host_interface_samples_history_spec.rb +37 -0
  54. data/spec/models/host_samples_history_spec.rb +51 -0
  55. data/spec/models/vm_disk_samples_history_spec.rb +46 -0
  56. data/spec/models/vm_interface_samples_history_spec.rb +37 -0
  57. data/spec/models/vm_samples_history_spec.rb +44 -0
  58. data/spec/ovirt_metrics_spec.rb +6 -0
  59. data/spec/schemas/schema_rhev30.rb +655 -0
  60. data/spec/schemas/schema_rhev31.rb +679 -0
  61. data/spec/spec_helper.rb +21 -0
  62. data/spec/support/active_record.rb +42 -0
  63. data/travis.yml +9 -0
  64. metadata +225 -0
@@ -0,0 +1,655 @@
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