VConnectMultiStampManagement.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
Invoke-InstallOrUpdateModule 'SqlServer'

function Get-VConnectAzsStampsHealth {
      [CmdletBinding()]
      param (
            [Parameter(Mandatory = $true, Position = 0, HelpMessage = "VConnect API connection name; Please use Add-ApiConnection to create new connecition")]
            [string] $endpointName,
            [Switch] $exportCsv,
            [Switch] $gridView,
            [Switch] $printToConsole,
            [Switch] $extendedOutput,
            [Switch] $showLogs
      )
      try {
            $result = Invoke-RestApiRequest -endpointName $endpointName -relativeUrl 'admin/AzureStackAdminConnections/Get' -method 'GET'

            if (($result.Length -eq 2) -and ($null -ne $result[1])) {

                  $azsConnectionsList = $result[1] | Select-Object -Property ConnectionId, ConnectionName, Location, ArmEndpointUrl, TenantArmEndpointUrl, DefaultProviderSubscriptionId, TenantId, ClientId, LoginEndpoint, UseCertificateThumbprintInsteadAppSecret, EnvironmentCategoryTag, EnvironmentSubCategoryTag, IsAdfs, IsDisconnectedEnvironment, IsAllowManagement, CreatedTime, LastUpdatedTime

                  foreach ($azsConnection in $azsConnectionsList) {
                        try {
                              $adminArmEndpoint = $azsConnection.ArmEndpointUrl
                              $requestUrl = "$($adminArmEndpoint)/metadata/endpoints?api-version=2015-01-11"
                              if ($showLogs) {
                                    Write-Host "$($azsConnection.ConnectionName): Validating ARM endpoint..."
                                    Invoke-WebRequest $requestUrl
                              } else {
                                    Invoke-WebRequest $requestUrl |  Out-Null
                              }
                              Add-Member -InputObject $azsConnection -MemberType NoteProperty -Name Reachable -Value $true
                        }
                        catch {
                              $exception = $_
                              if ($showLogs) {
                                    Write-Host "$($azsConnection.ConnectionName) Validating ARM endpoint failed."
                                    Write-Host $exception
                              }
                              Add-Member -InputObject $azsConnection -MemberType NoteProperty -Name Reachable -Value $false
                        }
                  }

                  if ($gridView) {
                        $azsConnectionsList | Out-GridView
                        return
                  } 
                  if ($exportCsv) {
                        $dateTimeTicks = (Get-Date).Ticks
                        $outFileName = "Get-MamStamps-$($endpointName)-$($dateTimeTicks).csv"
                        Write-Host "Writing to File: $($outFileName)"
                        $azsConnectionsList | Export-Csv -Path $outFileName -NoTypeInformation
                        return
                  }
                  if ($printToConsole) {
                        if (-not $extendedOutput) {
                              $azsConnectionsList = $azsConnectionsList | Select-Object -Property ConnectionId, ConnectionName, Location, IsAdfs, EnvironmentCategoryTag, ArmEndpointUrl,TenantArmEndpointUrl,Reachable
                        }
                        Write-Host ""
                        Write-Host "Azure Stack Hub Stamp Connectivity Status" -BackgroundColor White -ForegroundColor DarkBlue
                        Write-Host ""

                        foreach ($azsConnection in $azsConnectionsList) {
                              Write-Host "------------------------------------------------------------------------------------------------"
                              if ($azsConnection.Reachable) {
                                    Write-Host "$($azsConnection.ConnectionName) is Reachable" -BackgroundColor Green -ForegroundColor Black
                              }
                              else {
                                    Write-Host "$($azsConnection.ConnectionName) is not Reachable" -BackgroundColor Red -ForegroundColor Black
                              }
                              Write-Host "------------------------------------------------------------------------------------------------"
                              Write-Output -InputObject $azsConnection
                              Write-Host ""
                        }
                        return
                  }
                  return $azsConnectionsList
            }
            Write-Error "Command returns null result."
            return $null
      }
      catch {
            $exception = $_
            Write-Host "Azure Stack Hub Stamp ARM endpoint validation: Failed to get stamp details."
            Write-Error $exception
      }
}

