Skip to content

Commit fbbc6e0

Browse files
authored
Merge pull request #620 from oracle/fix-scaling
Fix scaling action
2 parents 6d2c248 + 2d594be commit fbbc6e0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/scripts/scaling/scalingAction.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,11 @@ import sys, json
133133
outer_loop_must_break = False
134134
for i in json.load(sys.stdin)["items"]:
135135
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
140141
if outer_loop_must_break == False:
141142
print False
142143
INPUT
@@ -153,8 +154,9 @@ cat > cmds.py << INPUT
153154
import sys, json
154155
for i in json.load(sys.stdin)["items"]:
155156
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"]
158160
INPUT
159161
num_ms=`echo ${DOMAIN} | python cmds.py`
160162
else

0 commit comments

Comments
 (0)