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

Rule object missing exclusion boolean field for rule consumers/providers #28

Open
RonGonz-illumio opened this issue Jan 11, 2023 · 0 comments

Comments

@RonGonz-illumio
Copy link
Contributor

RonGonz-illumio commented Jan 11, 2023

The new style (Env, App, etc.) "Except Rules" in the PCE are represented by a consumer object in the rule that contains a boolean value for a field called "Exclusion". This boolean flag is not returned in the consumer or provider object representations.

Additionally and maybe more importantly, since the related objects don't have this field represented, there's currently no way (via the library) to set this field for existing rules (update), and/or to create new exclusionary style rules.

SNAG-0129

The api Schema for rule consumers is as follows:

 "consumers": [
    {
      "actors": "ams",
      "exclusion": false,
      "label": {
        "href": "string"
      },
      "label_group": {
        "href": "string"
      },
      "workload": {
        "href": "string"
      },
      "virtual_service": {
        "href": "string"
      },
      "ip_list": {
        "href": "string"
      }
    }
  ],

Expected Result

The illumio-py library should include the exclusion boolean value in it's object representation for consumers and providers in ruleset rules.

"consumers":[
{"label":{"href":"/orgs/1/labels/211","key":"env","value":"E-QUARANTINE"},"exclusion":true},
{"label":{"href":"/orgs/1/labels/199","key":"app","value":"APP_A"},"exclusion":false}]

Actual Result

the returned list of actors for a rule's consumers and or providers is a list of Actor Objects, however, the Exclusion boolean flag that is returned from the API is not represented.

[Actor(actors=None, label=Reference(href='/orgs/1/labels/199'), label_group=None, workload=None, virtual_service=None, virtual_server=None, ip_list=None), 

Steps to reproduce

retrieve a rule or ruleset, observed the missing boolean value.

@RonGonz-illumio RonGonz-illumio changed the title illumio-pi labelSet object missing exclusion boolean illumio-pi rule object missing exclusion boolean for consumers/providers Jan 11, 2023
@RonGonz-illumio RonGonz-illumio changed the title illumio-pi rule object missing exclusion boolean for consumers/providers illumio-pi rule object missing exclusion boolean for rule consumers/providers Jan 12, 2023
@RonGonz-illumio RonGonz-illumio changed the title illumio-pi rule object missing exclusion boolean for rule consumers/providers Rule object missing exclusion boolean field for rule consumers/providers Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant