Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Универсальные фильтры

case

check_attr

delete_attrs

divide

format

map

match

multiply

reduce

set_tag

set_value

split

Специальные фильтры

encode_dhcp_options (только after)

render_reply (только after)

reject_on_error (!)

Автотесты

https://github.com/latera/hard/blob/master/conf/specs.yml.template

podryad-rad-ran:/etc/hydra/hard/plugins/base-ran-rad-by-login.yml
plugins:
  filters:
    set_value_before:
      fix_doubled_acct-session-id_attribute:
        condition: '   $context.has_tag?("accounting")
                   and $request.RAD_REQUEST.try("Acct-Session-Id", "").to_s() != $request.RAD_REQUEST.try("Acct-Session-Id", "")'
        destination: $request.RAD_REQUEST.Acct-Session-Id
        value_expression: $request.RAD_REQUEST.Acct-Session-Id[0]
        specs:
          - name: fix_doubled_acct-session-id_attribute
            input:
              tags: [accounting]
              request:
                RAD_REQUEST:
                  Acct-Session-Id:
                    - '5746ECB0-00000027'
                    - '5746ECB0-00000027'
            expected:
              tags: [accounting]
              request:
                RAD_REQUEST:
                  Acct-Session-Id: '5746ECB0-00000027'
          - name: pass_through_correct_acct-session-id_attribute
            input:
              tags: [accounting]
              request:
                RAD_REQUEST:
                  Acct-Session-Id: '5746ECB0-00000027'
            expected:
              tags: [accounting]
              request:
                RAD_REQUEST:
                  Acct-Session-Id: '5746ECB0-00000027' 

HARD-438 - Getting issue details... STATUS

  • No labels