Here are some sample SSH workflows.

SSH Workflow

{
  "id":"ssh_workflow",
  "name": "SSH Workflow",
  "description":"SSH Workflow",
  "version":"1.0",
  "startStep":"step0",
  "variables": [
    {"name":"vnfId", "type": "string"}
  ],
  "input": [
    {"name": "USER", "description": "Username", "type": "string"},
    {"name": "PWD", "description": "Password", "type": "password"},
    {"name": "HOSTNAME", "description": "Hostname", "type": "string"},
    {"name": "CMD", "description": "Command", "type": "string"}
  ],
  "output": [
    {"name":"output", "description": "Output Result", "type": "string"}
  ],
  "steps":[
    {
      "stepId":"step0",
      "workflow":"RUN_SSH_COMMAND_IN_GUEST",
      "namespace": "nfv",
      "type":"task",
      "description": "SSH Command",
      "inBinding":[
       {"name": "username", "type": "string", "exportName": "USER"}
      ,{"name": "password", "type": "password", "exportName": "PWD"}
      ,{"name": "port", "type": "number", "default": "22"}
      ,{"name": "cmd", "type": "string", "exportName": "CMD"}
      ,{"name": "encoding", "type": "string", "default": " "}
      ,{"name": "hostNameOrIP", "type": "string", "exportName": "HOSTNAME"}
      ,{"name": "passwordAuthentication", "type": "boolean", "default": "true"}
      ],
      "outBinding": [
        {"name": "result", "type": "string", "exportName": "output"}
      ],
      "nextStep":"END"
    }
  ]
}

SSH Workflow with Sleep

{
  "id":"ssh_workflow_with_sleep",
  "name": "SSH Workflow with Sleep",
  "description":"SSH Workflow with 60 seconds sleep in step 0",
  "version":"1.0",
  "startStep":"step0",
  "variables": [
    {"name":"vnfId", "type": "string"}
  ],
  "input": [
    {"name": "USER", "description": "Username", "type": "string"},
    {"name": "PWD", "description": "Password", "type": "password"},
    {"name": "HOSTNAME", "description": "Hostname", "type": "string"},
    {"name": "CMD", "description": "Command", "type": "string"}
  ],
  "output": [
    {"name":"output", "description": "Output Result", "type": "string"}
  ],
  "steps":[
    {
      "stepId":"step0",
      "workflow":"RUN_SSH_COMMAND_IN_GUEST",
      "namespace": "nfv",
      "type":"task",
      "description": "Step with 60 sec Sleep",
      "inBinding":[
        { "name": "initialDelay", "type": "number", "default": "60" },
        {"name": "username", "type": "string", "exportName": "USER"},
        {"name": "password", "type": "password", "exportName": "PWD"},
        {"name": "port", "type": "number", "default": "22"},
        {"name": "cmd", "type": "string", "exportName": "CMD"},
        {"name": "encoding", "type": "string", "default": " "},
        {"name": "hostNameOrIP", "type": "string", "exportName": "HOSTNAME"},
        {"name": "passwordAuthentication", "type": "boolean", "default": "true"}
      ],
      "outBinding": [
        {"name": "result", "type": "string", "exportName": "output"}
      ],
      "nextStep":"END"
    }
  ]
}

Parameterized SSH Workflow

{
  "id":"parameterized_ssh_workflow",
  "name": "Parameterized SSH Workflow",
  "description":"Parameterized SSH Workflow",
  "version":"1.0",
  "startStep":"step0",
  "variables": [
    {"name":"vnfId", "type": "string"}
  ],
  "input": [
    {"name": "USER", "description": "Username", "type": "string"},
    {"name": "PWD", "description": "Password", "type": "password"},
    {"name": "HOSTNAME", "description": "Hostname", "type": "string"},
    {"name": "SCRIPT_ARGUMENT", "description": "Script Argument", "type": "string"}
  ],
  "output": [
    {"name":"output", "description": "Output Result", "type": "string"}
  ],
  "steps":[
    {
      "stepId":"step0",
      "workflow":"RUN_SSH_COMMAND_IN_GUEST",
      "namespace": "nfv",
      "type":"task",
      "description": "Parameterized SSH Command",
      "inBinding":[
       {"name": "username", "type": "string", "exportName": "USER"}
      ,{"name": "password", "type": "password", "exportName": "PWD"}
      ,{"name": "port", "type": "number", "default": "22"}
      ,{"name": "cmd", "type": "string", "default": "/opt/script1.sh {{SCRIPT_ARGUMENT}}"}
      ,{"name": "encoding", "type": "string", "default": " "}
      ,{"name": "hostNameOrIP", "type": "string", "exportName": "HOSTNAME"}
      ,{"name": "passwordAuthentication", "type": "boolean", "default": "true"}
      ],
      "outBinding": [
        {"name": "result", "type": "string", "exportName": "output"}
      ],
      "nextStep":"END"
    }
  ]
}