Esempio n. 1
0
testcase = 'Large File Read & Write across NFS Volumes(20GB)'
logging.info('----Start of testcase "%s"----\n', testcase)

if len(sys.argv) < 2:
    print "Arguments are not correct, Please provide as follows..."
    print "python nfsLargeFileReadWrite.py conf.txt  vdbench_file_to_run"
    logging.debug('----Ending script because of parameter mismatch----\n')
    exit()

VdbFile = 'filesystem_nfs'
#resultCollectionNew('\n"%s" testcase starts....' %testcase, ['', ''])
print('----Start of testcase "%s"----' % testcase)

config = configFile(sys.argv)
api_key = get_apikey(config)
stdurl = get_url(config, api_key[1])
tsmIP = config["ipVSM2"]
ClientIP = 'all'


#---------------------------METHODS-----------------------------------------------------
# to overwrite size for the given vdbench file....
def writingVDBfile(volume, vdbFile, vol_size):
    executeCmd('yes | cp -rf vdbench/templates/%s vdbench/%s' %
               (vdbFile, volume['name']))
    logging.info('copying vdbench/templates/%s file to vdbench as "%s"', \
                    vdbFile, volume['name'])
    output = getoutput('mount | grep %s | awk \'{print $3}\'' %
                       (volume['mountPoint']))
    old_str = 'mountDirectory'
    new_str = output[0].rstrip('\n')
Esempio n. 2
0
def is_blocked():
    endTime = ctime()
    get_logger_footer('snapshot on iSCSI test completed')
    resultCollection('Snapshot functionality on iSCSI LUN test case is',\
            ['BLOCKED', ''], startTime, endTime)
    exit()

if APIKEY[0] == 'FAILED':
    errormsg = str(APIKEY[1])
    logging.error('Snapshot functionality on iSCSI LUN test case blocked due '\
            'to: %s', errormsg)
    is_blocked()

APIKEY = APIKEY[1]
STDURL = get_url(conf, APIKEY)
logging.debug('DEVMAN_IP: %s', DEVMAN_IP)
logging.debug('USER: %s', USER)
logging.debug('PASSWORD: %s', PASSWORD)
logging.debug('VSM_IP: %s', VSM_IP)
logging.debug('APIKEY: %s', APIKEY)
logging.debug('STDURL: %s', STDURL)

def getTsmInfo(tsms):
    if tsms[0] == 'PASSED':
        tsm = tsms[1]
        return tsm[0]['name'], tsm[0]['id'], tsm[0]['datasetid'], \
                tsm[0]['controllerid']
    logging.error('Snapshot functionality on iSCSI LUN test case blocked '\
            'due to %s', tsms[1])
    is_blocked()