function Get-VConnectDiscoveredResourcesStatus {
      param(
            [Parameter(Mandatory = $true, Position = 0)]
            $name,
            [Parameter(Mandatory = $true, Position = 1)]
            $dbName,
            [Parameter(Mandatory = $false, Position = 2)]
            [int] $connectionId = 0,
            [Switch] $printToConsole
            )

      $query = "select
           drs.PlatformConnectionId as ConnectionId,
           drs.Cluster as StampName,
           drs.PlatformServiceName as Service,
           drs.ResourceSubType as ResourceType,
           Max(drs.DiscoveredDate) as UpdatesDate,
           Max(dj.Id) as DiscoverJobId,
           Max(ds.DeploymentId) as DeploymentId,
           Max(ops.ResultMessage) as LastMessage
           from DiscoveredResources drs with (nolock)
           inner join DiscoveryJobs dj with (nolock) on drs.DiscoveryJobId = dj.Id
           inner join Deployments ds with (nolock) on ds.DeploymentId = dj.DiscoveryJobDeploymentId
           inner join Operations ops with (nolock) on ops.DeploymentId = ds.DeploymentId
           Where ($connectionId <= 0 or drs.PlatformConnectionId = $connectionId)
              and drs.IsDeleted = 0
              and drs.PlatformConnectionType = 1050
              and ds.StatusString = 'Completed'
              and ops.OperationName = 'DiscoverAdminPlatformServiceOp'
           Group by PlatformConnectionId, Cluster, PlatformServiceName, ResourceSubType
           order by Cluster, PlatformServiceName, ResourceSubType"


      Write-Host "Azure Stack Hub Stamp Resource Update Status..."

      if ($printToConsole) {
        Invoke-SqlDbQuery $name $query $dbName -printToConsole
        return
      }
      return Invoke-SqlDbQuery $name $query $dbName
}

