-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #428 from aws/dev
chore: release 0.32
- Loading branch information
Showing
30 changed files
with
774 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/AWS.Deploy.CLI/TypeHintResponses/BeanstalkEnvironmentTypeHintResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using AWS.Deploy.Common.Recipes; | ||
|
||
namespace AWS.Deploy.CLI.TypeHintResponses | ||
{ | ||
/// <summary> | ||
/// The <see cref="BeanstalkApplicationTypeHintResponse"/> class encapsulates | ||
/// <see cref="OptionSettingTypeHint.BeanstalkEnvironment"/> type hint response | ||
/// </summary> | ||
public class BeanstalkEnvironmentTypeHintResponse : IDisplayable | ||
{ | ||
public bool CreateNew { get; set; } | ||
public string EnvironmentName { get; set; } | ||
|
||
public BeanstalkEnvironmentTypeHintResponse( | ||
bool createNew, | ||
string environmentName) | ||
{ | ||
CreateNew = createNew; | ||
EnvironmentName = environmentName; | ||
} | ||
|
||
public string ToDisplayString() => EnvironmentName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/AWS.Deploy.Common/Recipes/Validation/RecipeValidators/MinMaxConstraintValidator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
namespace AWS.Deploy.Common.Recipes.Validation | ||
{ | ||
/// <summary> | ||
/// This validator enforces a constraint that the value for one option setting item is less than another option setting item. | ||
/// The setting that holds the minimum value is identified by the 'MinValueOptionSettingsId'. | ||
/// The setting that holds the maximum value is identified by the 'MaxValueOptionSettingsId'. | ||
/// </summary> | ||
public class MinMaxConstraintValidator : IRecipeValidator | ||
{ | ||
public string MinValueOptionSettingsId { get; set; } = string.Empty; | ||
public string MaxValueOptionSettingsId { get; set; } = string.Empty; | ||
public string ValidationFailedMessage { get; set; } = "The value specified for {{MinValueOptionSettingsId}} must be less than or equal to the value specified for {{MaxValueOptionSettingsId}}"; | ||
|
||
public ValidationResult Validate(Recommendation recommendation, IDeployToolValidationContext deployValidationContext) | ||
{ | ||
double minVal; | ||
double maxValue; | ||
|
||
try | ||
{ | ||
minVal = recommendation.GetOptionSettingValue<double>(recommendation.GetOptionSetting(MinValueOptionSettingsId)); | ||
maxValue = recommendation.GetOptionSettingValue<double>(recommendation.GetOptionSetting(MaxValueOptionSettingsId)); | ||
} | ||
catch (OptionSettingItemDoesNotExistException) | ||
{ | ||
return ValidationResult.Failed($"Could not find a valid value for {MinValueOptionSettingsId} or {MaxValueOptionSettingsId}. Please provide a valid value and try again."); | ||
} | ||
|
||
if (minVal <= maxValue) | ||
return ValidationResult.Valid(); | ||
|
||
var failureMessage = | ||
ValidationFailedMessage | ||
.Replace("{{MinValueOptionSettingsId}}", MinValueOptionSettingsId) | ||
.Replace("{{MaxValueOptionSettingsId}}", MaxValueOptionSettingsId); | ||
|
||
return ValidationResult.Failed(failureMessage); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...NetAppElasticBeanstalkLinux/Generated/Configurations/BeanstalkEnvironmentConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// This is a generated file from the original deployment recipe. It contains properties for | ||
// all of the settings defined in the recipe file. It is recommended to not modify this file in order | ||
// to allow easy updates to the file when the original recipe that this project was created from has updates. | ||
// This class is marked as a partial class. If you add new settings to the recipe file, those settings should be | ||
// added to partial versions of this class outside of the Generated folder for example in the Configuration folder. | ||
|
||
namespace AspNetAppElasticBeanstalkLinux.Configurations | ||
{ | ||
public partial class BeanstalkEnvironmentConfiguration | ||
{ | ||
public bool CreateNew { get; set; } | ||
public string EnvironmentName { get; set; } | ||
|
||
/// A parameterless constructor is needed for <see cref="Microsoft.Extensions.Configuration.ConfigurationBuilder"/> | ||
/// or the classes will fail to initialize. | ||
/// The warnings are disabled since a parameterless constructor will allow non-nullable properties to be initialized with null values. | ||
#nullable disable warnings | ||
public BeanstalkEnvironmentConfiguration() | ||
{ | ||
|
||
} | ||
#nullable restore warnings | ||
|
||
public BeanstalkEnvironmentConfiguration( | ||
bool createNew, | ||
string environmentName) | ||
{ | ||
CreateNew = createNew; | ||
EnvironmentName = environmentName; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.