mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-11-22 07:00:19 +00:00
Support for metadata-only fetches in k8s_info module (#1030)
* Support for metadata-only fetches in k8s_info module * Fix integration test assert * Add missing changelog fragment * Fix linters and sanity checks * Fix linters * Apply suggestion from @abikouo * fix: resolve linter errors after rebase Fix import sorting and apply black formatting to k8s_info.py and args_common.py to pass tox -e linters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> Co-authored-by: aubin bikouo <abikouo@redhat.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Bikouo Aubin
aubin bikouo
Claude Opus 4.6
parent
dd4ca7a8b0
commit
08a761fc17
@@ -4,3 +4,4 @@
|
||||
- wait
|
||||
- api-server-caching
|
||||
- discovery
|
||||
- metadata-only-fetches
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Retrieve Node list with metadata_only
|
||||
kubernetes.core.k8s_info:
|
||||
kind: Node
|
||||
metadata_only: true
|
||||
register: node_metadata_only_list
|
||||
|
||||
- name: Assert response has kind PartialObjectMetadata
|
||||
assert:
|
||||
that:
|
||||
- node_metadata_only_list.resources[0].kind == "PartialObjectMetadata"
|
||||
|
||||
- name: Retrieve full Node list
|
||||
kubernetes.core.k8s_info:
|
||||
kind: Node
|
||||
metadata_only: false
|
||||
register: node_full_list
|
||||
|
||||
- name: Assert response has kind Node
|
||||
assert:
|
||||
that:
|
||||
- node_full_list.resources[0].kind == "Node"
|
||||
Reference in New Issue
Block a user