Project

General

Profile

action #58490

Updated by livdywan over 4 years ago

Try to do update operation but 400 back. 

 ``` 
 linux-4360:/usr/share/openqa/script # ./dump_templates --host localhost --group "cc" --json --full >bb.json 
 linux-4360:/usr/share/openqa/script # ./load_templates bb.json --update  
 { 
   JobGroups      => [ 
                     { 
                       group_name => "cc", 
                       template     => "defaults:\n    x86_64:\n      machine: 64bit\n      priority: 50\nproducts:\n    aa-aa-Server-DVD-x86_64:\n      distri: aa\n      flavor: Server-DVD\n      version: aa\nscenarios:\n    x86_64:\n      aa-aa-Server-DVD-x86_64:\n      - '1'\n", 
                     }, 
                   ], 
   JobTemplates => [ 
                     { 
                       group_name => "cc", 
                       machine => { name => "64bit" }, 
                       prio => 50, 
                       product => { 
                         arch      => "x86_64", 
                         distri    => "aa", 
                         flavor    => "Server-DVD", 
                         group     => "aa-aa-Server-DVD", 
                         version => "aa", 
                       }, 
                       test_suite => { name => 1 }, 
                     }, 
                   ], 
   Machines       => [ 
                     { 
                       backend => "qemu", 
                       name => "64bit", 
                       settings => [ 
                         { key => "HDDSIZEGB", value => 20 }, 
                         { key => "QEMUCPU", value => "qemu64" }, 
                         { key => "VIRTIO_CONSOLE", value => 1 }, 
                         { key => "WORKER_CLASS", value => "qemu_x86_64" }, 
                       ], 
                     }, 
                   ], 
   Products       => [ 
                     { 
                       arch       => "x86_64", 
                       distri     => "aa", 
                       flavor     => "Server-DVD", 
                       settings => [], 
                       version    => "aa", 
                     }, 
                   ], 
   TestSuites     => [{ name => 1, settings => [] }], 
 } 
 ERROR: 400 - Bad Request 
 { 
   error => [ 
     "Job template name '1' with aa-aa-Server-DVD-x86_64 and 64bit is already used in job group 'cc'", 
   ], 
   error_status => 400, 
   id => 3, 
 } 
 { 
   JobGroups      => { added => 0, of => 1 }, 
   JobTemplates => { added => 0, of => 1 }, 
   Machines       => { added => 1, of => 1 }, 
   Products       => { added => 1, of => 1 }, 
   TestSuites     => { added => 1, of => 1 }, 
 } 
 ```

Back