<s> from novaclient . tests . functional import base <EOL> class TestOsServicesNovaClient ( base . ClientTestBase ) : <EOL> """<STR_LIT>""" <EOL> COMPUTE_API_VERSION = "<STR_LIT>" <EOL> def test_os_services_list ( self ) : <EOL> table = self . nova ( '<STR_LIT>' ) <EOL> for serv in self . client . services . list ( ) : <EOL> self . assertIn ( serv . binary , table ) <EOL> def test_os_service_disable_enable ( self ) : <EOL> for serv in self . client . services . list ( ) : <EOL> host = self . _get_column_value_from_single_row_table ( <EOL> self . nova ( '<STR_LIT>' % serv . binary ) , '<STR_LIT>' ) <EOL> service = self . nova ( '<STR_LIT>' % ( host , serv . binary ) ) <EOL> self . addCleanup ( self . nova , '<STR_LIT>' , <EOL> params = "<STR_LIT>" % ( host , serv . binary ) ) <EOL> status = self . _get_column_value_from_single_row_table ( <EOL> service , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , status ) <EOL> service = self . nova ( '<STR_LIT>' % ( host , serv . binary ) ) <EOL> status = self . _get_column_value_from_single_row_table ( <EOL> service , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , status ) <EOL> def test_os_service_disable_log_reason ( self ) : <EOL> for serv in self . client . services . list ( ) : <EOL> host = self . _get_column_value_from_single_row_table ( <EOL> self . nova ( '<STR_LIT>' % serv . binary ) , '<STR_LIT>' ) <EOL> service = self . nova ( '<STR_LIT>' <EOL> % ( host , serv . binary ) ) <EOL> self . addCleanup ( self . nova , '<STR_LIT>' , <EOL> params = "<STR_LIT>" % ( host , serv . binary ) ) <EOL> status = self . _get_column_value_from_single_row_table ( <EOL> service , '<STR_LIT>' ) <EOL> log_reason = self . _get_column_value_from_single_row_table ( <EOL> service , '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , status ) <EOL> self . assertEqual ( '<STR_LIT>' , log_reason ) </s>
