irods
4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
![]() ![]() |
#include "rcMisc.h"
#include "getRescQuota.h"
#include "miscUtil.h"
#include "objMetaOpr.hpp"
#include "resource.hpp"
#include "rsGetRescQuota.hpp"
#include "genQuery.h"
#include "rsGenQuery.hpp"
#include "irods_resource_backport.hpp"
Go to the source code of this file.
Functions | |
int | rsGetRescQuota (rsComm_t *rsComm, getRescQuotaInp_t *getRescQuotaInp, rescQuota_t **rescQuota) |
int | _rsGetRescQuota (rsComm_t *rsComm, getRescQuotaInp_t *getRescQuotaInp, rescQuota_t **rescQuota) |
int | getQuotaByResc (rsComm_t *rsComm, char *userName, char *rescName, genQueryOut_t **genQueryOut) |
int | queRescQuota (rescQuota_t **rescQuotaHead, genQueryOut_t *genQueryOut) |
int | fillRescQuotaStruct (rescQuota_t *rescQuota, char *tmpQuotaLimit, char *tmpQuotaOver, char *tmpRescName, char *tmpQuotaRescId, char *tmpQuotaUserId) |
int | setRescQuota (rsComm_t *_comm, const char *_obj_path, const char *_resc_name, rodsLong_t _data_size) |
int | updatequotaOverrun (const char *_resc_hier, rodsLong_t _data_size, int _flags) |
int | chkRescQuotaPolicy (rsComm_t *rsComm) |
int _rsGetRescQuota | ( | rsComm_t * | rsComm, |
getRescQuotaInp_t * | getRescQuotaInp, | ||
rescQuota_t ** | rescQuota | ||
) |
Definition at line 47 of file rsGetRescQuota.cpp.
References freeGenQueryOut(), getQuotaByResc(), NULL, queRescQuota(), getRescQuotaInp::rescName, irods.pypyodbc::status, USER__NULL_INPUT_ERR, and getRescQuotaInp::userName.
Referenced by rsGetRescQuota().
Definition at line 337 of file rsGetRescQuota.cpp.
References applyRule(), clearKeyVal(), RuleExecInfo::condInputData, initReiWithDataObjInp(), LOG_ERROR, NO_SAVE_REI, NULL, RESC_QUOTA_OFF, RESC_QUOTA_UNINIT, RescQuotaPolicy, rodsLog(), and irods.pypyodbc::status.
Referenced by setRescQuota().
int fillRescQuotaStruct | ( | rescQuota_t * | rescQuota, |
char * | tmpQuotaLimit, | ||
char * | tmpQuotaOver, | ||
char * | tmpRescName, | ||
char * | tmpQuotaRescId, | ||
char * | tmpQuotaUserId | ||
) |
Definition at line 187 of file rsGetRescQuota.cpp.
References rescQuota::flags, GLOBAL_QUOTA, NAME_LEN, rescQuota::quotaLimit, rescQuota::quotaOverrun, rescQuota::rescName, rstrcpy(), and rescQuota::userId.
Referenced by queRescQuota().
int getQuotaByResc | ( | rsComm_t * | rsComm, |
char * | userName, | ||
char * | rescName, | ||
genQueryOut_t ** | genQueryOut | ||
) |
Definition at line 80 of file rsGetRescQuota.cpp.
References addInxVal(), clearGenQueryInp(), COL_R_RESC_NAME, COL_USER_NAME, MAX_NAME_LEN, MAX_SQL_ROWS, GenQueryInp::maxRows, NULL, GenQueryInp::options, QUOTA_QUERY, rsGenQuery(), GenQueryInp::sqlCondInp, irods.pypyodbc::status, and USER__NULL_INPUT_ERR.
Referenced by _rsGetRescQuota().
int queRescQuota | ( | rescQuota_t ** | rescQuotaHead, |
genQueryOut_t * | genQueryOut | ||
) |
Definition at line 128 of file rsGetRescQuota.cpp.
References COL_QUOTA_LIMIT, COL_QUOTA_OVER, COL_QUOTA_RESC_ID, COL_QUOTA_USER_ID, COL_R_RESC_NAME, fillRescQuotaStruct(), getSqlResultByInx(), SqlResult::len, LOG_ERROR, rescQuota::next, NULL, rodsLog(), GenQueryOut::rowCnt, UNMATCHED_KEY_OR_INDEX, and SqlResult::value.
Referenced by _rsGetRescQuota().
int rsGetRescQuota | ( | rsComm_t * | rsComm, |
getRescQuotaInp_t * | getRescQuotaInp, | ||
rescQuota_t ** | rescQuota | ||
) |
Definition at line 21 of file rsGetRescQuota.cpp.
References _rsGetRescQuota(), rodsServerHost::conn, getAndConnRcatHost(), LOCAL_HOST, rodsServerHost::localFlag, rcGetRescQuota(), SLAVE_RCAT, irods.pypyodbc::status, and getRescQuotaInp::zoneHint.
Referenced by setRescQuota().
int setRescQuota | ( | rsComm_t * | _comm, |
const char * | _obj_path, | ||
const char * | _resc_name, | ||
rodsLong_t | _data_size | ||
) |
Definition at line 213 of file rsGetRescQuota.cpp.
References chkRescQuotaPolicy(), rsComm_t::clientUser, irods::error::code(), freeAllRescQuota(), irods::resource_manager::hier_to_leaf_id(), irods::log(), LOG_DEBUG, MAX_NAME_LEN, NAME_LEN, NULL, irods::error::ok(), PASS, rescQuota::quotaOverrun, resc_mgr, RESC_QUOTA_ON, getRescQuotaInp::rescName, irods::RESOURCE_QUOTA_OVERRUN(), rodsLog(), userInfo_t::rodsZone, rsGetRescQuota(), rstrcpy(), irods.pypyodbc::status, SYS_RESC_QUOTA_EXCEEDED, getRescQuotaInp::userName, userInfo_t::userName, and getRescQuotaInp::zoneHint.
Referenced by irods::apply_policy_for_create_operation(), and getRescForCreate().
int updatequotaOverrun | ( | const char * | _resc_hier, |
rodsLong_t | _data_size, | ||
int | _flags | ||
) |
Definition at line 296 of file rsGetRescQuota.cpp.
References irods::error::code(), GLB_QUOTA, GlobalQuotaOverrun, irods::resource_manager::hier_to_leaf_id(), irods::log(), irods::error::ok(), deploy_schemas_locally::parser, PASS, resc_mgr, RESC_QUOTA, and irods::RESOURCE_QUOTA_OVERRUN().
Referenced by _rsDataObjClose().