kdevops.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Fix choice/endchoice kconfig options
       [not found] <CGME20230912194912eucas1p20d99edc0e417cda49b132eb8b7777198@eucas1p2.samsung.com>
@ 2023-09-12 19:49 ` Daniel Gomez
       [not found]   ` <CGME20230912194914eucas1p2e6fc3cdcb7745a011c0760849f08eca8@eucas1p2.samsung.com>
                     ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Daniel Gomez @ 2023-09-12 19:49 UTC (permalink / raw)
  To: mcgrof; +Cc: kdevops, jlayton, Daniel Gomez

Hi,

As you may know, Jeff Layton found the way to fix the choice/enchoice issue
by removing the redundant string the config selected is assigned to [1].

[1] 95f5695f fstests: remove redundant string prompts for fstype

These patches are meant to fix that in the terraform section. While most of the
patches are trivial, I'd like to know what you guys think about dropping a
choice/endchoice config ("AWS name search") that depends on an previous
choice/endchoice option ("AWS AMI owner") but we keep the config that the first
multichoice was assigned to (TERRAFORM_AWS_NS).

Hope I explained this correctly. Otherwise, please check patch [2] and ask any
question.

[2] terraform: aws: hide TERRAFORM_AWS_AMI_OWNER and drop AWS name search

Patch [3] it's the same but with less choice/endchoice configs and perhaps
simpler to see the intention.

[3] terraform: aws: hide AWS availability region option

Note: I did add/merge some spelling corrections. If you think it's too noisy
and not appropriate, I can make a separate commit for that.

The other patches remove choice/endchoice if only one option is available as Jeff
suggested and/or hide the config by removing the redundant string.

Daniel

Daniel Gomez (5):
  terraform: gce: remove redundant string for cpu and mem choice
  terraform: aws: hide AWS availability region option
  terraform: aws: hide TERRAFORM_AWS_AMI_OWNER and drop AWS name search
  terraform: aws: drop multichoice option for TERRAFORM_AWS_VIRT_TYPE
  terraform: aws: hide TERRAFORM_AWS_INSTANCE_TYPE

 terraform/aws/Kconfig | 160 ++++++++----------------------------------
 terraform/gce/Kconfig |  56 ++++-----------
 2 files changed, 46 insertions(+), 170 deletions(-)

-- 
2.39.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/5] terraform: gce: remove redundant string for cpu and mem choice
       [not found]   ` <CGME20230912194914eucas1p2e6fc3cdcb7745a011c0760849f08eca8@eucas1p2.samsung.com>
@ 2023-09-12 19:49     ` Daniel Gomez
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Gomez @ 2023-09-12 19:49 UTC (permalink / raw)
  To: mcgrof; +Cc: kdevops, jlayton, Daniel Gomez

This commits is part of the propagation fix found by Jeff
Layton in the choice/endchoice Kconfig option. When a CONFIG option
is used to assign the selected CONFIG, a string can't be added to
that config, otherwise the config is exposed and not updated with
user selection. Removing the string makes the config option hide from
the menuconfig.

For multichoice menu with single choice, remove choice menu and
leave it as standalone option with its default value.

Also, s/gce/GCE/g for Google Compute Engine (GCE) or Google Cloud
Platform Provider (GCP) and add documentation link to the terraform
variable each option is assigned to.

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
 terraform/gce/Kconfig | 56 ++++++++++++-------------------------------
 1 file changed, 15 insertions(+), 41 deletions(-)

diff --git a/terraform/gce/Kconfig b/terraform/gce/Kconfig
index 2102abd2..95ebd8da 100644
--- a/terraform/gce/Kconfig
+++ b/terraform/gce/Kconfig
@@ -8,24 +8,15 @@ config TERRAFORM_GCE_PROJECT_NAME
 	  the actual name of the project you have created using the
 	  GCE interface.
 
-choice
-	prompt "Choose GCE region location to use"
-	default TERRAFORM_GCE_WEST_2C
-
-config TERRAFORM_GCE_WEST_2C
-	bool "us-west2-c"
-	help
-	  This option will set the gce region location to us-west2-c.
-
-endchoice
-
 config TERRAFORM_GCE_REGION_LOCATION
 	string "GCE region location"
-	default "us-west2-c" if TERRAFORM_GCE_WEST_2C
+	default "us-west2-c"
 	help
