###########################################
## SCFD file version: 0.2                ##
## Release: TLF/TLC17ASP_1703_004        ##
## MNL version: MNL17ASP_FZM_1703_001    ##
## MNL version: MNL17ASP_FZC_1703_001    ##
###########################################


# CHANNEL id MO MaxOccurs reduced 48 --> 4 (following migration is only for sanity purpose)
####################################################################################################################
# LTE3296 Harmonized Object Model for SRAN and LTE – late changes
####################################################################################################################
#1. add new CHANNELGROUP and CHANNEL for SFN (CHANNEL id should be equal to ANTMOD id in antlDN parameter)
add_cls minor LCELL/newCHANNELGROUPnew-1
add_cls minor LCELL/newCHANNELGROUPnew-2
add_cls minor LCELL/newCHANNELGROUPnew-3
add_cls minor LCELL/newCHANNELGROUPnew-4
add_cls minor LCELL/newCHANNELGROUPnew-5
add_cls minor LCELL/newCHANNELGROUPnew-6
add_cls minor LCELL/newCHANNELGROUPnew-7
add_cls minor LCELL/newCHANNELGROUPnew-8
add_cls minor LCELL/newCHANNELGROUPnew-9
add_cls minor LCELL/newCHANNELGROUPnew-10
add_cls minor LCELL/newCHANNELGROUPnew-11
add_cls minor LCELL/newCHANNELGROUPnew-12
set_operation minor newCHANNELGROUPnew create
add_cls minor newCHANNELGROUPnew/newCHANNELnew-1
add_cls minor newCHANNELGROUPnew/newCHANNELnew-2
add_cls minor newCHANNELGROUPnew/newCHANNELnew-3
add_cls minor newCHANNELGROUPnew/newCHANNELnew-4
set_operation minor newCHANNELnew create
set_adaptation minor newCHANNELGROUPnew com.nokia.srbts.mnl
set_adaptation minor newCHANNELnew com.nokia.srbts.mnl


#2. add oldChannelId (LCELL id + ANTMOD id + ANTL id + direction) to CHANNEL
dependence_add_param_based_on_MOC_instance minor LCELL lcellInstanceId + 0
add_param minor CHANNEL lcellInstanceId value
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL lcellInstanceId = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/MNL-1/MNLENT-1/CELLMAPPING-1/LCELL-${LCELL} lcellInstanceId : 

add_param minor CHANNEL antmodId value
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL antmodId = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/MNL-1/MNLENT-1/CELLMAPPING-1/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-${CHANNEL} antlDN : 
regex_replace minor PARAM MRBTS-*/MNL-*/MNLENT-*/CELLMAPPING-*/LCELL-*/CHANNELGROUP-*/CHANNEL-* antmodId REPLACE "/RMOD-[0-9]*/ANTL-[0-9]*" ALL ""
regex_replace minor PARAM MRBTS-*/MNL-*/MNLENT-*/CELLMAPPING-*/LCELL-*/CHANNELGROUP-*/CHANNEL-* antmodId REPLACE "MRBTS-[0-9]*/EQM-1/APEQM-[0-9]*/ANTMOD-" ALL ""

add_param minor CHANNEL antlId value
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL antlId = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/MNL-1/MNLENT-1/CELLMAPPING-1/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-${CHANNEL} antlDN : 
regex_replace minor PARAM MRBTS-*/MNL-*/MNLENT-*/CELLMAPPING-*/LCELL-*/CHANNELGROUP-*/CHANNEL-* antlId REPLACE "MRBTS-[0-9]*/EQM-1/APEQM-[0-9]*/ANTMOD-[0-9]*/RMOD-[0-9]*/ANTL-" ALL ""

add_param minor CHANNEL oldChannelId old
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL oldChannelId = CONST "true" == CONST "true" ? PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-${CHANNEL} lcellInstanceId JOIN CONST "/" JOIN PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-${CHANNEL} antmodId JOIN CONST "/" JOIN PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-${CHANNEL} antlId JOIN CONST "/" JOIN PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-${CHANNEL} direction :


#3. add newChannelId (LCELL id + newCHANNELGROUPnew id + ANTL id + direction) to newCHANNELnew
add_param minor newCHANNELnew lcellInstanceId value
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew/newCHANNELnew lcellInstanceId = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/MNL-1/MNLENT-1/CELLMAPPING-1/LCELL-${LCELL} lcellInstanceId : 
dependence_add_param_based_on_MOC_instance minor newCHANNELGROUPnew channelGroupInstanceId + 0
add_param minor newCHANNELnew channelGroupInstanceId value
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew/newCHANNELnew channelGroupInstanceId = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/MNL-1/MNLENT-1/CELLMAPPING-1/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew} channelGroupInstanceId : 
dependence_add_param_based_on_MOC_instance minor newCHANNELnew channelInstanceId + 0