function Test-SharedFolderAccess {
      param(
            [Parameter(Mandatory = $true, Position = 0)]
            $MarketplaceOfflineRepoPath,
            [Parameter(Mandatory = $true, Position = 1)]
            $MarketplaceOfflineRepoUsername,
            [Parameter(Mandatory = $true, Position = 2)]
            $MarketplaceOfflineRepoPassword
            )
            
    try {
        $MarketplaceOfflineRepoPath = $MarketplaceOfflineRepoPath.TrimEnd('\')
        
        Write-Verbose "Connecting to '$MarketplaceOfflineRepoPath'..." -Verbose
        net use $MarketplaceOfflineRepoPath /user:$MarketplaceOfflineRepoUsername $MarketplaceOfflineRepoPassword /persistent:no
        if (-not (Test-Path $("filesystem::$MarketplaceOfflineRepoPath"))) {
            Write-Error "Unable to access Offline repo directory '$MarketplaceOfflineRepoPath'"
            throw
        }
        $tempDownloadDir = "$MarketplaceOfflineRepoPath\testaccess.txt"
        New-Item $tempDownloadDir -ItemType File
        if (Test-Path $tempDownloadDir) {
             Remove-Item -Path $tempDownloadDir -Force
        }
        Write-Verbose "Read Write validation completed." -Verbose
        Write-Host "Validating SharedFolderAccess is success. " -BackgroundColor Black -ForegroundColor Green
    }
    catch {
          Write-Error "Test Offline Marketplace Repository access failed"
          throw
    }
}

function Test-AzureSyndicationCredential {
      param(
            [Parameter(Mandatory = $true, Position = 0)]
            $SyndicationSubscriptionId,
            [Parameter(Mandatory = $true, Position = 1)]
            $SyndicationAdminTenantId,
            [Parameter(Mandatory = $false, Position = 2)]
            $SyndicationAdminApplicationId,
            [Parameter(Mandatory = $false, Position = 3)]
            $SyndicationAdminApplicationCredential
            )
    try {
        Import-Module -Name Az.Accounts -ErrorAction Stop
        Import-Module -Name Azs.Syndication.Admin -ErrorAction Stop
    }
    catch {
          Write-Error "Import Az.Accounts and Azs.Syndication.Admin failed."
          throw
    }
    # Login into Azure Stack environment
    try {
        Write-Verbose "Trying to login in to Azure..." -Verbose
        [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13
        Clear-AzContext -Scope Process -Force -ErrorAction Stop
        if ($SyndicationAdminApplicationId -ne $null) {
            $syndicationAdminCred = Get-Credential -UserName $SyndicationAdminApplicationId -Message 'Enter Azure Syndication Application Secret...'
        } else {
            $syndicationAdminCred = $SyndicationAdminApplicationCredential
        }
        if ($syndicationAdminCred -eq $null) {
          Write-Error "Please provide input for 'SyndicationAdminApplicationId' or 'syndicationAdminCred'..."
        }

        Connect-AzAccount -EnvironmentName AzureCloud -ServicePrincipal -Credential $syndicationAdminCred -TenantId $SyndicationAdminTenantId -Scope Process -Force -ErrorAction Stop
        Get-AzSubscription -SubscriptionID $SyndicationSubscriptionId | Select-AzSubscription -Scope Process
    }
    catch {
          Write-Error "Login into Azure to access $SyndicationSubscriptionId Failed."
          throw
    }
    try {
        Write-Verbose "Trying to list available Azure Marketplace Products..." -Verbose
        $productsSelected = Select-AzsMarketplaceItem
        $productsSelected
        Clear-AzContext -Scope Process -Force -ErrorAction SilentlyContinue

        Write-Host "Validating AzureSyndicationCredential is success. " -BackgroundColor Black -ForegroundColor Green
    }
    catch {
          Write-Error "Test AzureSyndicationCredential is failed."
          throw
    }
}

function Export-AzsMarketplaceItemToOfflineRepo {
      param(
            [Parameter(Mandatory = $true, Position = 0)]
            $SyndicationSubscriptionId,
            [Parameter(Mandatory = $true, Position = 1)]
            $SyndicationAdminTenantId,
            [Parameter(Mandatory = $false, Position = 2)]
            $SyndicationAdminApplicationId,
            [Parameter(Mandatory = $false, Position = 3)]
            $SyndicationAdminApplicationCredential,
            [Parameter(Mandatory = $true, Position = 4)]
            $MarketplaceOfflineRepoPath,
            [Parameter(Mandatory = $true, Position = 5)]
            $MarketplaceOfflineRepoUsername,
            [Parameter(Mandatory = $true, Position = 6)]
            $MarketplaceOfflineRepoPassword
            )
    try {
        Import-Module -Name Az.Accounts -ErrorAction Stop
        Import-Module -Name Azs.Syndication.Admin -ErrorAction Stop
    }
    catch {
          Write-Error "Import Az.Accounts and Azs.Syndication.Admin failed."
          throw
    }
    try {
        Write-Verbose "Connecting to '$MarketplaceOfflineRepoPath'..." -Verbose
        $MarketplaceOfflineRepoPath = $MarketplaceOfflineRepoPath.TrimEnd('\')
        $tempDownloadDir = "$MarketplaceOfflineRepoPath\.downloading"

        net use $MarketplaceOfflineRepoPath /user:$MarketplaceOfflineRepoUsername $MarketplaceOfflineRepoPassword /persistent:no
        if (-not (Test-Path $("filesystem::$MarketplaceOfflineRepoPath"))) {
            return Get-ScriptResult $false 1 "Unable to access Offline repo directory '$MarketplaceOfflineRepoPath'"
        }
        if (-not (Test-Path $tempDownloadDir)) {
            New-Item $tempDownloadDir -ItemType Directory -Force -ErrorAction SilentlyContinue
        }
    }
    catch {
          Write-Error "Test Offline Marketplace Repository access failed"
          throw
    }
    # Login into Azure Stack environment
    try {
        [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13
        Clear-AzContext -Scope Process -Force -ErrorAction Stop
        if ($SyndicationAdminApplicationId -ne $null) {
            $syndicationAdminCred = Get-Credential -UserName $SyndicationAdminApplicationId -Message 'Enter Azure Syndication Application Secret...'
        } else {
            $syndicationAdminCred = $SyndicationAdminApplicationCredential
        }
        if ($syndicationAdminCred -eq $null) {
          Write-Error "Please provide input for 'SyndicationAdminApplicationId' or 'SyndicationAdminApplicationCredential'..."
        }
        Connect-AzAccount -EnvironmentName AzureCloud -ServicePrincipal -Credential $syndicationAdminCred -TenantId $SyndicationAdminTenantId -Scope Process -Force -ErrorAction Stop
        Get-AzSubscription -SubscriptionID $SyndicationSubscriptionId | Select-AzSubscription -Scope Process
    }
    catch {
          Write-Error "Login into Azure to access $SyndicationSubscriptionId Failed."
          throw
    }
    try {
        Write-Verbose "Please select only one product to export." -Verbose
        $productToDownload = Select-AzsMarketplaceItem
        if ($productToDownload.Length -eq 0) {
            Write-Error "No Marketplace prodcuct is selected. Please try again."
            return
        }
        if ($productToDownload -is [array]) {
            Write-Warning "Multiple Products are selected to export. Please try again." -Verbose
            return
        }
        $MarketplaceItemId = $productToDownload.Split('/')[-1]
        Write-Verbose "Start exporting $MarketplaceItemId" -Verbose

        $products = @($productToDownload)
        $products | Export-AzsMarketplaceItem -RepositoryDir $tempDownloadDir -IgnoreDependencies -AcceptLegalTerms -ErrorAction Stop
        Write-Verbose "Exporting $MarketplaceItemId is completed successfully." -Verbose
    }
    catch {
          Write-Error "Export Marketplace products into Offline Repository failed."
          throw
    }
    
    Clear-AzContext -Scope Process -Force -ErrorAction SilentlyContinue
    try {
        # Update status of downloaded Marketplace product folder
        Write-Verbose "Moving download product from temp folder to Repository." -Verbose
        net use $MarketplaceOfflineRepoPath /user:$MarketplaceOfflineRepoUsername $MarketplaceOfflineRepoPassword /persistent:no
        Move-Item "$tempDownloadDir\$MarketplaceItemId" $MarketplaceOfflineRepoPath -Force -ErrorAction Stop
    }
    catch {
          Write-Error "Configuring Offline Marketplace Repository is failed."
          throw
    }
}

function Import-AzsMarketplaceItemFromOfflineRepo {
      param(
            [Parameter(Mandatory = $true, Position = 0)]
            $MarketplaceProductId,
            [Parameter(Mandatory = $true, Position = 1)]
            $AdminArmEndpoint,
            [Parameter(Mandatory = $true, Position = 2)]
            $DefaultProviderSubscriptionId,
            [Parameter(Mandatory = $true, Position = 3)]
            $AzsAdminTenantId,
            [Parameter(Mandatory = $false, Position = 4)]
            $AdminApplicationId,
            [Parameter(Mandatory = $false, Position = 5)]
            $AdminApplicationCredential,
            [Parameter(Mandatory = $true, Position = 6)]
            $MarketplaceOfflineRepoPath,
            [Parameter(Mandatory = $true, Position = 7)]
            $MarketplaceOfflineRepoUsername,
            [Parameter(Mandatory = $true, Position = 8)]
            $MarketplaceOfflineRepoPassword
            )
    
    try {
        Import-Module -Name Az.Accounts -ErrorAction Stop
        Import-Module -Name Az.Storage -ErrorAction Stop
        Import-Module -Name Azs.Syndication.Admin -ErrorAction Stop
    }
    catch {
        Write-Error "Import Az.Accounts, Az.Storage and Azs.Syndication.Admin failed."
        throw
    }
    try {
        Write-Verbose "Connecting to '$MarketplaceOfflineRepoPath'..." -Verbose
        # Validate access to shared folder / offline repo
        net use $MarketplaceOfflineRepoPath /user:$MarketplaceOfflineRepoUsername $MarketplaceOfflineRepoPassword /persistent:no
        if (-not (Test-Path $("filesystem::$MarketplaceOfflineRepoPath"))) {
            throw "Unable to find/access Offline repo directory $MarketplaceOfflineRepoPath"
        }

        $marketplaceItemPath = "$MarketplaceOfflineRepoPath\$MarketplaceProductId"
        if (-not (Test-Path $marketplaceItemPath)) {
            Write-Error "'$MarketplaceProductId' is not found the in offline repo. Please download the Marketplace Item."
        }
    }
    catch {
        Write-Error "Test Offline Marketplace Repository access failed"
        throw
    }

    try {
        [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13

        # Login into Azure Stack environment
        Clear-AzContext -Scope Process -Force -ErrorAction Stop

        $azsEnvironmentName = "AzsHub_ImportAzsMarketplaceItem"
        Add-AzEnvironment -Name $azsEnvironmentName -ArmEndpoint $AdminArmEndpoint -Scope Process -ErrorAction Stop

        if ($AdminApplicationId -ne $null) {
            $azSAdminCred = Get-Credential -UserName $AdminApplicationId -Message 'Enter Azure Stack Hub App Registration Secret...'
        } else {
            $azSAdminCred = $AdminApplicationCredential
        }
        if ($azSAdminCred -eq $null) {
          Write-Error "Please provide input for 'AdminApplicationId' or 'AdminApplicationCredential'..."
        }
        Add-AzAccount -EnvironmentName $azsEnvironmentName -ServicePrincipal -Credential $azSAdminCred -TenantId $AzsAdminTenantId -SubscriptionId $DefaultProviderSubscriptionId -Scope Process -ErrorAction Stop

        Get-AzSubscription -SubscriptionID $DefaultProviderSubscriptionId | Select-AzSubscription -Scope Process -ErrorAction Stop
    }
    catch {
        Write-Error "Login into Azure Stack Hub to access $DefaultProviderSubscriptionId Failed."
        throw
    }

    try {
        try {
            $JournalDir = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), [guid]::NewGuid().ToString())

            # Invoke Syndication Module
            $productName = $($MarketplaceProductId) # Product Name List to import
            Import-AzsMarketplaceItem -RepositoryDir $MarketplaceOfflineRepoPath -ProductName $productName -JournalDir $JournalDir -UpTo Import -ErrorAction Stop
            Write-Verbose "Importing $MarketplaceProductId is completed successfully." -Verbose
        }
        catch {
          Clear-AzContext -Scope Process -Force -ErrorAction SilentlyContinue
          Write-Error "Import Marketplace products from Offline Repository failed."
          throw
        }

        # Removing Syndication tool journal directory
        if (Test-Path $JournalDir) {
            Remove-Item -Path $JournalDir -Recurse -Force -ErrorAction SilentlyContinue
        }

        try {
            # Can be found in 'Azs.Syndication.Admin' PS Module Path => Import.psm1
            $syndicationTempRgName = "syndicationtemp-rg"
            $syndicationTempSaName = "syndicationtempsa"

            # Cleaning Syndication Temp Storage Account
            $tempSa = Get-AzStorageAccount -ResourceGroupName $syndicationTempRgName -Name $syndicationTempSaName -ErrorAction SilentlyContinue
            if ($null -eq $tempSa) {
                Write-Warning "Successfully imported Marketplace Item '$MarketplaceProductId'. Storage Account $syndicationTempSaName is not found. Cleaning imported Marketplace Item artifacts skiped."
                return
            }
            $saContext = New-AzStorageContext -ConnectionString $tempSa.Context.ConnectionString -ErrorAction Stop
            $artifactsToClean = Get-AzStorageBlob -Container temp -Context $saContext -Prefix "$MarketplaceProductId/" -ErrorAction Stop
            if ($true) {
                $artifactsToClean = $artifactsToClean | Where-Object { -not $_.Name.StartsWith("$MarketplaceProductId/icons/") }
            }
            $artifactsToClean | Remove-AzStorageBlob -Context $saContext -ErrorAction Stop -Verbose
            Clear-AzContext -Scope Process -Force -ErrorAction SilentlyContinue
        }
        catch {
          Clear-AzContext -Scope Process -Force -ErrorAction SilentlyContinue
          Write-Error "Import Marketplace Product completed successfully, but clean-up failed from storage account $syndicationTempSaName."
          throw
        }

        Write-Verbose "Successfully imported Marketplace Item '$MarketplaceProductId'." -Verbose
    }
    catch {
        Clear-AzContext -Scope Process -Force -ErrorAction Stop
        try {
            net use $MarketplaceOfflineRepoPath /user:$MarketplaceOfflineRepoUsername $MarketplaceOfflineRepoPassword /persistent:no
            if (Test-Path $($JournalDir)) {
                Remove-Item -Path $JournalDir -Recurse -Force -ErrorAction Stop
            }
        }
        catch {
            # Can be ignored
        }
        $_
    }
}
# SIG # Begin signature block
# MIIQQAYJKoZIhvcNAQcCoIIQMTCCEC0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUQBAyniHslSBZ4A1nM88Myy3R
# liCgggz8MIIGcjCCBFqgAwIBAgIIZDNR08c4nwgwDQYJKoZIhvcNAQELBQAwfDEL
# MAkGA1UEBhMCVVMxDjAMBgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgw
# FgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAvBgNVBAMMKFNTTC5jb20gUm9vdCBD
# Z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