Jump to: navigation, search

Neutron/LBaaS/DriverAPI

< Neutron‎ | LBaaS
Revision as of 09:23, 21 January 2013 by Oleg (talk)

Scope

LBaaS driver is a module that translates abstract model into vendor-specific and configures load balancing devices. This document describes API for drivers.

API

create_vip (device, vip)
update_vip (device, new_vip, old_vip)
delete_vip (device, vip)

create_pool (device, pool)
update_pool (device, new_pool, old_pool)
delete_pool (device, pool)

create_member (device, member)
update_member (device, new_member, old_member)
delete_member (device, member)

create_health_monitor (device, health_monitor, pool)
update_health_monitor (device, new_health_monitor, old_health_monitor, pool)
delete_health_monitor (device, health_monitor, pool)

get_pool_stats (device, pool)


All update methods receive both new and old objects. It's up to driver implementors how to apply changes to the actual configuration. For some devices (like HAProxy) it would be easier to replace the old part of config with newer one. For other devices (like Cisco ACE LB) it would be easier to calculate diff between new and old object and apply diff only.

Error Handling

Driver reports errors by raising an exception. The following types of exceptions are supported by framework:

UnsupportedFeature

The exception is raised when some feature is not supported by driver.

Example: driver is asked to configure session persistence, but it doesn't support it.

Parameters:

  • name - the name of feature

UnsupportedOption

The exception is raised when an unsupported option is requested.

Example: driver is asked to configure 'lb_method' of type 'some_exotic' and it doesn't support it.

Parameters:

  • feature - the name of feature
  • option - the name of option

AttributeRequired

The exception is raised when object misses some mandatory attribute.

Example: driver is asked to configure cookie-based session persistence, but name of cookie is missing.

Parameters:

  • name - the name of attribute

ConfigError

The exception is raised when any error occured during device configuration.

Parameters:

  • msg - the description of the error