api: create/register/upload template with empty template tag (#12234)

This commit is contained in:
Wei Zhou 2025-12-16 15:48:06 +01:00 committed by GitHub
parent 67217d4d2e
commit ba26d95ad7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -211,7 +211,7 @@ public class CreateTemplateCmd extends BaseAsyncCreateCmd implements UserCmd {
} }
public String getTemplateTag() { public String getTemplateTag() {
return templateTag; return StringUtils.isBlank(templateTag) ? null : templateTag;
} }
public Map getDetails() { public Map getDetails() {

View File

@ -160,7 +160,7 @@ public class GetUploadParamsForTemplateCmd extends AbstractGetUploadParamsCmd {
} }
public String getTemplateTag() { public String getTemplateTag() {
return templateTag; return StringUtils.isBlank(templateTag) ? null : templateTag;
} }
public boolean isDeployAsIs() { public boolean isDeployAsIs() {

View File

@ -265,7 +265,7 @@ public class RegisterTemplateCmd extends BaseCmd implements UserCmd {
} }
public String getTemplateTag() { public String getTemplateTag() {
return templateTag; return StringUtils.isBlank(templateTag) ? null : templateTag;
} }
public Map getDetails() { public Map getDetails() {

View File

@ -734,7 +734,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
logger.debug("Unable to allocate proxy {} with {} in {} due to [{}]. Retrying with another template", proxy, template, dc, e.getMessage(), e); logger.debug("Unable to allocate proxy {} with {} in {} due to [{}]. Retrying with another template", proxy, template, dc, e.getMessage(), e);
continue; continue;
} }
throw new CloudRuntimeException("Failed to allocate proxy [%s] in zone [%s] with available templates", e); throw new CloudRuntimeException(String.format("Failed to allocate proxy [%s] in zone [%s] with available templates", proxy, dc), e);
} }
} }