add_param minor newCHANNELnew antlId 1
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew/newCHANNELnew antlId = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} channelInstanceId == CONST "3" ? CONST "2" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew/newCHANNELnew antlId = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} channelInstanceId == CONST "4" ? CONST "2" :

add_param minor newCHANNELnew direction TX
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew/newCHANNELnew direction = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} channelInstanceId == CONST "2" ? CONST "RX" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew/newCHANNELnew direction = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} channelInstanceId == CONST "4" ? CONST "RX" :

add_param minor newCHANNELnew newChannelId new
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew/newCHANNELnew newChannelId = CONST "true" == CONST "true" ? PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} lcellInstanceId JOIN CONST "/" JOIN PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} channelGroupInstanceId JOIN CONST "/" JOIN PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} antlId JOIN CONST "/" JOIN PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} direction :


#4. copy antlDN (CHANNEL ==> newCHANNELnew) mapping with oldChannelId == newChannelId
dependence_copy_param_value_based_on_relation_matching minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew/newCHANNELnew newChannelId PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL oldChannelId PARAM antlDN


#5. delete old CHANNELGROUP and CHANNEL if antlDN contained "ANTMOD"
add_param minor CHANNEL tempAntlDN value
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL tempAntlDN = CONST 0 == CONST 0 ? PARAM MRBTS-${MRBTS}/MNL-1/MNLENT-1/CELLMAPPING-1/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-${CHANNEL} antlDN : 
regex_replace minor PARAM MRBTS-*/MNL-*/MNLENT-*/CELLMAPPING-*/LCELL-*/CHANNELGROUP-*/CHANNEL-* tempAntlDN REPLACE "[0-9]*" ALL ""
regex_replace minor PARAM MRBTS-*/MNL-*/MNLENT-*/CELLMAPPING-*/LCELL-*/CHANNELGROUP-*/CHANNEL-* tempAntlDN REPLACE "/" ALL ""
regex_replace minor PARAM MRBTS-*/MNL-*/MNLENT-*/CELLMAPPING-*/LCELL-*/CHANNELGROUP-*/CHANNEL-* tempAntlDN REPLACE "MRBTS-EQM-APEQM-" ALL ""
regex_replace minor PARAM MRBTS-*/MNL-*/MNLENT-*/CELLMAPPING-*/LCELL-*/CHANNELGROUP-*/CHANNEL-* tempAntlDN REPLACE "RMOD-ANTL-" ALL ""
regex_replace minor PARAM MRBTS-*/MNL-*/MNLENT-*/CELLMAPPING-*/LCELL-*/CHANNELGROUP-*/CHANNEL-* tempAntlDN REPLACE "APMOD-" ALL ""

add_param minor CHANNEL toBeDeleted false
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-1/MNLENT-1/CELLMAPPING-1/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-${CHANNEL} tempAntlDN == CONST "ANTMOD-" ? CONST "true" : 

add_param minor CHANNELGROUP toBeDeleted true
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-1 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-2 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-3 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-4 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-5 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-6 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-7 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-8 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-9 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-10 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-11 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-12 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-13 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-14 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-15 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-16 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-17 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-18 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-19 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-20 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-21 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-22 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-23 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-24 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-25 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-26 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-27 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-28 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-29 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-30 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-31 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-32 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-33 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-34 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-35 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-36 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-37 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-38 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-39 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-40 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-41 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-42 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-43 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-44 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-45 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-46 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-47 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-48 toBeDeleted == CONST "false" ? CONST "false" :

dependence_del_target_relative minor MOC MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP ? PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP} toBeDeleted == CONST "true"
dependence_del_target_relative minor MOC MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL ? PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP}/CHANNEL-${CHANNEL} toBeDeleted == CONST "true"


#6. delete empty newCHANNELGROUPnew and newCHANNELnew
add_param minor newCHANNELnew toBeDeleted true
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew/newCHANNELnew toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} antlDN == PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} antlDN ? CONST "false" :

