Exemplo n.º 1
0
def update_affiliation(trace_id, user_id, organization_id, update_attribute,
                       target_update_date):
    common_utils.begin_logger(trace_id, __name__, inspect.currentframe())

    key = {"UserID": user_id, "OrganizationID": organization_id}
    DB_utils.update(trace_id, Tables.PM_AFFILIATION, key, update_attribute,
                    target_update_date)
Exemplo n.º 2
0
def update_organization(trace_id, organization_id, update_attribute,
                        target_update_date):
    common_utils.begin_logger(trace_id, __name__, inspect.currentframe())

    key = {"OrganizationID": organization_id}
    DB_utils.update(trace_id, Tables.PM_ORGANIZATIONS, key, update_attribute,
                    target_update_date)
Exemplo n.º 3
0
def update(trace_id,
           exclusion_item_id,
           update_attribute,
           target_update_date=None):
    common_utils.begin_logger(trace_id, __name__, inspect.currentframe())
    key = {"ExclusionItemID": exclusion_item_id}
    DB_utils.update(trace_id, Tables.PM_EXCLUSION_ITEMS, key, update_attribute,
                    target_update_date)
Exemplo n.º 4
0
def update(trace_id,
           assessment_item_id,
           update_attribute,
           target_update_date=None):
    common_utils.begin_logger(trace_id, __name__, inspect.currentframe())
    key = {"AssessmentItemID": assessment_item_id}
    DB_utils.update(trace_id, Tables.PM_ASSESSMENT_ITEMS, key,
                    update_attribute, target_update_date)
def update(task_id, update_attribute, target_update_date):
    pm_logger = common_utils.begin_logger(task_id, __name__,
                                          inspect.currentframe())
    try:
        key = {"TaskID": task_id}
        DB_utils.update(task_id, Tables.PM_ORGANIZATION_TASKS, key,
                        update_attribute, target_update_date)
        return common_utils.response(True, pm_logger)
    except PmError as e:
        pm_logger.error(e)
        return common_utils.response(False, pm_logger)
Exemplo n.º 6
0
def update(trace_id, check_result_id, update_attribute, is_cw_logger=False):
    if (is_cw_logger):
        common_utils.begin_cw_logger(trace_id, __name__,
                                     inspect.currentframe())
    else:
        common_utils.begin_logger(trace_id, __name__, inspect.currentframe())
    key = {"CheckResultID": check_result_id}
    DB_utils.update(trace_id,
                    Tables.PM_CHECK_RESULTS,
                    key,
                    update_attribute,
                    is_cw_logger=is_cw_logger)
Exemplo n.º 7
0
def update(trace_id,
           check_history_id,
           update_attribute,
           target_update_date,
           is_cw_logger=False):
    if (is_cw_logger):
        common_utils.begin_cw_logger(trace_id, __name__,
                                     inspect.currentframe())
    else:
        common_utils.begin_logger(trace_id, __name__, inspect.currentframe())
    key = {"CheckHistoryID": check_history_id}
    DB_utils.update(trace_id,
                    Tables.PM_CHECK_HISTORY,
                    key,
                    update_attribute,
                    target_update_date,
                    is_cw_logger=is_cw_logger)
Exemplo n.º 8
0
def update_awscoops(trace_id,
                    coop_id,
                    update_attribute,
                    target_update_date=None,
                    is_cw_logger=False):
    if (is_cw_logger):
        common_utils.begin_cw_logger(trace_id, __name__,
                                     inspect.currentframe())
    else:
        common_utils.begin_logger(trace_id, __name__, inspect.currentframe())

    key = {"CoopID": coop_id}
    DB_utils.update(trace_id,
                    Tables.PM_AWSACCOUNTCOOPS,
                    key,
                    update_attribute,
                    target_update_date,
                    is_cw_logger=is_cw_logger)
def update(trace_id, security_check_webhook_id, update_attribute,
           target_update_date):
    common_utils.begin_logger(trace_id, __name__, inspect.currentframe())
    key = {'SecurityCheckWebhookID': security_check_webhook_id}
    DB_utils.update(trace_id, Tables.PM_SECURITY_CHECK_WEBHOOK, key,
                    update_attribute, target_update_date)
Exemplo n.º 10
0
def update(user_id, update_attribute):
    common_utils.begin_logger(user_id, __name__, inspect.currentframe())
    key = {"UserID": user_id}
    DB_utils.update(user_id, Tables.PM_USER_ATTRIBUTE, key, update_attribute)
def update(trace_id, organization_id, notify_code, update_attribute):
    common_utils.begin_logger(trace_id, __name__, inspect.currentframe())
    key = {"NotifyCode": notify_code, "OrganizationID": organization_id}
    DB_utils.update(trace_id, Tables.PM_ORG_NOTIFY_MAIL_DESTINATIONS, key,
                    update_attribute)
Exemplo n.º 12
0
def update_project(trace_id, project_id, update_attribute, target_update_date):
    common_utils.begin_logger(trace_id, __name__, inspect.currentframe())

    key = {"ProjectID": project_id}
    DB_utils.update(trace_id, Tables.PM_PROJECTS, key, update_attribute,
                    target_update_date)
Exemplo n.º 13
0
def update(trace_id, check_result_item_id, update_attribute):
    common_utils.begin_logger(trace_id, __name__, inspect.currentframe())
    key = {"CheckResultItemID": check_result_item_id}
    DB_utils.update(trace_id, Tables.PM_CHECK_RESULT_ITEMS, key,
                    update_attribute)