Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Configuring OpenStack VTEP

Overview

OpenStack VTEP is an ICOS application that provides OpenStack tenants access to physical devices that are plugged into a properly configured ICOS switch.

OpenStack VTEP consists of vtepc, which runs on a controller node in the OpenStack cluster, and vtepd, which runs on all compute nodes in the cluster as well as on OpenStack VTEP switches.

The instructions below detail how to configure vtepc to map tenants with the physical devices they desire access to.

Configuration Basics

Configuration of vtepc in this release is performed statically by editing a python script located on the controller node. The location of this file is /etc/vtepc/vtepc_config.py. An example implementation of this file is created at installation time.

A minimal amount of python knowledge is required to configure vtepc. Basically the script you write will declare three lists which describe gateways (OpenStack VTEP switches), tenants, and devices. A fourth list maps tenants to devices. vtepc will use this information to configure vtepd instances that are running in the cluster. Entries in these lists are python dictionaries which define various attributes of the respective objects being configured.

Numerous sources on the web describe python lists and dictionaries. Readers familiar with JSON should have little problem working with either as they are syntactically similar.

Configurable Lists

This section enumerates the Python lists that are used to configure vtepc. An example configuration is presented in the section that follows.

gateways

List name: gateways

Purpose: enumerate the OpenStack VTEP gateway switches in the cluster

The gateways list consists of elements made up of the following keys:

Name: ip

Value: IPV4 address string

Required: Yes

Example: {"ip": "192.168.3.100"}

tenants

List name: tenants

Purpose: enumerate the OpenStack VTEP tenants being configured

The tenants list enumerates the tenants affected by the configuration.

Name: name

Value: Tenant name assigned by OpenStack

Required: Yes

Example: {"name": "demo"}

devices

List name: devices

Purpose: enumerate the devices that exist on a given gateway

The devices list enumerates the devices on the various gateways in the cluster.

Name: name

Value: symbolic device name, unique to vtepc

Required: Yes

Note: the name can be any value desired, it is not related to the hostname or DNS name of the device.

Example: {"name": "Finance AIX 3.2"}

Name: description

Value: description of the device

Required: No (the value can be set to "")

Example: {"description": ""}

Name: mac

Value: mac address of the device

Required: Yes

Example: {"mac": "90-e2-ba-19-b1-ed"}

Name: gateway

Value: IPV4 address of the OpenStack VTEP gateway where the device is located.

Required: Yes

Example: {"gateway": "192.168.3.100"}

Note: This IP address must be bound to the port in this release

Name: port

Value: interface/port the device is located on the gateway.

Required: Yes

Example: {"port": "29"}

tenantdevmap

List name: tenantdevmap

Purpose: map devices to tenants

The tenantdevmap list maps tenants to devices. In this release, a device can be mapped to only one tenant. A tenant, however, can by mapped to multiple devices.

Name: tenant

Value: tenant name

Required: Yes

Note: the tenant name must match the name attribute of a tenant in the tenants list. The tenant name is case-sensitive and must match the name as known to OpenStack.

Example: {"tenant": "demo"}

Name: devices

Value: list of devices

Required: Yes

Note: A device name must match the name attribute of a device in the devices list.

Example: {"devices": ["Finance AIX 3.2", "Engineering Bug Database"]}

Configuration Example

The following is an example configuration of vtepc (this same configuration is installed in /etc/vtepd/vtepd_config.py).

gateways =     [{"ip": "192.168.3.100"}]
tenants  =     [{"name": "demo"}, {"name": "demo2"}]
devices  =     [{"name": "Ubuntu 12.04", "description": "wiki host",
                 "mac": "90-e2-ba-19-b1-ed", "port": "29",
                 "gateway": "192.168.3.100"},
                {"name": "Ubuntu 13.10", "description": "dev host",
                 "mac": "91-e1-b1-11-b1-e1", "port": "31",
                 "gateway": "192.168.3.100"}
               ]
tenantdevmap = [{"tenant": "demo",
                 "devices": [ "Ubuntu 12.04"]},
                {"tenant": "demo2",
                 "devices": [ "Ubuntu 13.10"]}
               ]

The above configuration maps a device named "Ubuntu 12.04" to the tenant "demo", and the device named "Ubuntu 13.04" to the tenant "demo2".

Both of these devices are located on the gateway which is reachable at IP address 192.168.3.100. "Ubuntu 13.10" is plugged into port 31 and has mac address 91-e1-b1-11-b1-e1, while "Ubuntu 12.04" is accessible on port 29 and has mac address 90-e2-ba-19-b1-ed.