Ejemplo n.º 1
0
from tsmUtils import get_tsm_info, listTSMWithIP_new

logging.basicConfig(format='%(asctime)s %(message)s',\
    filename='logs/automation_execution.log',filemode='a',level=logging.DEBUG)

testcase = 'Verify NFS share mount/umount alerts(devd logs)'

logging.info('----Start of testcase "%s"----', testcase)

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

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

conf = configFile(sys.argv)
apikey = get_apikey(conf)
stdurl = get_url(conf, apikey[1])
tsmIP = conf['ipVSM2']

startTime = ctime()
logging.info('Listing Tsm for given TSMIP "%s" to get its ID', tsmIP)
tsmList = listTSMWithIP_new(stdurl, tsmIP)
if tsmList[0] == 'PASSED':
    logging.info('TSM present with the given IP "%s"', tsmIP)
    logging.info('Getting tsm_name, tsm_id, and dataset_id...')
    get_tsmInfo = get_tsm_info(tsmList[1])
    tsmID = get_tsmInfo[0]
Ejemplo n.º 2
0
    edit_qos_readonly, listVolumeWithTSMId_new, get_volume_info, \
    edit_vol_quota
from utils import assign_iniator_gp_to_LUN, discover_iscsi_lun,\
    iscsi_login_logout, get_logger_footer, execute_mkfs, logAndresult
from haUtils import change_node_state
from vdbenchUtils import executeVdbenchFile, is_vdbench_alive, kill_vdbench

logging.basicConfig(format = '%(asctime)s %(message)s',\
        filename = 'logs/automation_execution.log',\
        filemode = 'a', level = logging.DEBUG)

testcase = 'Edit lun attributes and save changes after HA failover and giveback'

logging.info('----Start of testcase "%s"----', testcase)

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

logging.info('----Start of testcase "%s"----', testcase)

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

config = configFile(sys.argv)
apikey = get_apikey(config)
stdurl = get_url(config, apikey[1])
tsm_ip = '%s' % (config['ipVSM2'])
passwd = '%s' % (config['password'])