Author: fapeeler
Date: Mon Aug 24 12:52:19 2009
New Revision: 807192

URL: http://svn.apache.org/viewvc?rev=807192&view=rev
Log:
VCL-205

Added VMWARE_MAC_ETH0_GENERATED and VMWARE_MAC_ETH1_GENERATED for esx
module. These allow the site-admins to define a site registered MAC or
lets vmware server generate these. Required for a large distributed set
of esx servers.


Modified:
    incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf
    incubator/vcl/trunk/managementnode/lib/VCL/utils.pm

Modified: incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf?rev=807192&r1=807191&r2=807192&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf (original)
+++ incubator/vcl/trunk/managementnode/etc/vcl/vcld.conf Mon Aug 24 12:52:19 
2009
@@ -254,3 +254,13 @@
 # - VMWARE vmdk image files
 # - this can be storage on the management node
 VMWARE_IMAGEREPOSITORY=/install/vmware_images
+
+                           # VMWARE_MAC_ETH0_GENERATED:
+# VMWARE_MAC_ETH1_GENERATED:
+# Used when building the vmware vmx file
+# In case you need either vmware to generate the MAC or for you have
+# registered MAC addresses.
+# yes - allow vmware host server to generate MAC addresses
+# no -  allow vcl to assign known registered MAC address  
+VMWARE_MAC_ETH0_GENERATED=no
+VMWARE_MAC_ETH1_GENERATED=no

Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/utils.pm?rev=807192&r1=807191&r2=807192&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Mon Aug 24 12:52:19 2009
@@ -234,6 +234,8 @@
   $TOOLS
   $VERBOSE
   $VMWAREREPOSITORY
+  $VMWARE_MAC_ETH0_GENERATED
+  $VMWARE_MAC_ETH1_GENERATED
   $WRTPASS
   $WRTUSER
   $XMLRPC_USER
@@ -266,7 +268,7 @@
        our ($IDENTITY_linux_lab, $IDENTITY_solaris_lab, $IDENTITY_wxp, 
$IDENTITY_newwxp, $IDENTITY_bladerhel);
        our ($IMAGELIBENABLE) = 0;
        our ($IMAGESERVERS, $IMAGELIBUSER, $IMAGELIBKEY);
-       our ($VMWARETYPE, $VMWARE_DISK);
+       our ($VMWARETYPE, $VMWARE_DISK,$VMWARE_MAC_ETH0_GENERATED, 
$VMWARE_MAC_ETH1_GENERATED);
        our ($WINDOWS_ROOT_PASSWORD);
    our ($XMLRPC_USER, $XMLRPC_PASS, $XMLRPC_URL);
 
@@ -505,6 +507,18 @@
                        if ($l =~ /^VMWARE_DISK=(localdisk|networkdisk)/) {
                                $VMWARE_DISK = $1;
                        }
+
+                       #$VMWARE_MAC_ETHO_GENERATED
+                       if ($l =~ /^VMWARE_MAC_ETH0_GENERATED=(yes|no)/i) {
+                               $VMWARE_MAC_ETH0_GENERATED = 1 if ($1 =~ 
/yes/i);
+                               $VMWARE_MAC_ETH0_GENERATED = 0 if ($1 =~ /no/i);
+                       }
+
+                       #$VMWARE_MAC_ETH1_GENERATED
+                       if ($l =~ /^VMWARE_MAC_ETH1_GENERATED=(yes|no)/i) {
+                               $VMWARE_MAC_ETH1_GENERATED = 1 if ($1 =~ 
/yes/i);
+                               $VMWARE_MAC_ETH1_GENERATED = 0 if ($1 =~ /no/i);
+                       }
                        
                        if ($l =~ /^windows_root_password=(.*)/i) {
                                $WINDOWS_ROOT_PASSWORD = $1;
@@ -591,6 +605,15 @@
                import Net::Jabber qw(client);
        }
 
+       # Check ETH0 Generated
+       if(!defined($VMWARE_MAC_ETH0_GENERATED)){
+               $VMWARE_MAC_ETH0_GENERATED = 0;
+       }
+       # Check ETH1 Generated
+       if(!defined($VMWARE_MAC_ETH1_GENERATED)){
+               $VMWARE_MAC_ETH1_GENERATED = 0;
+       }
+
        # Get the remaining command line parameters
        $VERBOSE = $OPTIONS{verbose} if (defined($OPTIONS{verbose} && 
$OPTIONS{verbose}));
        $TESTING = $OPTIONS{testing} if (defined($OPTIONS{testing} && 
$OPTIONS{testing}));
@@ -623,6 +646,7 @@
 our $XCATROOT           = "/opt/xcat";
 our $TOOLS              = "$FindBin::Bin/../tools";
 our $VMWAREREPOSITORY   = "/install/vmware_images";
+our $VMWARE_MAC_GENERATED;
 our $VERBOSE;
 our $TESTING;
 our $CONF_FILE_PATH;


Reply via email to