+ elif behavior == SRV6BEHAVIOUR_END_AS:
+ if next_hop is None or out_if is None or in_if is None or \
+ src_addr is None or sid_list is None:
+ raise ValueError('Required parameter(s) missing.\nnext_hop:{0}'
+ '\nout_if:{1}\nin_if:{2}\nsrc_addr:{3}\n'
+ 'sid_list:{4}'.format(next_hop, out_if, in_if,
+ src_addr, sid_list))
+ sid_conf = 'next ' + ' next '.join(sid_list)
+ params = 'nh {0} oif {1} iif {2} src {3} {4}'.\
+ format(next_hop, out_if, in_if, src_addr, sid_conf)
+ elif behavior in [SRV6BEHAVIOUR_END_AD, SRV6BEHAVIOUR_END_AM]:
+ if next_hop is None or out_if is None or in_if is None:
+ raise ValueError('Required parameter(s) missing.\nnext_hop:{0}'
+ '\nout_if:{1}\nin_if:{2}'.
+ format(next_hop, out_if, in_if))
+ params = 'nh {0} oif {1} iif {2}'.format(next_hop, out_if, in_if)