add_param minor newCHANNELGROUPnew toBeDeleted true
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-1 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-2 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-3 toBeDeleted == CONST "false" ? CONST "false" :
dependence_mod_param_conditional_expression_relative minor PARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew toBeDeleted = PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-4 toBeDeleted == CONST "false" ? CONST "false" :

dependence_del_target_relative minor MOC MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew ? PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew} toBeDeleted == CONST "true"
dependence_del_target_relative minor MOC MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/newCHANNELGROUPnew/newCHANNELnew ? PARAM MRBTS-${MRBTS}/MNL-${MNL}/MNLENT-${MNLENT}/CELLMAPPING-${CELLMAPPING}/LCELL-${LCELL}/newCHANNELGROUPnew-${newCHANNELGROUPnew}/newCHANNELnew-${newCHANNELnew} toBeDeleted == CONST "true"


#7. cleanup
rename_cls minor newCHANNELGROUPnew CHANNELGROUP
rename_cls minor newCHANNELnew CHANNEL
del_param minor LCELL lcellInstanceId
del_param minor CHANNEL lcellInstanceId
del_param minor CHANNEL antmodId
del_param minor CHANNELGROUP channelGroupInstanceId
del_param minor CHANNEL channelGroupInstanceId
del_param minor CHANNEL channelInstanceId
del_param minor CHANNEL antlId
del_param minor CHANNEL oldChannelId
del_param minor CHANNEL newChannelId
del_param minor CHANNEL toBeDeleted
del_param minor CHANNELGROUP toBeDeleted
del_param minor CHANNEL tempAntlDN






#v0.2 end
# CHANNEL id MO MaxOccurs reduced 48 --> 4, maxIncl 48 --> 4
####################################################################################################################
# PR262465: FZAP's (FWHA) cell disapeard after CFG conversion from build FLC17A 440 to 510
####################################################################################################################
#48 was only possible for actSfn == true
#Maximum number of CHANNEL objects within a CHANNELGROUP was limited to 4 for FDD and TDD(actSfn == false)

#migrate old CHANNELs (id in range 1-48) to new CHANNELs (id in range 1-4)
#1. set the same key reference (instanceId) in CHANNELGROUP and its child CHANNELs
dependence_add_param_based_on_MOC_instance minor LCELL lcellInstanceId + 0
dependence_add_param_based_on_MOC_instance minor CHANNELGROUP channelGroupInstanceId + 0

add_list minor CHANNELGROUP tempKeyList
add_list_item minor CHANNELGROUP tempKeyList
add_list_param minor CHANNELGROUP tempKeyList 0 instanceId temp
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP tempKeyList 0 instanceId = CONST 1 == CONST 1 ? PARAM MRBTS-${MRBTS}/MNL-1/MNLENT-1/CELLMAPPING-1/LCELL-${LCELL} lcellInstanceId JOIN CONST "-" JOIN PARAM MRBTS-${MRBTS}/MNL-1/MNLENT-1/CELLMAPPING-1/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP} channelGroupInstanceId :

add_list minor CHANNEL tempKeyList
add_list_item minor CHANNEL tempKeyList
add_list_param minor CHANNEL tempKeyList 0 instanceId temp
dependence_mod_param_conditional_expression_relative minor LISTPARAM MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL tempKeyList 0 instanceId = CONST 1 == CONST 1 ? LISTPARAM MRBTS-${MRBTS}/MNL-1/MNLENT-1/CELLMAPPING-1/LCELL-${LCELL}/CHANNELGROUP-${CHANNELGROUP} tempKeyList 0 instanceId :

#2. add new CHANNELs (id in range 1-4)
add_cls minor CHANNELGROUP/newCHANNELnew-0
dependence_move_cls_if_key_atributes_match minor MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP/CHANNEL tempKeyList instanceId - - - MRBTS/MNL/MNLENT/CELLMAPPING/LCELL/CHANNELGROUP tempKeyList instanceId - - - newCHANNELnew
set_operation minor newCHANNELnew create
set_adaptation minor newCHANNELnew com.nokia.srbts.mnl
del_cls minor newCHANNELnew-0

#3. cleanup
del_cls minor CHANNEL
rename_cls minor newCHANNELnew CHANNEL
del_param minor LCELL lcellInstanceId
del_param minor CHANNELGROUP channelGroupInstanceId
del_list minor CHANNELGROUP tempKeyList
del_list minor CHANNEL tempKeyList

#v0.2 end




#history:
add_log minor "Conversion from MNL17ASP_FZM/FZC_1702_001 to MNL17ASP_FZM/FZC_1703_001"
