Pavlin Radoslavov | f4ad989 | 2013-03-04 14:15:19 -0800 | [diff] [blame] | 1 | #! /usr/bin/env python |
| 2 | # -*- Mode: python; py-indent-offset: 4; tab-width: 8; indent-tabs-mode: t; -*- |
| 3 | |
| 4 | import pprint |
| 5 | import os |
| 6 | import sys |
| 7 | import subprocess |
| 8 | import json |
| 9 | import argparse |
| 10 | import io |
| 11 | import time |
| 12 | |
| 13 | from flask import Flask, json, Response, render_template, make_response, request |
| 14 | |
| 15 | ## Global Var ## |
| 16 | ControllerIP="127.0.0.1" |
| 17 | ControllerPort=8080 |
| 18 | |
| 19 | DEBUG=0 |
| 20 | pp = pprint.PrettyPrinter(indent=4) |
| 21 | |
| 22 | app = Flask(__name__) |
| 23 | |
| 24 | ## Worker Functions ## |
| 25 | def log_error(txt): |
| 26 | print '%s' % (txt) |
| 27 | |
| 28 | def debug(txt): |
| 29 | if DEBUG: |
| 30 | print '%s' % (txt) |
| 31 | |
| 32 | # @app.route("/wm/flow/get/<flow-id>/json") |
| 33 | # Sample output: |
| 34 | # {"flowId":{"value":"0x5"},"installerId":{"value":"FOOBAR"},"dataPath":{"srcPort":{"dpid":{"value":"00:00:00:00:00:00:00:01"},"port":{"value":0}},"dstPort":{"dpid":{"value":"00:00:00:00:00:00:00:02"},"port":{"value":0}},"flowEntries":[{"flowEntryId":"0x1389","flowEntryMatch":null,"flowEntryActions":null,"dpid":{"value":"00:00:00:00:00:00:00:01"},"inPort":{"value":0},"outPort":{"value":1},"flowEntryUserState":"FE_USER_DELETE","flowEntrySwitchState":"FE_SWITCH_NOT_UPDATED","flowEntryErrorState":null},{"flowEntryId":"0x138a","flowEntryMatch":null,"flowEntryActions":null,"dpid":{"value":"00:00:00:00:00:00:00:02"},"inPort":{"value":9},"outPort":{"value":0},"flowEntryUserState":"FE_USER_DELETE","flowEntrySwitchState":"FE_SWITCH_NOT_UPDATED","flowEntryErrorState":null}]}} |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 35 | |
| 36 | def print_flow_path(parsedResult): |
Pavlin Radoslavov | ede9758 | 2013-03-08 18:57:28 -0800 | [diff] [blame] | 37 | flowId = parsedResult['flowId']['value'] |
| 38 | installerId = parsedResult['installerId']['value'] |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 39 | flowPathFlags = parsedResult['flowPathFlags']['flags'] |
Pavlin Radoslavov | ede9758 | 2013-03-08 18:57:28 -0800 | [diff] [blame] | 40 | srcSwitch = parsedResult['dataPath']['srcPort']['dpid']['value'] |
| 41 | srcPort = parsedResult['dataPath']['srcPort']['port']['value'] |
| 42 | dstSwitch = parsedResult['dataPath']['dstPort']['dpid']['value'] |
| 43 | dstPort = parsedResult['dataPath']['dstPort']['port']['value'] |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 44 | |
Pavlin Radoslavov | 204b286 | 2013-07-12 14:15:36 -0700 | [diff] [blame] | 45 | flowPathFlagsStr = "" |
| 46 | if (flowPathFlags & 0x1): |
| 47 | if flowPathFlagsStr: |
| 48 | flowPathFlagsStr += "," |
| 49 | flowPathFlagsStr += "DISCARD_FIRST_HOP_ENTRY" |
| 50 | if (flowPathFlags & 0x2): |
| 51 | if flowPathFlagsStr: |
| 52 | flowPathFlagsStr += "," |
| 53 | flowPathFlagsStr += "KEEP_ONLY_FIRST_HOP_ENTRY" |
| 54 | |
| 55 | print "FlowPath: (flowId = %s installerId = %s flowPathFlags = 0x%x(%s) src = %s/%s dst = %s/%s)" % (flowId, installerId, flowPathFlags, flowPathFlagsStr, srcSwitch, srcPort, dstSwitch, dstPort) |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 56 | match = parsedResult['flowEntryMatch']; |
| 57 | # |
| 58 | # Print the common conditions |
| 59 | # |
| 60 | if match == None: |
| 61 | print " Match: %s" % (match) |
| 62 | else: |
| 63 | # inPort = match['inPort'] |
| 64 | # matchInPort = match['matchInPort'] |
| 65 | srcMac = match['srcMac'] |
| 66 | matchSrcMac = match['matchSrcMac'] |
| 67 | dstMac = match['dstMac'] |
| 68 | matchDstMac = match['matchDstMac'] |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 69 | ethernetFrameType = match['ethernetFrameType'] |
| 70 | matchEthernetFrameType = match['matchEthernetFrameType'] |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 71 | vlanId = match['vlanId'] |
| 72 | matchVlanId = match['matchVlanId'] |
| 73 | vlanPriority = match['vlanPriority'] |
| 74 | matchVlanPriority = match['matchVlanPriority'] |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 75 | srcIPv4Net = match['srcIPv4Net'] |
| 76 | matchSrcIPv4Net = match['matchSrcIPv4Net'] |
| 77 | dstIPv4Net = match['dstIPv4Net'] |
| 78 | matchDstIPv4Net = match['matchDstIPv4Net'] |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 79 | ipProto = match['ipProto'] |
| 80 | matchIpProto = match['matchIpProto'] |
| 81 | ipToS = match['ipToS'] |
| 82 | matchIpToS = match['matchIpToS'] |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 83 | srcTcpUdpPort = match['srcTcpUdpPort'] |
| 84 | matchSrcTcpUdpPort = match['matchSrcTcpUdpPort'] |
| 85 | dstTcpUdpPort = match['dstTcpUdpPort'] |
| 86 | matchDstTcpUdpPort = match['matchDstTcpUdpPort'] |
| 87 | # if matchInPort == True: |
| 88 | # print " inPort: %s" % inPort['value'] |
| 89 | if matchSrcMac == True: |
| 90 | print " srcMac: %s" % srcMac['value'] |
| 91 | if matchDstMac == True: |
| 92 | print " dstMac: %s" % dstMac['value'] |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 93 | if matchEthernetFrameType == True: |
| 94 | print " ethernetFrameType: %s" % hex(ethernetFrameType) |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 95 | if matchVlanId == True: |
| 96 | print " vlanId: %s" % vlanId |
| 97 | if matchVlanPriority == True: |
| 98 | print " vlanPriority: %s" % vlanPriority |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 99 | if matchSrcIPv4Net == True: |
| 100 | print " srcIPv4Net: %s" % srcIPv4Net['value'] |
| 101 | if matchDstIPv4Net == True: |
| 102 | print " dstIPv4Net: %s" % dstIPv4Net['value'] |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 103 | if matchIpProto == True: |
| 104 | print " ipProto: %s" % ipProto |
| 105 | if matchIpToS == True: |
| 106 | print " ipToS: %s" % ipToS |
Pavlin Radoslavov | 67b3ef3 | 2013-04-03 02:44:48 -0700 | [diff] [blame] | 107 | if matchSrcTcpUdpPort == True: |
| 108 | print " srcTcpUdpPort: %s" % srcTcpUdpPort |
| 109 | if matchDstTcpUdpPort == True: |
| 110 | print " dstTcpUdpPort: %s" % dstTcpUdpPort |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 111 | |
| 112 | for f in parsedResult['dataPath']['flowEntries']: |
Pavlin Radoslavov | 8cdd1a2 | 2013-03-15 20:28:00 -0700 | [diff] [blame] | 113 | flowEntryId = f['flowEntryId'] |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 114 | dpid = f['dpid']['value'] |
| 115 | userState = f['flowEntryUserState'] |
| 116 | switchState = f['flowEntrySwitchState'] |
Pavlin Radoslavov | ede9758 | 2013-03-08 18:57:28 -0800 | [diff] [blame] | 117 | match = f['flowEntryMatch']; |
| 118 | actions = f['flowEntryActions'] |
Pavlin Radoslavov | 8cdd1a2 | 2013-03-15 20:28:00 -0700 | [diff] [blame] | 119 | print " FlowEntry: (%s, %s, %s, %s)" % (flowEntryId, dpid, userState, switchState) |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 120 | |
Pavlin Radoslavov | 2d59f58 | 2013-03-11 11:36:06 -0700 | [diff] [blame] | 121 | # |
| 122 | # Print the match conditions |
| 123 | # |
| 124 | if match == None: |
| 125 | print " Match: %s" % (match) |
| 126 | else: |
| 127 | inPort = match['inPort'] |
| 128 | matchInPort = match['matchInPort'] |
| 129 | srcMac = match['srcMac'] |
| 130 | matchSrcMac = match['matchSrcMac'] |
| 131 | dstMac = match['dstMac'] |
| 132 | matchDstMac = match['matchDstMac'] |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 133 | ethernetFrameType = match['ethernetFrameType'] |
| 134 | matchEthernetFrameType = match['matchEthernetFrameType'] |
Pavlin Radoslavov | 2d59f58 | 2013-03-11 11:36:06 -0700 | [diff] [blame] | 135 | vlanId = match['vlanId'] |
| 136 | matchVlanId = match['matchVlanId'] |
| 137 | vlanPriority = match['vlanPriority'] |
| 138 | matchVlanPriority = match['matchVlanPriority'] |
Pavlin Radoslavov | 2d59f58 | 2013-03-11 11:36:06 -0700 | [diff] [blame] | 139 | srcIPv4Net = match['srcIPv4Net'] |
| 140 | matchSrcIPv4Net = match['matchSrcIPv4Net'] |
| 141 | dstIPv4Net = match['dstIPv4Net'] |
| 142 | matchDstIPv4Net = match['matchDstIPv4Net'] |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 143 | ipProto = match['ipProto'] |
| 144 | matchIpProto = match['matchIpProto'] |
| 145 | ipToS = match['ipToS'] |
| 146 | matchIpToS = match['matchIpToS'] |
Pavlin Radoslavov | 2d59f58 | 2013-03-11 11:36:06 -0700 | [diff] [blame] | 147 | srcTcpUdpPort = match['srcTcpUdpPort'] |
| 148 | matchSrcTcpUdpPort = match['matchSrcTcpUdpPort'] |
| 149 | dstTcpUdpPort = match['dstTcpUdpPort'] |
| 150 | matchDstTcpUdpPort = match['matchDstTcpUdpPort'] |
| 151 | if matchInPort == True: |
| 152 | print " inPort: %s" % inPort['value'] |
| 153 | if matchSrcMac == True: |
| 154 | print " srcMac: %s" % srcMac['value'] |
| 155 | if matchDstMac == True: |
| 156 | print " dstMac: %s" % dstMac['value'] |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 157 | if matchEthernetFrameType == True: |
| 158 | print " ethernetFrameType: %s" % hex(ethernetFrameType) |
Pavlin Radoslavov | 2d59f58 | 2013-03-11 11:36:06 -0700 | [diff] [blame] | 159 | if matchVlanId == True: |
| 160 | print " vlanId: %s" % vlanId |
| 161 | if matchVlanPriority == True: |
| 162 | print " vlanPriority: %s" % vlanPriority |
Pavlin Radoslavov | 2d59f58 | 2013-03-11 11:36:06 -0700 | [diff] [blame] | 163 | if matchSrcIPv4Net == True: |
| 164 | print " srcIPv4Net: %s" % srcIPv4Net['value'] |
| 165 | if matchDstIPv4Net == True: |
| 166 | print " dstIPv4Net: %s" % dstIPv4Net['value'] |
Pavlin Radoslavov | ad3a1e6 | 2013-07-09 13:30:16 -0700 | [diff] [blame] | 167 | if matchIpProto == True: |
| 168 | print " ipProto: %s" % ipProto |
| 169 | if matchIpToS == True: |
| 170 | print " ipToS: %s" % ipToS |
Pavlin Radoslavov | 2d59f58 | 2013-03-11 11:36:06 -0700 | [diff] [blame] | 171 | if matchSrcTcpUdpPort == True: |
| 172 | print " srcTcpUdpPort: %s" % srcTcpUdpPort |
| 173 | if matchDstTcpUdpPort == True: |
| 174 | print " dstTcpUdpPort: %s" % dstTcpUdpPort |
Pavlin Radoslavov | ede9758 | 2013-03-08 18:57:28 -0800 | [diff] [blame] | 175 | |
Pavlin Radoslavov | 2d59f58 | 2013-03-11 11:36:06 -0700 | [diff] [blame] | 176 | # |
| 177 | # Print the actions |
| 178 | # |
| 179 | if actions == None: |
| 180 | print " Actions: %s" % (actions) |
| 181 | else: |
| 182 | for a in actions: |
| 183 | actionType = a['actionType'] |
| 184 | if actionType == "ACTION_OUTPUT": |
Pavlin Radoslavov | 82200bc | 2013-03-12 13:49:20 -0700 | [diff] [blame] | 185 | port = a['actionOutput']['port']['value'] |
Pavlin Radoslavov | 2d59f58 | 2013-03-11 11:36:06 -0700 | [diff] [blame] | 186 | maxLen = a['actionOutput']['maxLen'] |
| 187 | print " actionType: %s port: %s maxLen: %s" % (actionType, port, maxLen) |
| 188 | if actionType == "ACTION_SET_VLAN_VID": |
| 189 | vlanId = a['actionSetVlanId']['vlanId'] |
| 190 | print " actionType: %s vlanId: %s" % (actionType, vlanId) |
| 191 | if actionType == "ACTION_SET_VLAN_PCP": |
| 192 | vlanPriority = a['actionSetVlanPriority']['vlanPriority'] |
| 193 | print " actionType: %s vlanPriority: %s" % (actionType, vlanPriority) |
| 194 | if actionType == "ACTION_STRIP_VLAN": |
| 195 | stripVlan = a['actionStripVlan']['stripVlan'] |
| 196 | print " actionType: %s stripVlan: %s" % (actionType, stripVlan) |
| 197 | if actionType == "ACTION_SET_DL_SRC": |
| 198 | setEthernetSrcAddr = a['actionSetEthernetSrcAddr']['addr']['value'] |
| 199 | print " actionType: %s setEthernetSrcAddr: %s" % (actionType, setEthernetSrcAddr) |
| 200 | if actionType == "ACTION_SET_DL_DST": |
| 201 | setEthernetDstAddr = a['actionSetEthernetDstAddr']['addr']['value'] |
| 202 | print " actionType: %s setEthernetDstAddr: %s" % (actionType, setEthernetDstAddr) |
| 203 | if actionType == "ACTION_SET_NW_SRC": |
| 204 | setIPv4SrcAddr = a['actionSetIPv4SrcAddr']['addr']['value'] |
| 205 | print " actionType: %s setIPv4SrcAddr: %s" % (actionType, setIPv4SrcAddr) |
| 206 | if actionType == "ACTION_SET_NW_DST": |
| 207 | setIPv4DstAddr = a['actionSetIPv4DstAddr']['addr']['value'] |
| 208 | print " actionType: %s setIPv4DstAddr: %s" % (actionType, setIPv4DstAddr) |
| 209 | if actionType == "ACTION_SET_NW_TOS": |
| 210 | setIpToS = a['actionSetIpToS']['ipToS'] |
| 211 | print " actionType: %s setIpToS: %s" % (actionType, setIpToS) |
| 212 | if actionType == "ACTION_SET_TP_SRC": |
| 213 | setTcpUdpSrcPort = a['actionSetTcpUdpSrcPort']['port'] |
| 214 | print " actionType: %s setTcpUdpSrcPort: %s" % (actionType, setTcpUdpSrcPort) |
| 215 | if actionType == "ACTION_SET_TP_DST": |
| 216 | setTcpUdpDstPort = a['actionSetTcpUdpDstPort']['port'] |
| 217 | print " actionType: %s setTcpUdpDstPort: %s" % (actionType, setTcpUdpDstPort) |
| 218 | if actionType == "ACTION_ENQUEUE": |
| 219 | port = a['actionEnqueue']['port']['value'] |
| 220 | queueId = a['actionEnqueue']['queueId'] |
| 221 | print " actionType: %s port: %s queueId: %s" % (actionType, port, queueId) |
Pavlin Radoslavov | ede9758 | 2013-03-08 18:57:28 -0800 | [diff] [blame] | 222 | |
Pavlin Radoslavov | f4ad989 | 2013-03-04 14:15:19 -0800 | [diff] [blame] | 223 | def get_flow_path(flow_id): |
| 224 | try: |
| 225 | command = "curl -s \"http://%s:%s/wm/flow/get/%s/json\"" % (ControllerIP, ControllerPort, flow_id) |
| 226 | debug("get_flow_path %s" % command) |
| 227 | |
| 228 | result = os.popen(command).read() |
| 229 | debug("result %s" % result) |
| 230 | if len(result) == 0: |
Pavlin Radoslavov | 8e0a00d | 2013-03-15 18:32:33 -0700 | [diff] [blame] | 231 | print "No Flow found" |
| 232 | return; |
Pavlin Radoslavov | f4ad989 | 2013-03-04 14:15:19 -0800 | [diff] [blame] | 233 | |
| 234 | parsedResult = json.loads(result) |
| 235 | debug("parsed %s" % parsedResult) |
| 236 | except: |
| 237 | log_error("Controller IF has issue") |
| 238 | exit(1) |
| 239 | |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 240 | print_flow_path(parsedResult) |
Pavlin Radoslavov | f4ad989 | 2013-03-04 14:15:19 -0800 | [diff] [blame] | 241 | |
Pavlin Radoslavov | f4ad989 | 2013-03-04 14:15:19 -0800 | [diff] [blame] | 242 | |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 243 | def get_installer_flow_paths(installer_id, v1, p1, v2, p2): |
| 244 | try: |
| 245 | command = "curl -s \"http://%s:%s/wm/flow/getall-by-installer-id/%s/%s/%s/%s/%s/json\"" % (ControllerIP, ControllerPort, installer_id, v1, p1, v2, p2) |
| 246 | debug("get_installer_flow_paths %s" % command) |
Pavlin Radoslavov | f4ad989 | 2013-03-04 14:15:19 -0800 | [diff] [blame] | 247 | |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 248 | result = os.popen(command).read() |
| 249 | debug("result %s" % result) |
| 250 | if len(result) == 0: |
| 251 | print "No Flows found" |
| 252 | return; |
| 253 | |
| 254 | parsedResult = json.loads(result) |
| 255 | debug("parsed %s" % parsedResult) |
| 256 | except: |
| 257 | log_error("Controller IF has issue") |
| 258 | exit(1) |
| 259 | |
| 260 | for flowPath in parsedResult: |
| 261 | print_flow_path(flowPath) |
| 262 | |
| 263 | |
| 264 | def get_endpoints_flow_paths(v1, p1, v2, p2): |
| 265 | try: |
| 266 | command = "curl -s \"http://%s:%s/wm/flow/getall-by-endpoints/%s/%s/%s/%s/json\"" % (ControllerIP, ControllerPort, v1, p1, v2, p2) |
| 267 | debug("get_endpoints_flow_paths %s" % command) |
| 268 | |
| 269 | result = os.popen(command).read() |
| 270 | debug("result %s" % result) |
| 271 | if len(result) == 0: |
| 272 | print "No Flows found" |
| 273 | return; |
| 274 | |
| 275 | parsedResult = json.loads(result) |
| 276 | debug("parsed %s" % parsedResult) |
| 277 | except: |
| 278 | log_error("Controller IF has issue") |
| 279 | exit(1) |
| 280 | |
| 281 | for flowPath in parsedResult: |
| 282 | print_flow_path(flowPath) |
| 283 | |
| 284 | |
| 285 | def get_all_flow_paths(): |
| 286 | try: |
| 287 | command = "curl -s \"http://%s:%s/wm/flow/getall/json\"" % (ControllerIP, ControllerPort) |
| 288 | debug("get_all_flow_paths %s" % command) |
| 289 | |
| 290 | result = os.popen(command).read() |
| 291 | debug("result %s" % result) |
| 292 | if len(result) == 0: |
| 293 | print "No Flows found" |
| 294 | return; |
| 295 | |
| 296 | parsedResult = json.loads(result) |
| 297 | debug("parsed %s" % parsedResult) |
| 298 | except: |
| 299 | log_error("Controller IF has issue") |
| 300 | exit(1) |
| 301 | |
| 302 | for flowPath in parsedResult: |
| 303 | print_flow_path(flowPath) |
Pavlin Radoslavov | f4ad989 | 2013-03-04 14:15:19 -0800 | [diff] [blame] | 304 | |
| 305 | if __name__ == "__main__": |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 306 | usage_msg1 = "Usage:\n" |
| 307 | usage_msg2 = "%s <flow_id> : Print flow with Flow ID of <flow_id>\n" % (sys.argv[0]) |
| 308 | usage_msg3 = " all : Print all flows\n" |
| 309 | usage_msg4 = " installer <installer-id> <src-dpid> <src-port> <dest-dpid> <dest-port>\n" |
| 310 | usage_msg5 = " endpoints <src-dpid> <src-port> <dest-dpid> <dest-port>" |
| 311 | usage_msg = usage_msg1 + usage_msg2 + usage_msg3 + usage_msg4 + usage_msg5; |
Pavlin Radoslavov | f4ad989 | 2013-03-04 14:15:19 -0800 | [diff] [blame] | 312 | |
| 313 | # app.debug = False; |
| 314 | |
| 315 | # Usage info |
| 316 | if len(sys.argv) > 1 and (sys.argv[1] == "-h" or sys.argv[1] == "--help"): |
| 317 | print(usage_msg) |
| 318 | exit(0) |
| 319 | |
| 320 | # Check arguments |
| 321 | if len(sys.argv) < 2: |
| 322 | log_error(usage_msg) |
| 323 | exit(1) |
| 324 | |
| 325 | # Do the work |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 326 | if sys.argv[1] == "all": |
| 327 | get_all_flow_paths() |
| 328 | elif sys.argv[1] == "installer": |
| 329 | if len(sys.argv) < 7: |
| 330 | log_error(usage_msg) |
| 331 | exit(1) |
| 332 | get_installer_flow_paths(sys.argv[2], sys.argv[3], sys.argv[4], |
| 333 | sys.argv[5], sys.argv[6]) |
| 334 | elif sys.argv[1] == "endpoints": |
| 335 | if len(sys.argv) < 6: |
| 336 | log_error(usage_msg) |
| 337 | exit(1) |
| 338 | get_endpoints_flow_paths(sys.argv[2], sys.argv[3], sys.argv[4], |
| 339 | sys.argv[5]) |
| 340 | else: |
| 341 | get_flow_path(sys.argv[1]) |