1. 14 12月, 2018 13 次提交
  2. 31 8月, 2018 1 次提交
  3. 15 8月, 2018 1 次提交
    • M
      qapi: Fix some pycodestyle-3 complaints · b736e25a
      Markus Armbruster 提交于
      Fix the following issues:
      
          common.py:873:13: E129 visually indented line with same indent as next logical line
          common.py:1766:5: E741 ambiguous variable name 'l'
          common.py:1784:1: E305 expected 2 blank lines after class or function definition, found 1
          common.py:1833:1: E305 expected 2 blank lines after class or function definition, found 1
          common.py:1843:1: E305 expected 2 blank lines after class or function definition, found 1
          visit.py:181:18: E127 continuation line over-indented for visual indent
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180621083551.775-1-armbru@redhat.com>
      [Fixup squashed in:]
      Message-ID: <871sd0nzw9.fsf@dusky.pond.sub.org>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      b736e25a
  4. 04 7月, 2018 3 次提交
  5. 03 7月, 2018 1 次提交
  6. 22 6月, 2018 1 次提交
    • A
      qapi: allow empty branches in flat unions · 800877bb
      Anton Nefedov 提交于
      It often happens that just a few discriminator values imply extra data in
      a flat union. Existing checks did not make possible to leave other values
      uncovered. Such cases had to be worked around by either stating a dummy
      (empty) type or introducing another (subset) discriminator enumeration.
      
      Both options create redundant entities in qapi files for little profit.
      
      With this patch it is not necessary anymore to add designated union
      fields for every possible value of a discriminator enumeration.
      Signed-off-by: NAnton Nefedov <anton.nefedov@virtuozzo.com>
      Message-Id: <1529311206-76847-2-git-send-email-anton.nefedov@virtuozzo.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      800877bb
  7. 31 5月, 2018 2 次提交
    • I
      tests: qapi-schema tests for allow-preconfig · 7b13f2c2
      Igor Mammedov 提交于
      use new allow-preconfig parameter in tests and make sure that
      the QAPISchema can parse allow-preconfig correctly
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1526058959-41425-1-git-send-email-imammedo@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      7b13f2c2
    • I
      qapi: introduce new cmd option "allow-preconfig" · d6fe3d02
      Igor Mammedov 提交于
      New option will be used to allow commands, which are prepared/need
      to run, during preconfig state. Other commands that should be able
      to run in preconfig state, should be amended to not expect machine
      in initialized state or deal with it.
      
      For compatibility reasons, commands that don't use new flag
      'allow-preconfig' explicitly are not permitted to run in
      preconfig state but allowed in all other states like they used
      to be.
      
      Within this patch allow following commands in preconfig state:
         qmp_capabilities
         query-qmp-schema
         query-commands
         query-command-line-options
         query-status
         exit-preconfig
      to allow qmp connection, basic introspection and moving to the next
      state.
      
      PS:
      set-numa-node and query-hotpluggable-cpus will be enabled later in
      a separate patches.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <1526057503-39287-1-git-send-email-imammedo@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      [ehabkost: Changed "since 2.13" to "since 3.0"]
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      d6fe3d02
  8. 27 3月, 2018 2 次提交
  9. 20 3月, 2018 1 次提交
  10. 03 3月, 2018 6 次提交
  11. 06 2月, 2018 2 次提交
  12. 21 12月, 2017 4 次提交
  13. 01 9月, 2017 1 次提交
    • E
      qapi: Fix error handling code on alternate conflict · fda72ab4
      Eduardo Habkost 提交于
      The conflict check added by commit c0644771 ("qapi: Reject
      alternates that can't work with keyval_parse()") doesn't work
      with the following declaration:
      
        { 'alternate': 'Alt',
          'data': { 'one': 'bool',
                    'two': 'str' } }
      
      It crashes with:
      
        Traceback (most recent call last):
          File "./scripts/qapi-types.py", line 295, in <module>
            schema = QAPISchema(input_file)
          File "/home/ehabkost/rh/proj/virt/qemu/scripts/qapi.py", line 1468, in __init__
            self.exprs = check_exprs(parser.exprs)
          File "/home/ehabkost/rh/proj/virt/qemu/scripts/qapi.py", line 958, in check_exprs
            check_alternate(expr, info)
          File "/home/ehabkost/rh/proj/virt/qemu/scripts/qapi.py", line 830, in check_alternate
            % (name, key, types_seen[qtype]))
        KeyError: 'QTYPE_QSTRING'
      
      This happens because the previously-seen conflicting member
      ('one') can't be found at types_seen[qtype], but at
      types_seen['QTYPE_BOOL'].
      
      Fix the bug by moving the error check to the same loop that adds
      new items to types_seen, raising an exception if types_seen[qt]
      is already set.
      
      Add two additional test cases that can detect the bug.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170717180926.14924-1-ehabkost@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      fda72ab4
  14. 24 7月, 2017 1 次提交
  15. 20 6月, 2017 1 次提交