projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug 1167
[osm/N2VC.git]
/
n2vc
/
kubectl.py
diff --git
a/n2vc/kubectl.py
b/n2vc/kubectl.py
index
5836756
..
61b2dc3
100644
(file)
--- a/
n2vc/kubectl.py
+++ b/
n2vc/kubectl.py
@@
-37,7
+37,18
@@
class Kubectl:
"name": i.metadata.name,
"cluster_ip": i.spec.cluster_ip,
"type": i.spec.type,
"name": i.metadata.name,
"cluster_ip": i.spec.cluster_ip,
"type": i.spec.type,
- "ports": i.spec.ports,
+ "ports": [
+ {
+ "name": p.name,
+ "node_port": p.node_port,
+ "port": p.port,
+ "protocol": p.protocol,
+ "target_port": p.target_port,
+ }
+ for p in i.spec.ports
+ ]
+ if i.spec.ports
+ else [],
"external_ip": [i.ip for i in i.status.load_balancer.ingress]
if i.status.load_balancer.ingress
else None,
"external_ip": [i.ip for i in i.status.load_balancer.ingress]
if i.status.load_balancer.ingress
else None,