1. 07 7月, 2016 2 次提交
  2. 02 7月, 2016 7 次提交
    • L
      qemu: support setting host-side IP addresses/routes · fe8567f6
      Laine Stump 提交于
      For type='ethernet' interfaces only.
      
      (This patch had been pushed earlier in
      commit 0b4645a7, but was reverted in
      commit 84d47a3c because it had been
      accidentally pushed during the freeze for release 2.0.0)
      fe8567f6
    • L
      conf: support host-side IP/route information in <interface> · 98fa8f3e
      Laine Stump 提交于
      This is place as a sub-element of <source>, where other aspects of the
      host-side connection to the network device are located (network or
      bridge name, udp listen port, etc). It's a bit odd that the interface
      we're configuring with this info is itself named in <target dev='x'/>,
      but that ship sailed long ago:
      
          <interface type='ethernet'>
            <mac address='00:16:3e:0f:ef:8a'/>
            <source>
              <ip address='192.168.122.12' family='ipv4'
                  prefix='24' peer='192.168.122.1'/>
              <ip address='192.168.122.13' family='ipv4' prefix='24'/>
              <route family='ipv4' address='0.0.0.0'
                     gateway='192.168.122.1'/>
              <route family='ipv4' address='192.168.124.0' prefix='24'
                     gateway='192.168.124.1'/>
            </source>
          </interface>
      
      In practice, this will likely only be useful for type='ethernet', so
      its presence in any other type of interface is currently forbidden in
      the generic device Validate function (but it's been put into the
      general population of virDomainNetDef rather than the
      ethernet-specific union member so that 1) we can more easily add the
      capability to other types if needed, and 2) we can retain the info
      when set to an invalid interface type all the way through to
      validation and report a proper error, rather than just ignoring it
      (which is currently what happens for many other type-specific
      settings).
      
      (NB: The already-existing configuration of IP info for the guest-side
      of interfaces is in subelements directly under <interface>, and the
      name of the guest-side interface (when configurable) is in <guest
      dev='x'/>).
      
      (This patch had been pushed earlier in
      commit fe6a7789, but was reverted in
      commit d6584565 because it had been
      accidentally pushed during the freeze for release 2.0.0)
      98fa8f3e
    • J
      encryption: Add <cipher> and <ivgen> to encryption · 2552fec2
      John Ferlan 提交于
      For a luks device, allow the configuration of a specific cipher to be
      used for encrypting the volume.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      2552fec2
    • J
      encryption: Add luks parsing for storageencryption · 9bbf0d7e
      John Ferlan 提交于
      Add parse and format of the luks/passphrase secret including tests for
      volume XML parsing.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      9bbf0d7e
    • J
      util: Add 'usage' for encryption · 47e88b33
      John Ferlan 提交于
      In order to use more common code and set up for a future type, modify the
      encryption secret to allow the "usage" attribute or the "uuid" attribute
      to define the secret. The "usage" in the case of a volume secret would be
      the path to the volume as dictated by the backwards compatibility brought
      on by virStorageGenerateQcowEncryption where it set up the usage field as
      the vol->target.path and didn't allow someone to provide it. This carries
      into virSecretObjListFindByUsageLocked which takes the secret usage attribute
      value from from the domain disk definition and compares it against the
      usage type from the secret definition. Since none of the code dealing
      with qcow/qcow2 encryption secrets uses usage for lookup, it's a mostly
      cosmetic change. The real usage comes in a future path where the encryption
      is expanded to be a luks volume and the secret will allow definition of
      the usage field.
      
      This code will make use of the virSecretLookup{Parse|Format}Secret common code.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      47e88b33
    • J
      conf: Add new secret type "passphrase" · c8438010
      John Ferlan 提交于
      Add a new secret type known as "passphrase" - it will handle adding the
      secret objects that need a passphrase without a specific username.
      
      The format is:
      
         <secret ...>
           <uuid>...</uuid>
           ...
           <usage type='passphrase'>
             <name>mumblyfratz</name>
           </usage>
         </secret>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      c8438010
    • B
      Allow custom metadata in network configuration XML · 47a0866b
      Brandon Bennett 提交于
          This replicates the metadata field found in the domain configuration
          and adds it to the network configuration XML.
      47a0866b
  3. 01 7月, 2016 4 次提交
  4. 30 6月, 2016 1 次提交
  5. 27 6月, 2016 8 次提交
    • J
      Revert "conf: support host-side IP/route information in <interface>" · d6584565
      Ján Tomko 提交于
      This reverts commit fe6a7789.
      
      This feature was accidentally pushed in the feature freeze.
      d6584565
    • J
      Revert "qemu: support setting host-side IP addresses/routes" · 84d47a3c
      Ján Tomko 提交于
      This reverts commit 0b4645a7.
      
      This feature was accidentally pushed in the feature freeze.
      84d47a3c
    • A
      Clean up after virNetDevIP creation · 7970436e
      Andrea Bolognani 提交于
      Commit cf0568b0 moved a bunch of functions from virNetDev
      to the more specific virNetDevIP; however, not all of the
      existing uses were moved properly, causing build failures on
      FreeBSD.
      
      Complete the transition to the new names and drop the
      obsolete declarations from the header file while at it.
      7970436e
    • L
      qemu: support setting host-side IP addresses/routes · 0b4645a7
      Laine Stump 提交于
      For type='ethernet' interfaces only.
      0b4645a7
    • L
      conf: support host-side IP/route information in <interface> · fe6a7789
      Laine Stump 提交于
      This is place as a sub-element of <source>, where other aspects of the
      host-side connection to the network device are located (network or
      bridge name, udp listen port, etc). It's a bit odd that the interface
      we're configuring with this info is itself named in <target dev='x'/>,
      but that ship sailed long ago:
      
          <interface type='ethernet'>
            <mac address='00:16:3e:0f:ef:8a'/>
            <source>
              <ip address='192.168.122.12' family='ipv4'
                  prefix='24' peer='192.168.122.1'/>
              <ip address='192.168.122.13' family='ipv4' prefix='24'/>
              <route family='ipv4' address='0.0.0.0'
                     gateway='192.168.122.1'/>
              <route family='ipv4' address='192.168.124.0' prefix='24'
                     gateway='192.168.124.1'/>
            </source>
          </interface>
      
      In practice, this will likely only be useful for type='ethernet', so
      its presence in any other type of interface is currently forbidden in
      the generic device Validate function (but it's been put into the
      general population of virDomainNetDef rather than the
      ethernet-specific union member so that 1) we can more easily add the
      capability to other types, and 2) we can retain the info when set to
      an invalid interface type all the way through to validation and report
      a proper error, rather than just ignoring it (which is currently what
      happens for many other type-specific settings).
      
      (NB: The already-existing configuration of IP info for the guest-side
      of interfaces is in subelements directly under <interface>, and the
      name of the guest-side interface (when configurable) is in <guest
      dev='x'/>).
      fe6a7789
    • L
      conf/openvz: eliminate incorrect/undocumented use of <source dev='blah'/> · 9658e70f
      Laine Stump 提交于
      When support for <interface type='ethernet'> was added in commit
      9a4b705f back in 2010, it erroneously looked at <source dev='blah'/>
      for a user-specified guest-side interface name. This was never
      documented though. (that attribute already existed at the time in the
      data.ethernet union member of virDomainNetDef, but apparently had no
      practical use - it was only used as a storage place for a NetDef's
      bridge name during qemuDomainXMLToNative(), but even then that was
      never used for anything).
      
      When support for similar guest-side device naming was added to the lxc
      driver several years later, it was put in a new subelement <guest
      dev='blah'/>.
      
      In the intervening years, since there was no validation that
      ethernet.dev was NULL in the other drivers that didn't actually use
      it, innocent souls who were adding other features assuming they needed
      to account for non-NULL ethernet.dev when really they didn't, so
      little bits of the usual pointless cargo-cult code showed up.
      
      This patch not only switches the openvz driver to use the documented
      <guest dev='blah'/> notation for naming the guest-side device (just in
      case anyone is still using the openvz driver), and logs an error if
      anyone tries to set <source dev='blah'/> for a type='ethernet'
      interface, it also removes the cargo-cult uses of ethernet.dev and
      <source dev='blah'/>, and eliminates if from the RNG and from
      virDomainNetDef.
      
      NB: I decided on this course of action after mentioning the
      inconsistency here:
      
        https://www.redhat.com/archives/libvir-list/2016-May/msg02038.html
      
      and getting encouragement do eliminate it in a later IRC discussion
      with danpb.
      9658e70f
    • 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
      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
  6. 25 6月, 2016 4 次提交
  7. 24 6月, 2016 9 次提交
  8. 23 6月, 2016 3 次提交
  9. 22 6月, 2016 2 次提交