qontract-reconcile 0.10.1rc123__py3-none-any.whl → 0.10.1rc124__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.1
2
2
  Name: qontract-reconcile
3
- Version: 0.10.1rc123
3
+ Version: 0.10.1rc124
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Home-page: https://github.com/app-sre/qontract-reconcile
6
6
  Author: Red Hat App-SRE Team
@@ -367,7 +367,7 @@ reconcile/test/test_terraform_vpc_peerings.py,sha256=fRDgoyM9wyOdzIwjCno-vzhIA4v
367
367
  reconcile/test/test_terraform_vpc_peerings_build_desired_state.py,sha256=43EIGnrm5xAdtuSL6tKDh-nepk4WOKkONMNUOU1BN_Y,37236
368
368
  reconcile/test/test_unleash.py,sha256=a4jT0Hzlje6AEkwhMmeDUkzo6rsD_WGSZicwFg47mmM,4192
369
369
  reconcile/test/test_utils_aws_api.py,sha256=GwUByT-ZXjVHlHBzoomyWjngNVp5uYA3-UcgDjzxWko,8997
370
- reconcile/test/test_utils_aws_helper.py,sha256=2FjZ3cY2VLuHpkt2t-6S0xkJnpTbesx8pprP_75-7xI,2307
370
+ reconcile/test/test_utils_aws_helper.py,sha256=kqmj1QPOJjjHGlWvaKWZUkEXo0K0qVeZBW3slwBUtVY,2297
371
371
  reconcile/test/test_utils_aws_rds.py,sha256=gr2S_s5YBz-jGlcZMbvU9DSJ2co0CAJ3K7opxdAdf7w,1062
372
372
  reconcile/test/test_utils_cluster_version_data.py,sha256=ua2zivisH5PsZtZxjuQ3QXFVzF2SRUIVbxHdbmn-clc,6019
373
373
  reconcile/test/test_utils_data_structures.py,sha256=ZDa-15vxe7v6TG4pLDF_R9rGFbBDEYG9rUDDf2Dyjjk,342
@@ -467,7 +467,7 @@ reconcile/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
467
467
  reconcile/utils/aggregated_list.py,sha256=svF8qu2U8iAIUPrGbKiMzuzz2RffI0GOJzWDxBDgSIQ,3332
468
468
  reconcile/utils/amtool.py,sha256=9p9FYkv4RYPnkDICuN1apcqJyZ5n8WbHF6vC0FIiQIw,2166
469
469
  reconcile/utils/aws_api.py,sha256=bbNisd1Y7mjqaKhDdr5ocSjERhItHNs8aAvCYENMSZ4,59770
470
- reconcile/utils/aws_helper.py,sha256=WXSz4UG0BEkY8IE9osGhbBOzsep4lPpegO5SAq3N0H0,1691
470
+ reconcile/utils/aws_helper.py,sha256=E8NHkStoHRmvLVjRll2f5kGtU3i3f7ekp5V6nrn7B_M,1691
471
471
  reconcile/utils/binary.py,sha256=3IBnwjKakHM367skPPvG6yVSQYjKt5muQlFNdoa63DU,2352
472
472
  reconcile/utils/cluster_version_data.py,sha256=HPBPDosEdoGrMgBQMJvsicL5oPxVjqKHlhpFokUlsio,6680
473
473
  reconcile/utils/config.py,sha256=ZhYy3ZKI0vB_QvrYr14JPxu0EAVM5gS8cKRbM8ECRSE,992
@@ -531,7 +531,7 @@ reconcile/utils/state.py,sha256=_SmE7fOEReET3iy9jRQ1pyuaJebg5962Zs9Iy1dzTJk,9530
531
531
  reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
532
532
  reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
533
533
  reconcile/utils/terraform_client.py,sha256=fR5HscDYZblw27tb_lqhJM-CSshcPDyfNORdYJMzNOE,30509
