Skip to content

Commit 10d64f5

Browse files
committed
yo list: add ResourceType column
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
1 parent 8a407ae commit 10d64f5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ New Features:
1111
- Columns may be specified as a list in the config file (`list_columns`)
1212
- An alternative list may be specified via `yo list -C a,b,c`
1313
- Columns can be added to the end of the table with `yo list -x Column`
14+
- The `yo list` command includes a new column, `ResourceType`, which corresponds
15+
to the value of the `Oracle-Recommended-Tags.ResourceType` tag.
1416

1517
## 1.5.1 - Tue, Apr 9, 2024
1618

yo/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,12 @@ def columns(self) -> t.Dict[str, Column]:
877877
"AD": (lambda i: i.ad, lambda v, m: v.ad),
878878
"Created": (lambda i: strftime(i.time_created), None),
879879
"IP": (self._ip_column, None),
880+
"ResourceType": (
881+
lambda i: i.defined_tags.get("Oracle-Recommended-Tags", {}).get(
882+
"ResourceType", ""
883+
),
884+
None,
885+
),
880886
}
881887

882888
def add_args(self, parser: argparse.ArgumentParser) -> None:

0 commit comments

Comments
 (0)