ovirt_metrics 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,679 @@
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.date "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.text "value", :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 "fqdn_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
+ t.integer "number_of_sockets", :limit => 2
148
+ t.decimal "cpu_speed_mh", :precision => 18, :scale => 0
149
+ end
150
+
151
+ add_index "host_configuration", ["cluster_id"], :name => "host_configuration_cluster_id_idx"
152
+ add_index "host_configuration", ["host_id"], :name => "host_configuration_host_id_idx"
153
+
154
+ create_table "host_daily_history", :primary_key => "history_id", :force => true do |t|
155
+ t.date "history_datetime", :null => false
156
+ t.string "host_id", :limit => nil, :null => false
157
+ t.integer "host_status", :limit => 2, :null => false
158
+ t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
159
+ t.integer "memory_usage_percent", :limit => 2, :default => 0
160
+ t.integer "max_memory_usage", :limit => 2
161
+ t.integer "cpu_usage_percent", :limit => 2
162
+ t.integer "max_cpu_usage", :limit => 2
163
+ t.integer "ksm_cpu_percent", :limit => 2, :default => 0
164
+ t.integer "max_ksm_cpu_percent", :limit => 2, :default => 0
165
+ t.integer "active_vms", :limit => 2, :default => 0
166
+ t.integer "max_active_vms", :limit => 2, :default => 0
167
+ t.integer "total_vms", :limit => 2, :default => 0
168
+ t.integer "max_total_vms", :limit => 2, :default => 0
169
+ t.integer "total_vms_vcpus", :default => 0
170
+ t.integer "max_total_vms_vcpus", :default => 0
171
+ t.integer "cpu_load", :default => 0
172
+ t.integer "max_cpu_load", :default => 0
173
+ t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
174
+ t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
175
+ t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
176
+ t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
177
+ t.integer "swap_used_mb"
178
+ t.integer "max_swap_used_mb"
179
+ t.integer "host_configuration_version"
180
+ end
181
+
182
+ add_index "host_daily_history", ["history_datetime"], :name => "idx_host_history_datetime_daily"
183
+ add_index "host_daily_history", ["host_configuration_version"], :name => "idx_host_configuration_version_daily"
184
+ add_index "host_daily_history", ["host_id"], :name => "host_daily_history_host_id_idx"
185
+
186
+ create_table "host_hourly_history", :primary_key => "history_id", :force => true do |t|
187
+ t.datetime "history_datetime", :null => false
188
+ t.string "host_id", :limit => nil, :null => false
189
+ t.integer "host_status", :limit => 2, :null => false
190
+ t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
191
+ t.integer "memory_usage_percent", :limit => 2, :default => 0
192
+ t.integer "max_memory_usage", :limit => 2
193
+ t.integer "cpu_usage_percent", :limit => 2
194
+ t.integer "max_cpu_usage", :limit => 2
195
+ t.integer "ksm_cpu_percent", :limit => 2, :default => 0
196
+ t.integer "max_ksm_cpu_percent", :limit => 2, :default => 0
197
+ t.integer "active_vms", :limit => 2, :default => 0
198
+ t.integer "max_active_vms", :limit => 2, :default => 0
199
+ t.integer "total_vms", :limit => 2, :default => 0
200
+ t.integer "max_total_vms", :limit => 2, :default => 0
201
+ t.integer "total_vms_vcpus", :default => 0
202
+ t.integer "max_total_vms_vcpus", :default => 0
203
+ t.integer "cpu_load", :default => 0
204
+ t.integer "max_cpu_load", :default => 0
205
+ t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
206
+ t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
207
+ t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
208
+ t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
209
+ t.integer "swap_used_mb"
210
+ t.integer "max_swap_used_mb"
211
+ t.integer "host_configuration_version"
212
+ end
213
+
214
+ add_index "host_hourly_history", ["history_datetime"], :name => "idx_host_history_datetime_hourly"
215
+ add_index "host_hourly_history", ["host_configuration_version"], :name => "idx_host_configuration_version_hourly"
216
+ add_index "host_hourly_history", ["host_id"], :name => "host_hourly_history_host_id_idx"
217
+
218
+ create_table "host_interface_configuration", :primary_key => "history_id", :force => true do |t|
219
+ t.string "host_interface_id", :limit => nil, :null => false
220
+ t.string "host_interface_name", :limit => 50, :null => false
221
+ t.string "host_id", :limit => nil, :null => false
222
+ t.integer "host_interface_type", :limit => 2
223
+ t.integer "host_interface_speed_bps"
224
+ t.string "mac_address", :limit => 59
225
+ t.string "network_name", :limit => 50
226
+ t.string "ip_address", :limit => 20
227
+ t.string "gateway", :limit => 20
228
+ t.boolean "bond"
229
+ t.string "bond_name", :limit => 50
230
+ t.integer "vlan_id"
231
+ t.integer "host_configuration_version"
232
+ t.datetime "create_date"
233
+ t.datetime "update_date"
234
+ t.datetime "delete_date"
235
+ end
236
+
237
+ add_index "host_interface_configuration", ["host_id"], :name => "host_interface_configuration_host_id_idx"
238
+ add_index "host_interface_configuration", ["host_interface_id"], :name => "host_interface_configuration_host_interface_id_idx"
239
+
240
+ create_table "host_interface_daily_history", :primary_key => "history_id", :force => true do |t|
241
+ t.date "history_datetime", :null => false
242
+ t.string "host_interface_id", :limit => nil, :null => false
243
+ t.integer "receive_rate_percent", :limit => 2
244
+ t.integer "max_receive_rate_percent", :limit => 2
245
+ t.integer "transmit_rate_percent", :limit => 2
246
+ t.integer "max_transmit_rate_percent", :limit => 2
247
+ t.integer "host_interface_configuration_version"
248
+ end
249
+
250
+ add_index "host_interface_daily_history", ["history_datetime"], :name => "idx_host_interface_history_datetime_daily"
251
+ add_index "host_interface_daily_history", ["host_interface_configuration_version"], :name => "idx_host_interface_configuration_version_daily"
252
+ add_index "host_interface_daily_history", ["host_interface_id"], :name => "host_interface_daily_history_host_interface_id_idx"
253
+
254
+ create_table "host_interface_hourly_history", :primary_key => "history_id", :force => true do |t|
255
+ t.datetime "history_datetime", :null => false
256
+ t.string "host_interface_id", :limit => nil, :null => false
257
+ t.integer "receive_rate_percent", :limit => 2
258
+ t.integer "max_receive_rate_percent", :limit => 2
259
+ t.integer "transmit_rate_percent", :limit => 2
260
+ t.integer "max_transmit_rate_percent", :limit => 2
261
+ t.integer "host_interface_configuration_version"
262
+ end
263
+
264
+ add_index "host_interface_hourly_history", ["history_datetime"], :name => "idx_host_interface_history_datetime_hourly"
265
+ add_index "host_interface_hourly_history", ["host_interface_configuration_version"], :name => "idx_host_interface_configuration_version_hourly"
266
+ add_index "host_interface_hourly_history", ["host_interface_id"], :name => "host_interface_hourly_history_host_interface_id_idx"
267
+
268
+ create_table "host_interface_samples_history", :primary_key => "history_id", :force => true do |t|
269
+ t.datetime "history_datetime", :null => false
270
+ t.string "host_interface_id", :limit => nil, :null => false
271
+ t.integer "receive_rate_percent", :limit => 2
272
+ t.integer "transmit_rate_percent", :limit => 2
273
+ t.integer "host_interface_configuration_version"
274
+ end
275
+
276
+ add_index "host_interface_samples_history", ["history_datetime"], :name => "idx_host_interface_history_datetime_samples"
277
+ add_index "host_interface_samples_history", ["host_interface_configuration_version"], :name => "idx_host_interface_configuration_version_samples"
278
+ add_index "host_interface_samples_history", ["host_interface_id"], :name => "host_interface_samples_history_host_interface_id_idx"
279
+
280
+ create_table "host_samples_history", :primary_key => "history_id", :force => true do |t|
281
+ t.datetime "history_datetime", :null => false
282
+ t.string "host_id", :limit => nil, :null => false
283
+ t.integer "host_status", :limit => 2, :null => false
284
+ t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
285
+ t.integer "memory_usage_percent", :limit => 2, :default => 0
286
+ t.integer "cpu_usage_percent", :limit => 2
287
+ t.integer "ksm_cpu_percent", :limit => 2, :default => 0
288
+ t.integer "active_vms", :limit => 2, :default => 0
289
+ t.integer "total_vms", :limit => 2, :default => 0
290
+ t.integer "total_vms_vcpus", :default => 0
291
+ t.integer "cpu_load", :default => 0
292
+ t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
293
+ t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
294
+ t.integer "swap_used_mb"
295
+ t.integer "host_configuration_version"
296
+ end
297
+
298
+ add_index "host_samples_history", ["history_datetime"], :name => "idx_host_history_datetime_samples"
299
+ add_index "host_samples_history", ["host_configuration_version"], :name => "idx_host_configuration_version_samples"
300
+ add_index "host_samples_history", ["host_id"], :name => "host_samples_history_host_id_idx"
301
+
302
+ create_table "schema_version", :force => true do |t|
303
+ t.string "version", :limit => 10, :null => false
304
+ t.string "script", :null => false
305
+ t.string "checksum", :limit => 128
306
+ t.string "installed_by", :limit => 30, :null => false
307
+ t.datetime "started_at"
308
+ t.datetime "ended_at"
309
+ t.string "state", :limit => 15, :null => false
310
+ t.boolean "current", :null => false
311
+ t.text "comment", :default => ""
312
+ end
313
+
314
+ create_table "storage_domain_configuration", :primary_key => "history_id", :force => true do |t|
315
+ t.string "storage_domain_id", :limit => nil, :null => false
316
+ t.string "storage_domain_name", :limit => 250, :null => false
317
+ t.integer "storage_domain_type", :limit => 2, :null => false
318
+ t.integer "storage_type", :limit => 2, :null => false
319
+ t.datetime "create_date"
320
+ t.datetime "update_date"
321
+ t.datetime "delete_date"
322
+ end
323
+
324
+ add_index "storage_domain_configuration", ["storage_domain_id"], :name => "storage_domain_configuration_storage_domain_id_idx"
325
+
326
+ create_table "storage_domain_daily_history", :primary_key => "history_id", :force => true do |t|
327
+ t.date "history_datetime", :null => false
328
+ t.string "storage_domain_id", :limit => nil, :null => false
329
+ t.integer "available_disk_size_gb"
330
+ t.integer "used_disk_size_gb"
331
+ t.integer "storage_configuration_version"
332
+ end
333
+
334
+ add_index "storage_domain_daily_history", ["history_datetime"], :name => "idx_storage_domain_history_datetime_daily"
335
+ add_index "storage_domain_daily_history", ["storage_configuration_version"], :name => "idx_storage_configuration_version_daily"
336
+ add_index "storage_domain_daily_history", ["storage_domain_id"], :name => "storage_domain_daily_history_storage_domain_id_idx"
337
+
338
+ create_table "storage_domain_hourly_history", :primary_key => "history_id", :force => true do |t|
339
+ t.datetime "history_datetime", :null => false
340
+ t.string "storage_domain_id", :limit => nil, :null => false
341
+ t.integer "available_disk_size_gb"
342
+ t.integer "used_disk_size_gb"
343
+ t.integer "storage_configuration_version"
344
+ end
345
+
346
+ add_index "storage_domain_hourly_history", ["history_datetime"], :name => "idx_storage_history_datetime_hourly"
347
+ add_index "storage_domain_hourly_history", ["storage_configuration_version"], :name => "idx_storage_configuration_version_hourly"
348
+ add_index "storage_domain_hourly_history", ["storage_domain_id"], :name => "storage_domain_hourly_history_storage_domain_id_idx"
349
+
350
+ create_table "storage_domain_samples_history", :primary_key => "history_id", :force => true do |t|
351
+ t.datetime "history_datetime", :null => false
352
+ t.string "storage_domain_id", :limit => nil, :null => false
353
+ t.integer "available_disk_size_gb"
354
+ t.integer "used_disk_size_gb"
355
+ t.integer "storage_configuration_version"
356
+ end
357
+
358
+ add_index "storage_domain_samples_history", ["history_datetime"], :name => "idx_storage_history_datetime_samples"
359
+ add_index "storage_domain_samples_history", ["storage_configuration_version"], :name => "idx_storage_configuration_version_samples"
360
+ add_index "storage_domain_samples_history", ["storage_domain_id"], :name => "storage_domain_samples_history_storage_domain_id_idx"
361
+
362
+ create_table "tag_details", :primary_key => "history_id", :force => true do |t|
363
+ t.string "tag_id", :limit => nil, :null => false
364
+ t.string "tag_name", :limit => 50, :null => false
365
+ t.string "tag_description", :limit => 4000
366
+ t.string "tag_path", :limit => 4000, :null => false
367
+ t.integer "tag_level", :limit => 2, :null => false
368
+ t.datetime "create_date", :null => false
369
+ t.datetime "update_date"
370
+ t.datetime "delete_date"
371
+ end
372
+
373
+ add_index "tag_details", ["tag_id"], :name => "tag_details_tag_id_idx"
374
+ add_index "tag_details", ["tag_level"], :name => "tag_details_tag_level_idx"
375
+ add_index "tag_details", ["tag_path"], :name => "tag_details_tag_path_idx"
376
+
377
+ create_table "tag_relations_history", :primary_key => "history_id", :force => true do |t|
378
+ t.string "entity_id", :limit => nil, :null => false
379
+ t.integer "entity_type", :limit => 2, :null => false
380
+ t.string "parent_id", :limit => nil
381
+ t.datetime "attach_date", :null => false
382
+ t.datetime "detach_date"
383
+ end
384
+
385
+ add_index "tag_relations_history", ["entity_id", "attach_date"], :name => "ix_tag_relations_history"
386
+ add_index "tag_relations_history", ["entity_type"], :name => "ix_tag_relations_history_1"
387
+ add_index "tag_relations_history", ["parent_id"], :name => "tag_relations_history_parent_id_idx"
388
+
389
+ create_table "vm_configuration", :primary_key => "history_id", :force => true do |t|
390
+ t.string "vm_id", :limit => nil, :null => false
391
+ t.string "vm_name", :null => false
392
+ t.string "vm_description", :limit => 4000
393
+ t.integer "vm_type", :limit => 2
394
+ t.string "cluster_id", :limit => nil, :null => false
395
+ t.string "template_id", :limit => nil, :null => false
396
+ t.string "template_name", :limit => 40
397
+ t.integer "cpu_per_socket", :limit => 2
398
+ t.integer "number_of_sockets", :limit => 2
399
+ t.integer "memory_size_mb"
400
+ t.integer "operating_system", :limit => 2, :default => 0, :null => false
401
+ t.string "ad_domain", :limit => 40
402
+ t.string "default_host", :limit => nil
403
+ t.boolean "high_availability"
404
+ t.boolean "initialized"
405
+ t.boolean "stateless"
406
+ t.boolean "fail_back"
407
+ t.boolean "auto_suspend", :default => false
408
+ t.integer "usb_policy", :limit => 2
409
+ t.string "time_zone", :limit => 40
410
+ t.integer "cluster_configuration_version"
411
+ t.integer "default_host_configuration_version"
412
+ t.datetime "create_date"
413
+ t.datetime "update_date"
414
+ t.datetime "delete_date"
415
+ end
416
+
417
+ add_index "vm_configuration", ["cluster_id"], :name => "vm_configuration_cluster_id_idx"
418
+ add_index "vm_configuration", ["vm_id"], :name => "vm_configuration_vm_id_idx"
419
+
420
+ create_table "vm_daily_history", :primary_key => "history_id", :force => true do |t|
421
+ t.date "history_datetime", :null => false
422
+ t.string "vm_id", :limit => nil, :null => false
423
+ t.integer "vm_status", :limit => 2, :null => false
424
+ t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
425
+ t.integer "cpu_usage_percent", :limit => 2, :default => 0
426
+ t.integer "max_cpu_usage", :limit => 2
427
+ t.integer "memory_usage_percent", :limit => 2, :default => 0
428
+ t.integer "max_memory_usage", :limit => 2
429
+ t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
430
+ t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
431
+ t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
432
+ t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
433
+ t.string "vm_ip"
434
+ t.string "current_user_name"
435
+ t.string "currently_running_on_host", :limit => nil
436
+ t.integer "vm_configuration_version"
437
+ t.integer "current_host_configuration_version"
438
+ end
439
+
440
+ add_index "vm_daily_history", ["current_host_configuration_version"], :name => "idx_vm_current_host_configuration_daily"
441
+ add_index "vm_daily_history", ["history_datetime"], :name => "idx_vm_history_datetime_daily"
442
+ add_index "vm_daily_history", ["vm_configuration_version"], :name => "idx_vm_configuration_version_daily"
443
+ add_index "vm_daily_history", ["vm_id"], :name => "vm_daily_history_vm_id_idx"
444
+
445
+ create_table "vm_device_history", :primary_key => "history_id", :force => true do |t|
446
+ t.string "vm_id", :limit => nil, :null => false
447
+ t.string "device_id", :limit => nil, :null => false
448
+ t.string "type", :limit => 30, :null => false
449
+ t.string "address", :null => false
450
+ t.boolean "is_managed", :default => false, :null => false
451
+ t.boolean "is_plugged"
452
+ t.boolean "is_readonly", :default => false, :null => false
453
+ t.integer "vm_configuration_version"
454
+ t.integer "device_configuration_version"
455
+ t.datetime "create_date", :null => false
456
+ t.datetime "update_date"
457
+ t.datetime "delete_date"
458
+ end
459
+
460
+ add_index "vm_device_history", ["vm_id", "type"], :name => "idx_vm_device_history_vm_id_type"
461
+
462
+ create_table "vm_disk_configuration", :primary_key => "history_id", :force => true do |t|
463
+ t.string "image_id", :limit => nil, :null => false
464
+ t.string "storage_domain_id", :limit => nil
465
+ t.integer "vm_internal_drive_mapping", :limit => 2
466
+ t.string "vm_disk_description", :limit => 4000
467
+ t.integer "vm_disk_size_mb"
468
+ t.integer "vm_disk_type", :limit => 2
469
+ t.integer "vm_disk_format", :limit => 2
470
+ t.integer "vm_disk_interface", :limit => 2
471
+ t.datetime "create_date"
472
+ t.datetime "update_date"
473
+ t.datetime "delete_date"
474
+ t.string "vm_disk_id", :limit => nil
475
+ t.string "vm_disk_name"
476
+ t.boolean "is_shared"
477
+ end
478
+
479
+ add_index "vm_disk_configuration", ["image_id"], :name => "vm_disk_configuration_vm_disk_id_idx"
480
+ add_index "vm_disk_configuration", ["storage_domain_id"], :name => "vm_disk_configuration_storage_domain_id_idx"
481
+
482
+ create_table "vm_disk_daily_history", :primary_key => "history_id", :force => true do |t|
483
+ t.date "history_datetime", :null => false
484
+ t.string "image_id", :limit => nil, :null => false
485
+ t.integer "vm_disk_status", :limit => 2
486
+ t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
487
+ t.integer "vm_disk_actual_size_mb", :null => false
488
+ t.integer "read_rate_bytes_per_second"
489
+ t.integer "max_read_rate_bytes_per_second"
490
+ t.decimal "read_latency_seconds", :precision => 18, :scale => 9
491
+ t.decimal "max_read_latency_seconds", :precision => 18, :scale => 9
492
+ t.integer "write_rate_bytes_per_second"
493
+ t.integer "max_write_rate_bytes_per_second"
494
+ t.decimal "write_latency_seconds", :precision => 18, :scale => 9
495
+ t.decimal "max_write_latency_seconds", :precision => 18, :scale => 9
496
+ t.decimal "flush_latency_seconds", :precision => 18, :scale => 9
497
+ t.decimal "max_flush_latency_seconds", :precision => 18, :scale => 9
498
+ t.integer "vm_disk_configuration_version"
499
+ t.string "vm_disk_id", :limit => nil
500
+ end
501
+
502
+ add_index "vm_disk_daily_history", ["history_datetime"], :name => "idx_vm_disk_history_datetime_daily"
503
+ add_index "vm_disk_daily_history", ["image_id"], :name => "vm_disk_daily_history_vm_disk_id_idx"
504
+ add_index "vm_disk_daily_history", ["vm_disk_configuration_version"], :name => "idx_vm_disk_configuration_version_daily"
505
+
506
+ create_table "vm_disk_hourly_history", :primary_key => "history_id", :force => true do |t|
507
+ t.datetime "history_datetime", :null => false
508
+ t.string "image_id", :limit => nil, :null => false
509
+ t.integer "vm_disk_status", :limit => 2
510
+ t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
511
+ t.integer "vm_disk_actual_size_mb", :null => false
512
+ t.integer "read_rate_bytes_per_second"
513
+ t.integer "max_read_rate_bytes_per_second"
514
+ t.decimal "read_latency_seconds", :precision => 18, :scale => 9
515
+ t.decimal "max_read_latency_seconds", :precision => 18, :scale => 9
516
+ t.integer "write_rate_bytes_per_second"
517
+ t.integer "max_write_rate_bytes_per_second"
518
+ t.decimal "write_latency_seconds", :precision => 18, :scale => 9
519
+ t.decimal "max_write_latency_seconds", :precision => 18, :scale => 9
520
+ t.decimal "flush_latency_seconds", :precision => 18, :scale => 9
521
+ t.decimal "max_flush_latency_seconds", :precision => 18, :scale => 9
522
+ t.integer "vm_disk_configuration_version"
523
+ t.string "vm_disk_id", :limit => nil
524
+ end
525
+
526
+ add_index "vm_disk_hourly_history", ["history_datetime"], :name => "idx_vm_disk_history_datetime_hourly"
527
+ add_index "vm_disk_hourly_history", ["image_id"], :name => "vm_disk_hourly_history_vm_disk_id_idx"
528
+ add_index "vm_disk_hourly_history", ["vm_disk_configuration_version"], :name => "idx_vm_disk_configuration_version_hourly"
529
+
530
+ create_table "vm_disk_samples_history", :primary_key => "history_id", :force => true do |t|
531
+ t.datetime "history_datetime", :null => false
532
+ t.string "image_id", :limit => nil, :null => false
533
+ t.integer "vm_disk_status", :limit => 2
534
+ t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
535
+ t.integer "vm_disk_actual_size_mb", :null => false
536
+ t.integer "read_rate_bytes_per_second"
537
+ t.decimal "read_latency_seconds", :precision => 18, :scale => 9
538
+ t.integer "write_rate_bytes_per_second"
539
+ t.decimal "write_latency_seconds", :precision => 18, :scale => 9
540
+ t.decimal "flush_latency_seconds", :precision => 18, :scale => 9
541
+ t.integer "vm_disk_configuration_version"
542
+ t.string "vm_disk_id", :limit => nil
543
+ end
544
+
545
+ add_index "vm_disk_samples_history", ["history_datetime"], :name => "idx_vm_disk_history_datetime_samples"
546
+ add_index "vm_disk_samples_history", ["image_id"], :name => "vm_disk_samples_history_vm_disk_id_idx"
547
+ add_index "vm_disk_samples_history", ["vm_disk_configuration_version"], :name => "idx_vm_disk_configuration_version_samples"
548
+
549
+ create_table "vm_disks_usage_daily_history", :primary_key => "history_id", :force => true do |t|
550
+ t.datetime "history_datetime", :null => false
551
+ t.string "vm_id", :limit => nil, :null => false
552
+ t.text "disks_usage"
553
+ end
554
+
555
+ add_index "vm_disks_usage_daily_history", ["history_datetime"], :name => "idx_disks_usage_history_datetime_daily"
556
+ add_index "vm_disks_usage_daily_history", ["vm_id"], :name => "idx_disks_usage_vm_id_daily"
557
+
558
+ create_table "vm_disks_usage_hourly_history", :primary_key => "history_id", :force => true do |t|
559
+ t.datetime "history_datetime", :null => false
560
+ t.string "vm_id", :limit => nil, :null => false
561
+ t.text "disks_usage"
562
+ end
563
+
564
+ add_index "vm_disks_usage_hourly_history", ["history_datetime"], :name => "idx_disks_usage_history_datetime_hourly"
565
+ add_index "vm_disks_usage_hourly_history", ["vm_id"], :name => "idx_disks_usage_vm_id_hourly"
566
+
567
+ create_table "vm_disks_usage_samples_history", :primary_key => "history_id", :force => true do |t|
568
+ t.datetime "history_datetime", :null => false
569
+ t.string "vm_id", :limit => nil, :null => false
570
+ t.text "disks_usage"
571
+ end
572
+
573
+ add_index "vm_disks_usage_samples_history", ["history_datetime"], :name => "idx_disks_usage_history_datetime_samples"
574
+ add_index "vm_disks_usage_samples_history", ["vm_id"], :name => "idx_disks_usage_vm_id_samples"
575
+
576
+ create_table "vm_hourly_history", :primary_key => "history_id", :force => true do |t|
577
+ t.datetime "history_datetime", :null => false
578
+ t.string "vm_id", :limit => nil, :null => false
579
+ t.integer "vm_status", :limit => 2, :null => false
580
+ t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
581
+ t.integer "cpu_usage_percent", :limit => 2, :default => 0
582
+ t.integer "max_cpu_usage", :limit => 2
583
+ t.integer "memory_usage_percent", :limit => 2, :default => 0
584
+ t.integer "max_memory_usage", :limit => 2
585
+ t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
586
+ t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
587
+ t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
588
+ t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
589
+ t.string "vm_ip"
590
+ t.string "current_user_name"
591
+ t.string "currently_running_on_host", :limit => nil
592
+ t.integer "vm_configuration_version"
593
+ t.integer "current_host_configuration_version"
594
+ end
595
+
596
+ add_index "vm_hourly_history", ["current_host_configuration_version"], :name => "idx_vm_current_host_configuration_hourly"
597
+ add_index "vm_hourly_history", ["history_datetime"], :name => "idx_vm_history_datetime_hourly"
598
+ add_index "vm_hourly_history", ["vm_configuration_version"], :name => "idx_vm_configuration_version_hourly"
599
+ add_index "vm_hourly_history", ["vm_id"], :name => "vm_hourly_history_vm_id_idx"
600
+
601
+ create_table "vm_interface_configuration", :primary_key => "history_id", :force => true do |t|
602
+ t.string "vm_interface_id", :limit => nil, :null => false
603
+ t.string "vm_interface_name", :limit => 50, :null => false
604
+ t.string "vm_id", :limit => nil
605
+ t.integer "vm_interface_type", :limit => 2
606
+ t.integer "vm_interface_speed_bps"
607
+ t.string "mac_address", :limit => 20
608
+ t.string "network_name", :limit => 50
609
+ t.integer "vm_configuration_version"
610
+ t.datetime "create_date"
611
+ t.datetime "update_date"
612
+ t.datetime "delete_date"
613
+ end
614
+
615
+ add_index "vm_interface_configuration", ["vm_id"], :name => "vm_interface_configuration_vm_id_idx"
616
+ add_index "vm_interface_configuration", ["vm_interface_id"], :name => "vm_interface_configuration_vm_interface_id_idx"
617
+
618
+ create_table "vm_interface_daily_history", :primary_key => "history_id", :force => true do |t|
619
+ t.date "history_datetime", :null => false
620
+ t.string "vm_interface_id", :limit => nil, :null => false
621
+ t.integer "receive_rate_percent", :limit => 2
622
+ t.integer "max_receive_rate_percent", :limit => 2
623
+ t.integer "transmit_rate_percent", :limit => 2
624
+ t.integer "max_transmit_rate_percent", :limit => 2
625
+ t.integer "vm_interface_configuration_version"
626
+ end
627
+
628
+ add_index "vm_interface_daily_history", ["history_datetime"], :name => "idx_vm_interface_history_datetime_daily"
629
+ add_index "vm_interface_daily_history", ["vm_interface_configuration_version"], :name => "idx_vm_interface_configuration_version_daily"
630
+ add_index "vm_interface_daily_history", ["vm_interface_id"], :name => "vm_interface_daily_history_vm_interface_id_idx"
631
+
632
+ create_table "vm_interface_hourly_history", :primary_key => "history_id", :force => true do |t|
633
+ t.datetime "history_datetime", :null => false
634
+ t.string "vm_interface_id", :limit => nil, :null => false
635
+ t.integer "receive_rate_percent", :limit => 2
636
+ t.integer "max_receive_rate_percent", :limit => 2
637
+ t.integer "transmit_rate_percent", :limit => 2
638
+ t.integer "max_transmit_rate_percent", :limit => 2
639
+ t.integer "vm_interface_configuration_version"
640
+ end
641
+
642
+ add_index "vm_interface_hourly_history", ["history_datetime"], :name => "idx_vm_interface_history_datetime_hourly"
643
+ add_index "vm_interface_hourly_history", ["vm_interface_configuration_version"], :name => "idx_vm_interface_configuration_version_hourly"
644
+ add_index "vm_interface_hourly_history", ["vm_interface_id"], :name => "vm_interface_hourly_history_vm_interface_id_idx"
645
+
646
+ create_table "vm_interface_samples_history", :primary_key => "history_id", :force => true do |t|
647
+ t.datetime "history_datetime", :null => false
648
+ t.string "vm_interface_id", :limit => nil, :null => false
649
+ t.integer "receive_rate_percent", :limit => 2
650
+ t.integer "transmit_rate_percent", :limit => 2
651
+ t.integer "vm_interface_configuration_version"
652
+ end
653
+
654
+ add_index "vm_interface_samples_history", ["history_datetime"], :name => "idx_vm_interface_history_datetime_samples"
655
+ add_index "vm_interface_samples_history", ["vm_interface_configuration_version"], :name => "idx_vm_interface_configuration_version_samples"
656
+ add_index "vm_interface_samples_history", ["vm_interface_id"], :name => "vm_interface_samples_history_vm_interface_id_idx"
657
+
658
+ create_table "vm_samples_history", :primary_key => "history_id", :force => true do |t|
659
+ t.datetime "history_datetime", :null => false
660
+ t.string "vm_id", :limit => nil, :null => false
661
+ t.integer "vm_status", :limit => 2, :null => false
662
+ t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
663
+ t.integer "cpu_usage_percent", :limit => 2, :default => 0
664
+ t.integer "memory_usage_percent", :limit => 2, :default => 0
665
+ t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
666
+ t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
667
+ t.string "vm_ip"
668
+ t.string "current_user_name"
669
+ t.string "currently_running_on_host", :limit => nil
670
+ t.integer "vm_configuration_version"
671
+ t.integer "current_host_configuration_version"
672
+ end
673
+
674
+ add_index "vm_samples_history", ["current_host_configuration_version"], :name => "idx_vm_current_host_configuration_samples"
675
+ add_index "vm_samples_history", ["history_datetime"], :name => "idx_vm_history_datetime_samples"
676
+ add_index "vm_samples_history", ["vm_configuration_version"], :name => "idx_vm_configuration_version_samples"
677
+ add_index "vm_samples_history", ["vm_id"], :name => "vm_samples_history_vm_id_idx"
678
+
679
+ end