oneacct-export 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0c6414129d54d140b3bd5e5600eba084de305c4
4
- data.tar.gz: 07175294296a7ffd6eb05e652ad02b25822779a2
3
+ metadata.gz: 9a8ec2b00918ec5fec106d4cae21103fd5d373f1
4
+ data.tar.gz: bd243d18fb461e681d6e96c36cc0597f13e11c5b
5
5
  SHA512:
6
- metadata.gz: 9b69cbd550b24cbeb8579bd847f93efa988e0ead182e2e05cf9ccfa975e55e19f3ad263c5868eddbbaa9b2b31270b47a4bb9bc2971e1e78ee7df6377f47d0731
7
- data.tar.gz: aa40e4167fd0764acbada58ed40a2f90cebddca0a5dd5b503049a179d80dbd0ee9e86e4855b788b9cf8ab79ca328059c9140476049d6a9273ba8dd267fc1c324
6
+ metadata.gz: a075db4e55f76c87d951c7c3e8325f41213eb8d05e8fccbdb26d0f2ab6bc3b7eaf821f874cf0a2e3e3e851ad7e1a6df91de8ef1496ecff0851da749a4cc0d444
7
+ data.tar.gz: 37f5e20dfe9e431fa9d8ba6c08805ec805bd5f8dc3f8f1c462022e24058dedd135d2b29bb5ac23939e49b4077b12b109e4b0de9b9d7b3485fdcd24ced640dde2
data/README.md CHANGED
@@ -106,6 +106,16 @@ RPC connection for OpenNebula can be configured in two ways:
106
106
  System environment variable `ONE_XMLRPC` contains URL of OpenNebula RPC
107
107
  gate. If empty, the same information can be stored in `~/.one/one_endpoint`.
108
108
 
109
+ ###Configure vmcatcher IMAGE attribute inheritance in OpenNebula
110
+ In `oned.conf`:
111
+ ~~~
112
+ INHERIT_IMAGE_ATTR = "VMCATCHER_EVENT_AD_MPURI"
113
+ INHERIT_IMAGE_ATTR = "VMCATCHER_EVENT_DC_IDENTIFIER"
114
+ INHERIT_IMAGE_ATTR = "VMCATCHER_EVENT_IL_DC_IDENTIFIER"
115
+ INHERIT_IMAGE_ATTR = "VMCATCHER_EVENT_SL_CHECKSUM_SHA512"
116
+ INHERIT_IMAGE_ATTR = "VMCATCHER_EVENT_HV_VERSION"
117
+ ~~~
118
+
109
119
  ###Set Rails environment variable according to your environment
110
120
  You have to set system environment variable `RAILS_ENV` to one of the
111
121
  values production, development or test. OneacctExport is not a Rails
@@ -134,10 +134,13 @@ class OneWorker
134
134
 
135
135
  data['memory'] = parse(vm['TEMPLATE/MEMORY'], NUMBER, '0')
136
136
 
137
- data['image_name'] = parse(image_map[vm['TEMPLATE/DISK[1]/IMAGE_ID']], STRING, nil)
137
+ data['image_name'] = parse(vm['TEMPLATE/DISK[1]/VMCATCHER_EVENT_AD_MPURI'], STRING, nil)
138
+ data['image_name'] = parse(image_map[vm['TEMPLATE/DISK[1]/IMAGE_ID']], STRING, nil) unless data['image_name']
138
139
  data['image_name'] = parse(mixin(vm), STRING, nil) unless data['image_name']
139
140
  data['image_name'] = parse(vm['TEMPLATE/DISK[1]/IMAGE_ID'], STRING) unless data['image_name']
140
141
 
142
+ data['disk_size'] = sum_disk_size(vm)
143
+
141
144
  data
142
145
  end
143
146
 
@@ -185,6 +188,28 @@ class OneWorker
185
188
  rstime
186
189
  end
187
190
 
191
+ # Sums disk size of all disks within the virtual machine
192
+ #
193
+ # @param [OpenNebula::VirtualMachine] vm virtual machine
194
+ #
195
+ # @return [Integer] sum of disk sizes in GB rounded up
196
+ def sum_disk_size(vm)
197
+ disk_size = 'NULL'
198
+ vm.each 'TEMPLATE/DISK' do |disk|
199
+ return 'NULL' unless disk['SIZE']
200
+
201
+ size = parse(disk['SIZE'], NUMBER, nil)
202
+ unless size
203
+ logger.warn("Disk size invalid for VM with id #{vm['ID']}.")
204
+ return 'NULL'
205
+ end
206
+ disk_size = disk_size.to_i + size.to_i
207
+ end
208
+
209
+ disk_size = (disk_size/1000.0).ceil unless disk_size.to_i == 0
210
+ disk_size
211
+ end
212
+
188
213
  # Sidekiq specific method, specifies the purpose of the worker
189
214
  #
190
215
  # @param [String] vms IDs of virtual machines to process in form of numbers separated by '|' (easier for cooperation with redis)
@@ -1,3 +1,3 @@
1
1
  class OneacctExporter
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
@@ -22,7 +22,7 @@ NetworkType: NULL
22
22
  NetworkInbound: <%= vm['network_inbound']%>
23
23
  NetworkOutbound: <%= vm['network_outbound']%>
24
24
  Memory: <%= vm['memory']%>
25
- Disk: NULL
25
+ Disk: <%= vm['disk_size']%>
26
26
  StorageRecordId: NULL
27
27
  ImageId: <%= vm['image_name']%>
28
28
  CloudType: OpenNebula