534
- reconcile/utils/terrascript_aws_client.py,sha256=HEyOWJ4n9DCLRtbBM7Il-0Zc3euFWamxIABILY9qim8,261916
534
+ reconcile/utils/terrascript_aws_client.py,sha256=1nF_oiKJHiQp0U_GbWXT8nEg6Nqp4CqYchN7ESjAqGI,261977
535
535
  reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
536
536
  reconcile/utils/unleash.py,sha256=QGANGA8BHG7oC_bt39c2M7uRa2ycjzmahN8_m7Zovos,3094
537
537
  reconcile/utils/vault.py,sha256=CnhNu0pZfqS14kD1dQmBldITvTcSJHaHfk-KPNNDC7k,14471
@@ -597,8 +597,8 @@ tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y
597
597
  tools/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
598
598
  tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
599
599
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
600
- qontract_reconcile-0.10.1rc123.dist-info/METADATA,sha256=97GUVhFMdkPW-74cifb-VosZiy8NqzFhQMx3lrHISlI,2291
601
- qontract_reconcile-0.10.1rc123.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
602
- qontract_reconcile-0.10.1rc123.dist-info/entry_points.txt,sha256=Af70EWPJxsTiCNF6gA-pWdw1A0Heqn-PZF-oBc5NmiU,302
603
- qontract_reconcile-0.10.1rc123.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
604
- qontract_reconcile-0.10.1rc123.dist-info/RECORD,,
600
+ qontract_reconcile-0.10.1rc124.dist-info/METADATA,sha256=8vXlksnwd7GI4vBp37d_iwA7IqQwMCaXlMTKaSMo_eo,2291
601
+ qontract_reconcile-0.10.1rc124.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
602
+ qontract_reconcile-0.10.1rc124.dist-info/entry_points.txt,sha256=Af70EWPJxsTiCNF6gA-pWdw1A0Heqn-PZF-oBc5NmiU,302
603
+ qontract_reconcile-0.10.1rc124.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
604
+ qontract_reconcile-0.10.1rc124.dist-info/RECORD,,
@@ -4,10 +4,10 @@ import reconcile.utils.aws_helper as awsh
4
4
  from reconcile.utils.secret_reader import SecretReader
5
5
 
6
6
 
7
- def test_get_user_id_from_arn():
7
+ def test_get_id_from_arn():
8
8
  user_id = "id"
9
9
  arn = f"arn:aws:iam::12345:user/{user_id}"
10
- result = awsh.get_user_id_from_arn(arn)
10
+ result = awsh.get_id_from_arn(arn)
11
11
  assert result == user_id
12
12
 
13
13
 
@@ -11,8 +11,8 @@ class AccountNotFoundError(Exception):
11
11
  Account = dict[str, Any]
12
12
 
13
13
 
14
- def get_user_id_from_arn(arn):
15
- # arn:aws:iam::12345:user/id --> id
14
+ def get_id_from_arn(arn):
15
+ # arn:aws:iam::12345:<arntype>/id --> id
16
16
  return arn.split("/")[1]
17
17
 
18
18
 
@@ -854,7 +854,8 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
854
854
  @staticmethod
855
855
  def get_alias_name_from_assume_role(assume_role):
856
856
  uid = awsh.get_account_uid_from_arn(assume_role)
857
- return f"account-{uid}"
857
+ role_name = awsh.get_id_from_arn(assume_role)
858
+ return f"account-{uid}-{role_name}"
858
859
 
859
860
  def populate_additional_providers(self, accounts):
860
861
  for account in accounts:
@@ -2315,7 +2316,7 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
2315
2316
  role_grants = ocm.get_aws_infrastructure_access_role_grants(cluster)
2316
2317
  for user_arn, _, state, switch_role_link in role_grants:
2317
2318
  # find correct user by identifier
2318
- user_id = awsh.get_user_id_from_arn(user_arn)
2319
+ user_id = awsh.get_id_from_arn(user_arn)
2319
2320
  # output will only be added once
2320
2321
  # terraform-resources created the user
2321
2322
  # and ocm-aws-infrastructure-access granted it the role