# IMPORTANT: not to be included in ADMIN build !
# only applicable when migration runs on BTS

for_objects "MRBTS/BTSSCW"
	if ( param_exist $current_dist_name "btsConfiguration" )
		begin
			define "btsConfiguration" get_param $current_dist_name "btsConfiguration"
			define "btsConfiguration" btsConfiguration JOIN "A"
			define "btsConfiguration" replace btsConfiguration "\D+" "" flags "g"
		
			if ( btsConfiguration >= 0 ) && ( btsConfiguration <= 1048575 )
				begin
					define "abort" "false"
					add_param $current_dist_name "btsConfiguration" btsConfiguration
				end
			else
				abort reason "invalid new MRBTS/mrbtsId configured in MRBTS/BTSSCW/btsConfiguration"
		end
	else
		abort reason "new MRBTS/mrbtsId not configured in MRBTS/BTSSCW/btsConfiguration"

for_objects "FTM/IPNO/IDNS"
	if ( param_exist $current_dist_name "serverIpAddress2" )
		if ( replace get_param $current_dist_name "serverIpAddress2" "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" "" flags "g" ) == ""
			define "abort" "false"
		else
			abort reason "invalid MNL/MNLENT/MPLANENW/oamPeerIpAddress configured in FTM/IPNO/IDNS/serverIpAddress2"
	else
		abort reason "MNL/MNLENT/MPLANENW/oamPeerIpAddress not configured in FTM/IPNO/IDNS/serverIpAddress2"
