oneacct-export 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +11 -0
  6. data/Rakefile +18 -0
  7. data/bin/oneacct-export +72 -0
  8. data/config/conf.yml +53 -0
  9. data/config/sidekiq.yml +6 -0
  10. data/lib/errors.rb +7 -0
  11. data/lib/errors/authentication_error.rb +3 -0
  12. data/lib/errors/resource_not_found_error.rb +3 -0
  13. data/lib/errors/resource_retrieval_error.rb +3 -0
  14. data/lib/errors/resource_state_error.rb +3 -0
  15. data/lib/errors/user_not_authorized_error.rb +3 -0
  16. data/lib/input_validator.rb +18 -0
  17. data/lib/one_data_accessor.rb +147 -0
  18. data/lib/one_worker.rb +181 -0
  19. data/lib/one_writer.rb +51 -0
  20. data/lib/oneacct_exporter.rb +88 -0
  21. data/lib/oneacct_exporter/log.rb +15 -0
  22. data/lib/oneacct_exporter/version.rb +3 -0
  23. data/lib/oneacct_opts.rb +131 -0
  24. data/lib/redis_conf.rb +29 -0
  25. data/lib/settings.rb +13 -0
  26. data/lib/sidekiq_conf.rb +11 -0
  27. data/lib/templates/apel-0.2.erb +30 -0
  28. data/mock/one_worker_DEPLOY_ID_missing.xml +136 -0
  29. data/mock/one_worker_DISK_missing.xml +119 -0
  30. data/mock/one_worker_ETIME_0.xml +137 -0
  31. data/mock/one_worker_ETIME_missing.xml +136 -0
  32. data/mock/one_worker_ETIME_nan.xml +137 -0
  33. data/mock/one_worker_GID_missing.xml +136 -0
  34. data/mock/one_worker_GNAME_missing.xml +136 -0
  35. data/mock/one_worker_HISTORY_RECORDS_missing.xml +91 -0
  36. data/mock/one_worker_HISTORY_many.xml +137 -0
  37. data/mock/one_worker_HISTORY_missing.xml +93 -0
  38. data/mock/one_worker_HISTORY_one.xml +115 -0
  39. data/mock/one_worker_IMAGE_ID_missing.xml +136 -0
  40. data/mock/one_worker_MEMORY_0.xml +137 -0
  41. data/mock/one_worker_MEMORY_missing.xml +136 -0
  42. data/mock/one_worker_MEMORY_nan.xml +137 -0
  43. data/mock/one_worker_NET_RX_0.xml +137 -0
  44. data/mock/one_worker_NET_RX_missing.xml +136 -0
  45. data/mock/one_worker_NET_RX_nan.xml +137 -0
  46. data/mock/one_worker_NET_TX_0.xml +137 -0
  47. data/mock/one_worker_NET_TX_missing.xml +136 -0
  48. data/mock/one_worker_NET_TX_nan.xml +137 -0
  49. data/mock/one_worker_RETIME_0.xml +115 -0
  50. data/mock/one_worker_RETIME_missing.xml +114 -0
  51. data/mock/one_worker_RSTIME_0.xml +115 -0
  52. data/mock/one_worker_RSTIME_>_RETIME.xml +115 -0
  53. data/mock/one_worker_RSTIME_missing.xml +114 -0
  54. data/mock/one_worker_STATE_missing.xml +136 -0
  55. data/mock/one_worker_STATE_out_of_range.xml +137 -0
  56. data/mock/one_worker_STIME_>_ETIME.xml +137 -0
  57. data/mock/one_worker_STIME_missing.xml +136 -0
  58. data/mock/one_worker_STIME_nan.xml +137 -0
  59. data/mock/one_worker_TEMPLATE_missing.xml +79 -0
  60. data/mock/one_worker_UID_missing.xml +136 -0
  61. data/mock/one_worker_VCPU_0.xml +137 -0
  62. data/mock/one_worker_VCPU_missing.xml +136 -0
  63. data/mock/one_worker_VCPU_nan.xml +137 -0
  64. data/mock/one_worker_malformed_vm.xml +136 -0
  65. data/mock/one_worker_valid_machine.xml +137 -0
  66. data/mock/one_worker_vm1.xml +137 -0
  67. data/mock/one_worker_vm2.xml +137 -0
  68. data/mock/one_worker_vm3.xml +137 -0
  69. data/mock/one_writer_testfile +2 -0
  70. data/oneacct-export.gemspec +31 -0
  71. data/spec/one_data_accessor_spec.rb +441 -0
  72. data/spec/one_worker_spec.rb +684 -0
  73. data/spec/one_writer_spec.rb +146 -0
  74. data/spec/oneacct_exporter_spec.rb +262 -0
  75. data/spec/oneacct_opts_spec.rb +229 -0
  76. data/spec/redis_conf_spec.rb +94 -0
  77. data/spec/spec_helper.rb +11 -0
  78. metadata +254 -0
