diff options
author | James <git@panaceas.org> | 2014-03-17 11:20:42 +0000 |
---|---|---|
committer | James <git@panaceas.org> | 2014-03-17 11:20:42 +0000 |
commit | dafb8e9f1b0c0d7cfe092ddb467a7650109efb51 (patch) | |
tree | b04072f8ab91f058c8fc3541367ed9524d543181 /INF.pm | |
download | inf-dafb8e9f1b0c0d7cfe092ddb467a7650109efb51.tar.gz inf-dafb8e9f1b0c0d7cfe092ddb467a7650109efb51.tar.bz2 inf-dafb8e9f1b0c0d7cfe092ddb467a7650109efb51.zip |
fish
Diffstat (limited to 'INF.pm')
-rw-r--r-- | INF.pm | 38 |
1 files changed, 38 insertions, 0 deletions
@@ -0,0 +1,38 @@ +package INF; +use INF::APC; +use INF::DSRx020; + + +#$infs = [ +# { +# host => 'ms2.foo.com', +# nice_name => 'ms2', +# community => 'write_cty_name', +# inf_type => 'apc' +# }, +# { +# host => 'kvm2.foo.com', +# nice_name => 'kvm2', +# user => 'Admin', +# password => 'password', +# inf_type => 'dsr' +# }, +#]; + +require 'INF/INF.pm'; + +sub new ($;$) { + my ( $class, $inf ) = @_; + + if ( $inf->{inf_type} eq 'dsr' ) { + return INF::DSRx020->new($inf); + } + elsif ( $inf->{inf_type} eq 'apc' ) { + return INF::APC->new($inf); + } + else { + return undef; + } +} + +1; |