[pve-devel] r5154 - pve-common/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Wed Sep 15 09:49:37 CEST 2010


Author: dietmar
Date: 2010-09-15 07:49:37 +0000 (Wed, 15 Sep 2010)
New Revision: 5154

Modified:
   pve-common/trunk/ChangeLog
   pve-common/trunk/RPCEnvironment.pm
Log:


Modified: pve-common/trunk/ChangeLog
===================================================================
--- pve-common/trunk/ChangeLog	2010-09-15 07:40:45 UTC (rev 5153)
+++ pve-common/trunk/ChangeLog	2010-09-15 07:49:37 UTC (rev 5154)
@@ -1,6 +1,7 @@
 2010-09-15  Proxmox Support Team  <support at proxmox.com>
 
 	* RPCEnvironment.pm (fork_worker): moved from PVE::Utils
+	(get_remote_node_ip): new helper
 
 	* ProcFSTools.pm (read_proc_starttime): moved from PVE::Utils
 

Modified: pve-common/trunk/RPCEnvironment.pm
===================================================================
--- pve-common/trunk/RPCEnvironment.pm	2010-09-15 07:40:45 UTC (rev 5153)
+++ pve-common/trunk/RPCEnvironment.pm	2010-09-15 07:49:37 UTC (rev 5154)
@@ -72,6 +72,7 @@
     
     my $self = {
 	type => $type,
+	hostname => PVE::INotify::read_file('hostname'),
     };
 
     bless $self, $class;
@@ -105,6 +106,12 @@
     return $self->{user};
 }
 
+sub get_hostname {
+    my ($self) = @_;
+
+    return $self->{hostname};
+}
+
 sub get_nodelist {
     my ($self) = @_;
 
@@ -119,6 +126,18 @@
     return $nodes;
 }
 
+sub get_remote_node_ip {
+    my ($self, $node) = @;
+
+    return undef if $node eq $self->{hostname};
+
+    die "implement me";
+
+    # fixme: check if node exists
+
+    # fixme: implement me
+}
+
 # UPID helper
 # WARN: $res->{filename} must not depend on PID, because we 
 # use it before we know the PID




More information about the pve-devel mailing list