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

PICS multiple conditionals in one step. #11506

Closed
krypton36 opened this issue Nov 5, 2021 · 2 comments
Closed

PICS multiple conditionals in one step. #11506

krypton36 opened this issue Nov 5, 2021 · 2 comments
Labels

Comments

@krypton36
Copy link
Contributor

krypton36 commented Nov 5, 2021

Problem

We need a way to define operators between multiple PICS values in one step.

In Steps 3 and 4:
Test Link

Proposed Solution

Convert this code here to the following:

test[kPICSName].names.forEach((picsName, index) => {
    eval(picsName + '=' + PICS.get(picsName).value)
}
yaml.tests = yaml.tests.filter(test => test[kPICSName] == [] || eval(test[kPICSName].operation);

Example YAML:

name: 3.2.2. [TC-DM-2.2] Operational Credential Attributes

config:
    cluster: "Operational Credentials"
    endpoint: 0

tests:
    - label: "Query NOCs"
      command: "readAttribute"
      attribute: "NOCs"
      response:
          constraints:
              type: list

    - label: "Query NOCs"
      command: "readAttribute"
      attribute: "NOCs"
      PICS: 
          names: [DUMMY_PICS0, DUMMY_PICS1, DUMMY_PICS2]
          operation: "!DUMMY_PICS0 || DUMMY_PICS1 && DUMMY_PICS2"
      response:
          value: [{NOC: "*"}]
          constraints:
              type: list
@krypton36
Copy link
Contributor Author

Please Note: Default Value will need to be updated as well.

@vivien-apple
Copy link
Contributor

Should have been fixed by #11729. Feel free to reopen if that still not enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants