original_docstring: Return the internal and external interface indices for SNAT.
  
          Ensure the internal n/w, external n/w and their corresponding
          BVI loopback interfaces are present, before returning their
          index values.
          
docstring: Return the internal and external interface indices for SNAT.
  Ensure the internal n/w, external n/w and their corresponding
  BVI loopback interfaces are present, before returning their
  index values.
docstring_tokens: Return the internal and external interface indices for SNAT . Ensure the internal n / w external n / w and their corresponding BVI loopback interfaces are present before returning their index values .
code: def _get_snat_indexes(self, floatingip_dict):
          """Return the internal and external interface indices for SNAT.
  
          Ensure the internal n/w, external n/w and their corresponding
          BVI loopback interfaces are present, before returning their
          index values.
          """
  
          # Get internal network details.
          internal_network_data = self.net_driver.ensure_network(
              floatingip_dict['internal_physnet'],
              floatingip_dict['internal_net_type'],
              floatingip_dict['internal_segmentation_id'])
          # Get the external network details
          external_network_data = self.net_driver.ensure_network(
              floatingip_dict['external_physnet'],
              floatingip_dict['external_net_type'],
              floatingip_dict['external_segmentation_id'])
          if internal_network_data and external_network_data:
              int_br_idx = internal_network_data['bridge_domain_id']
              ext_br_idx = external_network_data['bridge_domain_id']
              # Return the internal and external BVI loopback intf indxs.
              return (self.ensure_bridge_bvi(int_br_idx),
                      self.ensure_bridge_bvi(ext_br_idx))
          else:
              LOG.error('Failed to ensure network on host while setting SNAT')
              return None, None
code_tokens: def _get_snat_indexes ( self , floatingip_dict ) : internal_network_data = self . net_driver . ensure_network ( floatingip_dict [ 'internal_physnet' ] , floatingip_dict [ 'internal_net_type' ] , floatingip_dict [ 'internal_segmentation_id' ] ) external_network_data = self . net_driver . ensure_network ( floatingip_dict [ 'external_physnet' ] , floatingip_dict [ 'external_net_type' ] , floatingip_dict [ 'external_segmentation_id' ] ) if internal_network_data and external_network_data : int_br_idx = internal_network_data [ 'bridge_domain_id' ] ext_br_idx = external_network_data [ 'bridge_domain_id' ] return ( self . ensure_bridge_bvi ( int_br_idx ) , self . ensure_bridge_bvi ( ext_br_idx ) ) else : LOG . error ( 'Failed to ensure network on host while setting SNAT' ) return None , None
short_docstring: Return the internal and external interface indices for SNAT.
short_docstring_tokens: Return the internal and external interface indices for SNAT .
comment: """Return the internal and external interface indices for SNAT.
  
          Ensure the internal n/w, external n/w and their corresponding
          BVI loopback interfaces are present, before returning their
          index values.
          """$SEP$# Get internal network details.$SEP$# Get the external network details$SEP$# Return the internal and external BVI loopback intf indxs.