<s> import abc <EOL> import six <EOL> from nova import keymgr <EOL> @ six . add_metaclass ( abc . ABCMeta ) <EOL> class VolumeEncryptor ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , connection_info , ** kwargs ) : <EOL> self . _key_manager = keymgr . API ( ) <EOL> self . encryption_key_id = kwargs . get ( '<STR_LIT>' ) <EOL> def _get_key ( self , context ) : <EOL> """<STR_LIT>""" <EOL> return self . _key_manager . get_key ( context , self . encryption_key_id ) <EOL> @ abc . abstractmethod <EOL> def attach_volume ( self , context , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> @ abc . abstractmethod <EOL> def detach_volume ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> pass </s>
