diff options
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; |