Alteon Config Converter
Problem this snippet solves:
This Python script will convert Alteon config files to F5 syntax configuration. This converts self-IPs, SSL certs, Nodes, Pools, Monitors, HTTP and ClientSSL profiles and Virtual Servers.
If you have any specific requirements then feel free to PM me.
How to use this snippet:
Install the script using pip:
pip install alteon2f5
Or download it here or from the site at https://pypi.org/project/alteon2f5/1.4/
Run it using:
alteon2f5.py <name of input file> [partition name]
Options:
$ ./alteon2f5.py -h
usage: alteon2f5.py [-h] [--csv CSV] [--disable DISABLE] [--virtual VIRTUAL]
inputfile [partition]
Alteon Config Converter to F5 Syntax
positional arguments:
inputfile File containing Alteon Configuration
partition Optional partition name eg MyPartition
optional arguments:
-h, --help show this help message and exit
--csv CSV CSV-formatted modification file
--disable DISABLE Set all Virtual Addresses to disabled
--virtual VIRTUAL Output a single virtual server
It will output the config to the screen:
$ ./alteon2f5.py alteon.txt|more # Configuration created on Tue Jan 8 14:01:26 2019 # Input filename: alteon.txt # Partition: /Common/ # -- Number of objects -- # Type Number # ---------------------------- # SSL certs 8 # Self-IPs 2 # Floating Self-IPs 2 # Nodes 16 # Monitors - HTTP 8 # Pools 12 # Virtual Addresses 3 # Virtual Servers 3 # ---------------------------- # -- Creating SSL certs -- <snipped> #------------------------------------------------------- #----- Configuration below this line ----------------- net self IP_1.2.3.4 { address 1.2.3.4/24 traffic-group traffic-group-local-only vlan VLAN-1234 } ...
It will also write the SSL certificates to the current directory. Copy the certs to the /var/tmp directory on the target BIG-IP and run the load_certs.sh script on the BIG-IP. This will install the SSL certs.
Copy the output text to the big-ip and load it using
tmsh load sys config merge from-file /var/tmp/<config filename> verify
.
If there are no errors then load the config using
tmsh load sys config merge from-file /var/tmp/<config filename>
This should work with Python 2 and 3 and TMOS v11+.
There is also a bash script alteon2f5.sh which will read all of the txt files in the current directory and output all of the files into a new directory based on the name of the file
Code :
92405
Tested this on version:
11.0