summaryrefslogtreecommitdiffstats
path: root/INF.pm
diff options
context:
space:
mode:
Diffstat (limited to 'INF.pm')
-rw-r--r--INF.pm38
1 files changed, 38 insertions, 0 deletions
diff --git a/INF.pm b/INF.pm
new file mode 100644
index 0000000..d3301f6
--- /dev/null
+++ b/INF.pm
@@ -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;