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
################################################################################### | |
# dgmgmt.py | |
# | |
# author: jason rahm | |
# tmsh script author: john alam | |
# | |
# usage: dgmgmt.py [-h] host user {add,modify,delete} datagroup dgvalues | |
# | |
# positional arguments: | |
# host 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
################################################################################### | |
# dgmgmt.py | |
# | |
# author: jason rahm | |
# | |
# usage: dgmgmt.py [-h] host user {add,modify,delete} datagroup dgvalues | |
# | |
# positional arguments: | |
# host BIG-IP IP/FQDN | |
# user BIG-IP Username |
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
##################################################### | |
### Required net resolver - example configuration ### | |
##################################################### | |
#net dns-resolver r1 { | |
# forward-zones { | |
# . { | |
# nameservers { | |
# 8.8.8.8:domain { } | |
# 9.9.9.9:domain { } |
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" |
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
################################################################################### | |
# 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
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
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 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
# 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 | |
# |
OlderNewer