1. 27 6月, 2016 5 次提交
    • L
      tests: mock virNetDevSetIPAddress · e1219b6f
      Laine Stump 提交于
      Now that we can include <interface type='ethernet'> in tests, we could
      almost test XML that has an <ip> element in an interface. Except that
      the test fails when it tries to actually set the IP address for the
      interface's tap device. This patch mocks virNetDevSetIPAddress() to
      just return success.
      e1219b6f
    • L
      conf: clean up virDomainNetIPParseXML() · bfd2de6e
      Laine Stump 提交于
      Rearrange this function to be better organized and more correct:
      
      * the error codes were changed from the incorrect INVALID_ARG to
        XML_ERROR
      
      * prefix still isn't required, but if present it must be valid or an
        error will be logged.
      
      * don't emit a debug log just because prefix is missing - this
        is valid.
      
      * group everything related to setting prefix in one place rather than
        scattered through the function.
      bfd2de6e
    • L
      global: consistently use IP rather than Ip in identifiers · 22a6873a
      Laine Stump 提交于
      I'm tired of mistyping this all the time, so let's do it the same all
      the time (similar to how we changed all "Pci" to "PCI" awhile back).
      
      (NB: I've left alone some things in the esx and vbox drivers because
      I'm unable to compile them and they weren't obviously *not* a part of
      some API. I also didn't change a couple of variables named,
      e.g. "somethingIptables", because they were derived from the name of
      the "iptables" command)
      22a6873a
    • L
      util: move virInterface(State|Link)/virNetDevFeature from conf to util · 638c6e5b
      Laine Stump 提交于
      These had been declared in conf/device_conf.h, but then used in
      util/virnetdev.c, meaning that we had to #include conf/device_conf.h
      in virnetdev.c (which we have for a long time said shouldn't be done.
      
      This caused a bigger problem when I tried to #include util/virnetdev.h
      in a file in src/conf (which is allowed) - for some reason the
      "device_conf.h: File not found" error.
      
      The solution is to move the data types and functions used in util
      sources from conf to util. Some names were adjusted during the move
      ("virInterface" --> "virNetDevIf", and "VIR_INTERFACE" -->
      "VIR_NETDEV_IF")
      638c6e5b
    • L
      util: move virNetDevLinkDump to virnetlink.c · 943a400c
      Laine Stump 提交于
      virNetDevLinkDump should have been in virnetlink.c, but that file
      didn't exist yet when the function was created. It didn't really
      matter until now - I found that having virnetlink.h included by
      virnetdev.h caused build problems when trying to #include virnetdev.h
      in a .c file in src/conf (due to missing directory in -I). Rather than
      fix that to further institutionalize the incorrect placement of this
      one function, this patch moves the function.
      943a400c
  2. 26 6月, 2016 21 次提交
  3. 25 6月, 2016 14 次提交