-	  This option will set the gce region location. For more examples:
+	  This option will set the GCE region location. For more examples:
 	  https://cloud.google.com/compute/docs/regions-zones/
 
+	  Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#zone
+
 choice
 	prompt "Choose GCE Machine type"
 	default TERRAFORM_GCE_MACHINE_N1_STANDARD_8
@@ -45,7 +36,7 @@ config TERRAFORM_GCE_MACHINE_N1_STANDARD_8
 endchoice
 
 config TERRAFORM_GCE_MACHINE_TYPE
-	string "GCE Machine type"
+	string
 	default "n1-standard-1" if TERRAFORM_GCE_MACHINE_N1_STANDARD_1
 	default "n1-standard-8" if TERRAFORM_GCE_MACHINE_N1_STANDARD_8
 	help
@@ -54,40 +45,23 @@ config TERRAFORM_GCE_MACHINE_TYPE
 
 	  https://cloud.google.com/compute/docs/machine-types
 
-choice
-	prompt "Choose GCE scratch disk interface to use"
-	default TERRAFORM_GCE_SCRATCH_DISK_NVME
-
-config TERRAFORM_GCE_SCRATCH_DISK_NVME
-	bool "NVME"
-	help
-	  This option sets the scratch disk interface to NVMe.
-
-endchoice
+	  Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#machine_type
 
 config TERRAFORM_GCE_SCRATCH_DISK_INTERFACE
-	string "GCE scratch disk interface"
-	default "NVME" if TERRAFORM_GCE_SCRATCH_DISK_NVME
+	string "GCE scratch disk interface to use"
+	default "NVME"
 	help
-	  This option will set gce scratch disk interface.
+	  This option will set GCE scratch disk interface.
 
-choice
-	prompt "Choose GCE image to use"
-	default TERRAFORM_GCE_IMAGE_DEBIAN_10
-
-config TERRAFORM_GCE_IMAGE_DEBIAN_10
-	bool "debian-cloud/debian-10"
-	depends on TARGET_ARCH_X86_64
-	help
-	  This option sets the gce image to debian-cloud/debian-10.
-
-endchoice
+	  Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#scratch_disk
 
 config TERRAFORM_GCE_IMAGE
-	string "GCE image name to use"
-	default "debian-cloud/debian-10" if TERRAFORM_GCE_IMAGE_DEBIAN_10
+	string "GCE image to use"
+	default "debian-cloud/debian-10"
 	help
-	  This option will set gce image to debian-cloud/debian-10.
+	  This option will set GCE image to debian-cloud/debian-10.
+
+	  Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance#image
 
 config TERRAFORM_GCE_JSON_CREDENTIALS_PATH
 	string "GCE json credential file path"
-- 
2.39.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/5] terraform: aws: hide AWS availability region option
       [not found]   ` <CGME20230912194916eucas1p18db4cbc48e72969e5ab4bdb7a0bb1ae9@eucas1p1.samsung.com>
@ 2023-09-12 19:49     ` Daniel Gomez
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Gomez @ 2023-09-12 19:49 UTC (permalink / raw)
  To: mcgrof; +Cc: kdevops, jlayton, Daniel Gomez

This commit is part of the propagation fix found by Jeff
Layton in the choice/endchoice Kconfig option.

TERRAFORM_AWS_AV_REGION is a multichoice with single choice option
as it depends on AWS region multichoice option. Hide the option by
removing the string and assign the value automatically with its
AWS region option dependency.

Also, s/aws/AWS/g.

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
 terraform/aws/Kconfig | 36 +++++++++---------------------------
 1 file changed, 9 insertions(+), 27 deletions(-)

diff --git a/terraform/aws/Kconfig b/terraform/aws/Kconfig
index 158a0d63..cf3d59f0 100644
--- a/terraform/aws/Kconfig
+++ b/terraform/aws/Kconfig
@@ -7,21 +7,21 @@ choice
 config TERRAFORM_AWS_US_WEST_1
 	bool "us-west-1 - North California"
 	help
-	  This option will set the aws region to us-west-1.
+	  This option will set the AWS region to us-west-1.
 
 config TERRAFORM_AWS_US_WEST_2
 	bool "us-west-2 - Oregon"
 	help
-	  This option will set the aws region to us-west-2.
+	  This option will set the AWS region to us-west-2.
 
 endchoice
 
 config TERRAFORM_AWS_REGION