@@ -0,0 +1,136 @@
1
+ <VM>
2
+ <ID>36551</ID>
3
+ <UID>120</UID>
4
+ <GID>0</GID>
5
+ <UNAME>uname</UNAME>
6
+ <GNAME>gname</GNAME>
7
+ <NAME>one-36551</NAME>
8
+ <PERMISSIONS>
9
+ <OWNER_U>1</OWNER_U>
10
+ <OWNER_M>1</OWNER_M>
11
+ <OWNER_A>0</OWNER_A>
12
+ <GROUP_U>0</GROUP_U>
13
+ <GROUP_M>0</GROUP_M>
14
+ <GROUP_A>0</GROUP_A>
15
+ <OTHER_U>0</OTHER_U>
16
+ <OTHER_M>0</OTHER_M>
17
+ <OTHER_A>0</OTHER_A>
18
+ </PERMISSIONS>
19
+ <LAST_POLL>1383741679</LAST_POLL>
20
+ <STATE>6</STATE>
21
+ <LCM_STATE>0</LCM_STATE>
22
+ <RESCHED>0</RESCHED>
23
+ <ETIME>1383742270</ETIME>
24
+ <DEPLOY_ID>one-36551</DEPLOY_ID>
25
+ <MEMORY>1736960</MEMORY>
26
+ <CPU>0</CPU>
27
+ <NET_TX>0</NET_TX>
28
+ <NET_RX>0</NET_RX>
29
+ <TEMPLATE>
30
+ <CONTEXT>
31
+ <DISK_ID><![CDATA[1]]></DISK_ID>
32
+ <FILES><![CDATA[https://somewhere.com/init.sh]]></FILES>
33
+ <HOSTNAME><![CDATA[DebianVM]]></HOSTNAME>
34
+ <PUBLIC_IP><![CDATA[123.123.5.5]]></PUBLIC_IP>
35
+ <SSH_KEY><![CDATA[ssh-rsa AAAAB3NzaC1yc2EAAAADAQABasdgsdfhfgjhxhcHPNFthrHT5/+9lfrQCorJy5YjMJEGBC22dfgjghkDjSDFgjdhgKd54645dfJKd39LdlyzlEaCnjGUeD4C6tZdAISLSDfghSDFgSJ54sSFGJ5RTHARJIRJcX8QRVH46Zq02AeTgrty567ss34tqaa8Pt user@machine1.somewhere.com]]></SSH_KEY>
36
+ <TARGET><![CDATA[xvdb]]></TARGET>
37
+ </CONTEXT>
38
+ <CPU><![CDATA[0.5]]></CPU>
39
+ <DISK>
40
+ <BUS><![CDATA[ide]]></BUS>
41
+ <CLONE><![CDATA[YES]]></CLONE>
42
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
43
+ <DATASTORE><![CDATA[default]]></DATASTORE>
44
+ <DATASTORE_ID><![CDATA[1]]></DATASTORE_ID>
45
+ <DEV_PREFIX><![CDATA[xvd]]></DEV_PREFIX>
46
+ <DISK_ID><![CDATA[0]]></DISK_ID>
47
+ <DRIVER><![CDATA[tap2:tapdisk:aio:]]></DRIVER>
48
+ <IMAGE><![CDATA[debian6]]></IMAGE>
49
+ <IMAGE_ID><![CDATA[31]]></IMAGE_ID>
50
+ <READONLY><![CDATA[NO]]></READONLY>
51
+ <SAVE><![CDATA[NO]]></SAVE>
52
+ <SOURCE><![CDATA[/opt/opennebula/var/datastores/1/bc8db254875412f417ac745b7d47820]]></SOURCE>
53
+ <TARGET><![CDATA[xvda]]></TARGET>
54
+ <TM_MAD><![CDATA[ssh]]></TM_MAD>
55
+ <TYPE><![CDATA[FILE]]></TYPE>
56
+ </DISK>
57
+ <ERROR>
58
+ <MESSAGE><![CDATA[Error executing image transfer script: Path https://somewhere.com/init.sh is not allowed!]]></MESSAGE>
59
+ <TIMESTAMP><![CDATA[Wed Nov 6 13:34:19 2013]]></TIMESTAMP>
60
+ </ERROR>
61
+ <FEATURES>
62
+ <ACPI><![CDATA[no]]></ACPI>
63
+ </FEATURES>
64
+ <MEMORY>1736960</MEMORY>
65
+ <NAME><![CDATA[one-36551]]></NAME>
66
+ <NIC>
67
+ <BRIDGE><![CDATA[xenbr0]]></BRIDGE>
68
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
69
+ <IP><![CDATA[123.123.5.5]]></IP>
70
+ <MAC><![CDATA[01:23:45:67:89:ab]]></MAC>
71
+ <NETWORK><![CDATA[public]]></NETWORK>
72
+ <NETWORK_ID><![CDATA[4]]></NETWORK_ID>
73
+ <VLAN><![CDATA[NO]]></VLAN>
74
+ <WHITE_PORTS_TCP><![CDATA[22]]></WHITE_PORTS_TCP>
75
+ <WHITE_PORTS_UDP><![CDATA[67,68]]></WHITE_PORTS_UDP>
76
+ </NIC>
77
+ <OS>
78
+ <BOOTLOADER><![CDATA[pygrub]]></BOOTLOADER>
79
+ </OS>
80
+ <RAW>
81
+ <TYPE><![CDATA[xen]]></TYPE>
82
+ </RAW>
83
+ <TEMPLATE_ID><![CDATA[66]]></TEMPLATE_ID>
84
+ <VCPU><![CDATA[1]]></VCPU>
85
+ <VMID><![CDATA[36551]]></VMID>
86
+ </TEMPLATE>
87
+ <USER_TEMPLATE>
88
+ <SCHED_REQUIREMENTS><![CDATA[CLUSTER_ID = 100]]></SCHED_REQUIREMENTS>
89
+ </USER_TEMPLATE>
90
+ <HISTORY_RECORDS>
91
+ <HISTORY>
92
+ <OID>36551</OID>
93
+ <SEQ>0</SEQ>
94
+ <HOSTNAME>supermachine1.somewhere.com</HOSTNAME>
95
+ <HID>11</HID>
96
+ <CID>100</CID>
97
+ <STIME>1383741169</STIME>
98
+ <ETIME>1383741259</ETIME>
99
+ <VMMMAD>vmm_xen</VMMMAD>
100
+ <VNMMAD>fw</VNMMAD>
101
+ <TMMAD>ssh</TMMAD>
102
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
103
+ <DS_ID>0</DS_ID>
104
+ <PSTIME>1383741169</PSTIME>
105
+ <PETIME>1383741259</PETIME>
106
+ <RSTIME>0</RSTIME>
107
+ <RETIME>0</RETIME>
108
+ <ESTIME>0</ESTIME>
109
+ <EETIME>0</EETIME>
110
+ <REASON>1</REASON>
111
+ <ACTION>0</ACTION>
112
+ </HISTORY>
113
+ <HISTORY>
114
+ <OID>36551</OID>
115
+ <SEQ>1</SEQ>
116
+ <HOSTNAME>supermachine1.somewhere.com</HOSTNAME>
117
+ <HID>11</HID>
118
+ <CID>100</CID>
119
+ <STIME>1383741589</STIME>
120
+ <ETIME>1383742270</ETIME>
121
+ <VMMMAD>vmm_xen</VMMMAD>
122
+ <VNMMAD>fw</VNMMAD>
123
+ <TMMAD>ssh</TMMAD>
124
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
125
+ <DS_ID>0</DS_ID>
126
+ <PSTIME>1383741589</PSTIME>
127
+ <PETIME>1383741674</PETIME>
128
+ <RSTIME>1383741674</RSTIME>
129
+ <RETIME>1383742270</RETIME>
130
+ <ESTIME>1383742270</ESTIME>
131
+ <EETIME>1383742270</EETIME>
132
+ <REASON>0</REASON>
133
+ <ACTION>0</ACTION>
134
+ </HISTORY>
135
+ </HISTORY_RECORDS>
136
+ </VM>
@@ -0,0 +1,137 @@
1
+ <VM>
2
+ <ID>36551</ID>
3
+ <UID>120</UID>
4
+ <GID>0</GID>
5
+ <UNAME>uname</UNAME>
6
+ <GNAME>gname</GNAME>
7
+ <NAME>one-36551</NAME>
8
+ <PERMISSIONS>
9
+ <OWNER_U>1</OWNER_U>
10
+ <OWNER_M>1</OWNER_M>
11
+ <OWNER_A>0</OWNER_A>
12
+ <GROUP_U>0</GROUP_U>
13
+ <GROUP_M>0</GROUP_M>
14
+ <GROUP_A>0</GROUP_A>
15
+ <OTHER_U>0</OTHER_U>
16
+ <OTHER_M>0</OTHER_M>
17
+ <OTHER_A>0</OTHER_A>
18
+ </PERMISSIONS>
19
+ <LAST_POLL>1383741679</LAST_POLL>
20
+ <STATE>6</STATE>
21
+ <LCM_STATE>0</LCM_STATE>
22
+ <RESCHED>0</RESCHED>
23
+ <STIME>not_a_number</STIME>
24
+ <ETIME>1383742270</ETIME>
25
+ <DEPLOY_ID>one-36551</DEPLOY_ID>
26
+ <MEMORY>1736960</MEMORY>
27
+ <CPU>0</CPU>
28
+ <NET_TX>0</NET_TX>
29
+ <NET_RX>0</NET_RX>
30
+ <TEMPLATE>
31
+ <CONTEXT>
32
+ <DISK_ID><![CDATA[1]]></DISK_ID>
33
+ <FILES><![CDATA[https://somewhere.com/init.sh]]></FILES>
34
+ <HOSTNAME><![CDATA[DebianVM]]></HOSTNAME>
35
+ <PUBLIC_IP><![CDATA[123.123.5.5]]></PUBLIC_IP>
36
+ <SSH_KEY><![CDATA[ssh-rsa AAAAB3NzaC1yc2EAAAADAQABasdgsdfhfgjhxhcHPNFthrHT5/+9lfrQCorJy5YjMJEGBC22dfgjghkDjSDFgjdhgKd54645dfJKd39LdlyzlEaCnjGUeD4C6tZdAISLSDfghSDFgSJ54sSFGJ5RTHARJIRJcX8QRVH46Zq02AeTgrty567ss34tqaa8Pt user@machine1.somewhere.com]]></SSH_KEY>
37
+ <TARGET><![CDATA[xvdb]]></TARGET>
38
+ </CONTEXT>
39
+ <CPU><![CDATA[0.5]]></CPU>
40
+ <DISK>
41
+ <BUS><![CDATA[ide]]></BUS>
42
+ <CLONE><![CDATA[YES]]></CLONE>
43
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
44
+ <DATASTORE><![CDATA[default]]></DATASTORE>
45
+ <DATASTORE_ID><![CDATA[1]]></DATASTORE_ID>
46
+ <DEV_PREFIX><![CDATA[xvd]]></DEV_PREFIX>
47
+ <DISK_ID><![CDATA[0]]></DISK_ID>
48
+ <DRIVER><![CDATA[tap2:tapdisk:aio:]]></DRIVER>
49
+ <IMAGE><![CDATA[debian6]]></IMAGE>
50
+ <IMAGE_ID><![CDATA[31]]></IMAGE_ID>
51
+ <READONLY><![CDATA[NO]]></READONLY>
52
+ <SAVE><![CDATA[NO]]></SAVE>
53
+ <SOURCE><![CDATA[/opt/opennebula/var/datastores/1/bc8db254875412f417ac745b7d47820]]></SOURCE>
54
+ <TARGET><![CDATA[xvda]]></TARGET>
55
+ <TM_MAD><![CDATA[ssh]]></TM_MAD>
56
+ <TYPE><![CDATA[FILE]]></TYPE>
57
+ </DISK>
58
+ <ERROR>
59
+ <MESSAGE><![CDATA[Error executing image transfer script: Path https://somewhere.com/init.sh is not allowed!]]></MESSAGE>
60
+ <TIMESTAMP><![CDATA[Wed Nov 6 13:34:19 2013]]></TIMESTAMP>
61
+ </ERROR>
62
+ <FEATURES>
63
+ <ACPI><![CDATA[no]]></ACPI>
64
+ </FEATURES>
65
+ <MEMORY>1736960</MEMORY>
66
+ <NAME><![CDATA[one-36551]]></NAME>
67
+ <NIC>
68
+ <BRIDGE><![CDATA[xenbr0]]></BRIDGE>
69
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
70
+ <IP><![CDATA[123.123.5.5]]></IP>
71
+ <MAC><![CDATA[01:23:45:67:89:ab]]></MAC>
72
+ <NETWORK><![CDATA[public]]></NETWORK>
73
+ <NETWORK_ID><![CDATA[4]]></NETWORK_ID>
74
+ <VLAN><![CDATA[NO]]></VLAN>
75
+ <WHITE_PORTS_TCP><![CDATA[22]]></WHITE_PORTS_TCP>
76
+ <WHITE_PORTS_UDP><![CDATA[67,68]]></WHITE_PORTS_UDP>
77
+ </NIC>
78
+ <OS>
79
+ <BOOTLOADER><![CDATA[pygrub]]></BOOTLOADER>
80
+ </OS>
81
+ <RAW>
82
+ <TYPE><![CDATA[xen]]></TYPE>
83
+ </RAW>
84
+ <TEMPLATE_ID><![CDATA[66]]></TEMPLATE_ID>
85
+ <VCPU><![CDATA[1]]></VCPU>
86
+ <VMID><![CDATA[36551]]></VMID>
87
+ </TEMPLATE>
88
+ <USER_TEMPLATE>
89
+ <SCHED_REQUIREMENTS><![CDATA[CLUSTER_ID = 100]]></SCHED_REQUIREMENTS>
90
+ </USER_TEMPLATE>
91
+ <HISTORY_RECORDS>
92
+ <HISTORY>
93
+ <OID>36551</OID>
94
+ <SEQ>0</SEQ>
95
+ <HOSTNAME>supermachine1.somewhere.com</HOSTNAME>
96
+ <HID>11</HID>
97
+ <CID>100</CID>
98
+ <STIME>1383741169</STIME>
99
+ <ETIME>1383741259</ETIME>
100
+ <VMMMAD>vmm_xen</VMMMAD>
101
+ <VNMMAD>fw</VNMMAD>
102
+ <TMMAD>ssh</TMMAD>
103
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
104
+ <DS_ID>0</DS_ID>
105
+ <PSTIME>1383741169</PSTIME>
106
+ <PETIME>1383741259</PETIME>
107
+ <RSTIME>0</RSTIME>
108
+ <RETIME>0</RETIME>
109
+ <ESTIME>0</ESTIME>
110
+ <EETIME>0</EETIME>
111
+ <REASON>1</REASON>
112
+ <ACTION>0</ACTION>
113
+ </HISTORY>
114
+ <HISTORY>
115
+ <OID>36551</OID>
116
+ <SEQ>1</SEQ>
117
+ <HOSTNAME>supermachine1.somewhere.com</HOSTNAME>
118
+ <HID>11</HID>
119
+ <CID>100</CID>
120
+ <STIME>1383741589</STIME>
121
+ <ETIME>1383742270</ETIME>
122
+ <VMMMAD>vmm_xen</VMMMAD>
123
+ <VNMMAD>fw</VNMMAD>
124
+ <TMMAD>ssh</TMMAD>
125
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
126
+ <DS_ID>0</DS_ID>
127
+ <PSTIME>1383741589</PSTIME>
128
+ <PETIME>1383741674</PETIME>
129
+ <RSTIME>1383741674</RSTIME>
130
+ <RETIME>1383742270</RETIME>
131
+ <ESTIME>1383742270</ESTIME>
132
+ <EETIME>1383742270</EETIME>
133
+ <REASON>0</REASON>
134
+ <ACTION>0</ACTION>
135
+ </HISTORY>
136
+ </HISTORY_RECORDS>
137
+ </VM>
@@ -0,0 +1,79 @@
1
+ <VM>
2
+ <ID>36551</ID>
3
+ <UID>120</UID>
4
+ <GID>0</GID>
5
+ <UNAME>uname</UNAME>
6
+ <GNAME>gname</GNAME>
7
+ <NAME>one-36551</NAME>
8
+ <PERMISSIONS>
9
+ <OWNER_U>1</OWNER_U>
10
+ <OWNER_M>1</OWNER_M>
11
+ <OWNER_A>0</OWNER_A>
12
+ <GROUP_U>0</GROUP_U>
13
+ <GROUP_M>0</GROUP_M>
14
+ <GROUP_A>0</GROUP_A>
15
+ <OTHER_U>0</OTHER_U>
16
+ <OTHER_M>0</OTHER_M>
17
+ <OTHER_A>0</OTHER_A>
18
+ </PERMISSIONS>
19
+ <LAST_POLL>1383741679</LAST_POLL>
20
+ <STATE>6</STATE>
21
+ <LCM_STATE>0</LCM_STATE>
22
+ <RESCHED>0</RESCHED>
23
+ <STIME>1383741160</STIME>
24
+ <ETIME>1383742270</ETIME>
25
+ <DEPLOY_ID>one-36551</DEPLOY_ID>
26
+ <MEMORY>1736960</MEMORY>
27
+ <CPU>0</CPU>
28
+ <NET_TX>0</NET_TX>
29
+ <NET_RX>0</NET_RX>
30
+ <USER_TEMPLATE>
31
+ <SCHED_REQUIREMENTS><![CDATA[CLUSTER_ID = 100]]></SCHED_REQUIREMENTS>
32
+ </USER_TEMPLATE>
33
+ <HISTORY_RECORDS>
34
+ <HISTORY>
35
+ <OID>36551</OID>
36
+ <SEQ>0</SEQ>
37
+ <HOSTNAME>supermachine1.somewhere.com</HOSTNAME>
38
+ <HID>11</HID>
39
+ <CID>100</CID>
40
+ <STIME>1383741169</STIME>
41
+ <ETIME>1383741259</ETIME>
42
+ <VMMMAD>vmm_xen</VMMMAD>
43
+ <VNMMAD>fw</VNMMAD>
44
+ <TMMAD>ssh</TMMAD>
45
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
46
+ <DS_ID>0</DS_ID>
47
+ <PSTIME>1383741169</PSTIME>
48
+ <PETIME>1383741259</PETIME>
49
+ <RSTIME>0</RSTIME>
50
+ <RETIME>0</RETIME>
51
+ <ESTIME>0</ESTIME>
52
+ <EETIME>0</EETIME>
53
+ <REASON>1</REASON>
54
+ <ACTION>0</ACTION>
55
+ </HISTORY>
56
+ <HISTORY>
57
+ <OID>36551</OID>
58
+ <SEQ>1</SEQ>
59
+ <HOSTNAME>supermachine1.somewhere.com</HOSTNAME>
60
+ <HID>11</HID>
61
+ <CID>100</CID>
62
+ <STIME>1383741589</STIME>
63
+ <ETIME>1383742270</ETIME>
64
+ <VMMMAD>vmm_xen</VMMMAD>
65
+ <VNMMAD>fw</VNMMAD>
66
+ <TMMAD>ssh</TMMAD>
67
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
68
+ <DS_ID>0</DS_ID>
69
+ <PSTIME>1383741589</PSTIME>
70
+ <PETIME>1383741674</PETIME>
71
+ <RSTIME>1383741674</RSTIME>
72
+ <RETIME>1383742270</RETIME>
73
+ <ESTIME>1383742270</ESTIME>
74
+ <EETIME>1383742270</EETIME>
75
+ <REASON>0</REASON>
76
+ <ACTION>0</ACTION>
77
+ </HISTORY>
78
+ </HISTORY_RECORDS>
79
+ </VM>
@@ -0,0 +1,136 @@
1
+ <VM>
2
+ <ID>36551</ID>
3
+ <GID>0</GID>
4
+ <UNAME>uname</UNAME>
5
+ <GNAME>gname</GNAME>
6
+ <NAME>one-36551</NAME>
7
+ <PERMISSIONS>
8
+ <OWNER_U>1</OWNER_U>
9
+ <OWNER_M>1</OWNER_M>
10
+ <OWNER_A>0</OWNER_A>
11
+ <GROUP_U>0</GROUP_U>
12
+ <GROUP_M>0</GROUP_M>
13
+ <GROUP_A>0</GROUP_A>
14
+ <OTHER_U>0</OTHER_U>
15
+ <OTHER_M>0</OTHER_M>
16
+ <OTHER_A>0</OTHER_A>
17
+ </PERMISSIONS>
18
+ <LAST_POLL>1383741679</LAST_POLL>
19
+ <STATE>6</STATE>
20
+ <LCM_STATE>0</LCM_STATE>
21
+ <RESCHED>0</RESCHED>
22
+ <STIME>1383741160</STIME>
23
+ <ETIME>1383742270</ETIME>
24
+ <DEPLOY_ID>one-36551</DEPLOY_ID>
25
+ <MEMORY>1736960</MEMORY>
26
+ <CPU>0</CPU>
27
+ <NET_TX>0</NET_TX>
28
+ <NET_RX>0</NET_RX>
29
+ <TEMPLATE>
30
+ <CONTEXT>
31
+ <DISK_ID><![CDATA[1]]></DISK_ID>
32
+ <FILES><![CDATA[https://somewhere.com/init.sh]]></FILES>
33
+ <HOSTNAME><![CDATA[DebianVM]]></HOSTNAME>
34
+ <PUBLIC_IP><![CDATA[123.123.5.5]]></PUBLIC_IP>
35
+ <SSH_KEY><![CDATA[ssh-rsa AAAAB3NzaC1yc2EAAAADAQABasdgsdfhfgjhxhcHPNFthrHT5/+9lfrQCorJy5YjMJEGBC22dfgjghkDjSDFgjdhgKd54645dfJKd39LdlyzlEaCnjGUeD4C6tZdAISLSDfghSDFgSJ54sSFGJ5RTHARJIRJcX8QRVH46Zq02AeTgrty567ss34tqaa8Pt user@machine1.somewhere.com]]></SSH_KEY>
36
+ <TARGET><![CDATA[xvdb]]></TARGET>
37
+ </CONTEXT>
38
+ <CPU><![CDATA[0.5]]></CPU>
39
+ <DISK>
40
+ <BUS><![CDATA[ide]]></BUS>
41
+ <CLONE><![CDATA[YES]]></CLONE>
42
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
43
+ <DATASTORE><![CDATA[default]]></DATASTORE>
44
+ <DATASTORE_ID><![CDATA[1]]></DATASTORE_ID>
45
+ <DEV_PREFIX><![CDATA[xvd]]></DEV_PREFIX>
46
+ <DISK_ID><![CDATA[0]]></DISK_ID>
47
+ <DRIVER><![CDATA[tap2:tapdisk:aio:]]></DRIVER>
48
+ <IMAGE><![CDATA[debian6]]></IMAGE>
49
+ <IMAGE_ID><![CDATA[31]]></IMAGE_ID>
50
+ <READONLY><![CDATA[NO]]></READONLY>
51
+ <SAVE><![CDATA[NO]]></SAVE>
52
+ <SOURCE><![CDATA[/opt/opennebula/var/datastores/1/bc8db254875412f417ac745b7d47820]]></SOURCE>
53
+ <TARGET><![CDATA[xvda]]></TARGET>
54
+ <TM_MAD><![CDATA[ssh]]></TM_MAD>
55
+ <TYPE><![CDATA[FILE]]></TYPE>
56
+ </DISK>
57
+ <ERROR>
58
+ <MESSAGE><![CDATA[Error executing image transfer script: Path https://somewhere.com/init.sh is not allowed!]]></MESSAGE>
59
+ <TIMESTAMP><![CDATA[Wed Nov 6 13:34:19 2013]]></TIMESTAMP>
60
+ </ERROR>
61
+ <FEATURES>
62
+ <ACPI><![CDATA[no]]></ACPI>
63
+ </FEATURES>
64
+ <MEMORY>1736960</MEMORY>
65
+ <NAME><![CDATA[one-36551]]></NAME>
66
+ <NIC>
67
+ <BRIDGE><![CDATA[xenbr0]]></BRIDGE>
68
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
69
+ <IP><![CDATA[123.123.5.5]]></IP>
70
+ <MAC><![CDATA[01:23:45:67:89:ab]]></MAC>
71
+ <NETWORK><![CDATA[public]]></NETWORK>
72
+ <NETWORK_ID><![CDATA[4]]></NETWORK_ID>
73
+ <VLAN><![CDATA[NO]]></VLAN>
74
+ <WHITE_PORTS_TCP><![CDATA[22]]></WHITE_PORTS_TCP>
75
+ <WHITE_PORTS_UDP><![CDATA[67,68]]></WHITE_PORTS_UDP>
76
+ </NIC>
77
+ <OS>
78
+ <BOOTLOADER><![CDATA[pygrub]]></BOOTLOADER>
79
+ </OS>
80
+ <RAW>
81
+ <TYPE><![CDATA[xen]]></TYPE>
82
+ </RAW>
83
+ <TEMPLATE_ID><![CDATA[66]]></TEMPLATE_ID>
84
+ <VCPU><![CDATA[1]]></VCPU>
85
+ <VMID><![CDATA[36551]]></VMID>
86
+ </TEMPLATE>
87
+ <USER_TEMPLATE>
88
+ <SCHED_REQUIREMENTS><![CDATA[CLUSTER_ID = 100]]></SCHED_REQUIREMENTS>
89
+ </USER_TEMPLATE>
90
+ <HISTORY_RECORDS>
91
+ <HISTORY>
92
+ <OID>36551</OID>
93
+ <SEQ>0</SEQ>
94
+ <HOSTNAME>supermachine1.somewhere.com</HOSTNAME>
95
+ <HID>11</HID>
96
+ <CID>100</CID>
97
+ <STIME>1383741169</STIME>
98
+ <ETIME>1383741259</ETIME>
99
+ <VMMMAD>vmm_xen</VMMMAD>
100
+ <VNMMAD>fw</VNMMAD>
101
+ <TMMAD>ssh</TMMAD>
102
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
103
+ <DS_ID>0</DS_ID>
104
+ <PSTIME>1383741169</PSTIME>
105
+ <PETIME>1383741259</PETIME>
106
+ <RSTIME>0</RSTIME>
107
+ <RETIME>0</RETIME>
108
+ <ESTIME>0</ESTIME>
109
+ <EETIME>0</EETIME>
110
+ <REASON>1</REASON>
111
+ <ACTION>0</ACTION>
112
+ </HISTORY>
113
+ <HISTORY>
114
+ <OID>36551</OID>
115
+ <SEQ>1</SEQ>
116
+ <HOSTNAME>supermachine1.somewhere.com</HOSTNAME>
117
+ <HID>11</HID>
118
+ <CID>100</CID>
119
+ <STIME>1383741589</STIME>
120
+ <ETIME>1383742270</ETIME>
121
+ <VMMMAD>vmm_xen</VMMMAD>
122
+ <VNMMAD>fw</VNMMAD>
123
+ <TMMAD>ssh</TMMAD>
124
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
125
+ <DS_ID>0</DS_ID>
126
+ <PSTIME>1383741589</PSTIME>
127
+ <PETIME>1383741674</PETIME>
128
+ <RSTIME>1383741674</RSTIME>
129
+ <RETIME>1383742270</RETIME>
130
+ <ESTIME>1383742270</ESTIME>
131
+ <EETIME>1383742270</EETIME>
132
+ <REASON>0</REASON>
133
+ <ACTION>0</ACTION>
134
+ </HISTORY>
135
+ </HISTORY_RECORDS>
136
+ </VM>