This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ltm rule /Common/heatmap { | |
when HTTP_REQUEST { | |
if {[HTTP::uri] starts_with "/heatmap"} { | |
set chld "" | |
set chd "" | |
foreach state [table keys -subtable states] { | |
append chld $state | |
append chd "[table lookup -subtable states $state]," | |
} | |
set chd [string trimright $chd ","] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ltm rule /Common/heatmap_2022 { | |
when RULE_INIT priority 500 { | |
set static::geochart " | |
<html> | |
<head> | |
<title>Heatmap</title> | |
<script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cli script vip_ssl_check.tcl { | |
proc script::init {} { | |
set ::cssl_profiles "" | |
set ::sssl_profiles "" | |
} | |
proc print_ssl_details {vip cs ss insp} { | |
puts "Virtual: $vip" | |
puts "\tClient-side encrypted: $cs" | |
puts "\tServer-side encrypted: $ss" | |
puts "\tInspection possible: $insp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
# | |
# Copyright 2015-2019 F5 Networks Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from typing import Dict | |
from bigrest.bigip import BIGIP | |
def get_credentials() -> Dict: | |
#return {'host': os.getenv('F5_HOST'), 'user': os.getenv('F5_USER'), 'pass': os.getenv('F5_PASS')} | |
return {'host': 'ltm3.test.local', 'user': 'admin', 'pass': 'admin'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bigrest.bigip import BIGIP | |
import argparse | |
import getpass | |
import sys | |
import xlsxwriter | |
def build_parser(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("host", help="BIG-IP IP/FQDN") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bigsuds | |
b = bigsuds.BIGIP(hostname='ltm3.test.local') | |
zone_view = {'view_name': 'external', | |
'zone_name': 'dctest1.local.' | |
} | |
b.Management.Zone.zone_exist([zone_view]) | |
# [0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################### | |
# tmos_install.py | |
# v 0.1 - INCOMPLETE | |
# | |
# author: jason rahm | |
# | |
# usage: tmos_install.py [-h] [-a] inventory user password | |
# | |
# positional arguments: | |
# inventory inventory file (host IP/FQDN,image path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _upload(host, creds, fp): | |
chunk_size = 512 * 1024 | |
headers = { | |
'Content-Type': 'application/octet-stream' | |
} | |
fileobj = open(fp, 'rb') | |
filename = os.path.basename(fp) | |
if os.path.splitext(filename)[-1] == '.iso': | |
uri = 'https://%s/mgmt/cm/autodeploy/software-image-uploads/%s' % (host, filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import sys | |
from time import sleep | |
from bigrest.bigip import BIGIP | |
from bigrest.common.exceptions import RESTAPIError | |
from pathlib import Path | |
DO = "/Users/rahm/Downloads/f5-declarative-onboarding-1.20.0-2.noarch.rpm" |