#NEWLINE# def _stub_neutron_api_calls( self , neutron_sg_enabled = True ) : #NEWLINE# #INDENT# self . mox . StubOutWithMock ( api . neutron , 'is_extension_supported' ) #NEWLINE# self . mox . StubOutWithMock ( api . network , 'floating_ip_supported' ) #NEWLINE# self . mox . StubOutWithMock ( api . network , 'tenant_floating_ip_list' ) #NEWLINE# if neutron_sg_enabled : #NEWLINE# #INDENT# self . mox . StubOutWithMock ( api . network , 'security_group_list' ) #NEWLINE# #UNINDENT# api . neutron . is_extension_supported ( IsA ( http . HttpRequest ) , 'security-group' ) . AndReturn ( self ) #NEWLINE# api . network . floating_ip_supported ( IsA ( http . HttpRequest ) ) . AndReturn ( True ) #NEWLINE# api . network . tenant_floating_ip_list ( IsA ( http . HttpRequest ) ) . AndReturn ( self . floating_ips . list ( ) ) #NEWLINE# if neutron_sg_enabled : #NEWLINE# #INDENT# api . network . security_group_list ( IsA ( http . HttpRequest ) ) . AndReturn ( self . q_secgroups . list ( ) )