if procedure in ['Q_BOL_PTC', 'Q_CFER_ARO', 'Q_LAV_MEN', 'Q_MAG_VIS', 'Q_MOR_GIU', 'Q_RMUL_COM', 'Q_ROV_CVM2', 'Q_SBIB_PON', 'Q_TICTO_CHIR', 'Q_TRA_ARB_FFS1', 'Q_VED_ISO', 'Q_VVED_AGN', 'P_PON', 'Q_BON_QUA', 'Q_CUC_POR', 'Q_LAV_RSV', 'Q_MAR_MAR', 'Q_MUZ_MUZ', 'Q_RMUL_MAR', 'Q_ROV_CVM3', 'Q_SCA_LUG', 'Q_TRA_ARB', 'Q_TRA_ARB_FFS2', 'Q_VED_MUZ', 'V_TEST', 'Q_AETCAN_AIR', 'Q_CAL_AIR', 'Q_GNO_GNO', 'Q_MAG_LOD', 'Q_MAR_MAR2', 'Q_RMUL_ARB', 'Q_ROV_CVM1', 'Q_SAL_MAG', 'Q_TIC_BED', 'Q_TRA_ARB_FFS', 'Q_TRA_ARB_FFS3', 'Q_VER_BGU']: continue begin = isodate.parse_datetime(line.replace("\"","").split(",")[0]) end = isodate.parse_datetime(line.replace("\"","").split(",")[0]) # Creating temporary directory where CSV files will be stored dirpath = tempfile.mkdtemp() try: istsos2csv.execute({ 'begin': begin.isoformat(), 'end': end.isoformat(), 'procedure': procedure, 'op': op, 'url': '%s/%s' % (url1, srv1), 'd': dirpath }) csv2istsos.execute({ 'u': url2, 's': srv2, 'wd': dirpath, 'p': [procedure], 'v': True }) except Exception as e: print "*****************************************************************" print str(e)
if begin < samp1[0]: begin = samp1[0]""" begin = samp1[0] end = samp1[1] # Comment this if you want a full migration begin = isodate.parse_datetime('2015-04-29T07:30:00+00:00') end = isodate.parse_datetime('2015-04-29T08:10:00+00:00') istsos2csv.execute({ 'begin': begin.isoformat(), 'end': end.isoformat(), 'procedure': procedure, 'op': op, 'url': '%s/%s' % (url1, srv1), 'd': dirpath, 'user': auth[0], 'password': auth[1], 'noqi': True }) csv2istsos.execute({ 'u': url2, 's': srv2, 'wd': dirpath, 'p': [procedure], 'v': True, 'user': auth[0], 'password': auth[1], 'noqi': True