NAME

BigIP::LTM::ParseConfig - The great new BigIP::LTM::ParseConfig!

VERSION

Version 0.83

SYNOPSIS use BigIP::LTM::ParseConfig;

# Module initialization
my $bip = new BigIP::LTM::ParseConfig( '/config/bigip.conf' );
  
# Iterate over pools
foreach my $pool ( $bip->pools() ) {
    # Iterate over pool members
    foreach my $member ( $bip->members( $pool ) ) {
        # Change port from 80 to 443
        if ( $member /^(\d+\.\d+\.\d+\.\d+):80/ ) {
            push @members, "$1:443";
            my $change = 1;
        }
    }
    # Commit the change above (80->443)
    if ( $change ) {
        $bip->modify(
            type => 'pool',
            key  => $pool,
            members => [ @members ]
        );
    }
}
  
# Write out a new config file
$bip->write( '/config/bigip.conf.new' );

DESCRIPTION

BigIP::LTM::ParseConfig provides a Perl interface to reading, writing, and manipulating configuration files used on F5 (BigIP) LTM network devices.

This module is currently a work-in-progress. Please e-mail with problems, bug fixes, comments and complaints.

CONSTRUCTOR

new ( FILE )

Create a new BigIP::LTM::ParseConfig object.

FILE refers to the bigip.conf configuration file, usually found at /config/bigip.conf.

Example

$bip = BigIP::LTM::ParseConfig->new( '/config/bigip.conf' );

METHODS

monitors @monitos = $bip->monitors; =item nodes @nodes = $bip->nodes; =item partitions @partions = $bip->partitions; =item pools @pools = $bip->pools; =item profiles @profiles = $bip->profiles; =item routes @routes = $bip->routes; =item rules @rules = $bip->rules; =item users @users = $bip->uers; =item virtuals @virtuals = $bip->virtuals;

List the names of all found objects of the referring method.

Examples

@pools = $bip->pools();

@virtuals = $bip->virtuals();
monitor ( MONITOR )
node ( NODE )
partition ( PARTITION )
pool ( POOL )
profile ( PROFILE )
route ( ROUTE )
rule ( RULE )
user ( USER )
virtual ( VIRTUAL )

Return a hash of the object specified.

Examples

%sschneid = $bip->user( 'sschneid' );

$monitor = $bip->pool( 'Production_LDAP_pool')->{'monitor'};
members ( POOL )

List the members of a specified pool.

Example

@members = $bip->members( 'Production_LDAP_pool' );

Note that this is identical to using the pool method:

@members = @{$bip->pool( 'Production_LDAP_pool' )->{'members'}};
modify ( OPTIONS )

Modify the attributes of a specified object. The following options are required:

type

The type of object being modified. Allowed types are: monitor, node, partition, pool, profile, route, user, virtual.

key

The key (name) of the object being modified.

Following type and key should be a string or a reference to an array of strings. See the example below for more details.

Examples

$bip->modify(
    type => 'virtual',
    key  => 'Production_LDAP_vip',
    persist => 'cookie'
);
  
$bip->modify(
    type => 'pool',
    key  => 'Production_LDAP_pool',
    members => [ '192.168.0.1:636', '192.168.0.2:636' ]
);
write ( FILE )

Write out a new configuration file. FILE refers to the bigip.conf configuration file, usually found at /config/bigip.conf.

Example

$bip->write( '/config/bigip.conf.new' );

WENWU YAN, <careline at 126.com>

BUGS

Please report any bugs or feature requests to bug-bigip-ltm-parseconfig at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=BigIP-LTM-ParseConfig. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc BigIP::LTM::ParseConfig

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2019 by WENWU YAN.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

1 POD Error

The following errors were encountered while parsing the POD:

Around line 736:

=back doesn't take any parameters, but you said =back =head1 AUTHOR