-
Notifications
You must be signed in to change notification settings - Fork 8
Adding examples. #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Adding examples. #214
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Uncomment the following script and provide the below information to set up Intersight environment. | ||
| <# | ||
| $intersightEnv = @{ | ||
| BasePath = if ($env:INTERSIGHT_ENDPOINT) { $env:INTERSIGHT_ENDPOINT } else { "https://intersight.com" } | ||
| ApiKeyId = "xxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxx" | ||
| ApiKeyFilePath = "C:\\Users\\admin\\Downloads\\ProductionSecretKey.txt" | ||
| HttpSigningHeader = @("(request-target)", "Host", "Date", "Digest") | ||
| } | ||
|
|
||
| Set-IntersightConfiguration @intersightEnv | ||
| #> | ||
|
|
||
| $Source1 = Initialize-IntersightSoftwarerepositoryNfsServer -FileLocation "10.xx.xx.xx/shared/ucsc-845a-m8-huu-2.0.1.250000D.iso" -ObjectType "SoftwarerepositoryNfsServer" | ||
| $Account1 = Get-IntersightIamAccount -Name "my-account" | ||
| $Organization1 = Get-IntersightOrganizationOrganization -Name "test_new_org" -Account $Account1 | ||
| $Catalog1 = Get-IntersightSoftwarerepositoryCatalog -Name "user-catalog" -Organization $Organization1 | ||
| $FirmwareDistributable = New-IntersightFirmwareDistributable -Name "ucsc-845a-m8-huu-2.0.1.250000D" -ImportAction "None" -SupportedModels @("CAI-845A-M8") -Version "-" -Origin "User" -Source $Source1 -Catalog $Catalog1 | ||
| $Organization2 = Get-IntersightOrganizationOrganization -Name "test_new_org" -Account $Account1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why to call $organization2 when we have already $organization1 |
||
| $Catalog2 = Get-IntersightSoftwarerepositoryCatalog -Name "user-catalog" -Organization $Organization2 | ||
| $UpdatedFirmwareDistributable = $FirmwareDistributable | Set-IntersightFirmwareDistributable -Source $Source1 -Version "2.0(1.250000D)" -Catalog $Catalog2 -Name "ucsc-845a-m8-huu-2.0.1.250000D" -SupportedModels @("CAI-845A-M8") -Description "invalid CIFS image" | ||
| $DirectDownload3 = Initialize-IntersightFirmwareDirectDownload -ObjectType "FirmwareDirectDownload" | ||
| $NetworkShare3 = Initialize-IntersightFirmwareNetworkShare -Upgradeoption "NwUpgradeFull" -MapType "Nfs" -ObjectType "FirmwareNetworkShare" | ||
| $Server3 = Get-IntersightComputeRackUnit -DeviceMoId "69a54b3a6f72613101af857f" -Dn "/redfish/v1/Systems/system" | ||
| $FirmwareUpgrade = New-IntersightFirmwareUpgrade -UpgradeType "NetworkUpgrade" -Distributable $UpdatedFirmwareDistributable -DirectDownload $DirectDownload3 -NetworkShare $NetworkShare3 -Server $Server3 -ExcludeComponentList @() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Uncomment the following script and provide the below information to set up Intersight environment. | ||
| <# | ||
| $intersightEnv = @{ | ||
| BasePath = if ($env:INTERSIGHT_ENDPOINT) { $env:INTERSIGHT_ENDPOINT } else { "https://intersight.com" } | ||
| ApiKeyId = "xxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxx" | ||
| ApiKeyFilePath = "C:\\Users\\admin\\Downloads\\ProductionSecretKey.txt" | ||
| HttpSigningHeader = @("(request-target)", "Host", "Date", "Digest") | ||
| } | ||
|
|
||
| Set-IntersightConfiguration @intersightEnv | ||
| #> | ||
|
|
||
| $Servers11 = Get-IntersightComputeRackUnit -DeviceMoId "698d5fcb6f726131016e23d4" -Dn "sys/rack-unit-1" | ||
| $ValidInstallTarget = New-IntersightOsValidInstallTarget -Servers @($Servers11) | ||
| $OsSupport = New-IntersightOsOsSupport -OsVersion "ESXi 8.0" | ||
| $Account1 = Get-IntersightIamAccount -Name "my-account" | ||
| $Organization1 = Get-IntersightOrganizationOrganization -Name "Org-Auto-8332" -Account $Account1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you need to pass account to get account? please add comment before the main cmdlet operation so that user can read and understand it |
||
| $Catalog1 = Get-IntersightSoftwarerepositoryCatalog -Name "user-catalog" -Organization $Organization1 | ||
| $Image31 = Get-IntersightSoftwarerepositoryOperatingSystemFile -Name "Esxi80u2_embedded" -Catalog $Catalog1 | ||
| $OsduImage31 = Get-IntersightFirmwareServerConfigurationUtilityDistributable -Name "ucsxe-scu-7.1.7.260010.iso" -Catalog $Catalog1 | ||
| $IpV4Config31 = Initialize-IntersightCommIpV4Interface -ObjectType "CommIpV4Interface" -Gateway "" -IpAddress "" -Netmask "" | ||
| $IpConfiguration31 = Initialize-IntersightOsIpv4Configuration -ObjectType "OsIpv4Configuration" -IpV4Config $IpV4Config31 | ||
| $Answers31 = Initialize-IntersightOsAnswers -ObjectType "OsAnswers" -Hostname "google" -IpConfigType "DHCP" -IpConfiguration $IpConfiguration31 -IsRootPasswordCrypted $false -Nameserver "" -NetworkDevice "" -ProductKey "" -Source "Template" -RootPassword "123456" | ||
| $Organization4 = Get-IntersightOrganizationOrganization -Moid "5da9f0b76972652d30b3bae7" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do we receive for the organization when using the Moid? Will it work the same way in the customer environment? How should customers determine whether they need to provide the $organization1 Moid or the $organization4 Moid? |
||
| if ($Organization4) { | ||
| $Catalog3 = Get-IntersightOsCatalog -Name "shared" -Organization $Organization4 | ||
| } else { | ||
| $Catalog3 = Get-IntersightOsCatalog -Name "shared" | ||
| } | ||
| $ConfigurationFile31 = Get-IntersightOsConfigurationFile -Name "ESXi8.0ConfigFile" -Catalog $Catalog3 | ||
| $InstallTarget31 = Initialize-IntersightOsPhysicalDisk -ObjectType "OsPhysicalDisk" -Name "Disk 1" -SerialNumber "W0K40V960000K141L1Z5" -StorageControllerSlotId "MRAID" | ||
| $Body31 = Initialize-IntersightOsInstall -Description "" -InstallMethod "VMedia" -Image $Image31 -OsduImage $OsduImage31 -OverrideSecureBoot $true -Organization $Organization1 -Answers $Answers31 -ConfigurationFile $ConfigurationFile31 -InstallTarget $InstallTarget31 -Server $Servers11 | ||
| $Requests13 = Initialize-IntersightBulkRestSubRequest -ObjectType "BulkRestSubRequest" -Body $Body31 | ||
| $BulkInstallRequest = New-IntersightBulkRequest -Verb "POST" -Uri "/v1/os/Installs" -Requests @($Requests13) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why to provide $account1 any specific region because API key is generated for account and it works within account boundry