As far as I can tell all the things you mention can be done very easily in OpenNebula. However, things are done differently than in OpenStack, and imho in a much neater way 
You can define templates in either XML, the OpenNebula native syntax, or in the graphical user interface:
$ cat test.xml
<TEMPLATE>
<NAME>test</NAME>
<CONTEXT>
<FILES_DS><![CDATA[$FILE[IMAGE_ID=2]]]></FILES_DS>
<INIT_SCRIPTS><![CDATA[init.sh]]></INIT_SCRIPTS>
<NETWORK><![CDATA[YES]]></NETWORK>
<SSH_PUBLIC_KEY><![CDATA[$USER[SSH_PUBLIC_KEY]]]></SSH_PUBLIC_KEY>
</CONTEXT>
<CPU><![CDATA[1.0]]></CPU>
<DISK>
<IMAGE><![CDATA[c6]]></IMAGE>
</DISK>
<GRAPHICS>
<LISTEN><![CDATA[0.0.0.0]]></LISTEN>
<TYPE><![CDATA[vnc]]></TYPE>
</GRAPHICS>
<MEMORY><![CDATA[512]]></MEMORY>
<NIC>
<NETWORK><![CDATA[net_172]]></NETWORK>
</NIC>
<OS>
<ARCH><![CDATA[x86_64]]></ARCH>
</OS>
</TEMPLATE>
$ onetemplate create test.xml
# or ...
$ cat test.tpl
CONTEXT=[
INIT_SCRIPTS="init.sh",
FILES_DS="$FILE[IMAGE_ID=2]",
SSH_PUBLIC_KEY="$USER[SSH_PUBLIC_KEY]" ]
CPU="0.1"
DISK=[
IMAGE="ttylinux" ]
GRAPHICS=[
LISTEN="0.0.0.0",
TYPE="vnc" ]
MEMORY="64"
NIC=[
NETWORK="net_172_vlan",
NETWORK_UNAME="oneadmin" ]
OS=[
ARCH="x86_64" ]
$ onetemplate create test.tpl
You will notice that there is no embedded script in the template, that’s because we do it differently in OpenNebula. In OpenNebula we register the script separately and specify in the template that it should be included into the VM and executed. The FILES_DS parameter indicates what files to include into the VM, and the INIT_SCRIPTS what files to execute.
$ oneimage create --name init.sh --path init.sh --type context -d files
ID: 2
All of this will only work if the Virtual Machine OS image has the OpenNebula Context Packages installed.
Many of the stuff that you have in the user_data
section can be done directly with OpenNebula, without putting them in a script. For instance, networking will be automatically configured, no need to do that manually in the script. The network information is sent to the VM via contextualization mechanism and that is transparent to the user. More info here.
Also note that all these things can be in Sunstone, the web gui, very easily.
Disclaimer: I haven’t tested any of the templates or commands, just wrote them off the top of my head, there are probably missing attributes and syntax errors everywhere.