1. 27 7月, 2016 19 次提交
    • P
      util: storage: Add parser for qemu's json backing pseudo-protocol · e91f767c
      Peter Krempa 提交于
      Add a modular parser that will allow to parse 'json' backing definitions
      that are supported by qemu. The initial implementation adds support for
      the 'file' driver.
      
      Due to the approach qemu took to implement the JSON backing strings it's
      possible to specify them in two approaches.
      
      The object approach:
          json:{ "file" : { "driver":"file",
                            "filename":"/path/to/file"
                          }
               }
      
      And a partially flattened approach:
          json:{"file.driver":"file"
                "file.filename":"/path/to/file"
               }
      
      Both of the above are supported by qemu and by the code added in this
      commit. The current implementation de-flattens the first level ('file.')
      if possible and required. Other handling may be added later but
      currently only one level was possible anyways.
      e91f767c
    • P
      util: json: Make first argument of virJSONValueCopy const · 22ad4a7c
      Peter Krempa 提交于
      It's just read.
      22ad4a7c
    • S
      qemu: Adjust the cur_ballon on coldplug/unplug of dimms · 707063ef
      Shivaprasad G Bhat 提交于
      The cur_balloon also increases/decreases with dimm hotplug/unplug.
      To be consistent, adjust the value for coldplug too. This was inconsistently
      taken care when cur_ballon != memory to begin with. The patch fixes it
      irrespective of that.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      707063ef
    • E
      virconf: Fix config file path construction · c5d0a2a3
      Erik Skultety 提交于
      Since commit c4bdff19, the path to the configuration file has been constructed
      in the following manner:
       - if no config filename was passed to virConfLoadConfigPath, libvirt.conf was
       used as default
       - otherwise the filename was concatenated with
       "<config_dir>/libvirt/libvirt%s%s.conf" which in admin case resulted in
       "libvirt-libvirt-admin.conf.conf". Obviously, this non-existent config led to
       ignoring  all user settings in libvirt-admin.conf. This patch requires the
       config filename to be always provided as an argument with the concatenation
       being simplified.
      
       Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1357364Signed-off-by: NErik Skultety <eskultet@redhat.com>
      c5d0a2a3
    • R
      docs: Add Kimchi as Web Application · 3b9c60af
      Ramon Medeiros 提交于
      Kimchi is a open-source interface to kvm. It runs with HTML5, simple and
      easy to manage kvm guests.
      Signed-off-by: NRamon Medeiros <ramonn@linux.vnet.ibm.com>
      3b9c60af
    • P
      util: qemu: Don't generate any extra commas in virQEMUBuildCommandLineJSON · ca620e35
      Peter Krempa 提交于
      The function would generate a leading comma. Let the callers properly
      add commas by formatting the commas at the end and trimming the trailing
      one.
      ca620e35
    • P
      util: qemu: Allow for different approaches to format JSON arrays · b7eef33d
      Peter Krempa 提交于
      For use with memory hotplug virQEMUBuildCommandLineJSONRecurse attempted
      to format JSON arrays as bitmap on the command line. Make the formatter
      function configurable so that it can be reused with different syntaxes
      of arrays such as numbered arrays for use with disk sources.
      
      This patch extracts the code and adds a parameter for the function that
      will allow to plug in different formatters.
      b7eef33d
    • P
      util: qemu: Allow nested objects in JSON -> commandline generator · cd86d6f4
      Peter Krempa 提交于
      Move the iterator of objects to the recursive function so that nested
      objects are supported by flattening the structure with '.' delimiters.
      cd86d6f4
    • P
      util: qemu: Add support for user-passed strings in JSON->commandline · 25a272ad
      Peter Krempa 提交于
      Until now the JSON->commandline convertor was used only for objects
      created by qemu. To allow reusing it with disk formatter we'll need to
      escape ',' as usual in qemu commandlines.
      25a272ad
    • P
      util: qemu: Add wrapper for JSON -> commandline conversion · f0276c34
      Peter Krempa 提交于
      Refactor the command line generator by adding a wrapper (with
      documentation) that will handle the outermost object iteration.
      
      This patch also renames the functions and tweaks the error message for
      nested arrays to be more universal.
      
      The new function is then reused to simplify qemucommandutiltest.
      f0276c34
    • P
      util: json: Make first argument of virJSONValueObjectForeachKeyValue const · bc433971
      Peter Krempa 提交于
      The iterator function (second argument) already requires that the object
      is handled as 'const' thus we won't modify the object itself.
      bc433971
    • P
      tests: Add testing of backing store string parser · 4e3dbfa2
      Peter Krempa 提交于
      As we already test that the extraction of the backing store string works
      well additional tests for the backing store string parser can be made
      simpler.
      
      Export virStorageSourceNewFromBackingAbsolute and use it to parse the
      backing store strings, format them using virDomainDiskSourceFormat and
      match them against expected XMLs.
      4e3dbfa2
    • P
      tests: qemuxml2xml: Avoid crash when processing an XML that fails to parse · c934f1e0
      Peter Krempa 提交于
      Failure to parse a XML that was not supposed to fail would result into a
      crash in the test suite as the vcpu bitmap would not be filled prior to
      the active XML->XML test.
      
      Skip formatting of the vcpu snippet in the fake status XML formatter in
      such case to avoid the crash. The test would fail anyways.
      c934f1e0
    • J
      Remove unnecessary virDomainDefClearDeviceAliases · fc0378a9
      John Ferlan 提交于
      Nothing in the code path after the removed call has needs/uses the alias
      anyway (as would be the case for command line building or talking to monitor).
      The alias is VIR_FREE'd in virDomainDeviceInfoClear which is called for any
      device that needs/uses an alias via virDomainDeviceDefFree or virDomainDefFree
      as well as during virDomainDeviceInfoFree for host devices.
      
      For persistent domains, the domain definition (including aliases) gets
      freed a few screens later when it's replaced with newDef.
      
      For transient domains, the definition is freed/unref'd along with the
      virDomainObj a few moments later.
      fc0378a9
    • J
      conf: Remove CCW,PCI clear address helpers · d95f5beb
      John Ferlan 提交于
      Since commit id 'fb063500' these are no longer called, so remove them
      d95f5beb
    • J
      libxl: implement virDomainBlockStats · eee7bd4e
      Joao Martins 提交于
      Introduce initial support for domainBlockStats API call that
      allow us to query block device statistics. OpenStack nova
      uses this API call to query block statistics, alongside
      virDomainMemoryStats and virDomainInterfaceStats.  Note that
      this patch only introduces it for VBD for starters. QDisk
      would come in a separate patch series.
      
      A new statistics data structure is introduced to fit common
      statistics among others specific to the underlying block
      backends. For the VBD statistics on linux these are exported
      via sysfs on the path:
      
      "/sys/bus/xen-backend/devices/vbd-<domid>-<devid>/statistics"
      
      To calculate the block devno libxlDiskPathToID is introduced.
      Each backend implements its own function to extract statistics,
      allowing support for multiple backends and different platforms.
      
      VBD stats are exposed in reqs and number of sectors from
      blkback, and it's up to us to convert it to sector sizes.
      The sector size is gathered through xenstore in the device
      backend entry "physical-sector-size".
      
      BlockStatsFlags variant is also implemented which has the
      added benefit of getting the number of flush requests.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      eee7bd4e
    • H
      qemu: rename QEMU_CAPS_MLOCK to QEMU_CAPS_REALTIME_MLOCK · e975fd2d
      Henning Schild 提交于
      Purely cosmetic change to be consistent with the other names.
      Signed-off-by: NHenning Schild <henning.schild@siemens.com>
      e975fd2d
    • J
      conf: events: handle NULL uuid · 2bfa7513
      Jovanka Gulicoska 提交于
      Not all objects have a uuid, such as nodedevs. When we add events
      support for them, NULL will be passed here, so handle it.
      2bfa7513
    • A
  2. 26 7月, 2016 10 次提交
  3. 25 7月, 2016 8 次提交
  4. 24 7月, 2016 1 次提交
  5. 22 7月, 2016 2 次提交