summaryrefslogtreecommitdiffstats
path: root/INF.pm
diff options
context:
space:
mode:
authorJames <git@panaceas.org>2014-03-17 11:20:42 +0000
committerJames <git@panaceas.org>2014-03-17 11:20:42 +0000
commitdafb8e9f1b0c0d7cfe092ddb467a7650109efb51 (patch)
treeb04072f8ab91f058c8fc3541367ed9524d543181 /INF.pm
downloadinf-dafb8e9f1b0c0d7cfe092ddb467a7650109efb51.tar.gz
inf-dafb8e9f1b0c0d7cfe092ddb467a7650109efb51.tar.bz2
inf-dafb8e9f1b0c0d7cfe092ddb467a7650109efb51.zip
fish
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;