@@ -0,0 +1,147 @@
1
+ <VM>
2
+ <ID>50343</ID>
3
+ <UID>70</UID>
4
+ <GID>102</GID>
5
+ <UNAME>fedcloud.egi.eu_3</UNAME>
6
+ <GNAME>fedcloud.egi.eu</GNAME>
7
+ <NAME>testINH_MPURI</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>1424693996</LAST_POLL>
20
+ <STATE>6</STATE>
21
+ <LCM_STATE>0</LCM_STATE>
22
+ <RESCHED>0</RESCHED>
23
+ <STIME>1424693218</STIME>
24
+ <ETIME>1424693998</ETIME>
25
+ <DEPLOY_ID>one-50343</DEPLOY_ID>
26
+ <MEMORY>0</MEMORY>
27
+ <CPU>0</CPU>
28
+ <NET_TX>0</NET_TX>
29
+ <NET_RX>0</NET_RX>
30
+ <TEMPLATE>
31
+ <AUTOMATIC_REQUIREMENTS><![CDATA[CLUSTER_ID = 100 & !(PUBLIC_CLOUD = YES)]]></AUTOMATIC_REQUIREMENTS>
32
+ <CONTEXT>
33
+ <DISK_ID><![CDATA[1]]></DISK_ID>
34
+ <PUBLIC_IP><![CDATA[147.251.253.102]]></PUBLIC_IP>
35
+ <SSH_KEY><![CDATA[ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFy/sRQ4M0jYyiJyBRGpidQ6eJCdMRRZzzxuxQDidvxhcHPNFthrHT5/+9lfrQCorJy5YjMJEGBC22Y62kctQ//FCa2wICdxGZVgcXdOLnGar5ztgrt1txlCu2/80yc1e0u39LdlyzlEaCnjGUeD4C6tZdAISLfQwiWEvzsJKJR302MDZCqnir9BEo57rTORAVD853hmko/3lvZk2EwgM+5lcMr13Hy/mbwNSuWq0ik71BSXyB1bnJ2XfiXOzPfkG1sflhe0j488nwNLNU1NSBbHARJIRJcX8QRVH46Zq02AeTNJikXxCnbfdGG8VcG5H8eWOa36m0ZWHGNgqaa8Pt xparak@craban1.ics.muni.cz]]></SSH_KEY>
36
+ <TARGET><![CDATA[xvdb]]></TARGET>
37
+ <USER_DATA><![CDATA[#cloud-config
38
+ # see https://help.ubuntu.com/community/CloudInit
39
+
40
+ runcmd:
41
+ - /bin/echo 'Instance is ready to use.' | wall
42
+
43
+ ]]></USER_DATA>
44
+ </CONTEXT>
45
+ <CPU><![CDATA[1]]></CPU>
46
+ <DISK>
47
+ <CLONE><![CDATA[YES]]></CLONE>
48
+ <CLONE_TARGET><![CDATA[SYSTEM]]></CLONE_TARGET>
49
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
50
+ <DATASTORE><![CDATA[default]]></DATASTORE>
51
+ <DATASTORE_ID><![CDATA[1]]></DATASTORE_ID>
52
+ <DEV_PREFIX><![CDATA[xvd]]></DEV_PREFIX>
53
+ <DISK_ID><![CDATA[0]]></DISK_ID>
54
+ <DRIVER><![CDATA[tap2:tapdisk:aio:]]></DRIVER>
55
+ <IMAGE><![CDATA[662b0e71-3e21-5f43-b6a1-cc2f51319fa7]]></IMAGE>
56
+ <IMAGE_ID><![CDATA[227]]></IMAGE_ID>
57
+ <IMAGE_UNAME><![CDATA[oneadmin]]></IMAGE_UNAME>
58
+ <LN_TARGET><![CDATA[SYSTEM]]></LN_TARGET>
59
+ <READONLY><![CDATA[NO]]></READONLY>
60
+ <SAVE><![CDATA[NO]]></SAVE>
61
+ <SIZE><![CDATA[not_a_number]]></SIZE>
62
+ <SOURCE><![CDATA[/opt/opennebula/var/datastores/1/c516eb23fcb184f1458104a5d66f36b0]]></SOURCE>
63
+ <TARGET><![CDATA[xvda]]></TARGET>
64
+ <TM_MAD><![CDATA[ssh]]></TM_MAD>
65
+ <TYPE><![CDATA[FILE]]></TYPE>
66
+ <VMCATCHER_EVENT_AD_MPURI><![CDATA[https://appdb.egi.eu/store/vo/image/662b0e71-3e21-5f43-b6a1-cc2f51319fa7:156/]]></VMCATCHER_EVENT_AD_MPURI>
67
+ <VMCATCHER_EVENT_DC_IDENTIFIER><![CDATA[662b0e71-3e21-5f43-b6a1-cc2f51319fa7]]></VMCATCHER_EVENT_DC_IDENTIFIER>
68
+ <VMCATCHER_EVENT_HV_VERSION><![CDATA[20141029]]></VMCATCHER_EVENT_HV_VERSION>
69
+ <VMCATCHER_EVENT_IL_DC_IDENTIFIER><![CDATA[76fdee70-8119-5d33-9f40-3c57e1c60df1]]></VMCATCHER_EVENT_IL_DC_IDENTIFIER>
70
+ <VMCATCHER_EVENT_SL_CHECKSUM_SHA512><![CDATA[02a2b436e8f10c22527795c33bf623a1a0ef2e7036166e8831f653c3662f8f897a821f4751d774947e32a854654ff645097c47da236e46ad54806c6fc72a29ce]]></VMCATCHER_EVENT_SL_CHECKSUM_SHA512>
71
+ </DISK>
72
+ <FEATURES>
73
+ <ACPI><![CDATA[no]]></ACPI>
74
+ </FEATURES>
75
+ <GRAPHICS>
76
+ <KEYMAP><![CDATA[en-us]]></KEYMAP>
77
+ <LISTEN><![CDATA[0.0.0.0]]></LISTEN>
78
+ <PASSWD><![CDATA[a54VG45dsE49fgsEflhp87dfz7j8dfs465fgs65g4v2c0csre5rd898fRE00AD5g]]></PASSWD>
79
+ <PORT><![CDATA[56243]]></PORT>
80
+ <TYPE><![CDATA[VNC]]></TYPE>
81
+ </GRAPHICS>
82
+ <MEMORY><![CDATA[2048]]></MEMORY>
83
+ <NAME><![CDATA[one-50343]]></NAME>
84
+ <NIC>
85
+ <AR_ID><![CDATA[15]]></AR_ID>
86
+ <BRIDGE><![CDATA[xenbr0]]></BRIDGE>
87
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
88
+ <IP><![CDATA[147.251.253.102]]></IP>
89
+ <MAC><![CDATA[02:00:93:fb:fd:66]]></MAC>
90
+ <NETWORK><![CDATA[public]]></NETWORK>
91
+ <NETWORK_ID><![CDATA[18]]></NETWORK_ID>
92
+ <NIC_ID><![CDATA[0]]></NIC_ID>
93
+ <VLAN><![CDATA[NO]]></VLAN>
94
+ <WHITE_PORTS_TCP><![CDATA[22]]></WHITE_PORTS_TCP>
95
+ <WHITE_PORTS_UDP><![CDATA[67,68]]></WHITE_PORTS_UDP>
96
+ </NIC>
97
+ <OS>
98
+ <BOOTLOADER><![CDATA[/usr/lib/xen/boot/hvmloader]]></BOOTLOADER>
99
+ </OS>
100
+ <RAW>
101
+ <DATA><![CDATA[builder='hvm']]></DATA>
102
+ <TYPE><![CDATA[xen]]></TYPE>
103
+ </RAW>
104
+ <RAW>
105
+ <DATA><![CDATA[device_model='/usr/lib/xen/bin/qemu-dm']]></DATA>
106
+ <TYPE><![CDATA[xen]]></TYPE>
107
+ </RAW>
108
+ <RAW>
109
+ <DATA><![CDATA[boot='dc']]></DATA>
110
+ <TYPE><![CDATA[xen]]></TYPE>
111
+ </RAW>
112
+ <VCPU><![CDATA[1]]></VCPU>
113
+ <VMID><![CDATA[50343]]></VMID>
114
+ </TEMPLATE>
115
+ <USER_TEMPLATE>
116
+ <ARCHITECTURE><![CDATA[x86]]></ARCHITECTURE>
117
+ <DESCRIPTION><![CDATA[Instantiated with rOCCI-server on Mon, 23 Feb 2015 13:06:58 +0100.]]></DESCRIPTION>
118
+ <OCCI_COMPUTE_MIXINS><![CDATA[http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_centos_6_5_minimal_fedcloud_dukan_83 http://schema.fedcloud.egi.eu/occi/infrastructure/resource_tpl#small http://opennebula.org/occi/infrastructure#compute]]></OCCI_COMPUTE_MIXINS>
119
+ <OCCI_ID><![CDATA[50343]]></OCCI_ID>
120
+ <USER_IDENTITY><![CDATA[/DC=cz/DC=cesnet-ca/O=CESNET/CN=Boris Parak]]></USER_IDENTITY>
121
+ <USER_X509_DN><![CDATA[/DC=cz/DC=cesnet-ca/O=CESNET/CN=Boris Parak]]></USER_X509_DN>
122
+ </USER_TEMPLATE>
123
+ <HISTORY_RECORDS>
124
+ <HISTORY>
125
+ <OID>50343</OID>
126
+ <SEQ>0</SEQ>
127
+ <HOSTNAME>dukan8.ics.muni.cz</HOSTNAME>
128
+ <HID>15</HID>
129
+ <CID>100</CID>
130
+ <STIME>1424693223</STIME>
131
+ <ETIME>1424693998</ETIME>
132
+ <VMMMAD>xen</VMMMAD>
133
+ <VNMMAD>802.1Q</VNMMAD>
134
+ <TMMAD>ssh</TMMAD>
135
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
136
+ <DS_ID>0</DS_ID>
137
+ <PSTIME>1424693223</PSTIME>
138
+ <PETIME>1424693416</PETIME>
139
+ <RSTIME>1424693416</RSTIME>
140
+ <RETIME>1424693996</RETIME>
141
+ <ESTIME>1424693996</ESTIME>
142
+ <EETIME>1424693998</EETIME>
143
+ <REASON>2</REASON>
144
+ <ACTION>3</ACTION>
145
+ </HISTORY>
146
+ </HISTORY_RECORDS>
147
+ </VM>
@@ -0,0 +1,147 @@
1
+ <VM>
2
+ <ID>50343</ID>
3
+ <UID>70</UID>
4
+ <GID>102</GID>
5
+ <UNAME>fedcloud.egi.eu_3</UNAME>
6
+ <GNAME>fedcloud.egi.eu</GNAME>
7
+ <NAME>testINH_MPURI</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>1424693996</LAST_POLL>
20
+ <STATE>6</STATE>
21
+ <LCM_STATE>0</LCM_STATE>
22
+ <RESCHED>0</RESCHED>
23
+ <STIME>1424693218</STIME>
24
+ <ETIME>1424693998</ETIME>
25
+ <DEPLOY_ID>one-50343</DEPLOY_ID>
26
+ <MEMORY>0</MEMORY>
27
+ <CPU>0</CPU>
28
+ <NET_TX>0</NET_TX>
29
+ <NET_RX>0</NET_RX>
30
+ <TEMPLATE>
31
+ <AUTOMATIC_REQUIREMENTS><![CDATA[CLUSTER_ID = 100 & !(PUBLIC_CLOUD = YES)]]></AUTOMATIC_REQUIREMENTS>
32
+ <CONTEXT>
33
+ <DISK_ID><![CDATA[1]]></DISK_ID>
34
+ <PUBLIC_IP><![CDATA[147.251.253.102]]></PUBLIC_IP>
35
+ <SSH_KEY><![CDATA[ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFy/sRQ4M0jYyiJyBRGpidQ6eJCdMRRZzzxuxQDidvxhcHPNFthrHT5/+9lfrQCorJy5YjMJEGBC22Y62kctQ//FCa2wICdxGZVgcXdOLnGar5ztgrt1txlCu2/80yc1e0u39LdlyzlEaCnjGUeD4C6tZdAISLfQwiWEvzsJKJR302MDZCqnir9BEo57rTORAVD853hmko/3lvZk2EwgM+5lcMr13Hy/mbwNSuWq0ik71BSXyB1bnJ2XfiXOzPfkG1sflhe0j488nwNLNU1NSBbHARJIRJcX8QRVH46Zq02AeTNJikXxCnbfdGG8VcG5H8eWOa36m0ZWHGNgqaa8Pt xparak@craban1.ics.muni.cz]]></SSH_KEY>
36
+ <TARGET><![CDATA[xvdb]]></TARGET>
37
+ <USER_DATA><![CDATA[#cloud-config
38
+ # see https://help.ubuntu.com/community/CloudInit
39
+
40
+ runcmd:
41
+ - /bin/echo 'Instance is ready to use.' | wall
42
+
43
+ ]]></USER_DATA>
44
+ </CONTEXT>
45
+ <CPU><![CDATA[1]]></CPU>
46
+ <DISK>
47
+ <CLONE><![CDATA[YES]]></CLONE>
48
+ <CLONE_TARGET><![CDATA[SYSTEM]]></CLONE_TARGET>
49
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
50
+ <DATASTORE><![CDATA[default]]></DATASTORE>
51
+ <DATASTORE_ID><![CDATA[1]]></DATASTORE_ID>
52
+ <DEV_PREFIX><![CDATA[xvd]]></DEV_PREFIX>
53
+ <DISK_ID><![CDATA[0]]></DISK_ID>
54
+ <DRIVER><![CDATA[tap2:tapdisk:aio:]]></DRIVER>
55
+ <IMAGE><![CDATA[662b0e71-3e21-5f43-b6a1-cc2f51319fa7]]></IMAGE>
56
+ <IMAGE_ID><![CDATA[227]]></IMAGE_ID>
57
+ <IMAGE_UNAME><![CDATA[oneadmin]]></IMAGE_UNAME>
58
+ <LN_TARGET><![CDATA[SYSTEM]]></LN_TARGET>
59
+ <READONLY><![CDATA[NO]]></READONLY>
60
+ <SAVE><![CDATA[NO]]></SAVE>
61
+ <SIZE><![CDATA[10240]]></SIZE>
62
+ <SOURCE><![CDATA[/opt/opennebula/var/datastores/1/c516eb23fcb184f1458104a5d66f36b0]]></SOURCE>
63
+ <TARGET><![CDATA[xvda]]></TARGET>
64
+ <TM_MAD><![CDATA[ssh]]></TM_MAD>
65
+ <TYPE><![CDATA[FILE]]></TYPE>
66
+ <VMCATCHER_EVENT_AD_MPURI><![CDATA[https://appdb.egi.eu/store/vo/image/662b0e71-3e21-5f43-b6a1-cc2f51319fa7:156/]]></VMCATCHER_EVENT_AD_MPURI>
67
+ <VMCATCHER_EVENT_DC_IDENTIFIER><![CDATA[662b0e71-3e21-5f43-b6a1-cc2f51319fa7]]></VMCATCHER_EVENT_DC_IDENTIFIER>
68
+ <VMCATCHER_EVENT_HV_VERSION><![CDATA[20141029]]></VMCATCHER_EVENT_HV_VERSION>
69
+ <VMCATCHER_EVENT_IL_DC_IDENTIFIER><![CDATA[76fdee70-8119-5d33-9f40-3c57e1c60df1]]></VMCATCHER_EVENT_IL_DC_IDENTIFIER>
70
+ <VMCATCHER_EVENT_SL_CHECKSUM_SHA512><![CDATA[02a2b436e8f10c22527795c33bf623a1a0ef2e7036166e8831f653c3662f8f897a821f4751d774947e32a854654ff645097c47da236e46ad54806c6fc72a29ce]]></VMCATCHER_EVENT_SL_CHECKSUM_SHA512>
71
+ </DISK>
72
+ <FEATURES>
73
+ <ACPI><![CDATA[no]]></ACPI>
74
+ </FEATURES>
75
+ <GRAPHICS>
76
+ <KEYMAP><![CDATA[en-us]]></KEYMAP>
77
+ <LISTEN><![CDATA[0.0.0.0]]></LISTEN>
78
+ <PASSWD><![CDATA[a54VG45dsE49fgsEflhp87dfz7j8dfs465fgs65g4v2c0csre5rd898fRE00AD5g]]></PASSWD>
79
+ <PORT><![CDATA[56243]]></PORT>
80
+ <TYPE><![CDATA[VNC]]></TYPE>
81
+ </GRAPHICS>
82
+ <MEMORY><![CDATA[2048]]></MEMORY>
83
+ <NAME><![CDATA[one-50343]]></NAME>
84
+ <NIC>
85
+ <AR_ID><![CDATA[15]]></AR_ID>
86
+ <BRIDGE><![CDATA[xenbr0]]></BRIDGE>
87
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
88
+ <IP><![CDATA[147.251.253.102]]></IP>
89
+ <MAC><![CDATA[02:00:93:fb:fd:66]]></MAC>
90
+ <NETWORK><![CDATA[public]]></NETWORK>
91
+ <NETWORK_ID><![CDATA[18]]></NETWORK_ID>
92
+ <NIC_ID><![CDATA[0]]></NIC_ID>
93
+ <VLAN><![CDATA[NO]]></VLAN>
94
+ <WHITE_PORTS_TCP><![CDATA[22]]></WHITE_PORTS_TCP>
95
+ <WHITE_PORTS_UDP><![CDATA[67,68]]></WHITE_PORTS_UDP>
96
+ </NIC>
97
+ <OS>
98
+ <BOOTLOADER><![CDATA[/usr/lib/xen/boot/hvmloader]]></BOOTLOADER>
99
+ </OS>
100
+ <RAW>
101
+ <DATA><![CDATA[builder='hvm']]></DATA>
102
+ <TYPE><![CDATA[xen]]></TYPE>
103
+ </RAW>
104
+ <RAW>
105
+ <DATA><![CDATA[device_model='/usr/lib/xen/bin/qemu-dm']]></DATA>
106
+ <TYPE><![CDATA[xen]]></TYPE>
107
+ </RAW>
108
+ <RAW>
109
+ <DATA><![CDATA[boot='dc']]></DATA>
110
+ <TYPE><![CDATA[xen]]></TYPE>
111
+ </RAW>
112
+ <VCPU><![CDATA[1]]></VCPU>
113
+ <VMID><![CDATA[50343]]></VMID>
114
+ </TEMPLATE>
115
+ <USER_TEMPLATE>
116
+ <ARCHITECTURE><![CDATA[x86]]></ARCHITECTURE>
117
+ <DESCRIPTION><![CDATA[Instantiated with rOCCI-server on Mon, 23 Feb 2015 13:06:58 +0100.]]></DESCRIPTION>
118
+ <OCCI_COMPUTE_MIXINS><![CDATA[http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_centos_6_5_minimal_fedcloud_dukan_83 http://schema.fedcloud.egi.eu/occi/infrastructure/resource_tpl#small http://opennebula.org/occi/infrastructure#compute]]></OCCI_COMPUTE_MIXINS>
119
+ <OCCI_ID><![CDATA[50343]]></OCCI_ID>
120
+ <USER_IDENTITY><![CDATA[/DC=cz/DC=cesnet-ca/O=CESNET/CN=Boris Parak]]></USER_IDENTITY>
121
+ <USER_X509_DN><![CDATA[/DC=cz/DC=cesnet-ca/O=CESNET/CN=Boris Parak]]></USER_X509_DN>
122
+ </USER_TEMPLATE>
123
+ <HISTORY_RECORDS>
124
+ <HISTORY>
125
+ <OID>50343</OID>
126
+ <SEQ>0</SEQ>
127
+ <HOSTNAME>dukan8.ics.muni.cz</HOSTNAME>
128
+ <HID>15</HID>
129
+ <CID>100</CID>
130
+ <STIME>1424693223</STIME>
131
+ <ETIME>1424693998</ETIME>
132
+ <VMMMAD>xen</VMMMAD>
133
+ <VNMMAD>802.1Q</VNMMAD>
134
+ <TMMAD>ssh</TMMAD>
135
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
136
+ <DS_ID>0</DS_ID>
137
+ <PSTIME>1424693223</PSTIME>
138
+ <PETIME>1424693416</PETIME>
139
+ <RSTIME>1424693416</RSTIME>
140
+ <RETIME>1424693996</RETIME>
141
+ <ESTIME>1424693996</ESTIME>
142
+ <EETIME>1424693998</EETIME>
143
+ <REASON>2</REASON>
144
+ <ACTION>3</ACTION>
145
+ </HISTORY>
146
+ </HISTORY_RECORDS>
147
+ </VM>
@@ -0,0 +1,173 @@
1
+ <VM>
2
+ <ID>50343</ID>
3
+ <UID>70</UID>
4
+ <GID>102</GID>
5
+ <UNAME>fedcloud.egi.eu_3</UNAME>
6
+ <GNAME>fedcloud.egi.eu</GNAME>
7
+ <NAME>testINH_MPURI</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>1424693996</LAST_POLL>
20
+ <STATE>6</STATE>
21
+ <LCM_STATE>0</LCM_STATE>
22
+ <RESCHED>0</RESCHED>
23
+ <STIME>1424693218</STIME>
24
+ <ETIME>1424693998</ETIME>
25
+ <DEPLOY_ID>one-50343</DEPLOY_ID>
26
+ <MEMORY>0</MEMORY>
27
+ <CPU>0</CPU>
28
+ <NET_TX>0</NET_TX>
29
+ <NET_RX>0</NET_RX>
30
+ <TEMPLATE>
31
+ <AUTOMATIC_REQUIREMENTS><![CDATA[CLUSTER_ID = 100 & !(PUBLIC_CLOUD = YES)]]></AUTOMATIC_REQUIREMENTS>
32
+ <CONTEXT>
33
+ <DISK_ID><![CDATA[1]]></DISK_ID>
34
+ <PUBLIC_IP><![CDATA[147.251.253.102]]></PUBLIC_IP>
35
+ <SSH_KEY><![CDATA[ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFy/sRQ4M0jYyiJyBRGpidQ6eJCdMRRZzzxuxQDidvxhcHPNFthrHT5/+9lfrQCorJy5YjMJEGBC22Y62kctQ//FCa2wICdxGZVgcXdOLnGar5ztgrt1txlCu2/80yc1e0u39LdlyzlEaCnjGUeD4C6tZdAISLfQwiWEvzsJKJR302MDZCqnir9BEo57rTORAVD853hmko/3lvZk2EwgM+5lcMr13Hy/mbwNSuWq0ik71BSXyB1bnJ2XfiXOzPfkG1sflhe0j488nwNLNU1NSBbHARJIRJcX8QRVH46Zq02AeTNJikXxCnbfdGG8VcG5H8eWOa36m0ZWHGNgqaa8Pt xparak@craban1.ics.muni.cz]]></SSH_KEY>
36
+ <TARGET><![CDATA[xvdb]]></TARGET>
37
+ <USER_DATA><![CDATA[#cloud-config
38
+ # see https://help.ubuntu.com/community/CloudInit
39
+
40
+ runcmd:
41
+ - /bin/echo 'Instance is ready to use.' | wall
42
+
43
+ ]]></USER_DATA>
44
+ </CONTEXT>
45
+ <CPU><![CDATA[1]]></CPU>
46
+ <DISK>
47
+ <CLONE><![CDATA[YES]]></CLONE>
48
+ <CLONE_TARGET><![CDATA[SYSTEM]]></CLONE_TARGET>
49
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
50
+ <DATASTORE><![CDATA[default]]></DATASTORE>
51
+ <DATASTORE_ID><![CDATA[1]]></DATASTORE_ID>
52
+ <DEV_PREFIX><![CDATA[xvd]]></DEV_PREFIX>
53
+ <DISK_ID><![CDATA[0]]></DISK_ID>
54
+ <DRIVER><![CDATA[tap2:tapdisk:aio:]]></DRIVER>
55
+ <IMAGE><![CDATA[662b0e71-3e21-5f43-b6a1-cc2f51319fa7]]></IMAGE>
56
+ <IMAGE_ID><![CDATA[227]]></IMAGE_ID>
57
+ <IMAGE_UNAME><![CDATA[oneadmin]]></IMAGE_UNAME>
58
+ <LN_TARGET><![CDATA[SYSTEM]]></LN_TARGET>
59
+ <READONLY><![CDATA[NO]]></READONLY>
60
+ <SAVE><![CDATA[NO]]></SAVE>
61
+ <SIZE><![CDATA[10240]]></SIZE>
62
+ <SOURCE><![CDATA[/opt/opennebula/var/datastores/1/c516eb23fcb184f1458104a5d66f36b0]]></SOURCE>
63
+ <TARGET><![CDATA[xvda]]></TARGET>
64
+ <TM_MAD><![CDATA[ssh]]></TM_MAD>
65
+ <TYPE><![CDATA[FILE]]></TYPE>
66
+ <VMCATCHER_EVENT_AD_MPURI><![CDATA[https://appdb.egi.eu/store/vo/image/662b0e71-3e21-5f43-b6a1-cc2f51319fa7:156/]]></VMCATCHER_EVENT_AD_MPURI>
67
+ <VMCATCHER_EVENT_DC_IDENTIFIER><![CDATA[662b0e71-3e21-5f43-b6a1-cc2f51319fa7]]></VMCATCHER_EVENT_DC_IDENTIFIER>
68
+ <VMCATCHER_EVENT_HV_VERSION><![CDATA[20141029]]></VMCATCHER_EVENT_HV_VERSION>
69
+ <VMCATCHER_EVENT_IL_DC_IDENTIFIER><![CDATA[76fdee70-8119-5d33-9f40-3c57e1c60df1]]></VMCATCHER_EVENT_IL_DC_IDENTIFIER>
70
+ <VMCATCHER_EVENT_SL_CHECKSUM_SHA512><![CDATA[02a2b436e8f10c22527795c33bf623a1a0ef2e7036166e8831f653c3662f8f897a821f4751d774947e32a854654ff645097c47da236e46ad54806c6fc72a29ce]]></VMCATCHER_EVENT_SL_CHECKSUM_SHA512>
71
+ </DISK>
72
+ <DISK>
73
+ <CLONE><![CDATA[YES]]></CLONE>
74
+ <CLONE_TARGET><![CDATA[SYSTEM]]></CLONE_TARGET>
75
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
76
+ <DATASTORE><![CDATA[default]]></DATASTORE>
77
+ <DATASTORE_ID><![CDATA[1]]></DATASTORE_ID>
78
+ <DEV_PREFIX><![CDATA[xvd]]></DEV_PREFIX>
79
+ <DISK_ID><![CDATA[0]]></DISK_ID>
80
+ <DRIVER><![CDATA[tap2:tapdisk:aio:]]></DRIVER>
81
+ <IMAGE><![CDATA[662b0e71-3e21-5f43-b6a1-cc2f51319fa7]]></IMAGE>
82
+ <IMAGE_ID><![CDATA[227]]></IMAGE_ID>
83
+ <IMAGE_UNAME><![CDATA[oneadmin]]></IMAGE_UNAME>
84
+ <LN_TARGET><![CDATA[SYSTEM]]></LN_TARGET>
85
+ <READONLY><![CDATA[NO]]></READONLY>
86
+ <SAVE><![CDATA[NO]]></SAVE>
87
+ <SIZE><![CDATA[42368]]></SIZE>
88
+ <SOURCE><![CDATA[/opt/opennebula/var/datastores/1/c516eb23fcb184f1458104a5d66f36b0]]></SOURCE>
89
+ <TARGET><![CDATA[xvda]]></TARGET>
90
+ <TM_MAD><![CDATA[ssh]]></TM_MAD>
91
+ <TYPE><![CDATA[FILE]]></TYPE>
92
+ <VMCATCHER_EVENT_AD_MPURI><![CDATA[https://appdb.egi.eu/store/vo/image/662b0e71-3e21-5f43-b6a1-cc2f51319fa7:156/]]></VMCATCHER_EVENT_AD_MPURI>
93
+ <VMCATCHER_EVENT_DC_IDENTIFIER><![CDATA[662b0e71-3e21-5f43-b6a1-cc2f51319fa7]]></VMCATCHER_EVENT_DC_IDENTIFIER>
94
+ <VMCATCHER_EVENT_HV_VERSION><![CDATA[20141029]]></VMCATCHER_EVENT_HV_VERSION>
95
+ <VMCATCHER_EVENT_IL_DC_IDENTIFIER><![CDATA[76fdee70-8119-5d33-9f40-3c57e1c60df1]]></VMCATCHER_EVENT_IL_DC_IDENTIFIER>
96
+ <VMCATCHER_EVENT_SL_CHECKSUM_SHA512><![CDATA[02a2b436e8f10c22527795c33bf623a1a0ef2e7036166e8831f653c3662f8f897a821f4751d774947e32a854654ff645097c47da236e46ad54806c6fc72a29ce]]></VMCATCHER_EVENT_SL_CHECKSUM_SHA512>
97
+ </DISK>
98
+ <FEATURES>
99
+ <ACPI><![CDATA[no]]></ACPI>
100
+ </FEATURES>
101
+ <GRAPHICS>
102
+ <KEYMAP><![CDATA[en-us]]></KEYMAP>
103
+ <LISTEN><![CDATA[0.0.0.0]]></LISTEN>
104
+ <PASSWD><![CDATA[a54VG45dsE49fgsEflhp87dfz7j8dfs465fgs65g4v2c0csre5rd898fRE00AD5g]]></PASSWD>
105
+ <PORT><![CDATA[56243]]></PORT>
106
+ <TYPE><![CDATA[VNC]]></TYPE>
107
+ </GRAPHICS>
108
+ <MEMORY><![CDATA[2048]]></MEMORY>
109
+ <NAME><![CDATA[one-50343]]></NAME>
110
+ <NIC>
111
+ <AR_ID><![CDATA[15]]></AR_ID>
112
+ <BRIDGE><![CDATA[xenbr0]]></BRIDGE>
113
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
114
+ <IP><![CDATA[147.251.253.102]]></IP>
115
+ <MAC><![CDATA[02:00:93:fb:fd:66]]></MAC>
116
+ <NETWORK><![CDATA[public]]></NETWORK>
117
+ <NETWORK_ID><![CDATA[18]]></NETWORK_ID>
118
+ <NIC_ID><![CDATA[0]]></NIC_ID>
119
+ <VLAN><![CDATA[NO]]></VLAN>
120
+ <WHITE_PORTS_TCP><![CDATA[22]]></WHITE_PORTS_TCP>
121
+ <WHITE_PORTS_UDP><![CDATA[67,68]]></WHITE_PORTS_UDP>
122
+ </NIC>
123
+ <OS>
124
+ <BOOTLOADER><![CDATA[/usr/lib/xen/boot/hvmloader]]></BOOTLOADER>
125
+ </OS>
126
+ <RAW>
127
+ <DATA><![CDATA[builder='hvm']]></DATA>
128
+ <TYPE><![CDATA[xen]]></TYPE>
129
+ </RAW>
130
+ <RAW>
131
+ <DATA><![CDATA[device_model='/usr/lib/xen/bin/qemu-dm']]></DATA>
132
+ <TYPE><![CDATA[xen]]></TYPE>
133
+ </RAW>
134
+ <RAW>
135
+ <DATA><![CDATA[boot='dc']]></DATA>
136
+ <TYPE><![CDATA[xen]]></TYPE>
137
+ </RAW>
138
+ <VCPU><![CDATA[1]]></VCPU>
139
+ <VMID><![CDATA[50343]]></VMID>
140
+ </TEMPLATE>
141
+ <USER_TEMPLATE>
142
+ <ARCHITECTURE><![CDATA[x86]]></ARCHITECTURE>
143
+ <DESCRIPTION><![CDATA[Instantiated with rOCCI-server on Mon, 23 Feb 2015 13:06:58 +0100.]]></DESCRIPTION>
144
+ <OCCI_COMPUTE_MIXINS><![CDATA[http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_centos_6_5_minimal_fedcloud_dukan_83 http://schema.fedcloud.egi.eu/occi/infrastructure/resource_tpl#small http://opennebula.org/occi/infrastructure#compute]]></OCCI_COMPUTE_MIXINS>
145
+ <OCCI_ID><![CDATA[50343]]></OCCI_ID>
146
+ <USER_IDENTITY><![CDATA[/DC=cz/DC=cesnet-ca/O=CESNET/CN=Boris Parak]]></USER_IDENTITY>
147
+ <USER_X509_DN><![CDATA[/DC=cz/DC=cesnet-ca/O=CESNET/CN=Boris Parak]]></USER_X509_DN>
148
+ </USER_TEMPLATE>
149
+ <HISTORY_RECORDS>
150
+ <HISTORY>
151
+ <OID>50343</OID>
152
+ <SEQ>0</SEQ>
153
+ <HOSTNAME>dukan8.ics.muni.cz</HOSTNAME>
154
+ <HID>15</HID>
155
+ <CID>100</CID>
156
+ <STIME>1424693223</STIME>
157
+ <ETIME>1424693998</ETIME>
158
+ <VMMMAD>xen</VMMMAD>
159
+ <VNMMAD>802.1Q</VNMMAD>
160
+ <TMMAD>ssh</TMMAD>
161
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
162
+ <DS_ID>0</DS_ID>
163
+ <PSTIME>1424693223</PSTIME>
164
+ <PETIME>1424693416</PETIME>
165
+ <RSTIME>1424693416</RSTIME>
166
+ <RETIME>1424693996</RETIME>
167
+ <ESTIME>1424693996</ESTIME>
168
+ <EETIME>1424693998</EETIME>
169
+ <REASON>2</REASON>
170
+ <ACTION>3</ACTION>
171
+ </HISTORY>
172
+ </HISTORY_RECORDS>
173
+ </VM>
@@ -0,0 +1,161 @@
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>43557888</NET_TX>
29
+ <NET_RX>376832</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
+ <CLONE><![CDATA[YES]]></CLONE>
42
+ <CLONE_TARGET><![CDATA[SYSTEM]]></CLONE_TARGET>
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[662b0e71-3e21-5f43-b6a1-cc2f51319fa7]]></IMAGE>
50
+ <IMAGE_ID><![CDATA[31]]></IMAGE_ID>
51
+ <IMAGE_UNAME><![CDATA[oneadmin]]></IMAGE_UNAME>
52
+ <LN_TARGET><![CDATA[SYSTEM]]></LN_TARGET>
53
+ <READONLY><![CDATA[NO]]></READONLY>
54
+ <SAVE><![CDATA[NO]]></SAVE>
55
+ <SIZE><![CDATA[10240]]></SIZE>
56
+ <SOURCE><![CDATA[/opt/opennebula/var/datastores/1/c516eb23fcb184f1458104a5d66f36b0]]></SOURCE>
57
+ <TARGET><![CDATA[xvda]]></TARGET>
58
+ <TM_MAD><![CDATA[ssh]]></TM_MAD>
59
+ <TYPE><![CDATA[FILE]]></TYPE>
60
+ </DISK>
61
+ <DISK>
62
+ <CLONE><![CDATA[YES]]></CLONE>
63
+ <CLONE_TARGET><![CDATA[SYSTEM]]></CLONE_TARGET>
64
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
65
+ <DATASTORE><![CDATA[default]]></DATASTORE>
66
+ <DATASTORE_ID><![CDATA[1]]></DATASTORE_ID>
67
+ <DEV_PREFIX><![CDATA[xvd]]></DEV_PREFIX>
68
+ <DISK_ID><![CDATA[0]]></DISK_ID>
69
+ <DRIVER><![CDATA[tap2:tapdisk:aio:]]></DRIVER>
70
+ <IMAGE><![CDATA[662b0e71-3e21-5f43-b6a1-cc2f51319fa7]]></IMAGE>
71
+ <IMAGE_ID><![CDATA[227]]></IMAGE_ID>
72
+ <IMAGE_UNAME><![CDATA[oneadmin]]></IMAGE_UNAME>
73
+ <LN_TARGET><![CDATA[SYSTEM]]></LN_TARGET>
74
+ <READONLY><![CDATA[NO]]></READONLY>
75
+ <SAVE><![CDATA[NO]]></SAVE>
76
+ <SIZE><![CDATA[42368]]></SIZE>
77
+ <SOURCE><![CDATA[/opt/opennebula/var/datastores/1/c516eb23fcb184f1458104a5d66f36b0]]></SOURCE>
78
+ <TARGET><![CDATA[xvda]]></TARGET>
79
+ <TM_MAD><![CDATA[ssh]]></TM_MAD>
80
+ <TYPE><![CDATA[FILE]]></TYPE>
81
+ </DISK>
82
+ <ERROR>
83
+ <MESSAGE><![CDATA[Error executing image transfer script: Path https://somewhere.com/init.sh is not allowed!]]></MESSAGE>
84
+ <TIMESTAMP><![CDATA[Wed Nov 6 13:34:19 2013]]></TIMESTAMP>
85
+ </ERROR>
86
+ <FEATURES>
87
+ <ACPI><![CDATA[no]]></ACPI>
88
+ </FEATURES>
89
+ <MEMORY>1736960</MEMORY>
90
+ <NAME><![CDATA[one-36551]]></NAME>
91
+ <NIC>
92
+ <BRIDGE><![CDATA[xenbr0]]></BRIDGE>
93
+ <CLUSTER_ID><![CDATA[100]]></CLUSTER_ID>
94
+ <IP><![CDATA[123.123.5.5]]></IP>
95
+ <MAC><![CDATA[01:23:45:67:89:ab]]></MAC>
96
+ <NETWORK><![CDATA[public]]></NETWORK>
97
+ <NETWORK_ID><![CDATA[4]]></NETWORK_ID>
98
+ <VLAN><![CDATA[NO]]></VLAN>
99
+ <WHITE_PORTS_TCP><![CDATA[22]]></WHITE_PORTS_TCP>
100
+ <WHITE_PORTS_UDP><![CDATA[67,68]]></WHITE_PORTS_UDP>
101
+ </NIC>
102
+ <OS>
103
+ <BOOTLOADER><![CDATA[pygrub]]></BOOTLOADER>
104
+ </OS>
105
+ <RAW>
106
+ <TYPE><![CDATA[xen]]></TYPE>
107
+ </RAW>
108
+ <TEMPLATE_ID><![CDATA[66]]></TEMPLATE_ID>
109
+ <VCPU><![CDATA[1]]></VCPU>
110
+ <VMID><![CDATA[36551]]></VMID>
111
+ </TEMPLATE>
112
+ <USER_TEMPLATE>
113
+ <SCHED_REQUIREMENTS><![CDATA[CLUSTER_ID = 100]]></SCHED_REQUIREMENTS>
114
+ </USER_TEMPLATE>
115
+ <HISTORY_RECORDS>
116
+ <HISTORY>
117
+ <OID>36551</OID>
118
+ <SEQ>0</SEQ>
119
+ <HOSTNAME>supermachine1.somewhere.com</HOSTNAME>
120
+ <HID>11</HID>
121
+ <CID>100</CID>
122
+ <STIME>1383741169</STIME>
123
+ <ETIME>1383741259</ETIME>
124
+ <VMMMAD>vmm_xen</VMMMAD>
125
+ <VNMMAD>fw</VNMMAD>
126
+ <TMMAD>ssh</TMMAD>
127
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
128
+ <DS_ID>0</DS_ID>
129
+ <PSTIME>1383741169</PSTIME>
130
+ <PETIME>1383741259</PETIME>
131
+ <RSTIME>0</RSTIME>
132
+ <RETIME>0</RETIME>
133
+ <ESTIME>0</ESTIME>
134
+ <EETIME>0</EETIME>
135
+ <REASON>1</REASON>
136
+ <ACTION>0</ACTION>
137
+ </HISTORY>
138
+ <HISTORY>
139
+ <OID>36551</OID>
140
+ <SEQ>1</SEQ>
141
+ <HOSTNAME>supermachine1.somewhere.com</HOSTNAME>
142
+ <HID>11</HID>
143
+ <CID>100</CID>
144
+ <STIME>1383741589</STIME>
145
+ <ETIME>1383742270</ETIME>
146
+ <VMMMAD>vmm_xen</VMMMAD>
147
+ <VNMMAD>fw</VNMMAD>
148
+ <TMMAD>ssh</TMMAD>
149
+ <DS_LOCATION>/opt/opennebula/var/datastores</DS_LOCATION>
150
+ <DS_ID>0</DS_ID>
151
+ <PSTIME>1383741589</PSTIME>
152
+ <PETIME>1383741674</PETIME>
153
+ <RSTIME>1383741674</RSTIME>
154
+ <RETIME>1383742270</RETIME>
155
+ <ESTIME>1383742270</ESTIME>
156
+ <EETIME>1383742270</EETIME>
157
+ <REASON>0</REASON>
158
+ <ACTION>0</ACTION>
159
+ </HISTORY>
160
+ </HISTORY_RECORDS>
161
+ </VM>
@@ -178,6 +178,7 @@ describe OneWorker do
178
178
  data['network_outbound'] = 0
179
179
  data['memory'] = '1736960'
180
180
  data['image_name'] = 'image_name'
181
+ data['disk_size'] = 'NULL'
181
182
 
182
183
  data
183
184
  end
@@ -524,6 +525,15 @@ describe OneWorker do
524
525
  end
525
526
  end
526
527
 
528
+ context 'vm with TEMPLATE/DISK/VMCATCHER_EVENT_AD_MPURI' do
529
+ let(:filename) { 'one_worker_vm7.xml'}
530
+ let(:image_name) { 'https://appdb.egi.eu/store/vo/image/662b0e71-3e21-5f43-b6a1-cc2f51319fa7:156/' }
531
+
532
+ it 'uses TEMPLATE/DISK/VMCATCHER_EVENT_AD_MPURI for image id mapping' do
533
+ expect(subject.process_vm(vm, user_map, image_map)['image_name']).to eq(image_name)
534
+ end
535
+ end
536
+
527
537
  context 'vm without IMAGE_ID' do
528
538
  before :example do
529
539
  data['image_name'] = 'NULL'
@@ -587,6 +597,57 @@ describe OneWorker do
587
597
  expect(subject.process_vm(vm, user_map, image_map)['user_name']).to eq(user_name)
588
598
  end
589
599
  end
600
+
601
+ context 'vm with DISK SIZEs' do
602
+ before :example do
603
+ data['disk_size'] = 53
604
+ end
605
+
606
+ let(:filename) { 'one_worker_vm9.xml' }
607
+
608
+ it 'correctly sums disk sizes' do
609
+ expect(subject.process_vm(vm, user_map, image_map)).to eq(data)
610
+ end
611
+ end
612
+ end
613
+
614
+ describe '.sum_disk_size' do
615
+ let(:vm) do
616
+ xml = File.read("#{GEM_DIR}/mock/#{filename}")
617
+ OpenNebula::XMLElement.new(OpenNebula::XMLElement.build_xml(xml, 'VM'))
618
+ end
619
+
620
+ context 'vm with DISK without SIZE' do
621
+ let(:filename) { 'one_worker_valid_machine.xml' }
622
+
623
+ it 'returns NULL' do
624
+ expect(subject.sum_disk_size(vm)).to eq('NULL')
625
+ end
626
+ end
627
+
628
+ context 'vm with DISK with invalid SIZE' do
629
+ let(:filename) { 'one_worker_DISK_SIZE_nan.xml' }
630
+
631
+ it 'returns NULL' do
632
+ expect(subject.sum_disk_size(vm)).to eq('NULL')
633
+ end
634
+ end
635
+
636
+ context 'vm with single DISK and valid SIZE' do
637
+ let(:filename) { 'one_worker_vm7.xml' }
638
+
639
+ it 'return correct disk size' do
640
+ expect(subject.sum_disk_size(vm)).to eq(11)
641
+ end
642
+ end
643
+
644
+ context 'vm with multiple DISKs and valid SIZE' do
645
+ let(:filename) { 'one_worker_vm8.xml' }
646
+
647
+ it 'return correct disk size' do
648
+ expect(subject.sum_disk_size(vm)).to eq(53)
649
+ end
650
+ end
590
651
  end
591
652
 
592
653
  describe '.sum_rstime' do
@@ -688,6 +749,7 @@ describe OneWorker do
688
749
  data['network_outbound'] = 0
689
750
  data['memory'] = '1736960'
690
751
  data['image_name'] = 'image_name'
752
+ data['disk_size'] = 'NULL'
691
753
 
692
754
  data
693
755
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneacct-export
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Kimle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-09 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -177,6 +177,7 @@ files:
177
177
  - lib/sidekiq_conf.rb
178
178
  - lib/templates/apel-0.2.erb
179
179
  - mock/one_worker_DEPLOY_ID_missing.xml
180
+ - mock/one_worker_DISK_SIZE_nan.xml
180
181
  - mock/one_worker_DISK_missing.xml
181
182
  - mock/one_worker_ETIME_0.xml
182
183
  - mock/one_worker_ETIME_missing.xml
@@ -220,6 +221,9 @@ files:
220
221
  - mock/one_worker_vm4.xml
221
222
  - mock/one_worker_vm5.xml
222
223
  - mock/one_worker_vm6.xml
224
+ - mock/one_worker_vm7.xml
225
+ - mock/one_worker_vm8.xml
226
+ - mock/one_worker_vm9.xml
223
227
  - mock/one_writer_testfile
224
228
  - oneacct-export.gemspec
225
229
  - spec/one_data_accessor_spec.rb
@@ -261,4 +265,3 @@ test_files:
261
265
  - spec/oneacct_opts_spec.rb
262
266
  - spec/redis_conf_spec.rb
263
267
  - spec/spec_helper.rb
264
- has_rdoc: