networking_baremetal package

Subpackages

Submodules

networking_baremetal.common module

networking_baremetal.common.config_to_xml(config)
networking_baremetal.common.driver_mgr(device_id)
networking_baremetal.common.txt_subelement(parent, tag, text, *args, **kwargs)

networking_baremetal.config module

networking_baremetal.config.get_devices()

Get enabled network devices from configuration

This is called during driver initialization, during initialization additional driver specific configuration is loaded and the drivers validation method is called.

networking_baremetal.config.list_common_device_driver_opts()
networking_baremetal.config.list_opts()
networking_baremetal.config.validate_device_options(device)

Check every configured option for a device.

oslo.config converts and validates an option value when it is first read, not when the configuration is parsed. Without this, a malformed value goes unnoticed until the driver happens to use that option, which for most device options is while binding a port – long after the service started. Reading every registered option here moves that to startup, and reports all of a device’s problems at once instead of stopping at the first.

Must be called after the driver’s load_config(), so that driver specific options are registered.

Parameters:

device – name of the device configuration group.

Raises:

DriverValidationError – if any option has an invalid value.

networking_baremetal.constants module

class networking_baremetal.constants.NetconfEditConfigOperation(*values)

Bases: Enum

RFC 6241 - <edit-config> operation attribute

The “operation” attribute has one of the following values:
merge: The configuration data identified by the element

containing this attribute is merged with the configuration at the corresponding level in the configuration datastore identified by the <target> parameter. This is the default behavior.

replace: The configuration data identified by the element

containing this attribute replaces any related configuration in the configuration datastore identified by the <target> parameter. If no such configuration data exists in the configuration datastore, it is created. Unlike a <copy-config> operation, which replaces the entire target configuration, only the configuration actually present in the <config> parameter is affected.

create: The configuration data identified by the element

containing this attribute is added to the configuration if and only if the configuration data does not already exist in the configuration datastore. If the configuration data exists, an <rpc-error> element is returned with an <error-tag> value of “data-exists”.

delete: The configuration data identified by the element

containing this attribute is deleted from the configuration if and only if the configuration data currently exists in the configuration datastore. If the configuration data does not exist, an <rpc-error> element is returned with an <error-tag> value of “data-missing”.

remove: The configuration data identified by the element

containing this attribute is deleted from the configuration if the configuration data currently exists in the configuration datastore. If the configuration data does not exist, the “remove” operation is silently ignored by the server.

CREATE = 'create'
DELETE = 'delete'
MERGE = 'merge'
REMOVE = 'remove'
REPLACE = 'replace'

networking_baremetal.exceptions module

exception networking_baremetal.exceptions.DeviceConnectionError(**kwargs)

Bases: NeutronException

message = 'Driver failed connecting to device %(device)s: %(err)s'
exception networking_baremetal.exceptions.DriverEntrypointLoadError(**kwargs)

Bases: NeutronException

message = 'Failed to load entrypoint %(entry_point)s: %(err)s'
exception networking_baremetal.exceptions.DriverValidationError(**kwargs)

Bases: NeutronException

message = 'Failed driver validation for device %(device)s: %(err)s'
exception networking_baremetal.exceptions.PreConfiguredAggrergateNotFound(**kwargs)

Bases: NeutronException

message = 'Driver could not find the aggregate ID for the pre-configured link aggregate for links %(links)s on device %(device)s.'

networking_baremetal.ironic_client module

networking_baremetal.ironic_client.get_client()

Get an ironic client connection.

networking_baremetal.ironic_client.get_session(group)
networking_baremetal.ironic_client.list_opts()

networking_baremetal.neutron_client module

networking_baremetal.neutron_client.get_client()

Get a Neutron client connection via OpenStack SDK.

Returns:

OpenStack SDK Connection object for accessing network APIs

networking_baremetal.neutron_client.get_session(group)

Get a session for the specified config group.

Parameters:

group – Configuration group name

Returns:

keystoneauth1 session

networking_baremetal.neutron_client.list_opts()

Return neutron client configuration options.

Module contents