<s> """<STR_LIT>""" <EOL> import os <EOL> from oslo_config import cfg <EOL> from oslo_log import log <EOL> from freezer . snapshot import lvm <EOL> from freezer . snapshot import vss <EOL> from freezer . utils import winutils <EOL> CONF = cfg . CONF <EOL> logging = log . getLogger ( __name__ ) <EOL> home = os . path . expanduser ( "<STR_LIT>" ) <EOL> def snapshot_create ( backup_opt_dict ) : <EOL> """<STR_LIT>""" <EOL> if winutils . is_windows ( ) : <EOL> if backup_opt_dict . snapshot : <EOL> backup_opt_dict . shadow_path , backup_opt_dict . shadow = vss . vss_create_shadow_copy ( backup_opt_dict . windows_volume ) <EOL> backup_opt_dict . path_to_backup = winutils . use_shadow ( <EOL> backup_opt_dict . path_to_backup , <EOL> backup_opt_dict . windows_volume ) <EOL> return True <EOL> return False <EOL> else : <EOL> return lvm . lvm_snap ( backup_opt_dict ) <EOL> def snapshot_remove ( backup_opt_dict , shadow , windows_volume ) : <EOL> if winutils . is_windows ( ) : <EOL> vss . vss_delete_shadow_copy ( shadow , windows_volume ) <EOL> else : <EOL> lvm . lvm_snap_remove ( backup_opt_dict ) </s>
