<s> import string <EOL> from oslo_config import cfg <EOL> from rally . plugins . openstack import scenario <EOL> from rally . task import atomic <EOL> IRONIC_BENCHMARK_OPTS = [ <EOL> cfg . FloatOpt ( "<STR_LIT>" , <EOL> default = <NUM_LIT:1.0> , <EOL> help = "<STR_LIT>" <EOL> "<STR_LIT>" ) , <EOL> ] <EOL> CONF = cfg . CONF <EOL> benchmark_group = cfg . OptGroup ( name = "<STR_LIT>" , title = "<STR_LIT>" ) <EOL> CONF . register_opts ( IRONIC_BENCHMARK_OPTS , group = benchmark_group ) <EOL> class IronicScenario ( scenario . OpenStackScenario ) : <EOL> """<STR_LIT>""" <EOL> RESOURCE_NAME_FORMAT = "<STR_LIT>" <EOL> RESOURCE_NAME_ALLOWED_CHARACTERS = string . ascii_lowercase + string . digits <EOL> @ atomic . action_timer ( "<STR_LIT>" ) <EOL> def _create_node ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> kwargs [ "<STR_LIT:name>" ] = self . generate_random_name ( ) <EOL> return self . admin_clients ( "<STR_LIT>" ) . node . create ( ** kwargs ) <EOL> @ atomic . action_timer ( "<STR_LIT>" ) <EOL> def _list_nodes ( self , associated = None , maintenance = None , marker = None , <EOL> limit = None , detail = False , sort_key = None , sort_dir = None ) : <EOL> """<STR_LIT>""" <EOL> return self . admin_clients ( "<STR_LIT>" ) . node . list ( <EOL> associated = associated , maintenance = maintenance , marker = marker , <EOL> limit = limit , detail = detail , sort_key = sort_key , sort_dir = sort_dir ) <EOL> @ atomic . action_timer ( "<STR_LIT>" ) <EOL> def _delete_node ( self , node_id ) : <EOL> """<STR_LIT>""" <EOL> self . admin_clients ( "<STR_LIT>" ) . node . delete ( node_id ) </s>
