/etc/one/occi_templates/common.erb is in opennebula 3.4.1-4.1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #
# This template is processed by the OCCI Server to include specific data for the
# instance, you should not need to modify the ruby code.
# You can add common attributes for your cloud templates (e.g. OS)
#
<% if @vm_info['NAME'] %>
NAME = "<%= @vm_info['NAME'] %>"
<% end %>
<% @vm_info.each('DISK') do |disk| %>
<% if disk.attr('STORAGE','href') %>
DISK = [ IMAGE_ID = <%= disk.attr('STORAGE','href').split('/').last %>
]
<% end %>
<% end %>
<% @vm_info.each('NIC') do |nic| %>
<% if nic.attr('NETWORK','href') %>
NIC = [ NETWORK_ID = <%= nic.attr('NETWORK','href').split('/').last %>
<% if nic['IP'] %>
,IP = <%= nic['IP'] %>
<% end %>
]
<% end %>
<% end %>
<% if @vm_info.has_elements?('CONTEXT') %>
CONTEXT = [
<% first = true %>
<% @vm_info.each('CONTEXT/*') do |cont| %>
<% if cont.text %>
<% if first %>
<%= cont.name %> = "<%= cont.text %>"
<% first = false %>
<% else %>
,<%= cont.name %> = "<%= cont.text %>"
<% end %>
<% end %>
<% end %>
]
<% end %>
INSTANCE_TYPE = <%= @itype %>
|