#######################################################################################
#######################################################################################
#NIDD_VER: MNL17A_1702_001_00
#MNL: MNL_MNL17A_1702_001
#Migration from MNL17_1701_004 to MNL17A_1702_001
#24.02.2017 / R. Biedka
#######################################################################################

#######################################################################################
#######################################################################################
#genereal version check

for_objects "MRBTS/MNL"
	begin
		if not ( get_version $current_dist_name ) == "MNL17_1701_004"
			abort_file
	end



#######################################################################################
#parameters additions

for_objects "MRBTS/MNL/MNLENT/MPLANENW"
	begin
		if ( not param_exist $current_dist_name "mPlaneDscp" ) add_param $current_dist_name "mPlaneDscp" "34"
	end

for_objects "MRBTS/MNL"
	begin
		add_param $current_dist_name "productVariantPlanned" "sBTS"
	end
	
for_objects "MRBTS/WNBTS/WNCEL"
	begin 
	if ( param_exist $current_dist_name "intShutdownTimeout" ) define "intShutdownTimeoutValue" get_param $current_dist_name "intShutdownTimeout" 
	else define "intShutdownTimeoutValue" "noValue"
	define "wncelDN" get_param $current_dist_name "lCelwDN"
	if ( "noValue" != intShutdownTimeoutValue )
	begin 
		for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELW"
			begin
				if ( $current_dist_name == wncelDN ) add_param $current_dist_name "intShutdownTimeout" intShutdownTimeoutValue
			end
		end
	end
#######################################################################################
#parameters update

for_objects "MNL/MNLENT/FMCADM"
	begin
		# If MNL-productVariantPlanned is “sBTS”, actCategoryAlarms must be set to “true”.
		add_param $current_dist_name "actCategoryAlarms" "true"
	end
	
#######################################################################################
#parameters removal
for_objects "MNL/MNLENT/TEST/SFPREQ"
begin
	if ( param_exist $current_dist_name "sfpTestResults" ) del_param $current_dist_name "sfpTestResults"
	if ( param_exist $current_dist_name "rxPower" ) del_param $current_dist_name "rxPower"
	if ( param_exist $current_dist_name "serialNumber" ) del_param $current_dist_name "serialNumber"
	if ( param_exist $current_dist_name "sfpPairId" ) del_param $current_dist_name "sfpPairId"
	if ( param_exist $current_dist_name "targetSfp" ) del_param $current_dist_name "targetSfp"
	if ( param_exist $current_dist_name "testStatus" ) del_param $current_dist_name "testStatus"
	if ( param_exist $current_dist_name "txBiasCurrent" ) del_param $current_dist_name "txBiasCurrent"
	if ( param_exist $current_dist_name "txPower" ) del_param $current_dist_name "txPower"
	if ( param_exist $current_dist_name "txSupplyVoltage" ) del_param $current_dist_name "txSupplyVoltage"
end

for_objects "MNL/MNLENT/TEST/SFPREQ/SFPRES"
begin
	if ( param_exist $current_dist_name "rxPower" ) del_param $current_dist_name "rxPower"
	if ( param_exist $current_dist_name "serialNumber" ) del_param $current_dist_name "serialNumber"
	if ( param_exist $current_dist_name "sfpPairId" ) del_param $current_dist_name "sfpPairId"
	if ( param_exist $current_dist_name "targetSfp" ) del_param $current_dist_name "targetSfp"
	if ( param_exist $current_dist_name "testStatus" ) del_param $current_dist_name "testStatus"
	if ( param_exist $current_dist_name "txBiasCurrent" ) del_param $current_dist_name "txBiasCurrent"
	if ( param_exist $current_dist_name "txPower" ) del_param $current_dist_name "txPower"
	if ( param_exist $current_dist_name "txSupplyVoltage" ) del_param $current_dist_name "txSupplyVoltage"
end


for_objects "MRBTS/WNBTS/WNCEL"
begin
	if ( param_exist $current_dist_name "intShutdownTimeout" ) del_param $current_dist_name "intShutdownTimeout"
end





#######################################################################################

#Set proper versions and adaptations to MNL subtree

for_objects "MRBTS/MNL"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/AMGR"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/AMGR/LUAC"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/BBADM"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CAPADM"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CAPADM/CAPLIM"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CERTH"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CERTH/CMP"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CERTH/CRLH"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CERTH/CRLH/CRLDPCONFIG"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/DNS"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/FEATCADM"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/MPLANENW"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/PMCADM"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/PMMNL"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SECADM"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK/CLOCK_FDD"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK/GNSSE"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK/NTP"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK/PDH"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK/SYNCE"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK/TOP"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK/TOP/TOPF"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	

for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK/TOP/TOPP"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC/TIME"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	

for_objects "MRBTS/MNL/MNLENT/TAC"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end		
	
for_objects "MRBTS/MNL/MNLENT/TAC/LTAC"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/TRBLCADM"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELC"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELC/CHANNELGROUP"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELC/CHANNELGROUP/CHANNEL"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELW"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELW/CHANNELGROUP"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELW/CHANNELGROUP/CHANNEL"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	

for_objects "MRBTS/MNL/MNLENT/FMCADM"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELL"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
for_objects "MRBTS/MNL/NOTES"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	

for_objects "MRBTS/MNL/NOTES/NOTE"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNL_R"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end

for_objects "MRBTS/MNL/CMD"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end

for_objects "MRBTS/MNL/MNLENT/TRBLCADM/TRBLCADM_R"
	begin
		set_version $current_dist_name "MNL17A_1702_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
#######################################################################################