#CLI interface into F5. Managing an F5 through the web interface is a bummer. Why not wrap the API in a cli for easier management!
You will need to download the bigsuds soap library from f5.
F5 should put this on github..... :)
Pull requests welcome!
Some f5 operations take a 10 seconds to complete.
-
The default node monitoring is ICMP, this monitor should be in /Common/icmp ⋅⋅* Nodes should be created with their FQDN, and should have a valid A record
-
The default pool monitor is HTTP, this monitor should be in /Common/icmp ⋅⋅* Specified nodes should be referenced with their FQDN & should use the same format as they were created above.
-
Virtual servers are assumed to balance HTTP traffic.
-
Virtual servers have the following profiles automatically assigned. ⋅⋅* tcp ⋅⋅* http ⋅⋅* oneconnect
-
Creating a VS with a SSL profile, the CA should be available in the partition.
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land node list
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land node create --nodes "web-n01.staging.b.chicken.net, web-n02.staging.b.chicken.net"
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land node delete --nodes "web-n01.staging.b.chicken.net, web-n02.staging.b.chicken.net"
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land pool list
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land pool create --nodes "web-n01.staging.b.chicken.net:80, web-n02.staging.b.chicken.net:80" --pool_name "web.staging.b.chicken.net"
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land pool delete --pool_name "web.staging.b.chicken.net"
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land ssl_file list
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land ssl_file create --name web.staging.b.chicken.net --key sample.key --certificate sample.cert
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land ssl_file delete --name web.staging.b.chicken.net
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land ssl_profile list
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land ssl_profile create --name web.staging.b.chicken.net --certificate web.staging.b.chicken.net --key web.staging.b.chicken.net
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land ssl_profile create --name web.staging.b.chicken.net --certificate web.staging.b.chicken.net --key web.staging.b.chicken.net --chain mackspace_ca
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land ssl_profile delete --name web.staging.b.chicken.net
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land virtual_server list
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land virtual_server create --vip_name "web.staging.b.chicken.net" --vip_address "10.23.251.55" --port 80 --protocol TCP --pool web.staging.b.chicken.net --type http
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land virtual_server create --vip_name "web.staging.b.chicken.net" --vip_address "10.23.251.55" --port 443 --protocol TCP --pool web.staging.b.chicken.net --ssl_profile web.staging.b.chicken.net --type https
--snat - Secure network translation, available otpions: automap or none, snat pool not implmeneted. --protocol_profile - Specified TCP & UDP profile --http_profile -Specified HTTP profile, defaults to the default http profile.
python f5-cli.py --user user --host f5-1b.dev.b.chicken.net --partition chicken_land virtual_server delete --vip_name "web.staging.b.chicken.net"
######python deps: dnspython