Created
June 24, 2018 02:28
-
-
Save samirbehara-zz/a446680aa58eba467fe8babdfd7fd0f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_to_list_all_namespaces(k8s_client): | |
ret = k8s_client.list_namespace() | |
nscount = len(ret.items) | |
print(nscount) | |
assert(nscount > 0) | |
# Iterate through all the namespaces in the K8s cluster and list it down | |
for item in ret.items: | |
print(item.metadata.name) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment