ironic_inspector.common.swift
Module¶ironic_inspector.common.swift.
SwiftAPI
[source]¶Bases: object
API for communicating with Swift.
create_object
(object, data, container=None, headers=None)[source]¶Uploads a given string to Swift.
object – The name of the object in Swift
data – string data to put in the object
container – The name of the container for the object. Defaults to the value set in the configuration options.
headers – the headers for the object to pass to Swift
The Swift UUID of the object
utils.Error, if any operation with Swift fails.
get_object
(object, container=None)[source]¶Downloads a given object from Swift.
object – The name of the object in Swift
container – The name of the container for the object. Defaults to the value set in the configuration options.
Swift object
utils.Error, if the Swift operation fails.
ironic_inspector.common.swift.
get_introspection_data
(uuid, suffix=None)[source]¶Downloads introspection data from Swift.
uuid – UUID of the Ironic node that the data came from
suffix – optional suffix to add to the underlying swift object name
Swift object with the introspection data
ironic_inspector.common.swift.
reset_swift_session
()[source]¶Reset the global session variable.
Mostly useful for unit tests.
ironic_inspector.common.swift.
store_introspection_data
(data, uuid, suffix=None)[source]¶Uploads introspection data to Swift.
data – data to store in Swift
uuid – UUID of the Ironic node that the data came from
suffix – optional suffix to add to the underlying swift object name
name of the Swift object that the data is stored in
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.