But when I launch the script with a base64 template in argument, I got this errors :
/var/lib/one/remotes/datastore/xpath.rb:66:in block in <main>': undefined methodelements’ for nil:NilClass (NoMethodError)
from /var/lib/one/remotes/datastore/xpath.rb:60:in each' from /var/lib/one/remotes/datastore/xpath.rb:60:in‘
/var/lib/one/remotes/datastore/xpath.rb:66:in block in <main>': undefined methodelements’ for nil:NilClass (NoMethodError)
from /var/lib/one/remotes/datastore/xpath.rb:60:in each' from /var/lib/one/remotes/datastore/xpath.rb:60:in’
#!/bin/bash
# Argument hook for virtual network add to oned.conf
# VNET_HOOK = [
# name="bash_arguments",
# on="CREATE",
# command=<path_to_this_file>,
# arguments="$TEMPLATE" ]
XPATH=/var/lib/one/remotes/datastore/xpath.rb
T64=$1
USER_NAME=`$XPATH -b $T64 UNAME`
OWNER_USE_PERMISSION=`$XPATH -b $T64 PERMISSIONS/OWNER_U`
#UNAME and PERMISSIONS/OWNER_U are the XPATH for the attributes without the root element