The ironic_inspector.common.swift Module

class ironic_inspector.common.swift.SwiftAPI(user=None, tenant_name=None, key=None, auth_url=None, auth_version=None, service_type=None, endpoint_type=None)[source]

Bases: object

API for communicating with Swift.

create_object(object, data, container='ironic-inspector', headers=None)[source]

Uploads a given string to Swift.

Parameters:
  • 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.
  • headers – the headers for the object to pass to Swift
Returns:

The Swift UUID of the object

Raises:

utils.Error, if any operation with Swift fails.

get_object(object, container='ironic-inspector')[source]

Downloads a given object from Swift.

Parameters:
  • object – The name of the object in Swift
  • container – The name of the container for the object.
Returns:

Swift object

Raises:

utils.Error, if the Swift operation fails.

ironic_inspector.common.swift.get_introspection_data(uuid)[source]

Downloads introspection data from Swift.

Parameters:uuid – UUID of the Ironic node that the data came from
Returns:Swift object with the introspection data
ironic_inspector.common.swift.list_opts()[source]
ironic_inspector.common.swift.store_introspection_data(data, uuid)[source]

Uploads introspection data to Swift.

Parameters:
  • data – data to store in Swift
  • uuid – UUID of the Ironic node that the data came from
Returns:

name of the Swift object that the data is stored in

Previous topic

The ironic_inspector.common.ironic Module

Next topic

The ironic_inspector.conf Module

Project Source

This Page