Have vmfs:// also honor automount preference in vmware infrastructures
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10681 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -3666,6 +3666,10 @@ sub validate_datastore_prereqs_inlock { | ||||
|                     my $uri = "vmfs://$name"; | ||||
|                     # check and see if this vmfs is on the node. | ||||
|                     unless ($hyphash{$hyp}->{datastoremap}->{$uri}) { #If not already there, try creating it. | ||||
| 						unless ($datastoreautomount) { | ||||
|                     		xCAT::SvrUtils::sendmsg([1,": $uri is not currently accessible at the given location and automount is disabled in site table"], $output_handler,$node); | ||||
| 							return 0; | ||||
| 						} | ||||
|                         $refresh_names=1; | ||||
|                         ($hyphash{$hyp}->{datastoremap}->{$uri},$hyphash{$hyp}->{datastorerefmap}->{$uri})=create_vmfs_datastore($hostview,$name,$hyp); | ||||
|                         unless($hyphash{hyp}->{datastoremap}->{$uri}){ return 0; } | ||||
| @@ -3721,6 +3725,10 @@ sub validate_datastore_prereqs_inlock { | ||||
|                     $name =~ s/:$//; #remove a : if someone put it in for some reason.   | ||||
|                     my $uri = "vmfs://$name"; | ||||
|                     unless ($hyphash{$hyp}->{datastoremap}->{$uri}) { #If not already there, it should be! | ||||
| 						unless ($datastoreautomount) { | ||||
|                     		xCAT::SvrUtils::sendmsg([1,": $uri is not currently accessible at the given location and automount is disabled in site table"], $output_handler,$node); | ||||
| 							return 0; | ||||
| 						} | ||||
|                         $refresh_names=1; | ||||
|                         ($hyphash{$hyp}->{datastoremap}->{$uri},$hyphash{$hyp}->{datastorerefmap}->{$uri})=create_vmfs_datastore($hostview,$name,$hyp); | ||||
|                         unless($hyphash{hyp}->{datastoremap}->{$uri}){ return 0; } | ||||
| @@ -3825,6 +3833,9 @@ sub create_vmfs_datastore { | ||||
|     my $hostview = shift; # VM object | ||||
|     my $name = shift; # name of storage we wish to create. | ||||
|     my $hyp = shift; | ||||
| 	unless ($datastoreautomount) { | ||||
| 		die "automount of VMware datastores is disabled in site configuration, not continuing"; | ||||
| 	} | ||||
|     # call some VMware API here to create | ||||
|     my $hdss = $hostview->{vim}->get_view(mo_ref=>$hostview->configManager->datastoreSystem); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user