[ { "id": "f82cc0e9da781f57", "type": "tab", "label": "Flow 2", "disabled": false, "info": "", "env": [] }, { "id": "778ef71e8a76cbd9", "type": "group", "z": "f82cc0e9da781f57", "name": "Modular Command API", "style": { "fill": "#b797cf", "label": true, "color": "#000000" }, "nodes": [ "1012ab2626dbcdce", "3d8e15c2696dbccf", "5099135fbeb42799", "a04226f2fdad804d", "40831d99cdfe3673", "bf549a4352aa96a2", "c0d66e1938ed6439", "4d29b49959a930d8", "67beae28c94117b6", "698624156927987c", "8eadd89e88b35559", "f9d77d17c3b87f15", "aa749796b73fad39", "4f1dac5f1a394cfd", "a8a50d2c73b7b3c0", "873f47d367872df2", "cdcc4ceae2e1e953" ], "x": 34, "y": 59, "w": 1212, "h": 302 }, { "id": "3d4742b5f7f47edd", "type": "group", "z": "f82cc0e9da781f57", "name": "Test a command", "style": { "label": true, "color": "#000000", "fill": "#7fb7df" }, "nodes": [ "d33717b206f224e9", "0c279128f9a3bb2b", "b99d8c988181a8da", "290a818e9a5e883e", "aecaf6b2431fc4b4" ], "x": 34, "y": 399, "w": 852, "h": 162 }, { "id": "1012ab2626dbcdce", "type": "http request", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "Get Token", "method": "POST", "ret": "obj", "paytoqs": "body", "url": "https://{{ip}}/identity-manager/api/v1/auth/token", "tls": "81d1fdeb6246a4e3", "persist": false, "proxy": "", "authType": "", "senderr": false, "x": 870, "y": 220, "wires": [ [ "3d8e15c2696dbccf", "4d29b49959a930d8" ] ] }, { "id": "3d8e15c2696dbccf", "type": "link out", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "", "mode": "return", "links": [], "x": 1160, "y": 220, "wires": [], "l": true }, { "id": "5099135fbeb42799", "type": "change", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "name \\n pass", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "{}", "tot": "json" }, { "t": "set", "p": "payload.name", "pt": "msg", "to": "boshrexroth", "tot": "str" }, { "t": "set", "p": "payload.password", "pt": "msg", "to": "boshrexroth", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 510, "y": 220, "wires": [ [ "aa749796b73fad39" ] ] }, { "id": "a04226f2fdad804d", "type": "link in", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "Get Token", "links": [], "x": 320, "y": 220, "wires": [ [ "5099135fbeb42799" ] ], "l": true }, { "id": "40831d99cdfe3673", "type": "link in", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "command", "links": [], "x": 320, "y": 320, "wires": [ [ "c0d66e1938ed6439" ] ], "l": true }, { "id": "bf549a4352aa96a2", "type": "link out", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "", "mode": "return", "links": [], "x": 1160, "y": 320, "wires": [], "l": true }, { "id": "c0d66e1938ed6439", "type": "template", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "headers : Bearer", "field": "headers", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", "template": "{\n \"Authorization\": \"Bearer {{{flow.auth}}}\"\n}", "output": "json", "x": 550, "y": 320, "wires": [ [ "f9d77d17c3b87f15" ] ] }, { "id": "4d29b49959a930d8", "type": "change", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "Store token in flow.auth", "rules": [ { "t": "set", "p": "auth", "pt": "flow", "to": "payload.access_token", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1110, "y": 160, "wires": [ [] ] }, { "id": "67beae28c94117b6", "type": "change", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "ip", "rules": [ { "t": "set", "p": "ip", "pt": "msg", "to": "localhost", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 510, "y": 100, "wires": [ [ "8eadd89e88b35559" ] ] }, { "id": "698624156927987c", "type": "link in", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "Ip", "links": [], "x": 310, "y": 100, "wires": [ [ "67beae28c94117b6" ] ], "l": true }, { "id": "8eadd89e88b35559", "type": "link out", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "", "mode": "return", "links": [], "x": 1160, "y": 100, "wires": [], "l": true }, { "id": "f9d77d17c3b87f15", "type": "link call", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "ip", "links": [ "698624156927987c" ], "timeout": "30", "x": 710, "y": 320, "wires": [ [ "873f47d367872df2" ] ] }, { "id": "aa749796b73fad39", "type": "link call", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "ip", "links": [ "698624156927987c" ], "timeout": "30", "x": 710, "y": 220, "wires": [ [ "1012ab2626dbcdce" ] ] }, { "id": "4f1dac5f1a394cfd", "type": "comment", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "Set IP of the device", "info": "", "x": 150, "y": 100, "wires": [] }, { "id": "a8a50d2c73b7b3c0", "type": "comment", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "Get the Token", "info": "", "x": 130, "y": 220, "wires": [] }, { "id": "873f47d367872df2", "type": "http request", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "https://{{ip}}/{{command}}", "method": "GET", "ret": "obj", "paytoqs": "ignore", "url": "https://{{ip}}/{{command}}", "tls": "81d1fdeb6246a4e3", "persist": false, "proxy": "", "authType": "", "senderr": false, "credentials": {}, "x": 910, "y": 320, "wires": [ [ "bf549a4352aa96a2" ] ] }, { "id": "cdcc4ceae2e1e953", "type": "comment", "z": "f82cc0e9da781f57", "g": "778ef71e8a76cbd9", "name": "Main command", "info": "", "x": 140, "y": 320, "wires": [] }, { "id": "d33717b206f224e9", "type": "link call", "z": "f82cc0e9da781f57", "g": "3d4742b5f7f47edd", "name": "", "links": [ "a04226f2fdad804d" ], "timeout": "30", "x": 790, "y": 520, "wires": [ [] ] }, { "id": "0c279128f9a3bb2b", "type": "debug", "z": "f82cc0e9da781f57", "g": "3d4742b5f7f47edd", "name": "debug 75", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 780, "y": 440, "wires": [] }, { "id": "b99d8c988181a8da", "type": "inject", "z": "f82cc0e9da781f57", "g": "3d4742b5f7f47edd", "name": "network-manager/api/v1/interfaces", "props": [ { "p": "command", "v": "network-manager/api/v1/interfaces", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 220, "y": 480, "wires": [ [ "aecaf6b2431fc4b4" ] ] }, { "id": "290a818e9a5e883e", "type": "switch", "z": "f82cc0e9da781f57", "g": "3d4742b5f7f47edd", "name": "Error ?", "property": "statusCode", "propertyType": "msg", "rules": [ { "t": "eq", "v": "200", "vt": "num" }, { "t": "else" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 630, "y": 480, "wires": [ [ "0c279128f9a3bb2b" ], [ "d33717b206f224e9" ] ] }, { "id": "aecaf6b2431fc4b4", "type": "link call", "z": "f82cc0e9da781f57", "g": "3d4742b5f7f47edd", "name": "", "links": [ "40831d99cdfe3673" ], "timeout": "30", "x": 440, "y": 480, "wires": [ [ "290a818e9a5e883e" ] ] }, { "id": "81d1fdeb6246a4e3", "type": "tls-config", "name": "", "cert": "", "key": "", "ca": "", "certname": "", "keyname": "", "caname": "", "servername": "", "verifyservercert": false, "alpnprotocol": "" } ]