The nova.virt.ironic.patcher Module

Helper classes for Ironic HTTP PATCH creation.

class GenericDriverFields(node)

Bases: object

get_cleanup_patch(instance, network_info, flavor)

Build a patch to clean up the fields.

Parameters:
  • instance – the instance object.
  • network_info – the instance network information.
  • flavor – the flavor object.
Returns:

a json-patch with the fields that needs to be updated.

get_deploy_patch(instance, image_meta, flavor, preserve_ephemeral=None)

Build a patch to add the required fields to deploy a node.

Parameters:
  • instance – the instance object.
  • image_meta – the nova.objects.ImageMeta object instance
  • flavor – the flavor object.
  • preserve_ephemeral – preserve_ephemeral status (bool) to be specified during rebuild.
Returns:

a json-patch with the fields that needs to be updated.

create(node)

Create an instance of the appropriate DriverFields class.

Parameters:node – a node object returned from ironicclient
Returns:A GenericDriverFields instance.

Previous topic

The nova.virt.ironic.ironic_states Module

Next topic

The nova.virt.libvirt.blockinfo Module

Project Source

This Page