-	string "AWS region"
+	string
 	default "us-west-1" if TERRAFORM_AWS_US_WEST_1
 	default "us-west-2" if TERRAFORM_AWS_US_WEST_2
 	help
-	  This option will set the aws region to the specified value.
+	  This option will set the AWS region to the specified value.
 
 	  If you wish to expand on this list send a patch after reading
 	  this list:
@@ -30,7 +30,7 @@ config TERRAFORM_AWS_REGION
 
 	  Note that if you change region the AMI may change as well even
 	  for the same distribution. At least that applies to Amazon EC2
-	  optimized images. Use the aws console, to set that up it will
+	  optimized images. Use the AWS console, to set that up it will
 	  ask you for your credentials and then a region. Before adding
 	  an entry for ami image be sure you are on the region and then
 	  query with something like:
@@ -57,30 +57,12 @@ config TERRAFORM_AWS_REGION
 	  aws ec2 describe-images --image-ids ami-0699f753302dd8b00 | grep OwnerId
 	    "OwnerId": "137112412989",
 
-choice
-	prompt "AWS availability region to use"
-	default TERRAFORM_AWS_AV_US_WEST_1B
-
-config TERRAFORM_AWS_AV_US_WEST_1B
-	bool "us-west-1b"
-	depends on TERRAFORM_AWS_US_WEST_1
-	help
-	  This option will set the aws availiability region to us-west-1b.
-
-config TERRAFORM_AWS_AV_US_WEST_2B
-	bool "us-west-2b"
-	depends on TERRAFORM_AWS_US_WEST_2
-	help
-	  This option will set the aws availiability region to us-west-2b.
-
-endchoice
-
 config TERRAFORM_AWS_AV_REGION
-	string "AWS availablity region"
-	default "us-west-1b" if TERRAFORM_AWS_AV_US_WEST_1B
-	default "us-west-2b" if TERRAFORM_AWS_AV_US_WEST_2B
+	string
+	default "us-west-1b" if TERRAFORM_AWS_US_WEST_1
+	default "us-west-2b" if TERRAFORM_AWS_US_WEST_2
 	help
-	  This option will set the aws availablity region to the specified
+	  This option will set the AWS availablity region to the specified
 	  value.
 
 	  If you wish to expand on this list send a patch after reading this
-- 
2.39.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/5] terraform: aws: hide TERRAFORM_AWS_AMI_OWNER and drop AWS name search
       [not found]   ` <CGME20230912194917eucas1p255a2d6e940671576c95355d4ab9e99d4@eucas1p2.samsung.com>
@ 2023-09-12 19:49     ` Daniel Gomez
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Gomez @ 2023-09-12 19:49 UTC (permalink / raw)
  To: mcgrof; +Cc: kdevops, jlayton, Daniel Gomez

Hide TERRAFORM_AWS_AMI_OWNER and drop multichoice option for 'AWS name
search' as it directly depends on the option chosen at the 'AWS AMI
owner'.

This makes TERRAFORM_AWS_NS option to default to the proper value
without exposing it to the user making it non-visible symbol.

Also, 's/aws ami/AWS AMI/g'.

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
 terraform/aws/Kconfig | 107 ++++++++----------------------------------
 1 file changed, 19 insertions(+), 88 deletions(-)

diff --git a/terraform/aws/Kconfig b/terraform/aws/Kconfig
index cf3d59f0..ab734b28 100644
--- a/terraform/aws/Kconfig
+++ b/terraform/aws/Kconfig
@@ -72,141 +72,72 @@ config TERRAFORM_AWS_AV_REGION
 	  https://gist.github.com/neilstuartcraig/0ccefcf0887f29b7f240
 
 choice
-	prompt "AWS ami owner"
+	prompt "AWS AMI owner"
 	default TERRAFORM_AWS_AMI_AMAZON_X86_64 if TARGET_ARCH_X86_64
 	default TERRAFORM_AWS_AMI_AMAZON_ARM64 if TARGET_ARCH_ARM64
 
 config TERRAFORM_AWS_AMI_DEBIAN
 	bool "Debian - 379101102735"
 	help
-	  This option will set aws ami owner to Debian.
+	  This option will set AWS AMI owner to Debian.
 
 config TERRAFORM_AWS_AMI_AMAZON_X86_64
 	bool "Amazon Linux 2023 x86_64 - ami-0efa651876de2a5ce"
 	depends on TARGET_ARCH_X86_64 && TERRAFORM_AWS_US_WEST_2
 	help
