Skip to content

Request : Extend to Get Specific Property value from YAML file #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
akpuvvada opened this issue Nov 24, 2021 · 0 comments
Open

Request : Extend to Get Specific Property value from YAML file #45

akpuvvada opened this issue Nov 24, 2021 · 0 comments

Comments

@akpuvvada
Copy link

akpuvvada commented Nov 24, 2021

Description

I would like to request a new feature or extension where a getValue function to get the value of a Property provided the Property name and YAML file.

Property can be something like Domains_Domain[1]_Name - 'underscore' separated fields' names.

Refer to the YAML file and example of what I am trying to achieve at https://stackoverflow.com/questions/70101607/shell-function-to-get-value-of-a-property-from-yaml-file. I mentioned the same below as well.

DomainName=getValue Domains_Domain[1]_Name /path/my_yaml.yml

AppSpaceName=getValue Domains_Domain[$DomainName]_AppSpaces_AppSpace[1]_Name /path/my_yaml.yml

AppNodeName=getValue Domains_Domain[$DomainName]_AppSpaces_AppSpace[$AppSpaceName]_AppNodes_AppNode[1]_Name /path/my_yaml.yml

AppName=getValue Domains_Domain[$DomainName]_AppSpaces_AppSpace[$AppSpaceName]_AppNodes_AppNode[$AppNodeName]_Applications_Application[1]_Name /path/my_yaml.yml

AppVersion=getValue Domains_Domain[$DomainName]_AppSpaces_AppSpace[$AppSpaceName]_AppNodes_AppNode[$AppNodeName]_Applications_Application[$AppName]_Version /path/my_yaml.yml

Yaml file to test

---
Action: start
Version: 642
Domains:
  Domain:
    Name: SanityTest
    AppSpaces:
      AppSpace:
        Name: SanityAppSpace
        AppNodes:
          AppNode:
            Name: SanityAppnode
            Applications:
              Application:
                Name: InstagramTest.application
                Version: "1.0"
          AppNode:
            Name: SanityAppnode_1
            Applications:
              Application:
                Name: InstagramTest.application
                Version: "1.0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant