kdevops.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Daniel Gomez <da.gomez@samsung.com>
To: "mcgrof@kernel.org" <mcgrof@kernel.org>
Cc: "kdevops@lists.linux.dev" <kdevops@lists.linux.dev>,
	"jlayton@kernel.org" <jlayton@kernel.org>,
	Daniel Gomez <da.gomez@samsung.com>
Subject: [PATCH 3/5] terraform: aws: hide TERRAFORM_AWS_AMI_OWNER and drop AWS name search
Date: Tue, 12 Sep 2023 19:49:16 +0000	[thread overview]
Message-ID: <20230912194908.939107-4-da.gomez@samsung.com> (raw)
In-Reply-To: <20230912194908.939107-1-da.gomez@samsung.com>

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

  parent reply	other threads:[~2023-09-12 19:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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     ` Daniel Gomez [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230912194908.939107-4-da.gomez@samsung.com \
    --to=da.gomez@samsung.com \
    --cc=jlayton@kernel.org \
    --cc=kdevops@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).