#NEWLINE# def _do_create_sub_interface( self , sub_interface , vlan_id , vrf_name , ip , mask , is_external = False ) : #NEWLINE# #INDENT# is_multi_region_enabled = cfg . CONF . multi_region . enable_multi_region #NEWLINE# if ( is_external is True ) : #NEWLINE# #INDENT# if is_multi_region_enabled : #NEWLINE# #INDENT# region_id = cfg . CONF . multi_region . region_id #NEWLINE# conf_str = ( asr1k_snippets . CREATE_SUBINTERFACE_EXT_REGION_ID_WITH_ID % ( sub_interface , region_id , vlan_id , ip , ip ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# conf_str = ( asr1k_snippets . CREATE_SUBINTERFACE_EXTERNAL_WITH_ID % ( sub_interface , vlan_id , ip , mask ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if is_multi_region_enabled : #NEWLINE# #INDENT# region_id = cfg . CONF . multi_region . region_id #NEWLINE# conf_str = ( asr1k_snippets . CREATE_SUBINTERFACE_REGION_ID_WITH_ID % ( sub_interface , region_id , vlan_id , vrf_name , ip , mask ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# conf_str = ( asr1k_snippets . CREATE_SUBINTERFACE_WITH_ID % ( sub_interface , vlan_id , vrf_name , ip , mask ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . _edit_running_config ( conf_str , 'CREATE_SUBINTERFACE_WITH_ID' )