<s> import nova . conf <EOL> from nova import context <EOL> from nova . tests . functional . api_sample_tests import api_sample_base <EOL> CONF = nova . conf . CONF <EOL> CONF . import_opt ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> CONF . import_opt ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> class FloatingIpsBulkTest ( api_sample_base . ApiSampleTestBaseV21 ) : <EOL> ADMIN_API = True <EOL> extension_name = "<STR_LIT>" <EOL> def _get_flags ( self ) : <EOL> f = super ( FloatingIpsBulkTest , self ) . _get_flags ( ) <EOL> f [ '<STR_LIT>' ] = CONF . osapi_compute_extension [ : ] <EOL> f [ '<STR_LIT>' ] . append ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> return f <EOL> def setUp ( self ) : <EOL> super ( FloatingIpsBulkTest , self ) . setUp ( ) <EOL> pool = CONF . default_floating_pool <EOL> interface = CONF . public_interface <EOL> self . ip_pool = [ <EOL> { <EOL> '<STR_LIT:address>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : pool , <EOL> '<STR_LIT>' : interface , <EOL> '<STR_LIT:host>' : None <EOL> } , <EOL> { <EOL> '<STR_LIT:address>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : pool , <EOL> '<STR_LIT>' : interface , <EOL> '<STR_LIT:host>' : None <EOL> } , <EOL> { <EOL> '<STR_LIT:address>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : pool , <EOL> '<STR_LIT>' : interface , <EOL> '<STR_LIT:host>' : "<STR_LIT>" <EOL> } , <EOL> ] <EOL> self . compute . db . floating_ip_bulk_create ( <EOL> context . get_admin_context ( ) , self . ip_pool ) <EOL> self . addCleanup ( self . compute . db . floating_ip_bulk_destroy , <EOL> context . get_admin_context ( ) , self . ip_pool ) <EOL> def test_floating_ips_bulk_list ( self ) : <EOL> response = self . _do_get ( '<STR_LIT>' ) <EOL> self . _verify_response ( '<STR_LIT>' , <EOL> { } , response , <NUM_LIT:200> ) <EOL> def test_floating_ips_bulk_list_by_host ( self ) : <EOL> response = self . _do_get ( '<STR_LIT>' ) <EOL> self . _verify_response ( '<STR_LIT>' , <EOL> { } , response , <NUM_LIT:200> ) <EOL> def test_floating_ips_bulk_create ( self ) : <EOL> response = self . _do_post ( '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> { "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : CONF . default_floating_pool , <EOL> "<STR_LIT>" : CONF . public_interface } ) <EOL> self . _verify_response ( '<STR_LIT>' , { } , <EOL> response , <NUM_LIT:200> ) <EOL> def test_floating_ips_bulk_delete ( self ) : <EOL> response = self . _do_put ( '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> { "<STR_LIT>" : "<STR_LIT>" } ) <EOL> self . _verify_response ( '<STR_LIT>' , { } , <EOL> response , <NUM_LIT:200> ) </s>
