Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeimer committed Oct 10, 2024
1 parent bd90b3f commit 2f9a3e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ get Node # To get all Nodes
get PersistentVolumeClaim hpp # To get all PVCs when name starts from 'hpp'
get pvc -n openshift-storage hpp # To get all PVCs in 'openshift-storage' namespace when name starts from 'hpp'
```
- To print the resource YAML, add `yaml` to the `get` command, for example:

- To print the resource YAML, add `-oyaml` to the `get` command, for example:

```bash
get pvc hpp yaml # To print yamls of all PVCs when name starts from 'hpp'
get pvc -n openshift-storage hpp yaml # To print yamls of all PVCs in 'openshift-storage' namespace when name starts from 'hpp'
get pvc hpp -oyaml # To print yamls of all PVCs when name starts from 'hpp'
get pvc -n openshift-storage hpp -oyaml # To print yamls of all PVCs in 'openshift-storage' namespace when name starts from 'hpp'
```

- Help:
Expand Down
4 changes: 2 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def main(

actions_dict: Dict[str, Any] = {
GET_ACTION: get_resources,
"yaml": print_resource_yaml,
"logs": get_logs,
"describe": get_describe,
"exit": None,
Expand Down Expand Up @@ -156,7 +155,8 @@ def main(
if not resources_raw_data:
CONSOLE.print(f"No resources found for {resource_kind} {resource_name} {namespace_name}")
continue
actions_dict[action_name](resources_raw_data)

actions_dict[action_name](resources_raw_data, print_yaml)


def get_resources(resources_raw_data: List[Dict[str, Any]], print_yaml: bool = False, **kwargs: Dict[Any, Any]) -> None:
Expand Down

0 comments on commit 2f9a3e2

Please sign in to comment.