mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
(cherry picked from commit 596edabe7f216f9c634e3ce6cd7d5c6760550c53)
This commit is contained in:
parent
7ae71e9384
commit
584f9b818f
@ -357,7 +357,15 @@ module OpenNebula
|
||||
|
||||
break rc if OpenNebula.is_error?(rc)
|
||||
|
||||
rc = template.clone("#{template.name}-#{name}", recursive)
|
||||
# The maximum size is 128, so crop the template name if it
|
||||
# exceeds the limit
|
||||
new_name = "#{template.name}-#{name}"
|
||||
|
||||
if new_name.size > 128
|
||||
new_name = "#{template.name[0..(126 - name.size)]}-#{name}"
|
||||
end
|
||||
|
||||
rc = template.clone(new_name, recursive)
|
||||
|
||||
break rc if OpenNebula.is_error?(rc)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user