@@ -26,27 +26,27 @@ def main():
26
26
aToken = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
27
27
28
28
# Create a configuration object
29
- configuration = client .Configuration ()
29
+ aConfiguration = client .Configuration ()
30
30
31
31
# Specify the endpoint of your Kube cluster
32
- configuration .host = "https://XXX.XXX.XXX.XXX:443"
32
+ aConfiguration .host = "https://XXX.XXX.XXX.XXX:443"
33
33
34
34
# Security part.
35
35
# In this simple example we are not going to verify the SSL certificate of
36
36
# the remote cluster (for simplicity reason)
37
- configuration .verify_ssl = False
37
+ aConfiguration .verify_ssl = False
38
38
# Nevertheless if you want to do it you can with these 2 parameters
39
39
# configuration.verify_ssl=True
40
40
# ssl_ca_cert is the filepath to the file that contains the certificate.
41
41
# configuration.ssl_ca_cert="certificate"
42
42
43
- configuration .api_key = {"authorization" : "Bearer " + aToken }
43
+ aConfiguration .api_key = {"authorization" : "Bearer " + aToken }
44
44
45
- # Use our configuration
46
- client .Configuration . set_default ( configuration )
<
66D5
code>45 + # Create a ApiClient with our config
46
+ aApiClient = client .ApiClient ( aConfiguration )
47
47
48
48
# Do calls
49
- v1 = client .CoreV1Api ()
49
+ v1 = client .CoreV1Api (aApiClient )
50
50
print ("Listing pods with their IPs:" )
51
51
ret = v1 .list_pod_for_all_namespaces (watch = False )
52
52
for i in ret .items :
0 commit comments