#NEWLINE# @ validation . required_services ( consts . Service . NEUTRON ) #NEWLINE# @ validation . required_openstack ( users = True ) #NEWLINE# @ validation . external_network_exists ( 'floating_network' ) #NEWLINE# @ scenario . configure ( context = { #NEWLINE# #INDENT# 'cleanup' : [ 'neutron' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# def create_and_delete_floating_ips( self , floating_network = None , floating_ip_args = None ) : #NEWLINE# #INDENT# 'Create and delete floating IPs.\n\n        Measure the "neutron floating-ip-create" and "neutron\n        floating-ip-delete" commands performance.\n\n        :param floating_network: str, external network for floating IP creation\n        :param floating_ip_args: dict, POST /floatingips request options\n        ' #NEWLINE# floating_ip_args = ( floating_ip_args or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# floating_ip = self . _create_floatingip ( self , ** floating_ip_args ) #NEWLINE# self . _delete_floating_ip ( floating_ip [ 'floatingip' ] )