almusil / ovirt-lldp-labeler

This is a mirror for http://gerrit.ovirt.org, for issues use http://bugzilla.redhat.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oVirt Link Layer Discovery Protocol labeler

last build

oVirt LLDP labeler is a service which periodically checks LLDP information for configured clusters. Based on this information the labeler tries to find VLAN tag and add label to the corresponding interface. This is standalone service which can run on any machine with python oVirt SDK installed.

CLI

oVirt LLDP labeler has built in CLI tool. For one time run you can just use python ovirt_lldp_labeler_cli.py. This tool is located in /usr/share/ovirt-lldp-labeler/.

Print help with -h or --help switch.

Service

The oVirt LLDP labeler service consists of two parts. First is ovirt-lldp-labeler.service which runs only one time and then dies. Second part is ovirt-lldp-labeler.timer, this timer service when started will run periodically ovirt-lldp-labeler.service. Please note that correct function only the timer has to be in active state.

To enable the timer service run systemctl enable ovirt-lldp-labeler.timer and systemctl start ovirt-lldp-labeler.timer. One time only run can be done by either CLI tool or by running systemctl start ovirt-lldp-labeler.

Configuration

The configuration of the labeler are splitted in to two config files. /etc/ovirt-lldp-labeler/conf.d/ovirt-lldp-credentials.conf and /etc/ovirt-lldp-labeler/conf.d/ovirt-lldp-labeler.conf.

The configuration files consists of the key value pairs, structured by sections.

ovirt-lldp-credentials.conf

This file has permissions 0600 which should prevent any security problems.

Section [credentials]

username

oVirt engine administrator username
default: admin@internal

password

oVirt engine administrator password
default: 123456

ovirt-lldp-labeler.conf

Section [labeler]

clusters

List of clusters separated by , in this list you can use wildcard e.g. Cluster*, which will run labeler through all clusters starting with word Cluster.
default: Def*

api_url

Full api url for the oVirt engine
default: https://ovirt-engine/ovirt-engine/api

ca_file

Path to the custom certificate file. Leave empty if you don’t want to use custom certificate.
default:

auto_bonding

Boolean value. If set to true the labeler will do auto bonding.
default: true

auto_labeling

Boolean value. If set to true the labeler will do auto labeling.
default: true

ovirt-lldp-labeler.timer

Systemd file used to configure the periodical timer. It is usually located in /usr/lib/systemd/system/.

Section [Timer]

OnUnitActiveSec

Time delay for every update
default: 1h

Building

For building the project into rpm clone the project git clone https://gerrit.ovirt.org/ovirt-lldp-labeler.

Please note that for update to the latest labeler you need to run git checkout master and git pull inside the cloned directory. Then run again the steps below. In case you are missing the local master branch run git checkout -t origin/master -b master.

And simply run make rpm. Please note that for build to work you need to install rpm-build package.

The rpm package should be located in ~/rpmbuild/RPMS/noarch.

And finally for installation/update simply run yum install $PATH_TO_RPM

About

This is a mirror for http://gerrit.ovirt.org, for issues use http://bugzilla.redhat.com

License:Apache License 2.0


Languages

Language:Python 83.6%Language:Makefile 14.8%Language:Shell 1.6%