Revision c523b889 src/datastore/Datastore.cc

View differences:

src/datastore/Datastore.cc
122 122
/* ------------------------------------------------------------------------ */
123 123
/* ------------------------------------------------------------------------ */
124 124

  
125
Datastore::DatastoreType Datastore::type_in_template(string& str_template)
126
{
127
    string s_ds_type;
128
    string error_str;
129

  
130
    Template tmp_template;
131
    tmp_template.parse_str_or_xml(str_template, error_str);
132

  
133
    tmp_template.get("TYPE", s_ds_type);
134

  
135
    return Datastore::str_to_type(s_ds_type);
136
}
137

  
138
/* ------------------------------------------------------------------------ */
139
/* ------------------------------------------------------------------------ */
140

  
141 125
int Datastore::insert(SqlDB *db, string& error_str)
142 126
{
143 127
    int           rc;
......
447 431
    else
448 432
    {
449 433
        type = str_to_type(s_ds_type);
450
    }
451 434

  
452
    replace_template_attribute("TYPE", type_to_str(type));
435
        replace_template_attribute("TYPE", type_to_str(type));
436
    }
453 437

  
454 438
    if ( type == SYSTEM_DS )
455 439
    {

Also available in: Unified diff