def add(caller_id, name, memory, cpu, description, points, ec2name): """ Creates and saves new VM Template. @cmview_admin_cm @param_post{name,string} @param_post{memory,int} @param_post{cpu,int} @param_post{description,string} @param_post{points,int} @param_post{ec2name,string} name for EC2 interface """ try: template = Template() template.name = name template.memory = memory template.cpu = cpu template.description = description template.points = points template.ec2name = ec2name template.state = template_states['active'] template.save() except: raise CMException('template_create')