<s> import sys <EOL> from neutronclient . neutron . v2_0 . bgp import dragentscheduler as bgp_drsched <EOL> from neutronclient . tests . unit import test_cli20 <EOL> from neutronclient . tests . unit import test_cli20_agentschedulers as test_as <EOL> BGP_DRAGENT_ID = '<STR_LIT>' <EOL> BGP_SPEAKER = '<STR_LIT>' <EOL> class CLITestV20DRAgentScheduler ( test_as . CLITestV20AgentScheduler ) : <EOL> def test_add_bgp_speaker_to_dragent ( self ) : <EOL> resource = '<STR_LIT>' <EOL> cmd = bgp_drsched . AddBGPSpeakerToDRAgent ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> args = ( BGP_DRAGENT_ID , BGP_SPEAKER ) <EOL> body = { '<STR_LIT>' : BGP_SPEAKER } <EOL> result = { '<STR_LIT>' : '<STR_LIT>' , } <EOL> self . _test_add_to_agent ( resource , cmd , args , <EOL> self . client . BGP_DRINSTANCES , <EOL> body , result ) <EOL> def test_remove_bgp_speaker_from_dragent ( self ) : <EOL> resource = '<STR_LIT>' <EOL> cmd = bgp_drsched . RemoveBGPSpeakerFromDRAgent ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> args = ( BGP_DRAGENT_ID , BGP_SPEAKER ) <EOL> self . _test_remove_from_agent ( resource , cmd , args , <EOL> self . client . BGP_DRINSTANCES ) <EOL> def test_list_bgp_speakers_on_dragent ( self ) : <EOL> resources = '<STR_LIT>' <EOL> cmd = bgp_drsched . ListBGPSpeakersOnDRAgent ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> path = ( ( self . client . agent_path + self . client . BGP_DRINSTANCES ) % <EOL> BGP_DRAGENT_ID ) <EOL> self . _test_list_resources ( resources , cmd , base_args = [ BGP_DRAGENT_ID ] , <EOL> path = path ) <EOL> def test_list_dragents_hosting_bgp_speaker ( self ) : <EOL> resources = '<STR_LIT>' <EOL> cmd = bgp_drsched . ListDRAgentsHostingBGPSpeaker ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> path = ( ( self . client . bgp_speaker_path + self . client . BGP_DRAGENTS ) % <EOL> BGP_DRAGENT_ID ) <EOL> contents = { self . id_field : '<STR_LIT>' , '<STR_LIT>' : True } <EOL> self . _test_list_resources ( resources , cmd , base_args = [ BGP_DRAGENT_ID ] , <EOL> path = path , response_contents = contents ) </s>
