Exemplo n.º 1
0
    logging.debug('mount/umount 100 NFS volumes test case is')
    is_blocked(startTime, FOOTER_MSG, BLOCKED_MSG)
else:
    pools = pool_result[1]

pool_info = get_pool_info(pools, pool_name)
if pool_info[0] == 'FAILED':
    print 'Not able to get pool ID...'
    logging.error('Not able to get pool ID, Error: %s', pool_info[1])
    is_blocked(startTime, FOOTER_MSG, BLOCKED_MSG)
pool_id = pool_info[1]
print pool_id
#------------------------------------------------------------------------------

###---getiing account id-------------------------------------------------------
account_id = get_account_id(STDURL, account_name)
if account_id[0] == 'PASSED':
    account_id = account_id[1]
else:
    print 'Not able to get account id...'
    logging.error('mount/umount 100 NFS volumes test case is blocked, '\
            'Error: %s', account_id[1])
    is_blocked(startTime, FOOTER_MSG, BLOCKED_MSG)
print account_id
#------------------------------------------------------------------------------

###creating 5 TSM--------------------------------------------------------------
for x in range(1, 6):
    tsm_dict = {'name': 'T200%s' %(x), 'accountid': account_id, 'poolid': \
            pool_id, 'totaliops': '2000', 'quotasize': '1T', 'tntinterface': \
            str(TSM_interface[x-1]), 'dnsserver': str(TSM_dnsserver[x-1]), \
Exemplo n.º 2
0
# Get the pool_info for the desired from the list obtained above

#pool_info = get_pool_info(pool_list, POOL_NAME)
pool_info = get_pool_info(pool_list, None)
if pool_info[0] == 'FAILED':
    logging.error('Testcase %s is blocked due to' \
           ' : %s', tcName, pool_info[1])

# Extract the pool_id from the info obtained for said pool above

pool_id = pool_info[
    1]  # Note that in get_pool_info return value, pool_info[1] itself is ID

# Get account ID for VSM creation

account_id = get_account_id(
    STDURL, None)  # 2nd param is acc_name, if None, taken as 1st acc
if account_id[0] == 'FAILED':
    logging.error('Testcase %s is blocked due to' \
           ': %s',tcName, account_id[1])
    is_blocked(startTime, FOOTER_MSG, BLOCKED_MSG)
account_id = account_id[1]

# Provide variables for VSM creation (from conf & hardcode) in dict format

vsm_dict = {'name': VSM_NAME, 'accountid': account_id, 'poolid': \
        pool_id, 'totaliops': POOL_IOPS, 'quotasize': '1T', 'tntinterface': \
        VSM_INTERFACE, 'dnsserver': VSM_DNS, \
        'ipaddress': VSM_IP, 'totalthroughput': 4*int(POOL_IOPS)}

# Create VSM using the pool_id and the params received from conf file