Skip to content
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

[BUG] special chars in data-group data values #41

Closed
DumpySquare opened this issue Jul 7, 2021 · 2 comments
Closed

[BUG] special chars in data-group data values #41

DumpySquare opened this issue Jul 7, 2021 · 2 comments
Assignees
Labels
bug Something isn't working jira Jira created for this issue
Milestone

Comments

@DumpySquare
Copy link
Member

history

As discussed in #28, starting a new issue to track special characters in data-group data values breaking conversions

data

Seems that special characters "some data with special !@#${}[]12345", including quotes, are currently not parsed as expected

example config

ltm data-group internal /partition_1/string-datagroup {
    records {
        /api/test/app1 {}
        /api/test/app2 { 
            data something
        }
        /api/test/app3 { 
            data "something in quotes with special stuff!@#${}[]"
        }
        /api/test/app4 { 
            data 1234x5678
        }
    }
    type string
}
ltm data-group internal /partition_2/address_datagroup {
    records {
        1.1.1.1/28 {
            data somedata
        }
        2.2.2.2/32 {
            data "some data with special !@#${}[]12345"
        }
        3.3.3.3/24 {
            data 6534cv
        }
    type ip
    }
}
ltm data-group internal /partition_3/integer_datagroup {
    records {
        1 {
            data 1
        }
        4 {
            data xxx
        }
        5 {
            data 5000
        }
        777 {
            data 7
        }
        96789 {
            data "some data with special !@#${}[]12345"
        }
    }
    type integer
}

output

{
    "class": "ADC",
    "schemaVersion": "3.27.0",
    "id": "urn:uuid:be623a13-ce3c-4678-b296-dea9bae66ef9",
    "label": "Converted Declaration",
    "remark": "Auto-generated by AS3 Config Converter",
    "partition_1": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "string-datagroup": {
                "records": [
                    {
                        "key": "/api/test/app1",
                        "value": ""
                    },
                    {
                        "key": "/api/test/app2",
                        "value": ""
                    },
                    {
                        "key": "}",
                        "value": ""
                    },
                    {
                        "key": "/api/test/app3",
                        "value": ""
                    },
                    {
                        "key": "data \"something in quotes with special stuff!@#$",
                        "value": ""
                    },
                    {
                        "key": "/api/test/app4",
                        "value": ""
                    }
                ],
                "keyDataType": "string",
                "class": "Data_Group"
            }
        }
    },
    "partition_2": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "address_datagroup": {
                "records": [
                    {
                        "key": "1.1.1.1/28",
                        "value": "somedata"
                    },
                    {
                        "key": "2.2.2.2/32",
                        "value": ""
                    },
                    {
                        "key": "3.3.3.3/24",
                        "value": "6534cv"
                    }
                ],
                "class": "Data_Group",
                "keyDataType": "string"
            }
        }
    },
    "partition_3": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "integer_datagroup": {
                "records": [
                    {
                        "key": 1,
                        "value": "1"
                    },
                    {
                        "key": 4,
                        "value": "xxx"
                    },
                    {
                        "key": 5,
                        "value": "5000"
                    },
                    {
                        "key": 777,
                        "value": "7"
                    },
                    {
                        "key": 96789,
                        "value": ""
                    }
                ],
                "keyDataType": "integer",
                "class": "Data_Group"
            }
        }
    }
}

things to note

  • app2 string data-group missing value data
  • key 3 from string data-group is "}", probably continuation of previous error
  • app4 from string data-group has quotes with special chars that doesn't convert
  • address data-group value with special chars gets lost
  • integer data-group with special chars also gets lost

additional throughts

It may be worth looking at the default internal data-groups created by as3/analytics and atgTeem

@DumpySquare DumpySquare added the bug Something isn't working label Jul 7, 2021
@mdditt2000 mdditt2000 added the jira Jira created for this issue label Jul 8, 2021
@mdditt2000
Copy link

Create Jira CHARON-389 for PM tracking

@mdditt2000
Copy link

Merge branch '389-datagroup-conversion' into 'develop' -- Issue resolved. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jira Jira created for this issue
Projects
None yet
Development

No branches or pull requests

3 participants