Here are some sample File workflows.
Copy File Packaged Within Catalog to Guest
{ "id":"copy-file-to-guest", "name": "Copy File Packaged Within Catalog to Guest", "description":"Copy a File bundled within the CSAR under Artifacts/scripts to a remote machine", "version":"1.0", "startStep":"item0", "variables": [ {"name":"vnfId", "type": "string"} ], "input": [ {"name": "USERNAME", "description": "Username", "type": "string"} ,{"name": "PASSWORD", "description": "Password", "type": "password"} ,{"name": "IP", "description": "IP Address of the Guest", "type": "string"} ], "output": [ {"name": "copyResult", "type": "string"} ,{"name": "createResult", "type": "string"} ], "steps":[ { "stepId":"item0", "workflow":"COPY_FILE_TO_GUEST", "namespace": "nfv", "type":"task", "description": "Copy file", "inBinding":[ {"name": "username", "type": "string", "exportName": "USERNAME"} ,{"name": "password", "type": "password", "exportName": "PASSWORD"} ,{"name": "ip", "type": "string", "exportName": "IP"} ,{"name": "inFile", "type": "file", "default": [{"name": "file.txt"}]} ,{"name": "workingDirectory", "type": "string", "default": "/tmp"} ], "outBinding": [ {"name": "result", "type": "string", "exportName": "copyResult"} ], "nextStep": "END" } ] }
Copy User Provided File to Host
{ "id":"copy-file-to-guest-user-input", "name": "Copy user provided file to host", "description":"Copy user provided file to host", "version":"1.0", "startStep":"item0", "variables": [ {"name":"vnfId", "type": "string"} ], "input": [ {"name": "USERNAME", "description": "K8s master username", "type": "string"} ,{"name": "FILENAME", "description": "Filename", "type": "file"} ,{"name": "PASSWORD", "description": "K8s master password", "type": "password"} ,{"name": "IP", "description": "K8s master ip address", "type": "string"} ], "output": [ {"name": "copyResult", "type": "string"} ], "steps":[ { "stepId":"item0", "workflow":"COPY_FILE_TO_GUEST", "namespace": "nfv", "type":"task", "description": "Copy file", "inBinding":[ {"name": "username", "type": "string", "exportName": "USERNAME"} ,{"name": "password", "type": "password", "exportName": "PASSWORD"} ,{"name": "ip", "type": "string", "exportName": "IP"} ,{"name": "inFile", "type": "file", "exportName": "FILENAME"} ,{"name": "workingDirectory", "type": "string", "default": "/tmp"} ], "outBinding": [ {"name": "result", "type": "string", "exportName": "copyResult"} ], "nextStep": "END" } ] }