Esempio n. 1
0
                                      CLIENT1_PASSWORD, dest_check_mount_cmd)
check_mount_result = check_mount_result.strip('\n')

if CLIENT_NFS_MOUNT_PNT_2 == check_mount_result:
    print "Destination Volume is mounted successfully"
else:
    print "Destination Volume is not mounted successfully"
    logging.error('Testcase %s is blocked due to' \
            ': %s', tcName,mount_result)
    is_blocked(startTime, FOOTER_MSG, BLOCKED_MSG)

# Transfer the shell script that will run the workload

src_file = 'AMSx-WLAx-NSWx-NFSx-xxxx-AUX1_BACKUP_FILE_OPS.py'
dst_file = src_file
file_transfer_result = putFileToController(CLIENT1_IP, CLIENT1_PASSWORD,
                                           src_file, dst_file)

# Form the command that will run the workload on the NFS mount point

run_workload_cmd = 'python %s %s %s' % (src_file, CLIENT_NFS_MOUNT_PNT_1,
                                        CLIENT_NFS_MOUNT_PNT_2)

# Note the time when the workload starts

startTime = ctime()

# Run the File Create Read ModifyWrite Delete Ops on the NFS mount point for 5 iterations

sshToOtherClient(CLIENT1_IP, CLIENT1_USER, CLIENT1_PASSWORD, run_workload_cmd)

# Note the time when the workload execution has completed
Esempio n. 2
0
import json
import sys
from time import ctime
from cbrequest import configFile, resultCollection, executeCmd, getControllerInfo, createSFTPConnection, putFileToController

config = configFile(sys.argv)
IP = "ESXIP"
passwd = "ESXPASSWORD"
for x in range(1, int(config['Number_of_VMs']) + 1):
    executeCmd('> temp/createrdm.sh')
    executeCmd('cat sample/createrdm.sh >> temp/createrdm.sh')
    vmname = "%s" % (config['vmName%d' % (x)])
    datastore = "%s" % (config['datastoreName%d' % (x)])
    vmpassword = "******" % (config['vmPassword%d' % (x)])
    executeCmd('sed -i s/VMNAME/%s/g temp/createrdm.sh' % vmname)
    executeCmd('sed -i s/DATASTORE/%s/g temp/createrdm.sh' % datastore)
    executeCmd('sed -i s/VMLFILE/vmlfile%d/g temp/createrdm.sh' % (x))
    output = putFileToController(
        IP, passwd, "temp/createrdm.sh",
        "/vmfs/volumes/%s/%s/createrdm.sh" % (datastore, vmname))
    print output
    cmd = getControllerInfo(
        IP, passwd, "cp /autofolder/vmlfile%d /vmfs/volumes/%s/%s/vmlfile%d" %
        (x, datastore, vmname, x), "vmlfile.txt")
    print cmd
    cmd = getControllerInfo(
        IP, passwd,
        "sh -x /vmfs/volumes/%s/%s/createrdm.sh" % (datastore, vmname),
        "rdmfile.txt")
    print cmd
Esempio n. 3
0
import json
import sys
import time
from time import ctime
from cbrequest import configFile, executeCmd, resultCollection, getoutput, getControllerInfo, createSFTPConnection, putFileToController

IP = "ESXIP"
passwd = "ESXPASSWORD"

cmd = getControllerInfo(IP, passwd, "mkdir autofolder", "autofolder.txt")
print cmd
output = putFileToController(IP, passwd, "temp/createvml.sh",
                             "/autofolder/createvml.sh")
print output
output = putFileToController(IP, passwd, "tsmlist", "/autofolder/tsmlist")
print output
cmd = getControllerInfo(IP, passwd, "sh -x /autofolder/createvml.sh",
                        "esx.txt")
print cmd
Esempio n. 4
0
    print "Volume is not mounted successfully"
    logging.error('Testcase %s is blocked due to' \
            ': %s', tcName, mount_result)
    is_blocked(startTime, FOOTER_MSG, BLOCKED_MSG)

# Transfer the shell script that will run the workload

src_file_1 = 'AMSx-WLAx-NSWx-NFSx-xxxx-AUX1_SMALL_FILE_OPS.py'
src_file_2 = 'AMSx-WLAx-NSWx-NFSx-xxxx-AUX2_SMALL_FILE_OPS.py'
src_file_3 = 'AMSx-WLAx-NSWx-NFSx-xxxx-AUX3_SMALL_FILE_OPS.py'

dst_file_1 = src_file_1
dst_file_2 = src_file_2
dst_file_3 = src_file_3

file_transfer_result_1 = putFileToController(CLIENT1_IP, CLIENT1_PASSWORD,
                                             src_file_1, dst_file_1)
file_transfer_result_2 = putFileToController(CLIENT1_IP, CLIENT1_PASSWORD,
                                             src_file_2, dst_file_2)
file_transfer_result_3 = putFileToController(CLIENT1_IP, CLIENT1_PASSWORD,
                                             src_file_3, dst_file_3)

# Form the command that will run the workload on the NFS mount point

run_workload_cmd_1 = 'nohup python %s %s' % (src_file_1, CLIENT_NFS_MOUNT_PNT)
run_workload_cmd_2 = 'nohup python %s %s' % (src_file_2, CLIENT_NFS_MOUNT_PNT)
run_workload_cmd_3 = 'nohup python %s %s' % (src_file_3, CLIENT_NFS_MOUNT_PNT)

# Note the time when the workload starts

startTime = ctime()