def _save_bgp_speaker(self, bgp_speaker_id):
     cls = bgp_db.BgpDbMixin()
     bgp_speaker_body = {'bgp_speaker': {
                             'name': 'fake_bgp_speaker',
                             'ip_version': '4',
                             'local_as': '123',
                             'advertise_floating_ip_host_routes': '0',
                             'advertise_tenant_networks': '0',
                             'peers': [],
                             'networks': []}}
     cls._save_bgp_speaker(self.ctx, bgp_speaker_body, uuid=bgp_speaker_id)
 def _save_bgp_speakers(self, bgp_speakers):
     cls = bgp_db.BgpDbMixin()
     bgp_speaker_body = {
         'bgp_speaker': {
             'name': 'fake_bgp_speaker',
             'ip_version': '4',
             'local_as': '123',
             'advertise_floating_ip_host_routes': False,
             'advertise_tenant_networks': False,
             'peers': [],
             'networks': []
         }
     }
     i = 1
     for bgp_speaker_id in bgp_speakers:
         bgp_speaker_body['bgp_speaker']['local_as'] = i
         cls._save_bgp_speaker(self.ctx,
                               bgp_speaker_body,
                               uuid=bgp_speaker_id)
         i = i + 1