Skip to content

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

@akpuvvada

Description

@akpuvvada

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions