* Fix: resolve locally installed addons not being displayed
Addressed an issue where locally installed addons may not be displayed
if one with the same name is in the registry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 799a099890)
* Style: revert incorrect auto-formatting
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 1430aac438)
* Refactor: change original variable name to avoid confusions
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 0c1e347106)
* Test: add tests for outputs from `vela addon list`
when an addon with the same as registry one is locally installed
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit e6b3bb024c)
* Refactor: use more concise method to check length
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit afbb062e7c)
* Test: add one more test condition for dual addons
i.e. local and registry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit ac0718a662)
* Refactor: simplify testing logic by removing unneeded looping
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 75185f0f0d)
* Style: add missing license header
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit e1d8e99288)
Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: use Terraform provider name as application in CLI
In CLI, use Terraform provider name as application name when
create a Provider. Also display there providers in VelaUX.
1). manually created a Terraform Provider object, like https://github.com/oam-dev/terraform-controller/blob/master/getting-started.md#aws
2). by enabling a Terraform provider addon in version older than v1.3.0
3). by create a Terraform provider via `vela provider add`
4). by VelaUX
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
- For VelaUX, hidden a provider name (users don't need to manual set it). Used
the application/component name (config name) to be the provider name.
- Store description of a config to the annotation of the config application
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
(cherry picked from commit e3feeeec24)
Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: add terraform aws provider without AWS_SESSION_TOKEN
Fix#3589 and refine prompts for cli
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
(cherry picked from commit 904a72857b)
* Fix: support multiple-tenant cloud resources
Split terraform-xxx to two parts, the original addon will only install
definitions, and the provider object will be created by `vela provider`
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* continue
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* continue 0302
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support `vela provider list`
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* generate a configmap in an addon terraform-xxx
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix listing providers
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support add a provider
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support delete a provider
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support legacy providers
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix bugs in using local filepath as markdown filename; fix bugs in parseLocalFile
Signed-off-by: Nicola115 <2225992901@qq.com>
* ignore control character mismatch between lc.TerraformConfiguration and raw text
Signed-off-by: Nicola115 <2225992901@qq.com>
* goimports
Signed-off-by: Nicola115 <2225992901@qq.com>
* store remote and local in MarkDownReference struct
Signed-off-by: Nicola115 <2225992901@qq.com>
* gofmt
Signed-off-by: Nicola115 <2225992901@qq.com>
* fix too many argument bugs in generate.go:45
Signed-off-by: Nicola115 <2225992901@qq.com>
* fix invalid comment
Signed-off-by: Nicola115 <2225992901@qq.com>
* add doc-gen --local <LocalFile> and corresponding functions
Signed-off-by: Nicola115 <2225992901@qq.com>
* go format
Signed-off-by: Nicola115 <2225992901@qq.com>
* refactor the usage of vela def doc-gen from local file; refactor the function GenerateReferenceDoc
Signed-off-by: Nicola115 <2225992901@qq.com>
* gofmt and goimports
Signed-off-by: Nicola115 <2225992901@qq.com>
* update prompts info
Signed-off-by: Nicola115 <2225992901@qq.com>
* remove parseLocalDefinition struct, using ComponentDefinition instead
Signed-off-by: Nicola115 <2225992901@qq.com>
* standardize the function ParseLocalFile
Signed-off-by: Nicola115 <2225992901@qq.com>
* add unit test for ParseLocalFile
Signed-off-by: Nicola115 <2225992901@qq.com>
* remove redundant functions
Signed-off-by: Nicola115 <2225992901@qq.com>
* remove redundant lines and do goimports formatting
Signed-off-by: Nicola115 <2225992901@qq.com>
* Optimize error msg of addon enable/upgrade local path
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Fix and add unit test
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Run make reviewable to include all changes
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* remove test case for windows
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* fix unit test.
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>