metalsmith.sources module

Image sources to use when provisioning nodes.

class metalsmith.sources.FilePartitionImage(location, kernel_location, ramdisk_location, checksum)

Bases: metalsmith.sources.FileWholeDiskImage

A partition image from a local file location.

Warning

The location must be local to the ironic-conductor process handling the node, not to metalsmith itself! Since there is no easy way to determine which conductor handles a node, the same file must be available at the same location to all conductors in the same group.

Create a local file source.

Parameters:
  • location – Location of the image, optionally starting with file://.
  • kernel_location – Location of the kernel of the image, optionally starting with file://.
  • ramdisk_location – Location of the ramdisk of the image, optionally starting with file://.
  • checksum – MD5 checksum of the image.
class metalsmith.sources.FileWholeDiskImage(location, checksum)

Bases: metalsmith.sources._Source

A whole-disk image from a local file location.

Warning

The location must be local to the ironic-conductor process handling the node, not to metalsmith itself! Since there is no easy way to determine which conductor handles a node, the same file must be available at the same location to all conductors in the same group.

Create a local file source.

Parameters:
  • location – Location of the image, optionally starting with file://.
  • checksum – MD5 checksum of the image.
class metalsmith.sources.GlanceImage(image)

Bases: metalsmith.sources._Source

Image from the OpenStack Image service.

Create a Glance source.

Parameters:imageImage object, ID or name.
class metalsmith.sources.HttpPartitionImage(url, kernel_url, ramdisk_url, checksum=None, checksum_url=None)

Bases: metalsmith.sources.HttpWholeDiskImage

A partition image from an HTTP(s) location.

Create an HTTP source.

Parameters:
  • url – URL of the root disk image.
  • kernel_url – URL of the kernel image.
  • ramdisk_url – URL of the initramfs image.
  • checksum – MD5 checksum of the root disk image. Mutually exclusive with checksum_url.
  • checksum_url – URL of the checksum file for the root disk image. Has to be in the standard format of the md5sum tool. Mutually exclusive with checksum.
class metalsmith.sources.HttpWholeDiskImage(url, checksum=None, checksum_url=None)

Bases: metalsmith.sources._Source

A whole-disk image from HTTP(s) location.

Some deployment methods require a checksum of the image. It has to be provided via checksum or checksum_url.

Only checksum_url (if provided) has to be accessible from the current machine. Other URLs have to be accessible by the Bare Metal service (more specifically, by ironic-conductor processes).

Create an HTTP source.

Parameters:
  • url – URL of the image.
  • checksum – MD5 checksum of the image. Mutually exclusive with checksum_url.
  • checksum_url – URL of the checksum file for the image. Has to be in the standard format of the md5sum tool. Mutually exclusive with checksum.