You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by ar...@apache.org on 2010/05/27 15:15:50 UTC

svn commit: r948821 - /incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning.pm

Author: arkurth
Date: Thu May 27 13:15:50 2010
New Revision: 948821

URL: http://svn.apache.org/viewvc?rev=948821&view=rev
Log:
VCL-298
Added set_vmhost_os and vmhost_os subroutines to Provisioning.pm.  These allow a provisioning module to set and access an OS object for the VM host OS if one was created.  As a result, the provisioning module can call $self->vmhost_os->... to access the VM host computer's OS the same way it would call $self->os->... to access the guest's OS.

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning.pm?rev=948821&r1=948820&r2=948821&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning.pm Thu May 27 13:15:50 2010
@@ -78,6 +78,22 @@ sub set_os {
 
 #/////////////////////////////////////////////////////////////////////////////
 
+=head2 set_vmhost_os
+
+ Parameters  : None
+ Returns     : Process's VM host OS object
+ Description : Sets the VM host OS object for the provisioner module to access.
+
+=cut
+
+sub set_vmhost_os {
+	my $self = shift;
+	my $vmhost_os = shift;
+	$self->{vmhost_os} = $vmhost_os;
+}
+
+#/////////////////////////////////////////////////////////////////////////////
+
 =head2 os
 
  Parameters  : None
@@ -101,6 +117,29 @@ sub os {
 
 #/////////////////////////////////////////////////////////////////////////////
 
+=head2 vmhost_os
+
+ Parameters  : None
+ Returns     : Process's VM host OS object
+ Description : Allows provisioning modules to access the reservation's VM host OS
+               object.
+
+=cut
+
+sub vmhost_os {
+	my $self = shift;
+	
+	if (!$self->{vmhost_os}) {
+		notify($ERRORS{'WARNING'}, 0, "unable to return VM host OS object, \$self->{vmhost_os} is not set");
+		return;
+	}
+	else {
+		return $self->{vmhost_os};
+	}
+}
+
+#/////////////////////////////////////////////////////////////////////////////
+
 1;
 __END__