(CommandList
  children: [
    (C {(set)} {(-o)} {(errexit)})
    (C {(set)} {(-o)} {(nounset)})
    (C {(set)} {(-o)} {(pipefail)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:KUBE_ROOT)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {(dirname)} 
                        {
                          (DQ 
                            (BracedVarSub
                              token: <VSub_Name BASH_SOURCE>
                              bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)}))
                              spids: [72 77]
                            )
                          )
                        }
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [68 79]
              ) (/../..)
            }
          spids: [67]
        )
      ]
      spids: [67]
    )
    (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/photon-controller/config-common.sh))})
    (C {(source)} 
      {
        (DQ (${ VSub_Name KUBE_ROOT) (/cluster/photon-controller/) 
          (BracedVarSub
            token: <VSub_Name KUBE_CONFIG_FILE>
            suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(DQ (config-default.sh))})
            spids: [104 110]
          )
        )
      }
    )
    (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/common.sh))})
    (Assignment
      keyword: Assign_Readonly
      pairs: [(assign_pair lhs:(LhsName name:PHOTON) op:Equal rhs:{(DQ ('photon -n'))} spids:[128])]
      spids: [126]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:MASTER_NAME)
          op: Equal
          rhs: {(DQ (${ VSub_Name INSTANCE_PREFIX) (-master))}
          spids: [139]
        )
      ]
      spids: [137]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:NODE_NAMES)
          op: Equal
          rhs: 
            {
              (ArrayLiteralPart
                words: [
                  {
                    (CommandSubPart
                      command_list: 
                        (CommandList
                          children: [
                            (C {(eval)} {(echo)} 
                              {(DQ (${ VSub_Name INSTANCE_PREFIX)) (-node-) (Lit_LBrace '{') (1..) 
                                (DQ (${ VSub_Name NUM_NODES)) (Lit_RBrace '}')
                              }
                            )
                          ]
                        )
                      left_token: <Left_CommandSub '$('>
                      spids: [161 180]
                    )
                  }
                ]
              )
            }
          spids: [159]
        )
      ]
      spids: [157]
    )
    (FuncDef
      name: detect-master
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:silent)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )})
                        spids: [234 239]
                      )
                    }
                  spids: [233]
                )
              ]
              spids: [231]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:tenant_args)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('--tenant ') (${ VSub_Name PHOTON_TENANT) (' --project ') 
                        (${ VSub_Name PHOTON_PROJECT)
                      )
                    }
                  spids: [244]
                )
              ]
              spids: [242]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:KUBE_MASTER)
                  op: Equal
                  rhs: {(${ VSub_Name MASTER_NAME)}
                  spids: [258]
                )
              ]
              spids: [258]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:KUBE_MASTER_ID)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name KUBE_MASTER_ID>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )})
                        spids: [265 270]
                      )
                    }
                  spids: [264]
                )
              ]
              spids: [264]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:KUBE_MASTER_IP)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name KUBE_MASTER_IP>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )})
                        spids: [274 279]
                      )
                    }
                  spids: [273]
                )
              ]
              spids: [273]
            )
            (C {(set)} {(Lit_Other '+') (o)} {(pipefail)})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolUnary op_id:BoolUnary_z child:{(${ VSub_Name KUBE_MASTER_ID)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:KUBE_MASTER_ID)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (Pipeline
                                        children: [
                                          (C {(${ VSub_Name PHOTON)} {(vm)} {(list)} 
                                            {(${ VSub_Name tenant_args)}
                                          )
                                          (C {(grep)} 
                                            {(SQ <Lit_EscapedChar '\\t'>) (DQ (kubernetes-master)) 
                                              (SQ <Lit_EscapedChar '\\t'>)
                                            }
                                          )
                                          (C {(awk)} {(SQ <'{print $1}'>)})
                                        ]
                                        negated: False
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [312 346]
                              )
                            }
                          spids: [311]
                        )
                      ]
                      spids: [311]
                    )
                  ]
                  spids: [16777215 308]
                )
              ]
              spids: [16777215 349]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolUnary op_id:BoolUnary_z child:{(${ VSub_Name KUBE_MASTER_ID)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } 
                      {
                        (DQ 
                          (
"Could not find Kubernetes master node ID. Make sure you've launched a cluster with kube-up.sh"
                          )
                        )
                      }
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 365]
                )
              ]
              spids: [16777215 386]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolUnary
                              op_id: BoolUnary_z
                              child: 
                                {
                                  (DQ 
                                    (BracedVarSub
                                      token: <VSub_Name KUBE_MASTER_IP>
                                      suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )})
                                      spids: [397 400]
                                    )
                                  )
                                }
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:KUBE_MASTER_IP)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (Pipeline
                                        children: [
                                          (C {(${ VSub_Name PHOTON)} {(vm)} {(networks)} 
                                            {(DQ (${ VSub_Name KUBE_MASTER_ID))}
                                          )
                                          (C {(grep)} {(-i)} 
                                            {(SQ <Lit_EscapedChar '\\t'>) (DQ ('00:0C:29'))}
                                          )
                                          (C {(grep)} {(-E)} {(SQ <'[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+'>)})
                                          (C {(head)} {(-1)})
                                          (C {(awk)} {(-F) (SQ <'\\t'>)} {(SQ <'{print $3}'>)})
                                        ]
                                        negated: False
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [418 474]
                              )
                            }
                          spids: [417]
                        )
                      ]
                      spids: [417]
                    )
                  ]
                  spids: [16777215 406]
                )
              ]
              spids: [16777215 477]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolUnary
                              op_id: BoolUnary_z
                              child: 
                                {
                                  (DQ 
                                    (BracedVarSub
                                      token: <VSub_Name KUBE_MASTER_IP>
                                      suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )})
                                      spids: [487 490]
                                    )
                                  )
                                }
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                          (error)
                        }
                        {
                          (DQ 
                            (
"Could not find Kubernetes master node IP. Make sure you've launched a cluster with 'kube-up.sh'"
                            )
                          )
                        }
                      ]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[511])]
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 496]
                )
              ]
              spids: [16777215 520]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (DBracket expr:(BoolUnary op_id:BoolUnary_z child:{(${ VSub_Name silent)}))
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (status)
                      } {(DQ ('Master: ') ($ VSub_Name '$KUBE_MASTER') (' (') ($ VSub_Name '$KUBE_MASTER_IP') (')'))}
                    )
                  ]
                  spids: [16777215 536]
                )
              ]
              spids: [16777215 556]
            )
            (C {(set)} {(-o)} {(pipefail)})
          ]
          spids: [228]
        )
      spids: [224 227]
    )
    (FuncDef
      name: detect-nodes
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:silent)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ )})
                        spids: [609 614]
                      )
                    }
                  spids: [608]
                )
              ]
              spids: [606]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:failure) op:Equal rhs:{(0)} spids:[619])]
              spids: [617]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:tenant_args)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('--tenant ') (${ VSub_Name PHOTON_TENANT) (' --project ') 
                        (${ VSub_Name PHOTON_PROJECT)
                      )
                    }
                  spids: [625]
                )
              ]
              spids: [623]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:KUBE_NODE_IP_ADDRESSES)
                  op: Equal
                  rhs: {(ArrayLiteralPart)}
                  spids: [639]
                )
              ]
              spids: [639]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:KUBE_NODE_IDS)
                  op: Equal
                  rhs: {(ArrayLiteralPart)}
                  spids: [644]
                )
              ]
              spids: [644]
            )
            (C {(set)} {(Lit_Other '+') (o)} {(pipefail)})
            (ForExpr
              init: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:i)
                  right: (ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (ArithBinary
                  op_id: Arith_Less
                  left: (ArithVarRef name:i)
                  right: 
                    (ArithWord
                      w: 
                        {
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            prefix_op: VSub_Pound
                            bracket_op: (WholeArray op_id:Lit_At)
                            spids: [672 678]
                          )
                        }
                    )
                )
              update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i))
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [(assign_pair lhs:(LhsName name:node_id) op:Equal spids:[693])]
                      spids: [691]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:node_id)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (Pipeline
                                        children: [
                                          (C {(${ VSub_Name PHOTON)} {(vm)} {(list)} 
                                            {(${ VSub_Name tenant_args)}
                                          )
                                          (C {(grep)} 
                                            {(SQ <Lit_EscapedChar '\\t'>) 
                                              (DQ 
                                                (BracedVarSub
                                                  token: <VSub_Name NODE_NAMES>
                                                  bracket_op: 
                                                    (ArrayIndex
                                                      expr: (ArithWord w:{(${ VSub_Name i)})
                                                    )
                                                  spids: [718 725]
                                                )
                                              ) (SQ <Lit_EscapedChar '\\t'>)
                                            }
                                          )
                                          (C {(awk)} {(SQ <'{print $1}'>)})
                                        ]
                                        negated: False
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [697 738]
                              )
                            }
                          spids: [696]
                        )
                      ]
                      spids: [696]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: (BoolUnary op_id:BoolUnary_z child:{(${ VSub_Name node_id)})
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C 
                              {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') 
                                (Lit_Other ':') (error)
                              } 
                              {
                                (DQ ('Could not find ') 
                                  (BracedVarSub
                                    token: <VSub_Name NODE_NAMES>
                                    bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name i)}))
                                    spids: [767 774]
                                  )
                                )
                              }
                            )
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:failure)
                                  op: Equal
                                  rhs: {(1)}
                                  spids: [778]
                                )
                              ]
                              spids: [778]
                            )
                          ]
                          spids: [16777215 754]
                        )
                      ]
                      spids: [16777215 782]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:KUBE_NODE_IDS)
                          op: PlusEqual
                          rhs: {(ArrayLiteralPart words:[{(DQ (${ VSub_Name node_id))}])}
                          spids: [785]
                        )
                      ]
                      spids: [785]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:node_ip)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (Pipeline
                                        children: [
                                          (C {(${ VSub_Name PHOTON)} {(vm)} {(networks)} 
                                            {(DQ (${ VSub_Name node_id))}
                                          )
                                          (C {(grep)} {(-i)} 
                                            {(SQ <Lit_EscapedChar '\\t'>) (DQ ('00:0C:29'))}
                                          )
                                          (C {(grep)} {(-E)} {(SQ <'[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+'>)})
                                          (C {(head)} {(-1)})
                                          (C {(awk)} {(-F) (SQ <'\\t'>)} {(SQ <'{print $3}'>)})
                                        ]
                                        negated: False
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [805 861]
                              )
                            }
                          spids: [804]
                        )
                      ]
                      spids: [804]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:KUBE_NODE_IP_ADDRESSES)
                          op: PlusEqual
                          rhs: {(ArrayLiteralPart words:[{(DQ (${ VSub_Name node_ip))}])}
                          spids: [864]
                        )
                      ]
                      spids: [864]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: (BoolUnary op_id:BoolUnary_z child:{(${ VSub_Name silent)})
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C 
                              {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') 
                                (Lit_Other ':') (status)
                              } 
                              {
                                (DQ ('Node: ') 
                                  (BracedVarSub
                                    token: <VSub_Name NODE_NAMES>
                                    bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name i)}))
                                    spids: [901 908]
                                  ) (' (') 
                                  (BracedVarSub
                                    token: <VSub_Name KUBE_NODE_IP_ADDRESSES>
                                    bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name i)}))
                                    spids: [910 917]
                                  ) (')')
                                )
                              }
                            )
                          ]
                          spids: [16777215 888]
                        )
                      ]
                      spids: [16777215 922]
                    )
                  ]
                  spids: [687 925]
                )
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_ne
                              left: {(${ VSub_Name failure)}
                              right: {(0)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(exit)} {(1)})]
                  spids: [16777215 944]
                )
              ]
              spids: [16777215 952]
            )
            (C {(set)} {(-o)} {(pipefail)})
          ]
          spids: [603]
        )
      spids: [599 602]
    )
    (FuncDef
      name: detect-node-names
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('TODO: detect-node-names'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[984])]
            )
          ]
          spids: [975]
        )
      spids: [971 974]
    )
    (FuncDef
      name: verify-prereqs
      body: 
        (BraceGroup
          children: [
            (C {(verify-cmd-in-path)} {(photon)})
            (C {(verify-cmd-in-path)} {(ssh)})
            (C {(verify-cmd-in-path)} {(scp)})
            (C {(verify-cmd-in-path)} {(ssh-add)})
            (C {(verify-cmd-in-path)} {(openssl)})
            (C {(verify-cmd-in-path)} {(mkisofs)})
          ]
          spids: [1006]
        )
      spids: [1002 1005]
    )
    (FuncDef
      name: kube-up
      body: 
        (BraceGroup
          children: [
            (C {(verify-prereqs)})
            (C {(verify-ssh-prereqs)})
            (C {(verify-photon-config)})
            (C 
              {(kube) (Lit_Other ':') (Lit_Other ':') (util) (Lit_Other ':') (Lit_Other ':') 
                (ensure-temp-dir)
              }
            )
            (C {(find-release-tars)})
            (C {(find-image-id)})
            (C {(load-or-gen-kube-basicauth)})
            (C {(gen-cloud-init-iso)})
            (C {(gen-master-start)})
            (C {(create-master-vm)})
            (C {(install-salt-on-master)})
            (C {(gen-node-start)})
            (C {(install-salt-on-nodes)})
            (C {(detect-nodes)} {(-s)})
            (C {(install-kubernetes-on-master)})
            (C {(install-kubernetes-on-nodes)})
            (C {(wait-master-api)})
            (C {(wait-node-apis)})
            (C {(setup-pod-routes)})
            (C {(copy-kube-certs)})
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('Creating kubeconfig...'))}
            )
            (C {(create-kubeconfig)})
          ]
          spids: [1054]
        )
      spids: [1050 1053]
    )
    (FuncDef
      name: kube-down
      body: 
        (BraceGroup
          children: [
            (C {(detect-master)})
            (C {(detect-nodes)})
            (C {(pc-delete-vm)} {(DQ (${ VSub_Name KUBE_MASTER))} {(DQ (${ VSub_Name KUBE_MASTER_ID))})
            (ForExpr
              init: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:node)
                  right: (ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (ArithBinary
                  op_id: Arith_Less
                  left: (ArithVarRef name:node)
                  right: 
                    (ArithWord
                      w: 
                        {
                          (BracedVarSub
                            token: <VSub_Name KUBE_NODE_IDS>
                            prefix_op: VSub_Pound
                            bracket_op: (WholeArray op_id:Lit_At)
                            spids: [1194 1200]
                          )
                        }
                    )
                )
              update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:node))
              body: 
                (DoGroup
                  children: [
                    (C {(pc-delete-vm)} 
                      {
                        (DQ 
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name node)}))
                            spids: [1215 1222]
                          )
                        )
                      } 
                      {
                        (DQ 
                          (BracedVarSub
                            token: <VSub_Name KUBE_NODE_IDS>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name node)}))
                            spids: [1226 1233]
                          )
                        )
                      }
                    )
                  ]
                  spids: [1209 1237]
                )
            )
          ]
          spids: [1158]
        )
      spids: [1154 1157]
    )
    (FuncDef
      name: kube-push
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('TODO: kube-push'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1258])]
            )
          ]
          spids: [1249]
        )
      spids: [1245 1248]
    )
    (FuncDef
      name: prepare-push
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('TODO: prepare-push'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1280])]
            )
          ]
          spids: [1271]
        )
      spids: [1267 1270]
    )
    (FuncDef
      name: push-master
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('TODO: push-master'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1302])]
            )
          ]
          spids: [1293]
        )
      spids: [1289 1292]
    )
    (FuncDef
      name: push-node
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('TODO: push-node'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1324])]
            )
          ]
          spids: [1315]
        )
      spids: [1311 1314]
    )
    (FuncDef
      name: test-build-release
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('TODO: test-build-release'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1346])]
            )
          ]
          spids: [1337]
        )
      spids: [1333 1336]
    )
    (FuncDef
      name: test-setup
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('TODO: test-setup'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1368])]
            )
          ]
          spids: [1359]
        )
      spids: [1355 1358]
    )
    (FuncDef
      name: test-teardown
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('TODO: test-teardown'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1390])]
            )
          ]
          spids: [1381]
        )
      spids: [1377 1380]
    )
    (FuncDef
      name: pc-create-vm
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_name)
                  op: Equal
                  rhs: {(DQ (${ VSub_Number 1))}
                  spids: [1466]
                )
              ]
              spids: [1464]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_flavor)
                  op: Equal
                  rhs: {(DQ (${ VSub_Number 2))}
                  spids: [1476]
                )
              ]
              spids: [1474]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[1486])]
              spids: [1484]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[1492])]
              spids: [1490]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:tenant_args)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('--tenant ') (${ VSub_Name PHOTON_TENANT) (' --project ') 
                        (${ VSub_Name PHOTON_PROJECT)
                      )
                    }
                  spids: [1503]
                )
              ]
              spids: [1501]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_args)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('--name ') (${ VSub_Name vm_name) (' --image ') 
                        (${ VSub_Name PHOTON_IMAGE_ID) (' --flavor ') (${ VSub_Name vm_flavor)
                      )
                    }
                  spids: [1518]
                )
              ]
              spids: [1516]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:disk_args)
                  op: Equal
                  rhs: {(DQ ('disk-1 ') (${ VSub_Name PHOTON_DISK_FLAVOR) (' boot=true'))}
                  spids: [1537]
                )
              ]
              spids: [1535]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[1548])]
              spids: [1548]
            )
            (AndOr
              children: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:_VM_ID)
                      op: Equal
                      rhs: 
                        {
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [
                                  (SimpleCommand
                                    words: [
                                      {(${ VSub_Name PHOTON)}
                                      {(vm)}
                                      {(create)}
                                      {(${ VSub_Name tenant_args)}
                                      {(${ VSub_Name vm_args)}
                                      {(--disks)}
                                      {(DQ (${ VSub_Name disk_args))}
                                    ]
                                    redirects: [
                                      (Redir
                                        op_id: Redir_GreatAnd
                                        fd: 2
                                        arg_word: {(1)}
                                        spids: [1578]
                                      )
                                    ]
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub '$('>
                            spids: [1553 1580]
                          )
                        }
                      spids: [1552]
                    )
                  ]
                  spids: [1552]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [1584]
                    )
                  ]
                  spids: [1584]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_ne left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } {(DQ ('Failed to create VM. Error output:'))}
                    )
                    (C {(echo)} {(DQ (${ VSub_Name _VM_ID))})
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 1603]
                )
              ]
              spids: [16777215 1633]
            )
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('Created VM ') (${ VSub_Name vm_name) (': ') (${ VSub_Name _VM_ID))}
            )
            (C {(run-cmd)} 
              {
                (DQ (${ VSub_Name PHOTON) (' vm attach-iso -p ') (${ VSub_Name KUBE_TEMP) 
                  ('/cloud-init.iso ') (${ VSub_Name _VM_ID)
                )
              }
            )
            (C {(run-cmd)} {(DQ (${ VSub_Name PHOTON) (' vm start ') (${ VSub_Name _VM_ID))})
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('Started VM ') (${ VSub_Name vm_name) (', waiting for network address...'))}
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:have_network) op:Equal rhs:{(0)} spids:[1733])]
              spids: [1733]
            )
            (ForEach
              iter_name: i
              iter_words: [{(Lit_LBrace '{') (1..120) (Lit_RBrace '}')}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[1763])]
                      spids: [1763]
                    )
                    (AndOr
                      children: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:networks)
                              op: Equal
                              rhs: 
                                {
                                  (CommandSubPart
                                    command_list: 
                                      (CommandList
                                        children: [
                                          (C {(${ VSub_Name PHOTON)} {(vm)} {(networks)} 
                                            {(DQ (${ VSub_Name _VM_ID))}
                                          )
                                        ]
                                      )
                                    left_token: <Left_CommandSub '$('>
                                    spids: [1768 1782]
                                  )
                                }
                              spids: [1767]
                            )
                          ]
                          spids: [1767]
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:rc)
                              op: Equal
                              rhs: {($ VSub_QMark '$?')}
                              spids: [1786]
                            )
                          ]
                          spids: [1786]
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolBinary
                                      op_id: BoolBinary_ne
                                      left: {(${ VSub_Name rc)}
                                      right: {(0)}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C 
                              {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') 
                                (Lit_Other ':') (error)
                              } {(DQ ("'") (${ VSub_Name PHOTON) (' vm networks ') (${ VSub_Name _VM_ID) ("' failed. Error output: "))}
                            )
                            (C {(echo)} {(DQ (${ VSub_Name networks))})
                          ]
                          spids: [16777215 1805]
                        )
                      ]
                      spids: [16777215 1838]
                    )
                    (AndOr
                      children: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:networks)
                              op: Equal
                              rhs: 
                                {
                                  (CommandSubPart
                                    command_list: 
                                      (CommandList
                                        children: [
                                          (Pipeline
                                            children: [
                                              (C {(echo)} {(DQ (${ VSub_Name networks))})
                                              (C {(grep)} {(True)})
                                            ]
                                            negated: False
                                          )
                                        ]
                                      )
                                    left_token: <Left_CommandSub '$('>
                                    spids: [1842 1856]
                                  )
                                }
                              spids: [1841]
                            )
                          ]
                          spids: [1841]
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:rc)
                              op: Equal
                              rhs: {($ VSub_QMark '$?')}
                              spids: [1860]
                            )
                          ]
                          spids: [1860]
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolBinary
                                      op_id: BoolBinary_eq
                                      left: {(${ VSub_Name rc)}
                                      right: {(0)}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:have_network)
                                  op: Equal
                                  rhs: {(1)}
                                  spids: [1882]
                                )
                              ]
                              spids: [1882]
                            )
                            (Sentence
                              child: (ControlFlow token:<ControlFlow_Break break>)
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          spids: [16777215 1879]
                        )
                      ]
                      spids: [16777215 1890]
                    )
                    (C {(sleep)} {(1)})
                  ]
                  spids: [1748 1898]
                )
              spids: [1742 1746]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_eq
                              left: {(${ VSub_Name have_network)}
                              right: {(0)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } {(DQ ('VM ') (${ VSub_Name vm_name) (' failed to start up: no IP was found'))}
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 1921]
                )
              ]
              spids: [16777215 1946]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:_VM_IP)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(${ VSub_Name PHOTON)} {(vm)} {(networks)} 
                                    {(DQ (${ VSub_Name _VM_ID))}
                                  )
                                  (C {(head)} {(-1)})
                                  (C {(awk)} {(-F) (SQ <'\\t'>)} {(SQ <'{print $3}'>)})
                                ]
                                negated: False
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [1955 1988]
                      )
                    }
                  spids: [1954]
                )
              ]
              spids: [1954]
            )
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('VM ') (${ VSub_Name vm_name) (' has IP: ') (${ VSub_Name _VM_IP))}
            )
          ]
          spids: [1461]
        )
      spids: [1457 1460]
    )
    (FuncDef
      name: pc-delete-vm
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_name)
                  op: Equal
                  rhs: {(DQ (${ VSub_Number 1))}
                  spids: [2034]
                )
              ]
              spids: [2032]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_id)
                  op: Equal
                  rhs: {(DQ (${ VSub_Number 2))}
                  spids: [2044]
                )
              ]
              spids: [2042]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[2054])]
              spids: [2052]
            )
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('Deleting VM ') (${ VSub_Name vm_name))}
            )
            (C {(set)} {(Lit_Other '+') (o)} {(pipefail)})
            (AndOr
              children: [
                (Pipeline
                  children: [
                    (C {(${ VSub_Name PHOTON)} {(vm)} {(show)} {(DQ (${ VSub_Name vm_id))})
                    (C {(head)} {(-1)})
                    (SimpleCommand
                      words: [{(grep)} {(STARTED)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [2117]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [2121]
                        )
                      ]
                    )
                  ]
                  negated: False
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [2126]
                    )
                  ]
                  spids: [2126]
                )
              ]
              op_id: Op_DPipe
            )
            (C {(set)} {(Lit_Other '+') (o)} {(pipefail)})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_eq left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (AndOr
                      children: [
                        (SimpleCommand
                          words: [{(${ VSub_Name PHOTON)} {(vm)} {(stop)} {(DQ (${ VSub_Name vm_id))}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(/dev/null)}
                              spids: [2170]
                            )
                            (Redir
                              op_id: Redir_GreatAnd
                              fd: 2
                              arg_word: {(1)}
                              spids: [2174]
                            )
                          ]
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:rc)
                              op: Equal
                              rhs: {($ VSub_QMark '$?')}
                              spids: [2179]
                            )
                          ]
                          spids: [2179]
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolBinary
                                      op_id: BoolBinary_ne
                                      left: {(${ VSub_Name rc)}
                                      right: {(0)}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C 
                              {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') 
                                (Lit_Other ':') (error)
                              } {(DQ ('Error: could not stop ') (${ VSub_Name vm_name) (' (') ($ VSub_Name '$vm_id') (')'))}
                            )
                            (C 
                              {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') 
                                (Lit_Other ':') (error)
                              } {(DQ ('Please investigate and stop manually'))}
                            )
                            (ControlFlow
                              token: <ControlFlow_Return return>
                            )
                          ]
                          spids: [16777215 2198]
                        )
                      ]
                      spids: [16777215 2236]
                    )
                  ]
                  spids: [16777215 2153]
                )
              ]
              spids: [16777215 2239]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[2243])]
              spids: [2243]
            )
            (AndOr
              children: [
                (SimpleCommand
                  words: [{(${ VSub_Name PHOTON)} {(vm)} {(delete)} {(DQ (${ VSub_Name vm_id))}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 16777215
                      arg_word: {(/dev/null)}
                      spids: [2261]
                    )
                    (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[2265])
                  ]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [2270]
                    )
                  ]
                  spids: [2270]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_ne left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } {(DQ ('Error: could not delete ') (${ VSub_Name vm_name) (' (') ($ VSub_Name '$vm_id') (')'))}
                    )
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } {(DQ ('Please investigate and delete manually'))}
                    )
                  ]
                  spids: [16777215 2289]
                )
              ]
              spids: [16777215 2324]
            )
          ]
          spids: [2029]
        )
      spids: [2025 2028]
    )
    (FuncDef
      name: find-image-id
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[2353])]
              spids: [2351]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:PHOTON_IMAGE_ID)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(${ VSub_Name PHOTON)} {(image)} {(list)})
                                  (C {(grep)} 
                                    {(SQ <Lit_EscapedChar '\\t'>) (DQ (${ VSub_Name PHOTON_IMAGE)) 
                                      (SQ <Lit_EscapedChar '\\t'>)
                                    }
                                  )
                                  (C {(head)} {(-1)})
                                  (C {(grep)} {(READY)})
                                  (C {(awk)} {(-F) (SQ <'\\t'>)} {(SQ <'{print $1}'>)})
                                ]
                                negated: False
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [2358 2407]
                      )
                    }
                  spids: [2357]
                )
              ]
              spids: [2357]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_ne left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } 
                      {
                        (DQ ('Cannot find image ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                          (${ VSub_Name PHOTON_IMAGE) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                        )
                      }
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(LhsName name:fail) op:Equal rhs:{(1)} spids:[2446])]
                      spids: [2446]
                    )
                  ]
                  spids: [16777215 2425]
                )
              ]
              spids: [16777215 2450]
            )
          ]
          spids: [2348]
        )
      spids: [2344 2347]
    )
    (FuncDef
      name: gen-cloud-init-iso
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:password_hash) op:Equal spids:[2500])]
              spids: [2498]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:password_hash)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(openssl)} {(passwd)} {(-1)} {(DQ (${ VSub_Name KUBE_PASSWORD))})
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [2504 2516]
                      )
                    }
                  spids: [2503]
                )
              ]
              spids: [2503]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:ssh_key) op:Equal spids:[2522])]
              spids: [2520]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:ssh_key)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [(C {(ssh-add)} {(-L)}) (C {(head)} {(-1)})]
                                negated: False
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [2526 2536]
                      )
                    }
                  spids: [2525]
                )
              ]
              spids: [2525]
            )
            (Subshell
              child: 
                (CommandList
                  children: [
                    (C {(echo)} {(DQ ('#cloud-config'))})
                    (C {(echo)} {(DQ )})
                    (C {(echo)} {(DQ ('groups:'))})
                    (C {(echo)} {(DQ ('  - ') (${ VSub_Name VM_USER))})
                    (C {(echo)} {(DQ )})
                    (C {(echo)} {(DQ ('users:'))})
                    (C {(echo)} {(DQ ('  - name: ') (${ VSub_Name VM_USER))})
                    (C {(echo)} {(DQ ('    gecos: Kubernetes'))})
                    (C {(echo)} {(DQ ('    primary-group: ') (${ VSub_Name VM_USER))})
                    (C {(echo)} {(DQ ('    lock-passwd: false'))})
                    (C {(echo)} {(DQ ('    passwd: ') (${ VSub_Name password_hash))})
                    (C {(echo)} {(DQ ('    ssh-authorized-keys: '))})
                    (C {(echo)} {(DQ ('      - ') (${ VSub_Name ssh_key))})
                    (C {(echo)} {(DQ ('    sudo: ALL=(ALL) NOPASSWD:ALL'))})
                    (C {(echo)} {(DQ ('    shell: /bin/bash'))})
                    (C {(echo)} {(DQ )})
                    (C {(echo)} {(DQ ('hostname:'))})
                    (C {(echo)} {(DQ ('  - hostname: kube'))})
                  ]
                )
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name KUBE_TEMP) (/user-data.txt))}
                  spids: [2687]
                )
              ]
              spids: [2544 2685]
            )
            (C {(run-cmd)} 
              {
                (DQ ('mkisofs -rock -o ') (${ VSub_Name KUBE_TEMP) ('/cloud-init.iso ') 
                  (${ VSub_Name KUBE_TEMP) (/user-data.txt)
                )
              }
            )
          ]
          spids: [2495]
        )
      spids: [2491 2494]
    )
    (FuncDef
      name: gen-master-start
      body: 
        (BraceGroup
          children: [
            (C {(python)} {(DQ (${ VSub_Name KUBE_ROOT) (/third_party/htpasswd/htpasswd.py))} {(-b)} 
              {(-c)} {(DQ (${ VSub_Name KUBE_TEMP) (/htpasswd))} {(DQ (${ VSub_Name KUBE_USER))} 
              {(DQ (${ VSub_Name KUBE_PASSWORD))}
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:htpasswd) op:Equal spids:[2779])]
              spids: [2777]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:htpasswd)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(cat)} {(DQ (${ VSub_Name KUBE_TEMP) (/htpasswd))})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [2783 2792]
                      )
                    }
                  spids: [2782]
                )
              ]
              spids: [2782]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:octets) op:Equal spids:[2818])]
              spids: [2816]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:service_ip) op:Equal spids:[2823])]
              spids: [2821]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:octets)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [
                          {
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [
                                    (Pipeline
                                      children: [
                                        (C {(echo)} {(DQ (${ VSub_Name SERVICE_CLUSTER_IP_RANGE))})
                                        (C {(sed)} {(-e)} {(SQ <'s|/.*||'>)} {(-e)} {(SQ <'s/\\./ /g'>)})
                                      ]
                                      negated: False
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [2828 2852]
                            )
                          }
                        ]
                      )
                    }
                  spids: [2826]
                )
              ]
              spids: [2826]
            )
            (DParen
              child: 
                (BinaryAssign
                  op_id: Arith_PlusEqual
                  left: (LhsIndexedName name:octets index:(ArithWord w:{(Lit_Digits 3)}))
                  right: (ArithWord w:{(Lit_Digits 1)})
                )
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:service_ip)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(echo)} 
                                    {
                                      (DQ 
                                        (BracedVarSub
                                          token: <VSub_Name octets>
                                          bracket_op: (WholeArray op_id:Arith_Star)
                                          spids: [2872 2877]
                                        )
                                      )
                                    }
                                  )
                                  (C {(sed)} {(SQ <'s/ /./g'>)})
                                ]
                                negated: False
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [2868 2887]
                      )
                    }
                  spids: [2867]
                )
              ]
              spids: [2867]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:MASTER_EXTRA_SANS)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('IP:') (${ VSub_Name service_ip) (',DNS:') (${ VSub_Name MASTER_NAME) (',') 
                        (${ VSub_Name MASTER_EXTRA_SANS)
                      )
                    }
                  spids: [2890]
                )
              ]
              spids: [2890]
            )
            (Subshell
              child: 
                (CommandList
                  children: [
                    (C {(echo)} {(DQ ('#! /bin/bash'))})
                    (C {(echo)} {(DQ ('readonly MY_NAME=') (${ VSub_Name MASTER_NAME))})
                    (C {(grep)} {(-v)} {(DQ ('^#'))} 
                      {
                        (DQ (${ VSub_Name KUBE_ROOT) 
                          (/cluster/photon-controller/templates/hostname.sh)
                        )
                      }
                    )
                    (C {(echo)} {(DQ ('cd /home/kube/cache/kubernetes-install'))})
                    (C {(echo)} 
                      {(DQ ("readonly KUBE_MASTER_IP='{") ($ VSub_Name '$KUBE_MASTER_IP') ("}'"))}
                    )
                    (C {(echo)} {(DQ ("readonly MASTER_NAME='") (${ VSub_Name MASTER_NAME) ("'"))})
                    (C {(echo)} 
                      {(DQ ("readonly MASTER_IP_RANGE='") (${ VSub_Name MASTER_IP_RANGE) ("'"))}
                    )
                    (C {(echo)} 
                      {(DQ ("readonly INSTANCE_PREFIX='") (${ VSub_Name INSTANCE_PREFIX) ("'"))}
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly NODE_INSTANCE_PREFIX='") (${ VSub_Name INSTANCE_PREFIX) 
                          ("-node'")
                        )
                      }
                    )
                    (C {(echo)} {(DQ ("readonly NODE_IP_RANGES='") (${ VSub_Name NODE_IP_RANGES) ("'"))})
                    (C {(echo)} 
                      {
                        (DQ ("readonly SERVICE_CLUSTER_IP_RANGE='") 
                          (${ VSub_Name SERVICE_CLUSTER_IP_RANGE) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly ENABLE_NODE_LOGGING='") 
                          (BracedVarSub
                            token: <VSub_Name ENABLE_NODE_LOGGING>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(false)})
                            spids: [3030 3034]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly LOGGING_DESTINATION='") 
                          (BracedVarSub
                            token: <VSub_Name LOGGING_DESTINATION>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )})
                            spids: [3043 3046]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly ENABLE_CLUSTER_DNS='") 
                          (BracedVarSub
                            token: <VSub_Name ENABLE_CLUSTER_DNS>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(false)})
                            spids: [3055 3059]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly ENABLE_CLUSTER_UI='") 
                          (BracedVarSub
                            token: <VSub_Name ENABLE_CLUSTER_UI>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(false)})
                            spids: [3068 3072]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly DNS_SERVER_IP='") 
                          (BracedVarSub
                            token: <VSub_Name DNS_SERVER_IP>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )})
                            spids: [3081 3084]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly DNS_DOMAIN='") 
                          (BracedVarSub
                            token: <VSub_Name DNS_DOMAIN>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )})
                            spids: [3093 3096]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly KUBE_USER='") 
                          (BracedVarSub
                            token: <VSub_Name KUBE_USER>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )})
                            spids: [3105 3108]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly KUBE_PASSWORD='") 
                          (BracedVarSub
                            token: <VSub_Name KUBE_PASSWORD>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )})
                            spids: [3117 3120]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly SERVER_BINARY_TAR='") 
                          (BracedVarSub
                            token: <VSub_Name SERVER_BINARY_TAR>
                            suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{('*') (Lit_Slash /)})
                            spids: [3129 3134]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly SALT_TAR='") 
                          (BracedVarSub
                            token: <VSub_Name SALT_TAR>
                            suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{('*') (Lit_Slash /)})
                            spids: [3143 3148]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} {(DQ ("readonly MASTER_HTPASSWD='") (${ VSub_Name htpasswd) ("'"))})
                    (C {(echo)} 
                      {
                        (DQ ("readonly E2E_STORAGE_TEST_ENVIRONMENT='") 
                          (BracedVarSub
                            token: <VSub_Name E2E_STORAGE_TEST_ENVIRONMENT>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )})
                            spids: [3168 3171]
                          ) ("'")
                        )
                      }
                    )
                    (C {(echo)} 
                      {
                        (DQ ("readonly MASTER_EXTRA_SANS='") 
                          (BracedVarSub
                            token: <VSub_Name MASTER_EXTRA_SANS>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )})
                            spids: [3180 3183]
                          ) ("'")
                        )
                      }
                    )
                    (C {(grep)} {(-v)} {(DQ ('^#'))} 
                      {
                        (DQ (${ VSub_Name KUBE_ROOT) 
                          (/cluster/photon-controller/templates/create-dynamic-salt-files.sh)
                        )
                      }
                    )
                    (C {(grep)} {(-v)} {(DQ ('^#'))} 
                      {
                        (DQ (${ VSub_Name KUBE_ROOT) 
                          (/cluster/photon-controller/templates/install-release.sh)
                        )
                      }
                    )
                    (C {(grep)} {(-v)} {(DQ ('^#'))} 
                      {
                        (DQ (${ VSub_Name KUBE_ROOT) 
                          (/cluster/photon-controller/templates/salt-master.sh)
                        )
                      }
                    )
                  ]
                )
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name KUBE_TEMP) (/master-start.sh))}
                  spids: [3238]
                )
              ]
              spids: [2908 3236]
            )
          ]
          spids: [2739]
        )
      spids: [2735 2738]
    )
    (FuncDef
      name: gen-node-start
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal spids:[3268])]
              spids: [3266]
            )
            (ForExpr
              init: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:i)
                  right: (ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (ArithBinary
                  op_id: Arith_Less
                  left: (ArithVarRef name:i)
                  right: 
                    (ArithWord
                      w: 
                        {
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            prefix_op: VSub_Pound
                            bracket_op: (WholeArray op_id:Lit_At)
                            spids: [3282 3288]
                          )
                        }
                    )
                )
              update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i))
              body: 
                (DoGroup
                  children: [
                    (Subshell
                      child: 
                        (CommandList
                          children: [
                            (C {(echo)} {(DQ ('#! /bin/bash'))})
                            (C {(echo)} 
                              {
                                (DQ ('readonly MY_NAME=') 
                                  (BracedVarSub
                                    token: <VSub_Name NODE_NAMES>
                                    bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name i)}))
                                    spids: [3314 3321]
                                  )
                                )
                              }
                            )
                            (C {(grep)} {(-v)} {(DQ ('^#'))} 
                              {
                                (DQ (${ VSub_Name KUBE_ROOT) 
                                  (/cluster/photon-controller/templates/hostname.sh)
                                )
                              }
                            )
                            (C {(echo)} {(DQ ('KUBE_MASTER=') (${ VSub_Name KUBE_MASTER))})
                            (C {(echo)} {(DQ ('KUBE_MASTER_IP=') (${ VSub_Name KUBE_MASTER_IP))})
                            (C {(echo)} {(DQ ('NODE_IP_RANGE=') ($ VSub_Name '$NODE_IP_RANGES'))})
                            (C {(grep)} {(-v)} {(DQ ('^#'))} 
                              {
                                (DQ (${ VSub_Name KUBE_ROOT) 
                                  (/cluster/photon-controller/templates/salt-minion.sh)
                                )
                              }
                            )
                          ]
                        )
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: 
                            {(DQ (${ VSub_Name KUBE_TEMP) (/node-start-) (${ VSub_Name i) (.sh))}
                          spids: [3387]
                        )
                      ]
                      spids: [3300 3385]
                    )
                  ]
                  spids: [3297 3401]
                )
            )
          ]
          spids: [3263]
        )
      spids: [3259 3262]
    )
    (FuncDef
      name: gen-master-salt
      body: (BraceGroup children:[(C {(gen-salt)} {(DQ (kubernetes-master))})] spids:[3425])
      spids: [3421 3424]
    )
    (FuncDef
      name: gen-node-salt
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal spids:[3458])]
              spids: [3456]
            )
            (ForExpr
              init: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:i)
                  right: (ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (ArithBinary
                  op_id: Arith_Less
                  left: (ArithVarRef name:i)
                  right: 
                    (ArithWord
                      w: 
                        {
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            prefix_op: VSub_Pound
                            bracket_op: (WholeArray op_id:Lit_At)
                            spids: [3472 3478]
                          )
                        }
                    )
                )
              update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i))
              body: 
                (DoGroup
                  children: [
                    (C {(gen-salt)} 
                      {
                        (DQ 
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name i)}))
                            spids: [3493 3500]
                          )
                        )
                      }
                    )
                  ]
                  spids: [3487 3504]
                )
            )
          ]
          spids: [3453]
        )
      spids: [3449 3452]
    )
    (FuncDef
      name: gen-salt
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:node_name)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [3564]
                )
              ]
              spids: [3564]
            )
            (Subshell
              child: 
                (CommandList
                  children: [
                    (C {(echo)} {(SQ <'#!/bin/bash'>)})
                    (C {(echo)} {(SQ )})
                    (C {(echo)} {(DQ ('node=') (${ VSub_Name node_name))})
                    (C {(echo)} {(SQ <'out=/tmp/${node}-salt.out'>)})
                    (C {(echo)} {(SQ <'log=/tmp/${node}-salt.log'>)})
                    (C {(echo)} {(SQ )})
                    (C {(echo)} {(SQ <'echo $(date) >> $log'>)})
                    (C {(echo)} {(SQ <'salt ${node} state.highstate -t 30 --no-color > ${out}'>)})
                    (C {(echo)} {(SQ <'grep -E "Failed:[[:space:]]+0" ${out}'>)})
                    (C {(echo)} {(SQ <'success=$?'>)})
                    (C {(echo)} {(SQ <'cat ${out} >> ${log}'>)})
                    (C {(echo)} {(SQ )})
                    (C {(echo)} {(SQ <'if [[ ${success} -ne 0 ]]; then'>)})
                    (C {(echo)} {(SQ <'  # Did we try to install docker-engine?'>)})
                    (C {(echo)} {(SQ <'  attempted=$(grep docker-engine ${out} | wc -l)'>)})
                    (C {(echo)} {(SQ <'  # Is docker-engine installed?'>)})
                    (C {(echo)} 
                      {
                        (SQ 
                          <
'  installed=$(salt --output=txt ${node} pkg.version docker-engine | wc -l)'
                          >
                        )
                      }
                    )
                    (C {(echo)} {(SQ <'  if [[ ${attempted} -ne 0 && ${installed} -eq 0 ]]; then'>)})
                    (C {(echo)} {(SQ <'    echo "Unwedging docker-engine install" >> ${log}'>)})
                    (C {(echo)} 
                      {
                        (SQ 
                          <
'    salt ${node} cmd.run "rm -f /var/lib/docker/network/files/local-kv.db"'
                          >
                        )
                      }
                    )
                    (C {(echo)} {(SQ <'  fi'>)})
                    (C {(echo)} {(SQ <fi>)})
                    (C {(echo)} {(SQ <'exit ${success}'>)})
                  ]
                )
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name KUBE_TEMP) (/) (${ VSub_Name node_name) (-salt.sh))}
                  spids: [3736]
                )
              ]
              spids: [3570 3734]
            )
          ]
          spids: [3561]
        )
      spids: [3557 3560]
    )
    (FuncDef
      name: gen-add-route
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:route)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [3783]
                )
              ]
              spids: [3783]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:gateway)
                  op: Equal
                  rhs: {(${ VSub_Number 2)}
                  spids: [3789]
                )
              ]
              spids: [3789]
            )
            (Subshell
              child: 
                (CommandList
                  children: [
                    (C {(echo)} {(SQ <'#!/bin/bash'>)})
                    (C {(echo)} {(SQ )})
                    (C {(echo)} {(SQ <'# Immediately add route'>)})
                    (C {(echo)} 
                      {
                        (DQ ('sudo route add -net ') (${ VSub_Name route) (' gw ') 
                          (${ VSub_Name gateway)
                        )
                      }
                    )
                    (C {(echo)} {(SQ )})
                    (C {(echo)} {(SQ <'# Persist route so it lasts over restarts'>)})
                    (C {(echo)} {(SQ <'sed -in "s|^iface eth0.*|&\\n    post-up route add -net'>)} 
                      {(DQ (${ VSub_Name route) (' gw ') (${ VSub_Name gateway) ('|')) 
                        (SQ <'" /etc/network/interfaces'>)
                      }
                    )
                  ]
                )
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name KUBE_TEMP) (/add-route.sh))}
                  spids: [3868]
                )
              ]
              spids: [3795 3866]
            )
          ]
          spids: [3780]
        )
      spids: [3776 3779]
    )
    (FuncDef
      name: create-master-vm
      body: 
        (BraceGroup
          children: [
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('Starting master VM...'))}
            )
            (C {(pc-create-vm)} {(DQ (${ VSub_Name MASTER_NAME))} 
              {(DQ (${ VSub_Name PHOTON_MASTER_FLAVOR))}
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:KUBE_MASTER)
                  op: Equal
                  rhs: {(${ VSub_Name MASTER_NAME)}
                  spids: [3936]
                )
              ]
              spids: [3936]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:KUBE_MASTER_ID)
                  op: Equal
                  rhs: {(${ VSub_Name _VM_ID)}
                  spids: [3942]
                )
              ]
              spids: [3942]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:KUBE_MASTER_IP)
                  op: Equal
                  rhs: {(${ VSub_Name _VM_IP)}
                  spids: [3948]
                )
              ]
              spids: [3948]
            )
          ]
          spids: [3905]
        )
      spids: [3901 3904]
    )
    (FuncDef
      name: install-salt-on-master
      body: 
        (BraceGroup
          children: [
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('Installing salt on master...'))}
            )
            (C {(upload-server-tars)} {(DQ (${ VSub_Name MASTER_NAME))} 
              {(DQ (${ VSub_Name KUBE_MASTER_IP))}
            )
            (C {(run-script-remotely)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ (${ VSub_Name KUBE_TEMP) (/master-start.sh))}
            )
          ]
          spids: [3972]
        )
      spids: [3968 3971]
    )
    (FuncDef
      name: install-salt-on-nodes
      body: 
        (BraceGroup
          children: [
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('Creating nodes and installing salt on them...'))}
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:node) op:Equal spids:[4068])]
              spids: [4066]
            )
            (ForExpr
              init: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:node)
                  right: (ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (ArithBinary
                  op_id: Arith_Less
                  left: (ArithVarRef name:node)
                  right: 
                    (ArithWord
                      w: 
                        {
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            prefix_op: VSub_Pound
                            bracket_op: (WholeArray op_id:Lit_At)
                            spids: [4082 4088]
                          )
                        }
                    )
                )
              update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:node))
              body: 
                (DoGroup
                  children: [
                    (Sentence
                      child: 
                        (Subshell
                          child: 
                            (CommandList
                              children: [
                                (C {(pc-create-vm)} 
                                  {
                                    (DQ 
                                      (BracedVarSub
                                        token: <VSub_Name NODE_NAMES>
                                        bracket_op: 
                                          (ArrayIndex
                                            expr: (ArithWord w:{(${ VSub_Name node)})
                                          )
                                        spids: [4106 4113]
                                      )
                                    )
                                  } {(DQ (${ VSub_Name PHOTON_NODE_FLAVOR))}
                                )
                                (C {(run-script-remotely)} {(DQ (${ VSub_Name _VM_IP))} 
                                  {
                                    (DQ (${ VSub_Name KUBE_TEMP) (/node-start-) (${ VSub_Name node) 
                                      (.sh)
                                    )
                                  }
                                )
                              ]
                            )
                          spids: [4100 4143]
                        )
                      terminator: <Op_Amp '&'>
                    )
                  ]
                  spids: [4097 4148]
                )
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:fail) op:Equal rhs:{(0)} spids:[4158])]
              spids: [4156]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:job) op:Equal spids:[4164])]
              spids: [4162]
            )
            (ForEach
              iter_name: job
              iter_words: [
                {
                  (CommandSubPart
                    command_list: (CommandList children:[(C {(jobs)} {(-p)})])
                    left_token: <Left_CommandSub '$('>
                    spids: [4173 4177]
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (AndOr
                      children: [
                        (C {(wait)} {(DQ (${ VSub_Name job))})
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:fail)
                              op: Equal
                              rhs: 
                                {
                                  (ArithSubPart
                                    anode: 
                                      (ArithBinary
                                        op_id: Arith_Plus
                                        left: (ArithVarRef name:fail)
                                        right: (ArithWord w:{(Lit_Digits 1)})
                                      )
                                    spids: [4194 4201]
                                  )
                                }
                              spids: [4193]
                            )
                          ]
                          spids: [4193]
                        )
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  spids: [4180 4204]
                )
              spids: [4172 4178]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DParen
                          child: 
                            (ArithBinary
                              op_id: Arith_NEqual
                              left: (ArithVarRef name:fail)
                              right: (ArithWord w:{(Lit_Digits 0)})
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } {(DQ ('Failed to start ') (${ VSub_Name fail) (/) (${ VSub_Name NUM_NODES) (' nodes'))}
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 4221]
                )
              ]
              spids: [16777215 4250]
            )
          ]
          spids: [4037]
        )
      spids: [4033 4036]
    )
    (FuncDef
      name: install-kubernetes-on-master
      body: 
        (BraceGroup
          children: [
            (C {(try-until-success-ssh)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ ('Waiting for salt-master to start on ') (${ VSub_Name KUBE_MASTER))} {(DQ ('pgrep salt-master'))}
            )
            (C {(gen-master-salt)})
            (C {(copy-file-to-vm)} {(DQ (${ VSub_Name _VM_IP))} 
              {(DQ (${ VSub_Name KUBE_TEMP) (/kubernetes-master-salt.sh))} {(DQ (/tmp/kubernetes-master-salt.sh))}
            )
            (C {(try-until-success-ssh)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ ('Installing Kubernetes on ') (${ VSub_Name KUBE_MASTER) (' via salt'))} {(DQ ('sudo /bin/bash /tmp/kubernetes-master-salt.sh'))}
            )
          ]
          spids: [4274]
        )
      spids: [4270 4273]
    )
    (FuncDef
      name: install-kubernetes-on-nodes
      body: 
        (BraceGroup
          children: [
            (C {(gen-node-salt)})
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:node) op:Equal spids:[4395])]
              spids: [4393]
            )
            (ForExpr
              init: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:node)
                  right: (ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (ArithBinary
                  op_id: Arith_Less
                  left: (ArithVarRef name:node)
                  right: 
                    (ArithWord
                      w: 
                        {
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            prefix_op: VSub_Pound
                            bracket_op: (WholeArray op_id:Lit_At)
                            spids: [4409 4415]
                          )
                        }
                    )
                )
              update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:node))
              body: 
                (DoGroup
                  children: [
                    (Sentence
                      child: 
                        (Subshell
                          child: 
                            (CommandList
                              children: [
                                (C {(copy-file-to-vm)} {(DQ (${ VSub_Name _VM_IP))} 
                                  {
                                    (DQ (${ VSub_Name KUBE_TEMP) (/) 
                                      (BracedVarSub
                                        token: <VSub_Name NODE_NAMES>
                                        bracket_op: 
                                          (ArrayIndex
                                            expr: (ArithWord w:{(${ VSub_Name node)})
                                          )
                                        spids: [4443 4450]
                                      ) (-salt.sh)
                                    )
                                  } 
                                  {
                                    (DQ (/tmp/) 
                                      (BracedVarSub
                                        token: <VSub_Name NODE_NAMES>
                                        bracket_op: 
                                          (ArrayIndex
                                            expr: (ArithWord w:{(${ VSub_Name node)})
                                          )
                                        spids: [4456 4463]
                                      ) (-salt.sh)
                                    )
                                  }
                                )
                                (C {(try-until-success-ssh)} 
                                  {
                                    (DQ 
                                      (BracedVarSub
                                        token: <VSub_Name KUBE_NODE_IP_ADDRESSES>
                                        bracket_op: 
                                          (ArrayIndex
                                            expr: (ArithWord w:{(${ VSub_Name node)})
                                          )
                                        spids: [4471 4478]
                                      )
                                    )
                                  } 
                                  {
                                    (DQ ('Waiting for salt-master to start on ') 
                                      (BracedVarSub
                                        token: <VSub_Name NODE_NAMES>
                                        bracket_op: 
                                          (ArrayIndex
                                            expr: (ArithWord w:{(${ VSub_Name node)})
                                          )
                                        spids: [4485 4492]
                                      )
                                    )
                                  } {(DQ ('pgrep salt-minion'))}
                                )
                                (C {(try-until-success-ssh)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
                                  {
                                    (DQ ('Installing Kubernetes on ') 
                                      (BracedVarSub
                                        token: <VSub_Name NODE_NAMES>
                                        bracket_op: 
                                          (ArrayIndex
                                            expr: (ArithWord w:{(${ VSub_Name node)})
                                          )
                                        spids: [4514 4521]
                                      ) (' via salt')
                                    )
                                  } 
                                  {
                                    (DQ ('sudo /bin/bash /tmp/') 
                                      (BracedVarSub
                                        token: <VSub_Name NODE_NAMES>
                                        bracket_op: 
                                          (ArrayIndex
                                            expr: (ArithWord w:{(${ VSub_Name node)})
                                          )
                                        spids: [4529 4536]
                                      ) (-salt.sh)
                                    )
                                  }
                                )
                              ]
                            )
                          spids: [4427 4541]
                        )
                      terminator: <Op_Amp '&'>
                    )
                  ]
                  spids: [4424 4546]
                )
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:fail) op:Equal rhs:{(0)} spids:[4556])]
              spids: [4554]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:job) op:Equal spids:[4562])]
              spids: [4560]
            )
            (ForEach
              iter_name: job
              iter_words: [
                {
                  (CommandSubPart
                    command_list: (CommandList children:[(C {(jobs)} {(-p)})])
                    left_token: <Left_CommandSub '$('>
                    spids: [4571 4575]
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (AndOr
                      children: [
                        (C {(wait)} {(DQ (${ VSub_Name job))})
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:fail)
                              op: Equal
                              rhs: 
                                {
                                  (ArithSubPart
                                    anode: 
                                      (ArithBinary
                                        op_id: Arith_Plus
                                        left: (ArithVarRef name:fail)
                                        right: (ArithWord w:{(Lit_Digits 1)})
                                      )
                                    spids: [4592 4599]
                                  )
                                }
                              spids: [4591]
                            )
                          ]
                          spids: [4591]
                        )
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  spids: [4578 4602]
                )
              spids: [4570 4576]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DParen
                          child: 
                            (ArithBinary
                              op_id: Arith_NEqual
                              left: (ArithVarRef name:fail)
                              right: (ArithWord w:{(Lit_Digits 0)})
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } 
                      {
                        (DQ ('Failed to start install Kubernetes on ') (${ VSub_Name fail) (' out of ') 
                          (${ VSub_Name NUM_NODES) (' nodess')
                        )
                      }
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 4619]
                )
              ]
              spids: [16777215 4648]
            )
          ]
          spids: [4374]
        )
      spids: [4370 4373]
    )
    (FuncDef
      name: upload-server-tars
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_name)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [4669]
                )
              ]
              spids: [4669]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_ip)
                  op: Equal
                  rhs: {(${ VSub_Number 2)}
                  spids: [4675]
                )
              ]
              spids: [4675]
            )
            (C {(run-ssh-cmd)} {(DQ (${ VSub_Name vm_ip))} 
              {(DQ ('mkdir -p /home/kube/cache/kubernetes-install'))}
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:tar) op:Equal spids:[4698])]
              spids: [4696]
            )
            (ForEach
              iter_name: tar
              iter_words: [{(DQ (${ VSub_Name SERVER_BINARY_TAR))} {(DQ (${ VSub_Name SALT_TAR))}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [(assign_pair lhs:(LhsName name:base_tar) op:Equal spids:[4725])]
                      spids: [4723]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:base_tar)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [(C {(basename)} {(DQ (${ VSub_Name tar))})]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [4729 4737]
                              )
                            }
                          spids: [4728]
                        )
                      ]
                      spids: [4728]
                    )
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (status)
                      } {(DQ ('Uploading ') (${ VSub_Name base_tar) (' to ') (${ VSub_Name vm_name) (...))}
                    )
                    (C {(copy-file-to-vm)} {(DQ (${ VSub_Name vm_ip))} {(DQ (${ VSub_Name tar))} 
                      {
                        (DQ (/home/kube/cache/kubernetes-install/) 
                          (BracedVarSub
                            token: <VSub_Name tar>
                            suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{('*') (Lit_Slash /)})
                            spids: [4777 4782]
                          )
                        )
                      }
                    )
                  ]
                  spids: [4720 4786]
                )
              spids: [4706 4718]
            )
          ]
          spids: [4666]
        )
      spids: [4662 4665]
    )
    (FuncDef
      name: wait-master-api
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:curl_creds)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('--insecure --user ') (${ VSub_Name KUBE_USER) (':') 
                        (${ VSub_Name KUBE_PASSWORD)
                      )
                    }
                  spids: [4809]
                )
              ]
              spids: [4807]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:curl_output)
                  op: Equal
                  rhs: {(DQ ('--fail --output /dev/null --silent'))}
                  spids: [4824]
                )
              ]
              spids: [4822]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:curl_net)
                  op: Equal
                  rhs: {(DQ ('--max-time 1'))}
                  spids: [4832]
                )
              ]
              spids: [4830]
            )
            (C {(try-until-success)} 
              {(DQ ('Waiting for Kubernetes API on ') (${ VSub_Name KUBE_MASTER))} 
              {
                (DQ ('curl ') (${ VSub_Name curl_creds) (' ') (${ VSub_Name curl_output) (' ') 
                  (${ VSub_Name curl_net) (' https://') (${ VSub_Name KUBE_MASTER_IP) (/healthz)
                )
              }
            )
          ]
          spids: [4804]
        )
      spids: [4800 4803]
    )
    (FuncDef
      name: wait-node-apis
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:curl_output)
                  op: Equal
                  rhs: {(DQ ('--fail --output /dev/null --silent'))}
                  spids: [4891]
                )
              ]
              spids: [4889]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:curl_net)
                  op: Equal
                  rhs: {(DQ ('--max-time 1'))}
                  spids: [4899]
                )
              ]
              spids: [4897]
            )
            (ForExpr
              init: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:i)
                  right: (ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (ArithBinary
                  op_id: Arith_Less
                  left: (ArithVarRef name:i)
                  right: 
                    (ArithWord
                      w: 
                        {
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            prefix_op: VSub_Pound
                            bracket_op: (WholeArray op_id:Lit_At)
                            spids: [4917 4923]
                          )
                        }
                    )
                )
              update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i))
              body: 
                (DoGroup
                  children: [
                    (C {(try-until-success)} 
                      {
                        (DQ ('Waiting for Kubernetes API on ') 
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name i)}))
                            spids: [4939 4946]
                          ) (...)
                        )
                      } 
                      {
                        (DQ ('curl ') (${ VSub_Name curl_output) (' ') (${ VSub_Name curl_net) 
                          (' http://') 
                          (BracedVarSub
                            token: <VSub_Name KUBE_NODE_IP_ADDRESSES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name i)}))
                            spids: [4962 4969]
                          ) (':10250/healthz')
                        )
                      }
                    )
                  ]
                  spids: [4932 4974]
                )
            )
          ]
          spids: [4886]
        )
      spids: [4882 4885]
    )
    (FuncDef
      name: setup-pod-routes
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:node) op:Equal spids:[5015])]
              spids: [5013]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:KUBE_NODE_BRIDGE_NETWORK)
                  op: Equal
                  rhs: {(ArrayLiteralPart)}
                  spids: [5019]
                )
              ]
              spids: [5019]
            )
            (ForExpr
              init: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:node)
                  right: (ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (ArithBinary
                  op_id: Arith_Less
                  left: (ArithVarRef name:node)
                  right: 
                    (ArithWord
                      w: 
                        {
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            prefix_op: VSub_Pound
                            bracket_op: (WholeArray op_id:Lit_At)
                            spids: [5035 5041]
                          )
                        }
                    )
                )
              update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:node))
              body: 
                (DoGroup
                  children: [
                    (C {(try-until-success-ssh)} 
                      {
                        (DQ 
                          (BracedVarSub
                            token: <VSub_Name KUBE_NODE_IP_ADDRESSES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name node)}))
                            spids: [5065 5072]
                          )
                        )
                      } 
                      {
                        (DQ ('Waiting for cbr0 bridge on ') 
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name node)}))
                            spids: [5079 5086]
                          ) (' to have an address')
                        )
                      } {(SQ <'sudo ifconfig cbr0  | grep -oP "inet addr:\\K\\S+"'>)}
                    )
                    (C {(try-until-success-ssh)} 
                      {
                        (DQ 
                          (BracedVarSub
                            token: <VSub_Name KUBE_NODE_IP_ADDRESSES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name node)}))
                            spids: [5101 5108]
                          )
                        )
                      } 
                      {
                        (DQ ('Waiting for cbr0 bridge on ') 
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name node)}))
                            spids: [5115 5122]
                          ) (' to have correct address')
                        )
                      } {(SQ <'sudo ifconfig cbr0  | grep -oP "inet addr:\\K\\S+" | grep -v  "^172."'>)}
                    )
                    (C {(run-ssh-cmd)} 
                      {
                        (DQ 
                          (BracedVarSub
                            token: <VSub_Name KUBE_NODE_IP_ADDRESSES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name node)}))
                            spids: [5137 5144]
                          )
                        )
                      } {(SQ <'sudo ip route show | grep -E "dev cbr0" | cut -d " " -f1'>)}
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:KUBE_NODE_BRIDGE_NETWORK)
                          op: PlusEqual
                          rhs: {(ArrayLiteralPart words:[{(${ VSub_Name _OUTPUT)}])}
                          spids: [5152]
                        )
                      ]
                      spids: [5152]
                    )
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (status)
                      } 
                      {
                        (DQ ('cbr0 on ') 
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name node)}))
                            spids: [5170 5177]
                          ) (' is ') (${ VSub_Name _OUTPUT)
                        )
                      }
                    )
                  ]
                  spids: [5050 5185]
                )
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal spids:[5191])]
              spids: [5189]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:j) op:Equal spids:[5196])]
              spids: [5194]
            )
            (ForExpr
              init: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:i)
                  right: (ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (ArithBinary
                  op_id: Arith_Less
                  left: (ArithVarRef name:i)
                  right: 
                    (ArithWord
                      w: 
                        {
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            prefix_op: VSub_Pound
                            bracket_op: (WholeArray op_id:Lit_At)
                            spids: [5210 5216]
                          )
                        }
                    )
                )
              update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i))
              body: 
                (DoGroup
                  children: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (status)
                      } 
                      {
                        (DQ ('Configuring pod routes on ') 
                          (BracedVarSub
                            token: <VSub_Name NODE_NAMES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name i)}))
                            spids: [5238 5245]
                          ) (...)
                        )
                      }
                    )
                    (C {(gen-add-route)} 
                      {
                        (DQ 
                          (BracedVarSub
                            token: <VSub_Name KUBE_NODE_BRIDGE_NETWORK>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name i)}))
                            spids: [5253 5260]
                          )
                        )
                      } 
                      {
                        (DQ 
                          (BracedVarSub
                            token: <VSub_Name KUBE_NODE_IP_ADDRESSES>
                            bracket_op: (ArrayIndex expr:(ArithWord w:{(${ VSub_Name i)}))
                            spids: [5264 5271]
                          )
                        )
                      }
                    )
                    (C {(run-script-remotely)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
                      {(DQ (${ VSub_Name KUBE_TEMP) (/add-route.sh))}
                    )
                    (ForExpr
                      init: 
                        (BinaryAssign
                          op_id: Arith_Equal
                          left: (LhsName name:j)
                          right: (ArithWord w:{(Lit_Digits 0)})
                        )
                      cond: 
                        (ArithBinary
                          op_id: Arith_Less
                          left: (ArithVarRef name:j)
                          right: 
                            (ArithWord
                              w: 
                                {
                                  (BracedVarSub
                                    token: <VSub_Name NODE_NAMES>
                                    prefix_op: VSub_Pound
                                    bracket_op: (WholeArray op_id:Lit_At)
                                    spids: [5303 5309]
                                  )
                                }
                            )
                        )
                      update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:j))
                      body: 
                        (DoGroup
                          children: [
                            (If
                              arms: [
                                (if_arm
                                  cond: [
                                    (Sentence
                                      child: 
                                        (DBracket
                                          expr: 
                                            (BoolBinary
                                              op_id: BoolBinary_GlobNEqual
                                              left: {(DQ (${ VSub_Name i))}
                                              right: {(DQ (${ VSub_Name j))}
                                            )
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [
                                    (C {(gen-add-route)} 
                                      {
                                        (DQ 
                                          (BracedVarSub
                                            token: <VSub_Name KUBE_NODE_BRIDGE_NETWORK>
                                            bracket_op: 
                                              (ArrayIndex
                                                expr: (ArithWord w:{(${ VSub_Name j)})
                                              )
                                            spids: [5348 5355]
                                          )
                                        )
                                      } 
                                      {
                                        (DQ 
                                          (BracedVarSub
                                            token: <VSub_Name KUBE_NODE_IP_ADDRESSES>
                                            bracket_op: 
                                              (ArrayIndex
                                                expr: (ArithWord w:{(${ VSub_Name j)})
                                              )
                                            spids: [5359 5366]
                                          )
                                        )
                                      }
                                    )
                                    (C {(run-script-remotely)} 
                                      {
                                        (DQ 
                                          (BracedVarSub
                                            token: <VSub_Name KUBE_NODE_IP_ADDRESSES>
                                            bracket_op: 
                                              (ArrayIndex
                                                expr: (ArithWord w:{(${ VSub_Name i)})
                                              )
                                            spids: [5373 5380]
                                          )
                                        )
                                      } {(DQ (${ VSub_Name KUBE_TEMP) (/add-route.sh))}
                                    )
                                  ]
                                  spids: [16777215 5342]
                                )
                              ]
                              spids: [16777215 5391]
                            )
                          ]
                          spids: [5318 5394]
                        )
                    )
                  ]
                  spids: [5225 5397]
                )
            )
          ]
          spids: [5010]
        )
      spids: [5006 5009]
    )
    (FuncDef
      name: copy-kube-certs
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cert)
                  op: Equal
                  rhs: {(DQ (kubecfg.crt))}
                  spids: [5438]
                )
              ]
              spids: [5436]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:key)
                  op: Equal
                  rhs: {(DQ (kubecfg.key))}
                  spids: [5446]
                )
              ]
              spids: [5444]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:ca) op:Equal rhs:{(DQ (ca.crt))} spids:[5454])]
              spids: [5452]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cert_dir)
                  op: Equal
                  rhs: {(DQ (/srv/kubernetes))}
                  spids: [5462]
                )
              ]
              spids: [5460]
            )
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('Copying credentials from ') (${ VSub_Name KUBE_MASTER))}
            )
            (C {(export)} 
              {(Lit_VarLike 'KUBE_CERT=') (DQ (${ VSub_Name KUBE_TEMP) (/) (${ VSub_Name cert))}
            )
            (C {(export)} 
              {(Lit_VarLike 'KUBE_KEY=') (DQ (${ VSub_Name KUBE_TEMP) (/) (${ VSub_Name key))}
            )
            (C {(export)} {(Lit_VarLike 'CA_CERT=') (DQ (${ VSub_Name KUBE_TEMP) (/) (${ VSub_Name ca))})
            (C {(export)} {(Lit_VarLike 'CONTEXT=') (DQ (photon-) (${ VSub_Name INSTANCE_PREFIX))})
            (C {(run-ssh-cmd)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ ('sudo chmod 644 ') (${ VSub_Name cert_dir) (/) (${ VSub_Name cert))}
            )
            (C {(run-ssh-cmd)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ ('sudo chmod 644 ') (${ VSub_Name cert_dir) (/) (${ VSub_Name key))}
            )
            (C {(run-ssh-cmd)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ ('sudo chmod 644 ') (${ VSub_Name cert_dir) (/) (${ VSub_Name ca))}
            )
            (C {(copy-file-from-vm)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ (${ VSub_Name cert_dir) (/) (${ VSub_Name cert))} {(DQ (${ VSub_Name KUBE_CERT))}
            )
            (C {(copy-file-from-vm)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ (${ VSub_Name cert_dir) (/) (${ VSub_Name key))} {(DQ (${ VSub_Name KUBE_KEY))}
            )
            (C {(copy-file-from-vm)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ (${ VSub_Name cert_dir) (/) (${ VSub_Name ca))} {(DQ (${ VSub_Name CA_CERT))}
            )
            (C {(run-ssh-cmd)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ ('sudo chmod 600 ') (${ VSub_Name cert_dir) (/) (${ VSub_Name cert))}
            )
            (C {(run-ssh-cmd)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ ('sudo chmod 600 ') (${ VSub_Name cert_dir) (/) (${ VSub_Name key))}
            )
            (C {(run-ssh-cmd)} {(DQ (${ VSub_Name KUBE_MASTER_IP))} 
              {(DQ ('sudo chmod 600 ') (${ VSub_Name cert_dir) (/) (${ VSub_Name ca))}
            )
          ]
          spids: [5433]
        )
      spids: [5429 5432]
    )
    (FuncDef
      name: run-script-remotely
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_ip)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [5774]
                )
              ]
              spids: [5772]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:local_file)
                  op: Equal
                  rhs: {(DQ (${ VSub_Number 2))}
                  spids: [5782]
                )
              ]
              spids: [5780]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:base_file) op:Equal spids:[5792])]
              spids: [5790]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:remote_file) op:Equal spids:[5797])]
              spids: [5795]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:base_file)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {(DQ (${ VSub_Name local_file))})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [5802 5810]
                      )
                    }
                  spids: [5801]
                )
              ]
              spids: [5801]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:remote_file)
                  op: Equal
                  rhs: {(DQ (/tmp/) (${ VSub_Name base_file))}
                  spids: [5813]
                )
              ]
              spids: [5813]
            )
            (C {(copy-file-to-vm)} {(DQ (${ VSub_Name vm_ip))} {(DQ (${ VSub_Name local_file))} 
              {(DQ (${ VSub_Name remote_file))}
            )
            (C {(run-ssh-cmd)} {(DQ (${ VSub_Name vm_ip))} 
              {(DQ ('chmod 700 ') (${ VSub_Name remote_file))}
            )
            (C {(run-ssh-cmd)} {(DQ (${ VSub_Name vm_ip))} 
              {
                (DQ ('nohup sudo ') (${ VSub_Name remote_file) (' < /dev/null 1> ') 
                  (${ VSub_Name remote_file) ('.out 2>&1 &')
                )
              }
            )
          ]
          spids: [5769]
        )
      spids: [5765 5768]
    )
    (FuncDef
      name: run-ssh-cmd
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:ignore_failure)
                  op: Equal
                  rhs: {(DQ )}
                  spids: [5922]
                )
              ]
              spids: [5920]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_GlobEqual
                              left: {(DQ (${ VSub_Number 1))}
                              right: {(DQ (-i))}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:ignore_failure)
                          op: Equal
                          rhs: {(DQ (-i))}
                          spids: [5949]
                        )
                      ]
                      spids: [5949]
                    )
                    (C {(shift)})
                  ]
                  spids: [16777215 5946]
                )
              ]
              spids: [16777215 5958]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_ip)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [5964]
                )
              ]
              spids: [5962]
            )
            (C {(shift)})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmd)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [5975]
                )
              ]
              spids: [5973]
            )
            (C {(run-cmd)} {(${ VSub_Name ignore_failure)} 
              {
                (DQ ('ssh ') (${ VSub_Name SSH_OPTS) (' ') ($ VSub_Name '$VM_USER') ('@') 
                  (${ VSub_Name vm_ip) (' ') ($ VSub_Number '$1')
                )
              }
            )
          ]
          spids: [5917]
        )
      spids: [5913 5916]
    )
    (FuncDef
      name: copy-file-to-vm
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_ip)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [6046]
                )
              ]
              spids: [6044]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:local_file)
                  op: Equal
                  rhs: {(${ VSub_Number 2)}
                  spids: [6054]
                )
              ]
              spids: [6052]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:remote_file)
                  op: Equal
                  rhs: {(${ VSub_Number 3)}
                  spids: [6062]
                )
              ]
              spids: [6060]
            )
            (C {(run-cmd)} 
              {
                (DQ ('scp ') (${ VSub_Name SSH_OPTS) (' ') (${ VSub_Name local_file) (' ') 
                  (${ VSub_Name VM_USER) ('@') (${ VSub_Name vm_ip) (':') (${ VSub_Name remote_file)
                )
              }
            )
          ]
          spids: [6041]
        )
      spids: [6037 6040]
    )
    (FuncDef
      name: copy-file-from-vm
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_ip)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [6106]
                )
              ]
              spids: [6104]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:remote_file)
                  op: Equal
                  rhs: {(${ VSub_Number 2)}
                  spids: [6114]
                )
              ]
              spids: [6112]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:local_file)
                  op: Equal
                  rhs: {(${ VSub_Number 3)}
                  spids: [6122]
                )
              ]
              spids: [6120]
            )
            (C {(run-cmd)} 
              {
                (DQ ('scp ') (${ VSub_Name SSH_OPTS) (' ') (${ VSub_Name VM_USER) ('@') 
                  (${ VSub_Name vm_ip) (':') (${ VSub_Name remote_file) (' ') (${ VSub_Name local_file)
                )
              }
            )
          ]
          spids: [6101]
        )
      spids: [6097 6100]
    )
    (FuncDef
      name: run-cmd
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[6178])]
              spids: [6176]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:ignore_failure)
                  op: Equal
                  rhs: {(DQ )}
                  spids: [6184]
                )
              ]
              spids: [6182]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_GlobEqual
                              left: {(DQ (${ VSub_Number 1))}
                              right: {(DQ (-i))}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:ignore_failure)
                          op: Equal
                          rhs: {(${ VSub_Number 1)}
                          spids: [6211]
                        )
                      ]
                      spids: [6211]
                    )
                    (C {(shift)})
                  ]
                  spids: [16777215 6208]
                )
              ]
              spids: [16777215 6220]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmd)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [6226]
                )
              ]
              spids: [6224]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:output) op:Equal spids:[6232])]
              spids: [6230]
            )
            (AndOr
              children: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:output)
                      op: Equal
                      rhs: 
                        {
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [
                                  (SimpleCommand
                                    words: [{(${ VSub_Name cmd)}]
                                    redirects: [
                                      (Redir
                                        op_id: Redir_GreatAnd
                                        fd: 2
                                        arg_word: {(1)}
                                        spids: [6241]
                                      )
                                    ]
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub '$('>
                            spids: [6236 6243]
                          )
                        }
                      spids: [6235]
                    )
                  ]
                  spids: [6235]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [6247]
                    )
                  ]
                  spids: [6247]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_ne left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolUnary
                                      op_id: BoolUnary_z
                                      child: {(DQ (${ VSub_Name ignore_failure))}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C 
                              {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') 
                                (Lit_Other ':') (error)
                              } {(DQ ('Failed to run command: ') (${ VSub_Name cmd) (' Output:'))}
                            )
                            (C {(echo)} {(DQ (${ VSub_Name output))})
                            (C {(exit)} {(1)})
                          ]
                          spids: [16777215 6284]
                        )
                      ]
                      spids: [16777215 6318]
                    )
                  ]
                  spids: [16777215 6266]
                )
              ]
              spids: [16777215 6321]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:_OUTPUT)
                  op: Equal
                  rhs: {(${ VSub_Name output)}
                  spids: [6324]
                )
              ]
              spids: [6324]
            )
            (ControlFlow token:<ControlFlow_Return return> arg_word:{(${ VSub_Name rc)})
          ]
          spids: [6173]
        )
      spids: [6169 6172]
    )
    (FuncDef
      name: verify-ssh-prereqs
      body: 
        (BraceGroup
          children: [
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('Validating SSH configuration...'))}
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal spids:[6373])]
              spids: [6371]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[6377])]
              spids: [6377]
            )
            (AndOr
              children: [
                (SimpleCommand
                  words: [{(ssh-add)} {(-L)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 1
                      arg_word: {(/dev/null)}
                      spids: [6385]
                    )
                    (Redir
                      op_id: Redir_Great
                      fd: 2
                      arg_word: {(/dev/null)}
                      spids: [6389]
                    )
                  ]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [6395]
                    )
                  ]
                  spids: [6395]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_eq
                              left: {(DQ (${ VSub_Name rc))}
                              right: {(2)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(eval)}
                        {
                          (DQ 
                            (CommandSubPart
                              command_list: (CommandList children:[(C {(ssh-agent)})])
                              left_token: <Left_CommandSub '$('>
                              spids: [6430 6432]
                            )
                          )
                        }
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [6435]
                        )
                      ]
                    )
                    (C {(trap-add)} {(DQ ('kill ') (${ VSub_Name SSH_AGENT_PID))} {(EXIT)})
                  ]
                  spids: [16777215 6420]
                )
              ]
              spids: [16777215 6452]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[6456])]
              spids: [6456]
            )
            (AndOr
              children: [
                (SimpleCommand
                  words: [{(ssh-add)} {(-L)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 1
                      arg_word: {(/dev/null)}
                      spids: [6464]
                    )
                    (Redir
                      op_id: Redir_Great
                      fd: 2
                      arg_word: {(/dev/null)}
                      spids: [6468]
                    )
                  ]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [6474]
                    )
                  ]
                  spids: [6474]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_eq
                              left: {(DQ (${ VSub_Name rc))}
                              right: {(1)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(AndOr children:[(C {(ssh-add)}) (C {(true)})] op_id:Op_DPipe)]
                  spids: [16777215 6499]
                )
              ]
              spids: [16777215 6513]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (Pipeline
                          children: [
                            (SimpleCommand
                              words: [{(ssh-add)} {(-L)}]
                              redirects: [
                                (Redir
                                  op_id: Redir_Great
                                  fd: 1
                                  arg_word: {(/dev/null)}
                                  spids: [6529]
                                )
                                (Redir
                                  op_id: Redir_Great
                                  fd: 2
                                  arg_word: {(/dev/null)}
                                  spids: [6533]
                                )
                              ]
                            )
                          ]
                          negated: True
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } {(DQ ('Could not find or add an SSH identity.'))}
                    )
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } {(DQ ('Please start ssh-agent, add your identity, and retry.'))}
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 6538]
                )
              ]
              spids: [16777215 6572]
            )
          ]
          spids: [6355]
        )
      spids: [6351 6354]
    )
    (FuncDef
      name: verify-photon-config
      body: 
        (BraceGroup
          children: [
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ ('Validating Photon configuration...'))}
            )
            (C {(set)} {(Lit_Other '+') (o)} {(pipefail)})
            (C {(verify-photon-flavors)})
            (C {(verify-photon-image)})
            (C {(verify-photon-tenant)})
            (C {(set)} {(-o)} {(pipefail)})
          ]
          spids: [6596]
        )
      spids: [6592 6595]
    )
    (FuncDef
      name: verify-photon-flavors
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[6667])]
              spids: [6665]
            )
            (AndOr
              children: [
                (Pipeline
                  children: [
                    (C {(${ VSub_Name PHOTON)} {(flavor)} {(list)})
                    (C {(awk)} {(-F) (SQ <'\\t'>)} {(SQ <'{print $2}'>)})
                    (SimpleCommand
                      words: [
                        {(grep)}
                        {(-q)}
                        {(DQ ('^') (${ VSub_Name PHOTON_MASTER_FLAVOR) (Lit_Other '$'))}
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [6707]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [6711]
                        )
                      ]
                    )
                  ]
                  negated: False
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [6716]
                    )
                  ]
                  spids: [6716]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_ne left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } {(DQ ('ERROR: Cannot find VM flavor named ') (${ VSub_Name PHOTON_MASTER_FLAVOR))}
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 6735]
                )
              ]
              spids: [16777215 6759]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_GlobNEqual
                              left: {(DQ (${ VSub_Name PHOTON_MASTER_FLAVOR))}
                              right: {(DQ (${ VSub_Name PHOTON_NODE_FLAVOR))}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[6787])]
                      spids: [6787]
                    )
                    (AndOr
                      children: [
                        (Pipeline
                          children: [
                            (C {(${ VSub_Name PHOTON)} {(flavor)} {(list)})
                            (C {(awk)} {(-F) (SQ <'\\t'>)} {(SQ <'{print $2}'>)})
                            (SimpleCommand
                              words: [
                                {(grep)}
                                {(-q)}
                                {(DQ ('^') (${ VSub_Name PHOTON_NODE_FLAVOR) (Lit_Other '$'))}
                              ]
                              redirects: [
                                (Redir
                                  op_id: Redir_Great
                                  fd: 16777215
                                  arg_word: {(/dev/null)}
                                  spids: [6826]
                                )
                                (Redir
                                  op_id: Redir_GreatAnd
                                  fd: 2
                                  arg_word: {(1)}
                                  spids: [6830]
                                )
                              ]
                            )
                          ]
                          negated: False
                        )
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:rc)
                              op: Equal
                              rhs: {($ VSub_QMark '$?')}
                              spids: [6835]
                            )
                          ]
                          spids: [6835]
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolBinary
                                      op_id: BoolBinary_ne
                                      left: {(${ VSub_Name rc)}
                                      right: {(0)}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C 
                              {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') 
                                (Lit_Other ':') (error)
                              } {(DQ ('ERROR: Cannot find VM flavor named ') (${ VSub_Name PHOTON_NODE_FLAVOR))}
                            )
                            (C {(exit)} {(1)})
                          ]
                          spids: [16777215 6854]
                        )
                      ]
                      spids: [16777215 6878]
                    )
                  ]
                  spids: [16777215 6784]
                )
              ]
              spids: [16777215 6881]
            )
            (AndOr
              children: [
                (Pipeline
                  children: [
                    (C {(${ VSub_Name PHOTON)} {(flavor)} {(list)})
                    (C {(awk)} {(-F) (SQ <'\\t'>)} {(SQ <'{print $2}'>)})
                    (SimpleCommand
                      words: [
                        {(grep)}
                        {(-q)}
                        {(DQ ('^') (${ VSub_Name PHOTON_DISK_FLAVOR) (Lit_Other '$'))}
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [6920]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [6924]
                        )
                      ]
                    )
                  ]
                  negated: False
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [6929]
                    )
                  ]
                  spids: [6929]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_ne left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } {(DQ ('ERROR: Cannot find disk flavor named ') (${ VSub_Name PHOTON_DISK_FLAVOR))}
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 6948]
                )
              ]
              spids: [16777215 6972]
            )
          ]
          spids: [6662]
        )
      spids: [6658 6661]
    )
    (FuncDef
      name: verify-photon-image
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal spids:[6998])]
              spids: [6996]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[7002])]
              spids: [7002]
            )
            (AndOr
              children: [
                (Pipeline
                  children: [
                    (C {(${ VSub_Name PHOTON)} {(image)} {(list)})
                    (SimpleCommand
                      words: [
                        {(grep)}
                        {(-q)}
                        {(SQ <Lit_EscapedChar '\\t'>) (DQ (${ VSub_Name PHOTON_IMAGE)) 
                          (SQ <Lit_EscapedChar '\\t'>)
                        }
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [7032]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [7036]
                        )
                      ]
                    )
                  ]
                  negated: False
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [7041]
                    )
                  ]
                  spids: [7041]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_ne left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } 
                      {
                        (DQ ('ERROR: Cannot find image ') 
                          (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name PHOTON_IMAGE) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                        )
                      }
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 7060]
                )
              ]
              spids: [16777215 7086]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[7090])]
              spids: [7090]
            )
            (AndOr
              children: [
                (Pipeline
                  children: [
                    (C {(${ VSub_Name PHOTON)} {(image)} {(list)})
                    (C {(grep)} 
                      {(SQ <Lit_EscapedChar '\\t'>) (DQ (${ VSub_Name PHOTON_IMAGE)) 
                        (SQ <Lit_EscapedChar '\\t'>)
                      }
                    )
                    (SimpleCommand
                      words: [{(grep)} {(ERROR)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [7124]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [7128]
                        )
                      ]
                    )
                  ]
                  negated: False
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [7133]
                    )
                  ]
                  spids: [7133]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_eq left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ ('Warning: You have at least one ') (${ VSub_Name PHOTON_IMAGE) 
                          (' image in the ERROR state. You may want to investigate.')
                        )
                      }
                    )
                    (C {(echo)} {(DQ ('Images in the ERROR state will be ignored.'))})
                  ]
                  spids: [16777215 7152]
                )
              ]
              spids: [16777215 7173]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[7177])]
              spids: [7177]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:num_images)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(${ VSub_Name PHOTON)} {(image)} {(list)})
                                  (C {(grep)} 
                                    {(SQ <Lit_EscapedChar '\\t'>) (DQ (${ VSub_Name PHOTON_IMAGE)) 
                                      (SQ <Lit_EscapedChar '\\t'>)
                                    }
                                  )
                                  (C {(grep)} {(-c)} {(READY)})
                                ]
                                negated: False
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [7182 7214]
                      )
                    }
                  spids: [7181]
                )
              ]
              spids: [7181]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_gt
                              left: {(DQ (${ VSub_Name num_images))}
                              right: {(1)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ ('ERROR: You have more than one READY ') (${ VSub_Name PHOTON_IMAGE) 
                          (' image. Ensure there is only one')
                        )
                      }
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 7234]
                )
              ]
              spids: [16777215 7253]
            )
          ]
          spids: [6993]
        )
      spids: [6989 6992]
    )
    (FuncDef
      name: verify-photon-tenant
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal spids:[7267])]
              spids: [7265]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[7271])]
              spids: [7271]
            )
            (AndOr
              children: [
                (Pipeline
                  children: [
                    (C {(${ VSub_Name PHOTON)} {(tenant)} {(list)})
                    (SimpleCommand
                      words: [
                        {(grep)}
                        {(-q)}
                        {(SQ <Lit_EscapedChar '\\t'>) (DQ (${ VSub_Name PHOTON_TENANT))}
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [7298]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [7302]
                        )
                      ]
                    )
                  ]
                  negated: False
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [7307]
                    )
                  ]
                  spids: [7307]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_ne left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ ('ERROR: Cannot find tenant ') 
                          (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name PHOTON_TENANT) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                        )
                      }
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 7326]
                )
              ]
              spids: [16777215 7346]
            )
            (AndOr
              children: [
                (Pipeline
                  children: [
                    (C {(${ VSub_Name PHOTON)} {(project)} {(list)} {(--tenant)} 
                      {(DQ (${ VSub_Name PHOTON_TENANT))}
                    )
                    (SimpleCommand
                      words: [
                        {(grep)}
                        {(-q)}
                        {(SQ <Lit_EscapedChar '\\t'>) (DQ (${ VSub_Name PHOTON_PROJECT)) 
                          (SQ <Lit_EscapedChar '\\t'>)
                        }
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [7384]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [7388]
                        )
                      ]
                    )
                  ]
                  negated: False
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:rc)
                      op: Equal
                      rhs: {($ VSub_QMark '$?')}
                      spids: [7393]
                    )
                  ]
                  spids: [7393]
                )
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolBinary op_id:BoolBinary_ne left:{(${ VSub_Name rc)} right:{(0)})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ ('ERROR: Cannot find project ') 
                          (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name PHOTON_PROJECT) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                        )
                      }
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [16777215 7412]
                )
              ]
              spids: [16777215 7432]
            )
          ]
          spids: [7262]
        )
      spids: [7258 7261]
    )
    (FuncDef
      name: verify-cmd-in-path
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmd)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [7453]
                )
              ]
              spids: [7453]
            )
            (AndOr
              children: [
                (SimpleCommand
                  words: [{(which)} {(DQ (${ VSub_Name cmd))}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 16777215
                      arg_word: {(/dev/null)}
                      spids: [7467]
                    )
                  ]
                )
                (BraceGroup
                  children: [
                    (C 
                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') 
                        (error)
                      } {(DQ ("Can't find ") (${ VSub_Name cmd) (' in PATH, please install and retry.'))}
                    )
                    (C {(exit)} {(1)})
                  ]
                  spids: [7472]
                )
              ]
              op_id: Op_DPipe
            )
          ]
          spids: [7450]
        )
      spids: [7446 7449]
    )
    (FuncDef
      name: try-until-success-ssh
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_ip)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [7526]
                )
              ]
              spids: [7524]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmd_description)
                  op: Equal
                  rhs: {(${ VSub_Number 2)}
                  spids: [7534]
                )
              ]
              spids: [7532]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmd)
                  op: Equal
                  rhs: {(${ VSub_Number 3)}
                  spids: [7542]
                )
              ]
              spids: [7540]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:timeout) op:Equal rhs:{(600)} spids:[7550])]
              spids: [7548]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:sleep_time) op:Equal rhs:{(5)} spids:[7556])]
              spids: [7554]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:max_attempts) op:Equal spids:[7562])]
              spids: [7560]
            )
            (DParen
              child: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:max_attempts)
                  right: 
                    (ArithBinary
                      op_id: Arith_Slash
                      left: (ArithVarRef name:timeout)
                      right: (ArithVarRef name:sleep_time)
                    )
                )
            )
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ (${ VSub_Name cmd_description) (' for up to 10 minutes...'))}
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:attempt) op:Equal rhs:{(0)} spids:[7595])]
              spids: [7593]
            )
            (While
              cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)]
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[7609])]
                      spids: [7607]
                    )
                    (AndOr
                      children: [
                        (C {(run-ssh-cmd)} {(-i)} {(DQ (${ VSub_Name vm_ip))} {(DQ (${ VSub_Name cmd))})
                        (Assignment
                          keyword: Assign_None
                          pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(1)} spids:[7631])]
                          spids: [7631]
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolBinary
                                      op_id: BoolBinary_GlobNEqual
                                      left: {(${ VSub_Name rc)}
                                      right: {(0)}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (If
                              arms: [
                                (if_arm
                                  cond: [
                                    (Sentence
                                      child: 
                                        (DParen
                                          child: 
                                            (ArithBinary
                                              op_id: Arith_DEqual
                                              left: (ArithVarRef name:attempt)
                                              right: (ArithVarRef name:max_attempts)
                                            )
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [
                                    (C 
                                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') 
                                        (Lit_Other ':') (error)
                                      } {(DQ ('Failed, cannot proceed: you may need to retry to log into the VM to debug'))}
                                    )
                                    (C {(exit)} {(1)})
                                  ]
                                  spids: [16777215 7667]
                                )
                              ]
                              spids: [16777215 7688]
                            )
                          ]
                          spids: [16777215 7650]
                        )
                      ]
                      else_action: [(ControlFlow token:<ControlFlow_Break break>)]
                      spids: [7691 7697]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:attempt)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithVarRef name:attempt)
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [7701 7706]
                              )
                            }
                          spids: [7700]
                        )
                      ]
                      spids: [7700]
                    )
                    (C {(sleep)} {(${ VSub_Name sleep_time)})
                  ]
                  spids: [7604 7716]
                )
            )
          ]
          spids: [7521]
        )
      spids: [7517 7520]
    )
    (FuncDef
      name: try-until-success
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmd_description)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [7730]
                )
              ]
              spids: [7728]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmd)
                  op: Equal
                  rhs: {(${ VSub_Number 2)}
                  spids: [7738]
                )
              ]
              spids: [7736]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:timeout) op:Equal rhs:{(600)} spids:[7746])]
              spids: [7744]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:sleep_time) op:Equal rhs:{(5)} spids:[7752])]
              spids: [7750]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:max_attempts) op:Equal spids:[7758])]
              spids: [7756]
            )
            (DParen
              child: 
                (BinaryAssign
                  op_id: Arith_Equal
                  left: (LhsName name:max_attempts)
                  right: 
                    (ArithBinary
                      op_id: Arith_Slash
                      left: (ArithVarRef name:timeout)
                      right: (ArithVarRef name:sleep_time)
                    )
                )
            )
            (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} 
              {(DQ (${ VSub_Name cmd_description) (' for up to 10 minutes...'))}
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:attempt) op:Equal rhs:{(0)} spids:[7791])]
              spids: [7789]
            )
            (While
              cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)]
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[7805])]
                      spids: [7803]
                    )
                    (AndOr
                      children: [
                        (C {(run-cmd)} {(-i)} {(DQ (${ VSub_Name cmd))})
                        (Assignment
                          keyword: Assign_None
                          pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(1)} spids:[7821])]
                          spids: [7821]
                        )
                      ]
                      op_id: Op_DPipe
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolBinary
                                      op_id: BoolBinary_GlobNEqual
                                      left: {(${ VSub_Name rc)}
                                      right: {(0)}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (If
                              arms: [
                                (if_arm
                                  cond: [
                                    (Sentence
                                      child: 
                                        (DParen
                                          child: 
                                            (ArithBinary
                                              op_id: Arith_DEqual
                                              left: (ArithVarRef name:attempt)
                                              right: (ArithVarRef name:max_attempts)
                                            )
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [
                                    (C 
                                      {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') 
                                        (Lit_Other ':') (error)
                                      } {(DQ ('Failed, cannot proceed'))}
                                    )
                                    (C {(exit)} {(1)})
                                  ]
                                  spids: [16777215 7857]
                                )
                              ]
                              spids: [16777215 7878]
                            )
                          ]
                          spids: [16777215 7840]
                        )
                      ]
                      else_action: [(ControlFlow token:<ControlFlow_Break break>)]
                      spids: [7881 7887]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:attempt)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithVarRef name:attempt)
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [7891 7896]
                              )
                            }
                          spids: [7890]
                        )
                      ]
                      spids: [7890]
                    )
                    (C {(sleep)} {(${ VSub_Name sleep_time)})
                  ]
                  spids: [7800 7906]
                )
            )
          ]
          spids: [7725]
        )
      spids: [7721 7724]
    )
    (FuncDef
      name: trap-add
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:handler)
                  op: Equal
                  rhs: {(DQ (${ VSub_Number 1))}
                  spids: [7929]
                )
              ]
              spids: [7927]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:signal)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (BracedVarSub
                          token: <VSub_Number 2>
                          suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(EXIT)})
                          spids: [7941 7945]
                        )
                      )
                    }
                  spids: [7939]
                )
              ]
              spids: [7937]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:cur) op:Equal spids:[7951])]
              spids: [7949]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cur)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (C {(eval)} 
                                  {
                                    (DQ ("sh -c 'echo ") 
                                      (EscapedLiteralPart
                                        token: <Lit_EscapedChar '\\$'>
                                      ) ("3' -- ") 
                                      (CommandSubPart
                                        command_list: 
                                          (CommandList
                                            children: [(C {(trap)} {(-p)} {(${ VSub_Name signal)})]
                                          )
                                        left_token: <Left_CommandSub '$('>
                                        spids: [7964 7972]
                                      )
                                    )
                                  }
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [7957 7974]
                        )
                      )
                    }
                  spids: [7955]
                )
              ]
              spids: [7955]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolUnary op_id:BoolUnary_n child:{(DQ (${ VSub_Name cur))})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:handler)
                          op: Equal
                          rhs: {(DQ (${ VSub_Name cur) ('; ') (${ VSub_Name handler))}
                          spids: [7996]
                        )
                      ]
                      spids: [7996]
                    )
                  ]
                  spids: [16777215 7993]
                )
              ]
              spids: [16777215 8008]
            )
            (C {(trap)} {(DQ (${ VSub_Name handler))} {(${ VSub_Name signal)})
          ]
          spids: [7924]
        )
      spids: [7920 7923]
    )
  ]
)