DungKHoang / Old-NotUsed-Import-Export-OneView-Resources

11 stars 2 forks source link

Example for connections only is incorrect #6

Open JaragonCR opened 5 years ago

JaragonCR commented 5 years ago

in the examples it is specified that you can export just connections.

.\Import-OVResources.ps1 -OVProfileCSV .\profile.csv -OVProfileConnectionCSV .\connection.csv
Import Server Profiles from the profile.csv and connection.csv files

However the if statement will only get activated if SAN & Local storage are invoked as well.

if ( -not [string]::IsNullOrEmpty($OVProfileCSV) -and (Test-Path $OVProfileCSV) -and -not [string]::IsNullOrEmpty($OVProfileConnectionCSV) -and (Test-Path $OVProfileConnectionCSV) -and -not [string]::IsNullOrEmpty($OVProfileLOCALStorageCSV) -and (Test-Path $OVProfileLOCALStorageCSV) -and ` -not [string]::IsNullOrEmpty($OVProfileSANStorageCSV) -and (Test-Path $OVProfileSANStorageCSV) ) { Write-Host -ForegroundColor Cyan "Importing Server Profile from CSV file --> $OVProfileCSV" Create-OVProfile -OVProfileCSV $OVProfileCSV -OVProfileConnectionCSV $OVProfileConnectionCSV -OVProfileLOCALStorageCSV $OVProfileLOCALStorageCSV -OVProfileSANStorageCSV $OVProfileSANStorageCSV }