[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn@source.lon-capa.org
Sat, 29 Nov 2008 09:57:43 -0000


raeburn		Sat Nov 29 09:57:43 2008 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Additional methods to access data for domains and hosts in cluster from cached data from LON-CAPA DNS servers. 
  - domain_info() returns a hash of a hash of domain settings 
    ('description', 'auth_def', 'auth_arg_def','lang_def', 'city', 'longi', 'lati',
     'primary') with domain as a top level key.
  - all_host_domain() returns a hash (keys = hostIDs and values are corresponding domains).
  - Used by clusterstatus.pl rev 1.25.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.973 loncom/lonnet/perl/lonnet.pm:1.974
--- loncom/lonnet/perl/lonnet.pm:1.973	Fri Nov 28 12:09:16 2008
+++ loncom/lonnet/perl/lonnet.pm	Sat Nov 29 09:57:43 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.973 2008/11/28 12:09:16 bisitz Exp $
+# $Id: lonnet.pm,v 1.974 2008/11/29 09:57:43 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -8543,6 +8543,12 @@
 	}
 	return $domain{$name}{$what};
     }
+
+    sub domain_info {
+        &load_domain_tab() if (!$loaded);
+        return %domain;
+    }
+
 }
 
 
@@ -8620,6 +8626,11 @@
 	return %name_to_host;
     }
 
+    sub all_host_domain {
+        &load_hosts_tab() if (!$loaded);
+        return %hostdom;
+    }
+
     sub is_library {
 	&load_hosts_tab() if (!$loaded);