-	  This option will set aws ami owner to Amazon EC2 images for x86_64.
+	  This option will set AWS AMI owner to Amazon EC2 images for x86_64.
 
 config TERRAFORM_AWS_AMI_AMAZON_ARM64
 	bool "Amazon Linux 2023 ARM64 - ami-0699f753302dd8b00"
 	depends on TARGET_ARCH_ARM64 && TERRAFORM_AWS_US_WEST_2
 	help
-	  This option will set aws ami owner to Amazon EC2 images for arm64.
+	  This option will set AWS AMI owner to Amazon EC2 images for arm64.
 
 config TERRAFORM_AWS_RHEL9_X86_64
 	bool "RHEL9 x86_64 - ami-0dda7e535b65b6469"
 	depends on TARGET_ARCH_X86_64 && TERRAFORM_AWS_US_WEST_2
 	help
-	  This option will set aws ami owner to RHEL9 for x86_64.
+	  This option will set AWS AMI owner to RHEL9 for x86_64.
 
 config TERRAFORM_AWS_RHEL9_ARM64
 	bool "RHEL9 x86_64 - ami-08911268ee09cb08e"
 	depends on TARGET_ARCH_ARM64 && TERRAFORM_AWS_US_WEST_2
 	help
-	  This option will set aws ami owner to RHEL9 for ARM64
+	  This option will set AWS AMI owner to RHEL9 for ARM64
 
 config TERRAFORM_AWS_SLE15_SP4_X86_64
 	bool "SUSE Linux Enterprise Server 15 SP4 x86_64 - ami-079ba66a5e9f2b70e"
 	depends on TARGET_ARCH_X86_64 && TERRAFORM_AWS_US_WEST_2
 	help
-	  This option will set aws ami owner to SLE15-SP4 for x86_64.
+	  This option will set AWS AMI owner to SLE15-SP4 for x86_64.
 
 config TERRAFORM_AWS_SLE15_SP4_ARM64
 	bool "SUSE Linux Enterprise Server 15 SP4 ARM64 - ami-00f902c807805f51a"
 	depends on TARGET_ARCH_ARM64 && TERRAFORM_AWS_US_WEST_2
 	help
-	  This option will set aws ami owner to SLE15-SP4 for arm64.
+	  This option will set AWS AMI owner to SLE15-SP4 for arm64.
 
 endchoice
 
 config TERRAFORM_AWS_AMI_OWNER
-	string "AWS AMI owner"
+	string
 	default "379101102735" if TERRAFORM_AWS_AMI_DEBIAN
 	default "137112412989" if TERRAFORM_AWS_AMI_AMAZON_X86_64 || TERRAFORM_AWS_AMI_AMAZON_ARM64
 	default "309956199498" if TERRAFORM_AWS_RHEL9_X86_64 || TERRAFORM_AWS_RHEL9_ARM64
 	default "013907871322" if TERRAFORM_AWS_SLE15_SP4_X86_64 || TERRAFORM_AWS_SLE15_SP4_ARM64
 	help
