Skip to content
Snippets Groups Projects
Commit cd82c95c authored by ping's avatar ping
Browse files

Add missing creationTime field to template.json

parent ec21fbd2
No related branches found
No related tags found
1 merge request!5Add missing creationTime field to template.json
......@@ -33,7 +33,8 @@ function create_template_file {
"id": "${1}",
"name": "${2}",
"owner": "${3}",
"access": "${4}"
"access": "${4}",
"creationTime": "${5}"
}
EOL
}
......@@ -66,6 +67,7 @@ name=$1
owner=$2
vis=$3
iso_image=$4
creation_time=$(date -u '+%Y-%m-%dT%H:%M:%SZ')
[[ -f $iso_image ]] || { echoerr "ISO image \"$iso_image\" not found!" ; exit 1 ; }
......@@ -86,7 +88,7 @@ mkdir $id
create_disk $id
run_qemu $id $CPU $RAM $DISK $iso_image
create_template_file $id "$name" "$owner" "$vis"
create_template_file $id "$name" "$owner" "$vis" "$creation_time"
archive_template $id
echo "Template created successfully."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment