#######################################################################################
#######################################################################################
#NIDD_VER: MNL18_1710_001_00
# MNL: MNL18_1710_001
# Migration from MNL17A_1708_008 to MNL18_1710_001
# 16.10.2017 Sebastian Kulikowski
#######################################################################################

#######################################################################################
#######################################################################################
# general version check

for_objects "MRBTS/MNL"
	begin
	    define "majorVersion" replace ( get_version $current_dist_name )  "_.*$" "" flags "g"
		if not ( majorVersion == "MNL17A" )
			abort_file
	end

#######################################################################################
#######################################################################################
# update

for_objects "MRBTS/MNL/MNLENT/FEATCADM"
    begin
        define "featLadmDn" $current_dist_name JOIN "/FEATLADM-1"
        if ( objects_count featLadmDn ) == 0
            begin
                add_object featLadmDn
                set_operation featLadmDn "create"
                add_param featLadmDn "actDynamicFirewallForS1X2" "false"
            end

        if ( not param_exist $current_dist_name "actCli" ) add_param $current_dist_name "actCli" "false"
    end

for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK/NTP"
    begin
        define "ntpDn" $current_dist_name
        define "syncDn" "MRBTS-" JOIN $current_MRBTS JOIN "/MNL-" JOIN $current_MNL JOIN "/MNLENT-" JOIN $current_MNLENT JOIN "/SYNC-" JOIN $current_SYNC
        if ( param_exist syncDn "btsSyncMode" )                                                                                                                                                          
        begin
            define "btsSyncMode" get_param syncDn "btsSyncMode"
            if ( btsSyncMode ) == "LoosePhaseAndTimeSync" && ( param_exist ntpDn "ntpServerIpAddrList" )
                begin
                    add_param ntpDn "maxNtpTimeError" "100"
                end 
        end     
    end
for_objects "MRBTS/MNL/MNLENT/PMMNL"
    begin
        if ( not param_exist $current_dist_name "mtBTSEnergyMonitoring" )
            begin
				add_param $current_dist_name "mtBTSEnergyMonitoring" "15min"
			end
        if ( not param_exist $current_dist_name "ipDataTrafficVolumeInterval" )
            begin
				add_param $current_dist_name "ipDataTrafficVolumeInterval" "15min"
			end
			
		if not ( param_exist $current_dist_name "s1X2TacStatisticsInterval" ) add_param $current_dist_name "s1X2TacStatisticsInterval" "15min"
		if not ( param_exist $current_dist_name "topFreqSyncStatisticsInterval" ) add_param $current_dist_name "topFreqSyncStatisticsInterval" "15min"
		if not ( param_exist $current_dist_name "topPhaseSyncStatisticsInterval" ) add_param $current_dist_name "topPhaseSyncStatisticsInterval" "15min"
	end		
#######################################################################################
#######################################################################################
# general version check

# Set proper versions and adaptations to MNL sub-tree

for_objects "MRBTS/MNL"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/AMGR"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/AMGR/LUAC"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/AMGR/LUAC/LUAC_R"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/CERTH"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/CERTH/CMP"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/CERTH/CRLH"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/CERTH/CRLH/CRLDPCONFIG"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/BBADM"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CAPADM"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CAPADM/CAPLIM"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CERTHENT"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CERTHENT/CACERT_R"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CERTHENT/CMP_R"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CERTHENT/CRLH_R"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CERTHENT/CRLINFO_R"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/CERTHENT/NECERT_R"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/DNS"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/FEATCADM"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end

for_objects "MRBTS/MNL/MNLENT/FEATCADM/FEATGADM"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end

for_objects "MRBTS/MNL/MNLENT/FEATCADM/FEATLADM"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end

for_objects "MRBTS/MNL/MNLENT/MPLANENW"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/PMCADM"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/PMMNL"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SECADM"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SECADM/SECADM_R"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
	
for_objects "MRBTS/MNL/MNLENT/SYNC"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC/CLOCK"
	begin
		set_version $current_dist_name "MNL18_1710_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 "MNL18_1710_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 "MNL18_1710_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 "MNL18_1710_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 "MNL18_1710_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 "MNL18_1710_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 "MNL18_1710_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 "MNL18_1710_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 "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/SYNC/TIME"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	

for_objects "MRBTS/MNL/MNLENT/TAC"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end		
	
for_objects "MRBTS/MNL/MNLENT/TAC/LTAC"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/TRBLCADM"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELC"
	begin
		set_version $current_dist_name "MNL18_1710_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 "MNL18_1710_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 "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELW"
	begin
		set_version $current_dist_name "MNL18_1710_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 "MNL18_1710_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 "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	

for_objects "MRBTS/MNL/MNLENT/FMCADM"
	begin
		set_version $current_dist_name "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	
	
for_objects "MRBTS/MNL/MNLENT/CELLMAPPING/LCELL"
	begin
		set_version $current_dist_name "MNL18_1710_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 "MNL18_1710_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 "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end	

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

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

for_objects "MRBTS/MNL/CMD"
	begin
		set_version $current_dist_name "MNL18_1710_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 "MNL18_1710_001"
		set_adaptation $current_dist_name "com.nokia.srbts.mnl"
	end
