def take_action(self, parsed_args):
     neutron_client = self.get_client()
     _speaker_id = bgp_speaker.get_bgp_speaker_id(neutron_client,
                                                  parsed_args.bgp_speaker)
     neutron_client.add_bgp_speaker_to_dragent(
         parsed_args.dragent_id, {'bgp_speaker_id': _speaker_id})
     print(_('Associated BGP speaker %s to the Dynamic Routing agent.')
           % parsed_args.bgp_speaker, file=self.app.stdout)
 def take_action(self, parsed_args):
     neutron_client = self.get_client()
     _speaker_id = bgp_speaker.get_bgp_speaker_id(neutron_client,
                                                  parsed_args.bgp_speaker)
     neutron_client.remove_bgp_speaker_from_dragent(parsed_args.dragent_id,
                                                    _speaker_id)
     print(_('Disassociated BGP speaker %s from the '
             'Dynamic Routing agent.') % parsed_args.bgp_speaker,
           file=self.app.stdout)
 def take_action(self, parsed_args):
     neutron_client = self.get_client()
     _speaker_id = bgp_speaker.get_bgp_speaker_id(neutron_client,
                                                  parsed_args.bgp_speaker)
     neutron_client.add_bgp_speaker_to_dragent(
         parsed_args.dragent_id, {'bgp_speaker_id': _speaker_id})
     print(_('Associated BGP speaker %s to the Dynamic Routing agent.') %
           parsed_args.bgp_speaker,
           file=self.app.stdout)
 def take_action(self, parsed_args):
     neutron_client = self.get_client()
     _speaker_id = bgp_speaker.get_bgp_speaker_id(neutron_client,
                                                  parsed_args.bgp_speaker)
     neutron_client.remove_bgp_speaker_from_dragent(parsed_args.dragent_id,
                                                    _speaker_id)
     print(_('Disassociated BGP speaker %s from the '
             'Dynamic Routing agent.')
           % parsed_args.bgp_speaker, file=self.app.stdout)
 def call_server(self, neutron_client, search_opts, parsed_args):
     _speaker_id = bgp_speaker.get_bgp_speaker_id(neutron_client,
                                                  parsed_args.bgp_speaker)
     search_opts['bgp_speaker'] = _speaker_id
     data = neutron_client.list_dragents_hosting_bgp_speaker(**search_opts)
     return data
 def call_server(self, neutron_client, search_opts, parsed_args):
     _speaker_id = bgp_speaker.get_bgp_speaker_id(neutron_client,
                                                  parsed_args.bgp_speaker)
     search_opts['bgp_speaker'] = _speaker_id
     data = neutron_client.list_dragents_hosting_bgp_speaker(**search_opts)
     return data