forked from TrueCloudLab/frostfs-node
[#410] pkg/policy: Parse strings in filter key
With UN/LOCODE support, storage node may have `UN-LOCODE` attribute. Policy parser should support both `Ident` and `Strings` as filter keys to parse rules such as `FILTER "UN-LOCODE" EQ "RU LED" AS F`. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
5900975d58
commit
5f800458a3
3 changed files with 26 additions and 2 deletions
|
@ -52,7 +52,7 @@ type andChain struct {
|
|||
}
|
||||
|
||||
type simpleExpr struct {
|
||||
Key string `@Ident`
|
||||
Key string `@(Ident | String)`
|
||||
// We don't use literals here to improve error messages.
|
||||
Op string `@Ident`
|
||||
Value string `@(Ident | String | Int)`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue