def _test_add_remove_peer(self, action, cmd, args):
        """Add or Remove BGP Peer to/from a BGP Speaker."""
        resource = 'bgp_speaker'
        subcmd = '%s_bgp_peer' % action
        body = {'bgp_peer_id': 'peerid'}
        if action == 'add':
            retval = {'bgp_peer': 'peerid'}
        else:
            retval = None
        self._test_update_resource_action(resource, cmd, 'myid',
                                          subcmd, args, body, retval)
dataset/ETHPy150Open openstack/python-neutronclient/neutronclient/tests/unit/bgp/test_cli20_speaker.py/CLITestV20BGPSpeakerJSON._test_add_remove_peer/original