def get_clusters():
        """
        get all available cluster from Ariane server
        :return:
        """
        LOGGER.debug("ClusterService.get_clusters")
        params = SessionService.complete_transactional_req(None)
        if MappingService.driver_type != DriverFactory.DRIVER_REST:
            if params is None:
                params = {}
            params['OPERATION'] = 'getClusters'
            args = {'properties': params}
        else:
            if params is None:
                args = {'http_operation': 'GET', 'operation_path': ''}
            else:
                args = {'http_operation': 'GET', 'operation_path': '', 'parameters': params}

        response = ClusterService.requester.call(args)

        if MappingService.driver_type != DriverFactory.DRIVER_REST:
            response = response.get()

        ret = None
        if response.rc == 0:
            ret = []
            for datacenter in response.response_content['clusters']:
                ret.append(Cluster.json_2_cluster(datacenter))
        elif response.rc != 404:
            err_msg = 'ClusterService.get_clusters - Problem while getting clusters. ' \
                      'Reason: ' + str(response.response_content) + ' - ' + str(response.error_message) + \
                      " (" + str(response.rc) + ")"
            LOGGER.warning(err_msg)
            if response.rc == 500 and ArianeMappingOverloadError.ERROR_MSG in response.error_message:
                raise ArianeMappingOverloadError("ClusterService.get_clusters", ArianeMappingOverloadError.ERROR_MSG)
            # traceback.print_stack()
        return ret
def get_clusters ( ) : LOGGER . debug ( "ClusterService.get_clusters" ) params = SessionService . complete_transactional_req ( None ) if MappingService . driver_type != DriverFactory . DRIVER_REST : if params is None : params = { } params [ 'OPERATION' ] = 'getClusters' args = { 'properties' : params } else : if params is None : args = { 'http_operation' : 'GET' , 'operation_path' : '' } else : args = { 'http_operation' : 'GET' , 'operation_path' : '' , 'parameters' : params } response = ClusterService . requester . call ( args ) if MappingService . driver_type != DriverFactory . DRIVER_REST : response = response . get ( ) ret = None if response . rc == 0 : ret = [ ] for datacenter in response . response_content [ 'clusters' ] : ret . append ( Cluster . json_2_cluster ( datacenter ) ) elif response . rc != 404 : err_msg = 'ClusterService.get_clusters - Problem while getting clusters. ' 'Reason: ' + str ( response . response_content ) + ' - ' + str ( response . error_message ) + " (" + str ( response . rc ) + ")" LOGGER . warning ( err_msg ) if response . rc == 500 and ArianeMappingOverloadError . ERROR_MSG in response . error_message : raise ArianeMappingOverloadError ( "ClusterService.get_clusters" , ArianeMappingOverloadError . ERROR_MSG ) return ret
get all available cluster from Ariane server
        :return: