def GetBgpRoutingMode(network):
  """Returns the BGP routing mode of the input network."""
  if getattr(network, 'routingConfig', None) is not None:
    return network.routingConfig.routingMode
  else:
    return None