The freezer.storage.swift Module

  1. Copyright 2014,2015 Hewlett-Packard Development Company, L.P.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class freezer.storage.swift.SwiftStorage(client_manager, container, max_segment_size, skip_prepare=False)[source]

Bases: freezer.storage.physical.PhysicalStorage

add_stream(stream, package_name, headers=None)[source]
backup_blocks(backup)[source]
Parameters:backup (freezer.storage.base.Backup) –
Returns:
create_dirs(folder_list)[source]
get_file(from_path, to_path)[source]
info()[source]
listdir(path)[source]
Parameters:path (str) –
Return type:collections.Iterable[str]
prepare()[source]

Check if the provided container is already available on Swift. The verification is done by exact matching between the provided container name and the whole list of container available for the swift account.

put_file(from_path, to_path)[source]
rmtree(path)[source]
swift()[source]
Return type:swiftclient.Connection
Returns:
upload_chunk(content, path)[source]
upload_manifest(backup)[source]

Upload Manifest to manage segments in Swift

Parameters:backup (freezer.storage.base.Backup) – Backup
write_backup(rich_queue, backup)[source]

Upload object on the remote swift server :type rich_queue: freezer.streaming.RichQueue :type backup: freezer.storage.base.Backup