Skip to content

Commit 2621263

Browse files
committed
ls profiles
1 parent 4520b06 commit 2621263

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ __pycache__/
99
testing-variables.txt
1010
.DS_Store
1111
site/
12+
lock-test.py
1213

1314
# C extensions
1415
*.so

CHANGELOG.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,23 @@
22

33
All changes to the package starting with v0.3.1 will be logged here.
44

5+
## v0.4.1 [2022-09-27]
6+
#### What's New
7+
* None
8+
9+
#### Enhancements
10+
* None
511

6-
## v0.4.0 [2022-09-XX]
12+
#### Bug Fixes
13+
* Fix and issue with `pybritive ls profile --checked-out` where all environments for the checked out profile were being returned instead of just the actual environments checked out.
14+
15+
#### Dependencies
16+
* None
17+
18+
#### Other
19+
* None
20+
21+
## v0.4.0 [2022-09-16]
722
#### What's New
823
* `pybritive-aws-cred-process` - a "side-car" helper script/CLI program that provides a minimal codebase in an effort to reduce the latency of obtaining credentials via the AWS `credential_process` command.
924

@@ -25,7 +40,7 @@ region=us-east-1
2540

2641
However, the former reduces the latency of the call by ~50% while still maintaining basic functionality.
2742

28-
### Enhancements
43+
#### Enhancements
2944
* Provided a `GenericCloudCredentialPrinter` class which handles printing all cloud credentials not covered by a cloud specific credential printer.
3045

3146
#### Bug Fixes

src/pybritive/britive_cli.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,13 @@ def list_profiles(self, checked_out: bool = False):
153153
self.login()
154154
self._set_available_profiles()
155155
data = []
156-
checked_out_profiles = [p['papId'] for p in self.b.my_access.list_checked_out_profiles()] if checked_out else []
156+
checked_out_profiles = [
157+
f'{p["papId"]}-{p["environmentId"]}'
158+
for p in self.b.my_access.list_checked_out_profiles()
159+
] if checked_out else []
157160

158161
for profile in self.available_profiles:
159-
if not checked_out or profile['profile_id'] in checked_out_profiles:
162+
if not checked_out or f'{profile["profile_id"]}-{profile["env_id"]}' in checked_out_profiles:
160163
row = {
161164
'Application': profile['app_name'],
162165
'Environment': profile['env_name'],

0 commit comments

Comments
 (0)