File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -133,10 +133,11 @@ import sys, json
133
133
outer_loop_must_break = False
134
134
for i in json.load(sys.stdin)["items"]:
135
135
j = i["spec"]["clusters"]
136
- if "$wls_cluster_name " in j:
137
- outer_loop_must_break = True
138
- print True
139
- break
136
+ for index, cs in enumerate(j):
137
+ if j[index]["clusterName"] == "$wls_cluster_name ":
138
+ outer_loop_must_break = True
139
+ print True
140
+ break
140
141
if outer_loop_must_break == False:
141
142
print False
142
143
INPUT
@@ -153,8 +154,9 @@ cat > cmds.py << INPUT
153
154
import sys, json
154
155
for i in json.load(sys.stdin)["items"]:
155
156
j = i["spec"]["clusters"]
156
- if "$wls_cluster_name " in j:
157
- print j["$wls_cluster_name "]["replicas"]
157
+ for index, cs in enumerate(j):
158
+ if j[index]["clusterName"] == "$wls_cluster_name ":
159
+ print j[index]["replicas"]
158
160
INPUT
159
161
num_ms=` echo ${DOMAIN} | python cmds.py`
160
162
else
You can’t perform that action at this time.
0 commit comments