Matt Simerson > Provision-Unix-1.06 > Provision::Unix::VirtualOS::Xen::Config

Download:
Provision-Unix-1.06.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.4   Source  

NAME ^

Provision::Unix::VirtualOS::Xen::Config - perl interface to Xen configuration files

VERSION ^

version 1.06

SYNOPSIS ^

    use Provision::Unix::VirtualOS::Xen::Config;
    my $xen_config = Provision::Unix::VirtualOS::Xen::Config->new();

    $xen_config->read('/path/to/xen_conf.cfg');

    print $xen_config->get('memory'), "\n";
    $xen_config->set('memory' => 128);
    $xen_config->add_ip('192.168.0.23');
    $xen_config->write(\*STDOUT);

DESCRIPTION ^

Provision::Unix::VirtualOS::Xen::Config is an interface to reading and writing domU configuration files

USAGE ^

Provision::Unix::VirtualOS::Xen::Config->new();

This is used to instantiate a new configuration object.

$xen_config->read($file);

This will open, and parse the xen configuration object $file.

$xen_config->read(\*HANDLE);

This will read a configuration file from an open file handle.

$xen_config->parse($xen_config);

This will parse a configuration file that has been loaded into a scalar.

$xen_config->get($name);

This returns the value of the specified configuration variable. The value can be a scalar, an array ref, or a hash ref.

$xen_config->add_ip($ip, [$ip, ...])

This will add an ip, (or list of IPs) to the configuration file. Currently this only adds IPs to vif0.

$xen_config->del_ip($ip, [$ip, ...]);

This will delete an ip, (or list of IPs) from the configuration file. Currently, this only deletes IPs from vif0.

$xen_config->clear_ips();

This will delete all IPs from vif0.

SUPPORT ^

None at the moment

AUTHOR ^

  Max Vohra <max@pyrodyne.biz>

COPYRIGHT ^

Copyright (c) Max Vohra

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR ^

Matt Simerson <msimerson@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by The Network People, Inc..

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: