105 references to AzureSandboxContainerDeployment
Aspire.Hosting.Azure.Sandboxes (12)
AzureSandboxCleanupResource.cs (3)
21Annotations.Add(new PipelineConfigurationAnnotation(AzureSandboxContainerDeployment.ConfigureStaleCleanupDestroyOrdering)); 45AzureSandboxContainerDeployment.CreateStaleCleanupPipelineStep( 47AzureSandboxContainerDeployment.GetActiveStateSectionNames(context.PipelineContext.Model))
AzureSandboxEndpointPropertyValueProvider.cs (5)
20private readonly AzureSandboxContainerDeployment.SandboxEndpoint _sandboxEndpoint; 62.AcquireSectionAsync(AzureSandboxContainerDeployment.GetStateSectionName(_resource), cancellationToken) 151private static AzureSandboxContainerDeployment.SandboxEndpoint ResolveSandboxEndpoint(AzureSandboxContainerResource resource, EndpointReference endpointReference) 153var endpoints = AzureSandboxContainerDeployment.ResolveSandboxEndpoints(resource); 156AzureSandboxContainerDeployment.SandboxEndpoint? fallbackEndpoint = null;
AzureSandboxGroupResource.cs (4)
219AzureSandboxContainerDeployment.ValidateSandboxCompatibility(resource); 237sandboxContainer.Annotations.Add(new PipelineStepAnnotation(_ => AzureSandboxContainerDeployment.CreatePipelineSteps(sandboxContainer))); 240await AzureSandboxContainerDeployment.ConfigureDeployOrderingAsync(context, sandboxContainer).ConfigureAwait(false); 241AzureSandboxContainerDeployment.ConfigureDestroyOrdering(context, sandboxContainer);
Aspire.Hosting.Azure.Tests (93)
AzureSandboxesTests.cs (93)
50var scope = AzureSandboxContainerDeployment.CreateDataPlaneScope(sandboxGroup.Resource); 482var acrIdentity = await AzureSandboxContainerDeployment.ResolveImagePullManagedIdentityClientIdAsync( 486var publicIdentity = await AzureSandboxContainerDeployment.ResolveImagePullManagedIdentityClientIdAsync( 590Assert.False(AzureSandboxContainerDeployment.ShouldDeleteLabeledDeployment( 602Assert.False(AzureSandboxContainerDeployment.ShouldDeleteLabeledDeployment( 614Assert.False(AzureSandboxContainerDeployment.ShouldDeleteLabeledDeployment( 626Assert.False(AzureSandboxContainerDeployment.ShouldDeleteLabeledDeployment( 638Assert.True(AzureSandboxContainerDeployment.ShouldDeleteLabeledDeployment( 653AzureSandboxContainerDeployment.CreateLabelSelector("owner-1", "frontend-sandbox-container")); 664AzureSandboxContainerDeployment.CreateSandboxUrlSummary(currentUrl, retainedUrl)); 667AzureSandboxContainerDeployment.CreateSandboxUrlSummary(currentUrl, currentUrl)); 670AzureSandboxContainerDeployment.CreateSandboxUrlSummary(currentUrl, retainedUrl: null)); 685Assert.True(AzureSandboxContainerDeployment.HasRemoteDeploymentState(ownerOnlyState)); 686Assert.False(AzureSandboxContainerDeployment.HasRemoteDeploymentState(emptyState)); 704AzureSandboxContainerDeployment.ValidateDeploymentScope( 709AzureSandboxContainerDeployment.ValidateDeploymentScope( 725var firstAppHostIdentity = AzureSandboxContainerDeployment.GetStableAppHostIdentity(firstPolyglotBuilder.Configuration); 726var secondAppHostIdentity = AzureSandboxContainerDeployment.GetStableAppHostIdentity(secondPolyglotBuilder.Configuration); 727var owner = AzureSandboxContainerDeployment.CreateStableOwnerId(firstAppHostIdentity, "Production", scope, "frontend-sandbox-container"); 728var freshRunOwner = AzureSandboxContainerDeployment.CreateStableOwnerId(firstAppHostIdentity.ToLowerInvariant(), "production", scope, "frontend-sandbox-container"); 729var otherEnvironmentOwner = AzureSandboxContainerDeployment.CreateStableOwnerId(firstAppHostIdentity, "Staging", scope, "frontend-sandbox-container"); 730var otherAppOwner = AzureSandboxContainerDeployment.CreateStableOwnerId(secondAppHostIdentity, "Production", scope, "frontend-sandbox-container"); 731var otherScopeOwner = AzureSandboxContainerDeployment.CreateStableOwnerId( 742Assert.True(AzureSandboxContainerDeployment.ShouldDeleteLabeledDeployment( 767var pendingOwnerIds = AzureSandboxContainerDeployment.GetPendingOwnerCleanupIds( 780var legacyOwner = AzureSandboxContainerDeployment.CreateLegacyStableOwnerId( 784var productionOwner = AzureSandboxContainerDeployment.CreateStableOwnerId( 789var stagingOwner = AzureSandboxContainerDeployment.CreateStableOwnerId( 804var broadCleanupOwners = AzureSandboxContainerDeployment.GetPendingOwnerCleanupIds( 808var directCleanupState = AzureSandboxContainerDeployment.CreatePendingLegacyDeploymentCleanup( 826AzureSandboxContainerDeployment.GetStableAppHostIdentity(builder.Configuration)); 836new AzureSandboxContainerDeployment.SandboxEndpoint( 853var egressPolicy = AzureSandboxContainerDeployment.CreateEgressPolicy( 855var fingerprint = AzureSandboxContainerDeployment.CreateDeploymentSecurityFingerprint( 869Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, fingerprint, hasRuntimeEnvironmentConfiguration: false)); 872Assert.False(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, fingerprint, hasRuntimeEnvironmentConfiguration: false)); 873var updatedImageFingerprint = AzureSandboxContainerDeployment.CreateDeploymentSecurityFingerprint( 878Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, updatedImageFingerprint, hasRuntimeEnvironmentConfiguration: false)); 880Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, fingerprint, hasRuntimeEnvironmentConfiguration: false)); 883Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, fingerprint, hasRuntimeEnvironmentConfiguration: false)); 886var anonymousFingerprint = AzureSandboxContainerDeployment.CreateDeploymentSecurityFingerprint( 893Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, anonymousFingerprint, hasRuntimeEnvironmentConfiguration: false)); 895Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, fingerprint, hasRuntimeEnvironmentConfiguration: true)); 897Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, fingerprint, hasRuntimeEnvironmentConfiguration: false)); 899Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange( 905Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, fingerprint, hasRuntimeEnvironmentConfiguration: false)); 908var updatedIdentityFingerprint = AzureSandboxContainerDeployment.CreateDeploymentSecurityFingerprint( 919Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, updatedIdentityFingerprint, hasRuntimeEnvironmentConfiguration: false)); 921var updatedEgressFingerprint = AzureSandboxContainerDeployment.CreateDeploymentSecurityFingerprint( 925AzureSandboxContainerDeployment.CreateEgressPolicy(["other.example.com"])); 926Assert.True(AzureSandboxContainerDeployment.HasSecurityRelevantEndpointChange(previousState, updatedEgressFingerprint, hasRuntimeEnvironmentConfiguration: false)); 932using var handler = AzureSandboxContainerDeployment.CreatePublicEndpointHttpHandler(); 957AzureSandboxContainerDeployment.DeleteSandboxAsync( 995AzureSandboxContainerDeployment.DeleteExistingDeploymentAsync( 1033AzureSandboxContainerDeployment.DeleteExistingDeploymentAsync( 1068var existingScope = AzureSandboxContainerDeployment.CreateDataPlaneScope(sandboxGroup.Resource); 1095AzureSandboxContainerDeployment.DestroyAsync(stepContext, sandboxResource)); 1108var exception = AzureSandboxContainerDeployment.CreateDiskImageFailureException( 1142await AzureSandboxContainerDeployment.DeleteRemoteDeploymentsByResourceLabelAsync( 1599var reference = await AzureSandboxContainerDeployment.ResolveContainerImageReferenceForDiskImageAsync( 1815var resources = AzureSandboxContainerDeployment.CreateSandboxResources(sandboxContainer); 1820var lifecycle = AzureSandboxContainerDeployment.CreateLifecyclePolicy(sandboxContainer); 1831Assert.Equal(TimeSpan.FromMinutes(2), AzureSandboxContainerDeployment.GetPublicEndpointReadyTimeout(sandboxContainer)); 1833var egress = AzureSandboxContainerDeployment.CreateEgressPolicy( 1858var endpoint = Assert.Single(AzureSandboxContainerDeployment.ResolveSandboxEndpoints(sandboxContainer)); 1894Assert.Null(AzureSandboxContainerDeployment.CreateLifecyclePolicy(defaultSandbox)); 1896AzureSandboxContainerDeployment.CreateLifecyclePolicy(disabledSandbox)); 1900AzureSandboxContainerDeployment.CreateLifecyclePolicy(enabledSandbox)); 1990var endpoint = Assert.Single(AzureSandboxContainerDeployment.ResolveSandboxEndpoints(sandboxContainer)); 2013Assert.True(AzureSandboxContainerDeployment.TryResolveEndpointReferenceValue(api.GetEndpoint("http"), sandboxGroup.Resource, out var urlExpression)); 2018Assert.True(AzureSandboxContainerDeployment.TryResolveEndpointReferenceValue(api.GetEndpoint("http").Property(EndpointProperty.TargetPort), sandboxGroup.Resource, out var targetPortExpression)); 2052var exception = Assert.Throws<InvalidOperationException>(() => AzureSandboxContainerDeployment.ResolveSandboxEndpoints(sandboxContainer)); 2091var exception = Assert.Throws<NotSupportedException>(() => AzureSandboxContainerDeployment.ResolveSandboxEndpoints(sandboxContainer)); 2115var exception = Assert.Throws<NotSupportedException>(() => AzureSandboxContainerDeployment.ResolveSandboxEndpoints(sandboxContainer)); 2206var sandboxEndpoint = Assert.Single(AzureSandboxContainerDeployment.ResolveSandboxEndpoints(sandboxContainer)); 2338var sandboxEndpoint = Assert.Single(AzureSandboxContainerDeployment.ResolveSandboxEndpoints(sandboxContainer)); 2363var sandboxEndpoint = Assert.Single(AzureSandboxContainerDeployment.ResolveSandboxEndpoints(sandboxContainer)); 2380var steps = AzureSandboxContainerDeployment.CreatePipelineSteps(sandboxContainer).ToList(); 2397await AzureSandboxContainerDeployment.ConfigureDeployOrderingAsync(context, sandboxContainer); 2426AzureSandboxContainerDeployment.GetStateSectionName(apiSandbox), 2450var value = await AzureSandboxContainerDeployment.ResolveValueWithEgressHostsAsync(stepContext, web.Resource, endpointExpression); 2451var environment = await AzureSandboxContainerDeployment.ResolveEnvironmentVariablesAsync(stepContext, web.Resource); 2602var (entrypoint, command) = await AzureSandboxContainerDeployment.ResolveModeledCommandAsync( 2608Assert.True(AzureSandboxContainerDeployment.HasModeledCommandConfiguration(project.Resource)); 2612Assert.True(AzureSandboxContainerDeployment.HasModeledCommandConfiguration(container.Resource)); 2636AzureSandboxContainerDeployment.GetStateSectionName(apiSandbox), 2657var command = await AzureSandboxContainerDeployment.ResolveModeledCommandAsync(stepContext, worker.Resource); 2658var egressPolicy = AzureSandboxContainerDeployment.CreateEgressPolicy(command.EgressHosts); 2690var environment = await AzureSandboxContainerDeployment.ResolveEnvironmentVariablesAsync( 2693var egressPolicy = AzureSandboxContainerDeployment.CreateEgressPolicy(environment.EgressHosts); 2708var firstLease = await AzureSandboxContainerDeployment.AcquireDeploymentLeaseAsync( 2716var secondLeaseTask = AzureSandboxContainerDeployment.AcquireDeploymentLeaseAsync( 2790AzureSandboxContainerDeployment.CreateWithResponseLossCleanupAsync(