-	  This option will set aws AMI owner.
-
-choice
-	prompt "AWS name search"
-	default TERRAFORM_AWS_NS_DEBIAN_STRETCH_HVM_X86_64 if TARGET_ARCH_X86_64 && TERRAFORM_AWS_AMI_DEBIAN
-	default TERRAFORM_AWS_NS_DEBIAN_STRETCH_HVM_ARM64 if TERRAFORM_AWS_AMI_DEBIAN
-	default TERRAFORM_AWS_NS_AMAZON_2023_X86_64 if TARGET_ARCH_X86_64 && TERRAFORM_AWS_AMI_AMAZON_X86_64
-	default TERRAFORM_AWS_NS_AMAZON_2023_ARM64 if TARGET_ARCH_ARM64 && TERRAFORM_AWS_AMI_AMAZON_ARM64
-	default TERRAFORM_NS_RHEL9_X86_64 if TARGET_ARCH_X86_64 && TERRAFORM_AWS_RHEL9_X86_64
-	default TERRAFORM_NS_RHEL9_ARM64 if TARGET_ARCH_ARM64 && TERRAFORM_AWS_RHEL9_ARM64
-	default TERRAFORM_NS_SLE15SP4_X86_64 if TARGET_ARCH_X86_64 && TERRAFORM_AWS_SLE15_SP4_X86_64
-	default TERRAFORM_NS_SLE15SP4_ARM64 if TARGET_ARCH_ARM64 && TERRAFORM_AWS_SLE15_SP4_ARM64
-
-config TERRAFORM_AWS_NS_DEBIAN_STRETCH_HVM_X86_64
-	bool "debian-stretch-hvm-x86_64-*"
-	depends on TARGET_ARCH_X86_64
-	help
-	  This option will set aws name search to debian-stretch-hvm-x86_64-*
-
-config TERRAFORM_AWS_NS_DEBIAN_STRETCH_HVM_ARM64
-	bool "debian-stretch-hvm-arm64-*"
-	depends on TARGET_ARCH_ARM64
-	help
-	  This option will set aws name search to debian-stretch-hvm-arm64-*
-
-config TERRAFORM_AWS_NS_AMAZON_2023_X86_64
-	bool "al2023-*-x86_64"
-	select HAVE_SUPPORTS_PURE_IOMAP
-	depends on TARGET_ARCH_X86_64
-	help
-	  This option will set aws name search to the latest amazon 2023
-	  optimized image for x86_64.
-
-config TERRAFORM_AWS_NS_AMAZON_2023_ARM64
-	bool "al2023-*-arm64"
-	depends on TARGET_ARCH_ARM64
-	select HAVE_SUPPORTS_PURE_IOMAP
-	help
-	  This option will set aws name search to the latest amazon 2023
-	  optimized image arm64.
-
-config TERRAFORM_NS_RHEL9_X86_64
-	bool "RHEL-9.*x86_64-*"
-	depends on TARGET_ARCH_X86_64
-	help
-	  This option will set aws name search to the latest RHEL9
-	  image for x86_64.
-
-config TERRAFORM_NS_RHEL9_ARM64
-	bool "RHEL-9.*arm64-*"
-	depends on TARGET_ARCH_ARM64
-	help
-	  This option will set aws name search to the latest RHEL9
-	  image for arm64.
-
-config TERRAFORM_NS_SLE15SP4_X86_64
-	bool "suse-sles-15-sp4-*x86_64"
-	depends on TARGET_ARCH_X86_64
-	help
-	  This option will set aws name search to the latest SLE15-SP4
-	  image for x86_64.
-
-config TERRAFORM_NS_SLE15SP4_ARM64
-	bool "suse-sles-15-sp4-*arm64"
-	depends on TARGET_ARCH_ARM64
-	help
-	  This option will set aws name search to the latest SLE15-SP4
-	  image for arm64.
-
-endchoice
+	  This option will set AWS AMI owner.
 
 config TERRAFORM_AWS_NS
-	string "AWS name search"
-	default "debian-stretch-hvm-x86_64-*" if TERRAFORM_AWS_NS_DEBIAN_STRETCH_HVM_X86_64
-	default "debian-stretch-hvm-arm64-*" if TERRAFORM_AWS_NS_DEBIAN_STRETCH_HVM_ARM64
-	default "al2023-*-x86_64" if TERRAFORM_AWS_NS_AMAZON_2023_X86_64
-	default "al2023-*-arm64" if TERRAFORM_AWS_NS_AMAZON_2023_ARM64
-	default "RHEL-9.*x86_64-*" if TERRAFORM_NS_RHEL9_X86_64
-	default "RHEL-9.*arm64-*" if TERRAFORM_NS_RHEL9_ARM64
-	default "suse-sles-15-sp4-*x86_64" if TERRAFORM_NS_SLE15SP4_X86_64
-	default "suse-sles-15-sp4-*arm64" if TERRAFORM_NS_SLE15SP4_ARM64
+	string
+	default "debian-stretch-hvm-x86_64-*" if TARGET_ARCH_X86_64 && TERRAFORM_AWS_AMI_DEBIAN
+	default "debian-stretch-hvm-arm64-*" if TARGET_ARCH_ARM64 && TERRAFORM_AWS_AMI_DEBIAN
+	default "al2023-*-x86_64" if TARGET_ARCH_X86_64 && TERRAFORM_AWS_AMI_AMAZON_X86_64
+	default "al2023-*-arm64" if TARGET_ARCH_ARM64 && TERRAFORM_AWS_AMI_AMAZON_ARM64
+	default "RHEL-9.*x86_64-*" if TARGET_ARCH_X86_64 && TERRAFORM_AWS_RHEL9_X86_64
+	default "RHEL-9.*arm64-*" if TARGET_ARCH_ARM64 && TERRAFORM_AWS_RHEL9_ARM64
+	default "suse-sles-15-sp4-*x86_64" if TARGET_ARCH_X86_64 && TERRAFORM_AWS_SLE15_SP4_X86_64
+	default "suse-sles-15-sp4-*arm64" if TARGET_ARCH_ARM64 && TERRAFORM_AWS_SLE15_SP4_ARM64
 	help
 	  This option will set aws image search to use. Using this filter glob
 	  lets us get the latest ami for this owner / release.
