Exemplo n.º 1
0
def bigip_api(bigip, user, password):
    api = bigsuds.BIGIP(hostname=bigip, username=user, password=password)
    return api
Exemplo n.º 2
0
import socket

f1 = open('devices.txt', 'r')
devices = f1.readlines()
book = xlsxwriter.Workbook('appowner.xlsx')

for device in devices:
    row = 0
    col = 0
    column = device.split()
    name = column[0].strip("fqdn.com")
    sheet = book.add_worksheet(name)
    print device
    b = bigsuds.BIGIP(
        hostname=column[1],
        username='******',
        password='******',
    )
    partlist = b.Management.Partition.get_partition_list()
    for part in partlist:
        pname = part['partition_name']
        partcount = len(partlist)
        print pname
        b.Management.Partition.set_active_partition(pname)
        pools = b.LocalLB.Pool.get_list()

        for pool in pools:
            poolmembers = b.LocalLB.PoolMember.get_monitor_status([pool])
            for poolmember in poolmembers:
                for status in poolmember:
                    row = row + 1
Exemplo n.º 3
0
import bigsuds

b = bigsuds.BIGIP(
    hostname='192.168.122.31',
    username='******',
    password='',
)
#STATE_DISABLED
b.GlobalLB.Globals.set_auto_sync_state("STATE_DISABLED")
b.GlobalLB.Globals.set_sync_named_configuration_state("STATE_DISABLED")
b.GlobalLB.Globals.set_sync_group_name("test_anesh")
Exemplo n.º 4
0
if len(os.environ["CliqrDependencies"]) == 0:
    print(
        "There aren't any depency tiers, so nothing to create. Check your app topology."
    )
    sys.exit(0)

# Create list of dependent service tiers
dependencies = os.environ["CliqrDependencies"].split(",")

# Set the new server list from the CliQr environment
serverIps = os.environ["CliqrTier_" + dependencies[0] +
                       "_PUBLIC_IP"].split(",")

pool = 'pool' + os.environ['parentJobId']
vip = 'vip' + os.environ['parentJobId']
b = bigsuds.BIGIP(hostname=BIGIP_ADDRESS, username=username, password=password)

if cmd == "start":
    members = []
    for member in serverIps:
        members.append({'address': member, 'port': RS_PORT})

    b.LocalLB.Pool.create_v2([POOL_NAME], [POOL_LB_METHOD], [members])
    b.LocalLB.VirtualServer.create([{
        'name': VS_NAME,
        'address': VS_ADDRESS,
        'port': VS_PORT,
        'protocol': 'PROTOCOL_TCP'
    }], ['255.255.255.255'], [{
        'type': 'RESOURCE_TYPE_POOL',
        'default_pool_name': POOL_NAME