qontract-reconcile 0.10.2.dev177__py3-none-any.whl → 0.10.2.dev178__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qontract-reconcile
3
- Version: 0.10.2.dev177
3
+ Version: 0.10.2.dev178
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
6
6
  Project-URL: repository, https://github.com/app-sre/qontract-reconcile
@@ -141,7 +141,7 @@ reconcile/aus/version_gates/ocp_gate_handler.py,sha256=RW1ppDaCZXVegV9AzzqYXxDUu
141
141
  reconcile/aus/version_gates/sts_version_gate_handler.py,sha256=swwwz0YyvrEBf_InqrRRBCt2QzHYNvvq8jz9aYwElh4,3663
142
142
  reconcile/automated_actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
143
143
  reconcile/automated_actions/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
144
- reconcile/automated_actions/config/integration.py,sha256=cf1VxolcjlGP-xO7IIH5A00Qr4znNJTT7a_sU18ABig,10755
144
+ reconcile/automated_actions/config/integration.py,sha256=iOzR8PyWwKmUoB6Zx4bmbWFEiDPsP9tXuWia_bSW4vA,10921
145
145
  reconcile/aws_account_manager/README.md,sha256=_XFM3GZNHUzv--e_navqJuaUWpjC6QrHfulreHynFf0,262
146
146
  reconcile/aws_account_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
147
  reconcile/aws_account_manager/integration.py,sha256=XTamC824imAezzVoQhhwdMOawNcPCOghR_y7i_8bpJI,15343
@@ -807,7 +807,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
807
807
  tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
808
808
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
809
809
  tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
810
- qontract_reconcile-0.10.2.dev177.dist-info/METADATA,sha256=0-nd-z8GuU_IUpjauhA3gjoMnQSYcxgWNmMJNh1lgSE,24627
811
- qontract_reconcile-0.10.2.dev177.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
812
- qontract_reconcile-0.10.2.dev177.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
813
- qontract_reconcile-0.10.2.dev177.dist-info/RECORD,,
810
+ qontract_reconcile-0.10.2.dev178.dist-info/METADATA,sha256=vW_VvL_wbX71KGMMGNeLRCFptzQYPsNcbG1PGHrcJ9g,24627
811
+ qontract_reconcile-0.10.2.dev178.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
812
+ qontract_reconcile-0.10.2.dev178.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
813
+ qontract_reconcile-0.10.2.dev178.dist-info/RECORD,,
@@ -53,6 +53,7 @@ class AutomatedActionsUser(BaseModel):
53
53
  class AutomatedActionsPolicy(BaseModel):
54
54
  sub: str
55
55
  obj: str
56
+ max_ops: int
56
57
  params: dict[str, str] = {}
57
58
 
58
59
 
@@ -142,7 +143,7 @@ class AutomatedActionsConfigIntegration(
142
143
  roles: AutomatedActionRoles = {}
143
144
 
144
145
  for permission in permissions or []:
145
- obj = permission.action.operation_id
146
+ action = permission.action
146
147
 
147
148
  parameters: list[dict[str, str]] = [] if permission.arguments else [{}]
148
149
  for arg in permission.arguments or []:
@@ -163,7 +164,12 @@ class AutomatedActionsConfigIntegration(
163
164
  for role in permission.roles or []:
164
165
  aa_role = roles.setdefault(role.name, [])
165
166
  aa_role.extend(
166
- AutomatedActionsPolicy(sub=role.name, obj=obj, params=params)
167
+ AutomatedActionsPolicy(
168
+ sub=role.name,
169
+ obj=action.operation_id,
170
+ max_ops=action.max_ops,
171
+ params=params,
172
+ )
167
173
  for params in parameters
168
174
  )
169
175
  return roles