Comment 14 for bug 1739593

Submitter: Zuul
Branch: master

commit cd3eb60c2c00bcccfa9ccd4bf9d1a96ae7a5cd88
Author: Lee Yarwood <email address hidden>
Date: Mon Apr 24 19:23:44 2017 +0100

    libvirt: Collocate encryptor and volume driver calls

    This change introduces new utility methods for attaching and detaching
    frontend volume encryptors. These methods centralise the optional
    fetching of encryption metadata associated with a volume, fetching of the
    required encryptor and calls to detach or attach the encryptor.

    These new utility methods are called either after initially connecting
    to or before disconnecting from a volume. This ensures encryptors are
    correctly connected when swapping volumes for example, where previously
    no attempt was made to attach an encryptor to the target volume.

    The request context is provided to swap_volume and various other config
    generation related methods to allow for the lookup of the relevant
    encryption metadata if it is not provided.

    Closes-bug: #1739593
    Change-Id: Ica323b87fa85a454fca9d46ada3677f18fe50022