Generates temp file or directory on remote host.
def test_fun(duthosts, rand_one_dut_hostname):
duthost = duthosts[rand_one_dut_hostname]
parsed_com = duthost.tempfile(path="/home/admin/tmp", prefix="ans_")
path
- path for desired temp file or directory. If not specified, uses system default (probably/tmp/
)- Required:
False
- Type:
String
- Required:
prefix
- Prefix to file/directory name created- Required:
False
- Type:
String
- Default:
ansible.
- Required:
state
- Whether a file or directory should be created- Required:
False
- Type:
String
- Default:
file
- Choices:
file
directory
- Required:
suffix
- Suffix to file/directory name created- Required:
False
- Type:
String
- Default:
""
- Required:
Dictionary that just has the path to the temp file on the remote host.
path
- path to created temp file or directory