-- 
2.39.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/5] terraform: aws: drop multichoice option for TERRAFORM_AWS_VIRT_TYPE
       [not found]   ` <CGME20230912194919eucas1p1acf335160e5a2750745c5fba9084b080@eucas1p1.samsung.com>
@ 2023-09-12 19:49     ` Daniel Gomez
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Gomez @ 2023-09-12 19:49 UTC (permalink / raw)
  To: mcgrof; +Cc: kdevops, jlayton, Daniel Gomez

TERRAFORM_AWS_VIRT_TYPE is single choice option. Drop multichoice in
favor of string option.

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
 terraform/aws/Kconfig | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/terraform/aws/Kconfig b/terraform/aws/Kconfig
index ab734b28..18a96349 100644
--- a/terraform/aws/Kconfig
+++ b/terraform/aws/Kconfig
@@ -164,22 +164,11 @@ config TERRAFORM_AWS_NS
 
 	  https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html
 
-choice
-	prompt "AWS virt type"
-	default TERRAFORM_AWS_VIRT_TYPE_HVM
-
-config TERRAFORM_AWS_VIRT_TYPE_HVM
-	bool "hvm"
-	help
-	  This option will set aws virt type to hvm.
-
-endchoice
-
 config TERRAFORM_AWS_VIRT_TYPE
 	string "AWS virt type"
-	default "hvm" if TERRAFORM_AWS_VIRT_TYPE_HVM
+	default "hvm"
 	help
-	  This option will set aws virt type. It must match your your
+	  This option will set AWS virt type. It must match your your
 	  preferred image filter used above for name search.
 
 choice
-- 
2.39.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/5] terraform: aws: hide TERRAFORM_AWS_INSTANCE_TYPE
       [not found]   ` <CGME20230912194920eucas1p188665453a470e3ef71f957c1b063ba4a@eucas1p1.samsung.com>
@ 2023-09-12 19:49     ` Daniel Gomez
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Gomez @ 2023-09-12 19:49 UTC (permalink / raw)
  To: mcgrof; +Cc: kdevops, jlayton, Daniel Gomez

This commit is part of the propagation fix found by Jeff Layton in the
choice/endchoice Kconfig option.

Hide the config TERRAFORM_AWS_INSTANCE_TYPE by removing the string and
assign the value automatically with option selected in 'AWS instance
type'.

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
 terraform/aws/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/terraform/aws/Kconfig b/terraform/aws/Kconfig
index 18a96349..401d92ea 100644
--- a/terraform/aws/Kconfig
+++ b/terraform/aws/Kconfig
@@ -243,7 +243,7 @@ config TERRAFORM_AWS_INSTANCE_I4I_METAL
 endchoice
 
 config TERRAFORM_AWS_INSTANCE_TYPE
-	string "AWS AMI owner"
+	string
 	default "m5ad.4xlarge" if TERRAFORM_AWS_INSTANCE_M5AD_4XLARGE
 	default "is4gen.medium" if TERRAFORM_AWS_INSTANCE_IS4GEN_MEDIUM
 	default "is4gen.8xlarge" if TERRAFORM_AWS_INSTANCE_IS4GEN_8XLARGE
