[one-users] Re : Add network context variables automatically
Nicolas AGIUS
nicolas.agius at lps-it.fr
Tue Feb 19 01:13:08 PST 2013
Hi,
I've done somethings like this with OCCI.
I put all the IP stuff in the network template and added the following in "common.erb" :
CONTEXT=[
TARGET=xvdb
<% devnum = 0 %>
<% @vm_info.each('NIC') do |nic| %>
<% if nic.attr('NETWORK','href') %>
,CTX_ETH<%= devnum %> = "$NETWORK[TEMPLATE, NETWORK_ID = <%= nic.attr('NETWORK','href').split('/').last %> ]"
<% devnum += 1 %>
<% end %>
<% end %>
]
And I get all networks templates in the context file.
Cheers,
Nicolas AGIUS
--- En date de : Lun 18.2.13, Oriol Martí <omarti at cesca.cat> a écrit :
De: Oriol Martí <omarti at cesca.cat>
Objet: [one-users] Add network context variables automatically
À: "Users OpenNebula" <users at lists.opennebula.org>
Date: Lundi 18 février 2013, 15h20
Hello,
after looking the mechanism of the contextualization variables to set the network configuration, my idea is to pass the network parameters with contextualization, my idea is to add to the context variables the IP, netmask, DNS,... of the related NICs.
I've been thinking to add a hook on create a VM, but I don't know if I can modify the context variables at this point, does anybody know if is possible?
Maybe another solution could be launching the hook on the physical node and modifying directly the cdrom image that opennebula creates, but I'm not sure if this procedure it will be good because maybe the cdrom image is not created when the hook is launched and can fail easily.
Does anybody know if is possible to do? Maybe the only solution is modifying source code? Where can I start?
Thank you all,
_______________________________________________
Users mailing list
Users at lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130219/45b4e538/attachment-0002.htm>
More information about the Users
mailing list