Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ UPDATE `cloud`.`alert` SET type = 34 WHERE name = 'ALERT.VR.PRIVATE.IFACE.MTU';

-- Update configuration 'kvm.ssh.to.agent' description and is_dynamic fields
UPDATE `cloud`.`configuration` SET description = 'True if the management server will restart the agent service via SSH into the KVM hosts after or during maintenance operations', is_dynamic = 1 WHERE name = 'kvm.ssh.to.agent';

-- Update existing vm_template records with NULL type to "USER"
UPDATE `cloud`.`vm_template` SET `type` = 'USER' WHERE `type` IS NULL;
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,7 @@ public TemplateType validateTemplateType(BaseCmd cmd, boolean isAdmin, boolean i
} else if ((cmd instanceof RegisterVnfTemplateCmd || cmd instanceof UpdateVnfTemplateCmd) && !TemplateType.VNF.equals(templateType)) {
throw new InvalidParameterValueException("The template type must be VNF for VNF templates, but the actual type is " + templateType);
}
} else if (cmd instanceof RegisterTemplateCmd) {
} else if (cmd instanceof RegisterTemplateCmd || cmd instanceof GetUploadParamsForTemplateCmd) {
boolean isRouting = Boolean.TRUE.equals(isRoutingType);
templateType = (cmd instanceof RegisterVnfTemplateCmd) ? TemplateType.VNF : (isRouting ? TemplateType.ROUTING : TemplateType.USER);
}
Expand All @@ -2426,6 +2426,8 @@ public TemplateType validateTemplateType(BaseCmd cmd, boolean isAdmin, boolean i
throw new InvalidParameterValueException(String.format("Users can not register Template with template type %s.", templateType));
} else if (cmd instanceof UpdateTemplateCmd) {
throw new InvalidParameterValueException(String.format("Users can not update Template to template type %s.", templateType));
} else if (cmd instanceof GetUploadParamsForTemplateCmd) {
throw new InvalidParameterValueException(String.format("Users can not request upload parameters for Template with template type %s.", templateType));
}
}
return templateType;
Expand Down
Loading