-- 
2.39.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/5] Fix choice/endchoice kconfig options
  2023-09-12 19:49 ` [PATCH 0/5] Fix choice/endchoice kconfig options Daniel Gomez
                     ` (4 preceding siblings ...)
       [not found]   ` <CGME20230912194920eucas1p188665453a470e3ef71f957c1b063ba4a@eucas1p1.samsung.com>
@ 2023-09-12 21:49   ` Luis Chamberlain
  2023-09-13  4:56     ` Luis Chamberlain
  5 siblings, 1 reply; 8+ messages in thread
From: Luis Chamberlain @ 2023-09-12 21:49 UTC (permalink / raw)
  To: Daniel Gomez; +Cc: kdevops, jlayton

On Tue, Sep 12, 2023 at 07:49:11PM +0000, Daniel Gomez wrote:
> Hi,
> 
> As you may know, Jeff Layton found the way to fix the choice/enchoice issue
> by removing the redundant string the config selected is assigned to [1].
> 
> [1] 95f5695f fstests: remove redundant string prompts for fstype
> 
> These patches are meant to fix that in the terraform section. While most of the
> patches are trivial, I'd like to know what you guys think about dropping a
> choice/endchoice config ("AWS name search") that depends on an previous
> choice/endchoice option ("AWS AMI owner") but we keep the config that the first
> multichoice was assigned to (TERRAFORM_AWS_NS).
> 
> Hope I explained this correctly. Otherwise, please check patch [2] and ask any
> question.
> 
> [2] terraform: aws: hide TERRAFORM_AWS_AMI_OWNER and drop AWS name search
> 
> Patch [3] it's the same but with less choice/endchoice configs and perhaps
> simpler to see the intention.
> 
> [3] terraform: aws: hide AWS availability region option
> 
> Note: I did add/merge some spelling corrections. If you think it's too noisy
> and not appropriate, I can make a separate commit for that.
> 
> The other patches remove choice/endchoice if only one option is available as Jeff
> suggested and/or hide the config by removing the redundant string.

Looks all good, and goes tested by me, so:

Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Tested-by: Luis Chamberlain <mcgrof@kernel.org>

Please push!

  Luis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/5] Fix choice/endchoice kconfig options
  2023-09-12 21:49   ` [PATCH 0/5] Fix choice/endchoice kconfig options Luis Chamberlain
@ 2023-09-13  4:56     ` Luis Chamberlain
  0 siblings, 0 replies; 8+ messages in thread
From: Luis Chamberlain @ 2023-09-13  4:56 UTC (permalink / raw)
  To: Daniel Gomez; +Cc: kdevops, jlayton

On Tue, Sep 12, 2023 at 02:49:43PM -0700, Luis Chamberlain wrote:
> Please push!

I had a patch pending on this so I just pushed it myself.

  Luis

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-13  4:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20230912194912eucas1p20d99edc0e417cda49b132eb8b7777198@eucas1p2.samsung.com>
2023-09-12 19:49 ` [PATCH 0/5] Fix choice/endchoice kconfig options Daniel Gomez
     [not found]   ` <CGME20230912194914eucas1p2e6fc3cdcb7745a011c0760849f08eca8@eucas1p2.samsung.com>
2023-09-12 19:49     ` [PATCH 1/5] terraform: gce: remove redundant string for cpu and mem choice Daniel Gomez
     [not found]   ` <CGME20230912194916eucas1p18db4cbc48e72969e5ab4bdb7a0bb1ae9@eucas1p1.samsung.com>
2023-09-12 19:49     ` [PATCH 2/5] terraform: aws: hide AWS availability region option Daniel Gomez
     [not found]   ` <CGME20230912194917eucas1p255a2d6e940671576c95355d4ab9e99d4@eucas1p2.samsung.com>
2023-09-12 19:49     ` [PATCH 3/5] terraform: aws: hide TERRAFORM_AWS_AMI_OWNER and drop AWS name search Daniel Gomez
     [not found]   ` <CGME20230912194919eucas1p1acf335160e5a2750745c5fba9084b080@eucas1p1.samsung.com>
2023-09-12 19:49     ` [PATCH 4/5] terraform: aws: drop multichoice option for TERRAFORM_AWS_VIRT_TYPE Daniel Gomez
     [not found]   ` <CGME20230912194920eucas1p188665453a470e3ef71f957c1b063ba4a@eucas1p1.samsung.com>
2023-09-12 19:49     ` [PATCH 5/5] terraform: aws: hide TERRAFORM_AWS_INSTANCE_TYPE Daniel Gomez
2023-09-12 21:49   ` [PATCH 0/5] Fix choice/endchoice kconfig options Luis Chamberlain
2023-09-13  4:56     ` Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).