Ejemplo n.º 1
0
def authenticate(session, username, password):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="CONNECT_POOLING", type=BOOL, values=[False]))
    obj.add(AttrValue(name="USER_PASSWORD", type=STRING, values=[password]))
    obj.add(AttrValue(name="AUTHENTICATION_ONLY", type=BOOL, values=[False]))
    obj.add(AttrValue(name="CHECK_ONLY", type=BOOL, values=[False]))
    obj.add(AttrValue(name="LOGON_NAME", type=STRING, values=[username]))
    return obj
Ejemplo n.º 2
0
def authenticate(session, username, password):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="CONNECT_POOLING", type=BOOL, values=[False]))
    obj.add(AttrValue(name="USER_PASSWORD", type=STRING, values=[password]))
    obj.add(AttrValue(name="AUTHENTICATION_ONLY", type=BOOL, values=[False]))
    obj.add(AttrValue(name="CHECK_ONLY", type=BOOL, values=[False]))
    obj.add(AttrValue(name="LOGON_NAME", type=STRING, values=[username]))
    return obj
Ejemplo n.º 3
0
def serverMap(handle, version, docbase):
    obj = TypedObject(serializationversion=0)
    obj.add(AttrValue(name="r_docbase_name", type=STRING, values=[docbase]))
    obj.add(AttrValue(name="r_map_name", type=STRING, values=["mn_cs_map"]))
    obj.add(AttrValue(name="DBR_REQUEST_NAME", type=STRING, values=["DBRN_GET_SERVER_MAP"]))
    obj.add(AttrValue(name="DBR_REQUEST_VERSION", type=INT, values=[1]))
    obj.add(AttrValue(name="DBR_REQUEST_HANDLE", type=STRING, values=[handle]))
    obj.add(AttrValue(name="DBR_SOFTWARE_VERSION", type=STRING, values=[version]))
    return obj
Ejemplo n.º 4
0
def query(session, query, forUpdate, batchHint, bofDql):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="QUERY", type=STRING, values=[query]))
    obj.add(AttrValue(name="FOR_UPDATE", type=BOOL, values=[forUpdate]))
    obj.add(AttrValue(name="BATCH_HINT", type=INT, values=[batchHint]))
    obj.add(AttrValue(name="BOF_DQL", type=BOOL, values=[bofDql]))
    return obj
Ejemplo n.º 5
0
def query(session, query, forUpdate, batchHint, bofDql):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="QUERY", type=STRING, values=[query]))
    obj.add(AttrValue(name="FOR_UPDATE", type=BOOL, values=[forUpdate]))
    obj.add(AttrValue(name="BATCH_HINT", type=INT, values=[batchHint]))
    obj.add(AttrValue(name="BOF_DQL", type=BOOL, values=[bofDql]))
    return obj
Ejemplo n.º 6
0
def docbaseMap(handle, version):
    obj = TypedObject(serializationversion=0)
    obj.add(AttrValue(name="DBR_REQUEST_NAME", type=STRING, values=["DBRN_GET_DOCBASE_MAP"]))
    obj.add(AttrValue(name="DBR_REQUEST_VERSION", type=INT, values=[1]))
    obj.add(AttrValue(name="DBR_REQUEST_HANDLE", type=STRING, values=[handle]))
    obj.add(AttrValue(name="DBR_SOFTWARE_VERSION", type=STRING, values=[version]))
    return obj
Ejemplo n.º 7
0
def indexAgentStatus(session, indexname, agentname):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="NAME", type=STRING, values=[indexname]))
    obj.add(
        AttrValue(name="AGENT_INSTANCE_NAME", type=STRING, values=[agentname]))
    obj.add(AttrValue(name="ACTION", type=STRING, values=["status"]))
    return obj
Ejemplo n.º 8
0
def serverConfig(session):
    obj = TypedObject(session=session)
    obj.add(
        AttrValue(name="OBJECT_TYPE", type=STRING,
                  values=["dm_server_config"]))
    obj.add(AttrValue(name="FOR_REVERT", type=BOOL, values=[False]))
    obj.add(AttrValue(name="CACHE_VSTAMP", type=INT, values=[0]))
    return obj
Ejemplo n.º 9
0
def entryPoints(session):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="LANGUAGE", type=INT, values=[getLocaleId()]))
    obj.add(AttrValue(name="CHARACTER_SET", type=INT, values=[getCharsetId()]))
    obj.add(AttrValue(name="PLATFORM_ENUM", type=INT, values=[getPlatformId()]))
    obj.add(AttrValue(name="PLATFORM_VERSION_IMAGE", type=STRING, values=["python"]))
    obj.add(AttrValue(name="UTC_OFFSET", type=INT, values=[getOffsetInSeconds()]))
    obj.add(AttrValue(name="SDF_AN_custom_date_order", type=INT, values=[0]))
    obj.add(AttrValue(name="SDF_AN_custom_scan_fields", type=INT, values=[0]))
    obj.add(AttrValue(name="SDF_AN_date_separator", type=STRING, values=["/"]))
    obj.add(AttrValue(name="SDF_AN_date_order", type=INT, values=[2]))
    obj.add(AttrValue(name="SDF_AN_day_leading_zero", type=BOOL, values=[True]))
    obj.add(AttrValue(name="SDF_AN_month_leading_zero", type=BOOL, values=[True]))
    obj.add(AttrValue(name="SDF_AN_century", type=BOOL, values=[True]))
    obj.add(AttrValue(name="SDF_AN_time_separator", type=STRING, values=[":"]))
    obj.add(AttrValue(name="SDF_AN_hours_24", type=BOOL, values=[True]))
    obj.add(AttrValue(name="SDF_AN_hour_leading_zero", type=BOOL, values=[True]))
    obj.add(AttrValue(name="SDF_AN_noon_is_zero", type=BOOL, values=[False]))
    obj.add(AttrValue(name="SDF_AN_am", type=STRING, values=["AM"]))
    obj.add(AttrValue(name="SDF_AN_pm", type=STRING, values=["PM"]))
    obj.add(AttrValue(name="PLATFORM_EXTRA", type=INT, repeating=True, values=[0, 0, 0, 0]))
    obj.add(AttrValue(name="APPLICATION_CODE", type=STRING, values=[""]))
    return obj
Ejemplo n.º 10
0
def folderByPath(session, path):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="_FOLDER_PATH_", type=STRING, values=[path]))
    return obj
Ejemplo n.º 11
0
def sqlQuery(session, query, batchHint):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="QUERY", type=STRING, values=[query]))
    obj.add(AttrValue(name="BATCH_HINT", type=INT, values=[batchHint]))
    return obj
Ejemplo n.º 12
0
def docbaseConfig(session):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="OBJECT_TYPE", type=STRING, values=["dm_docbase_config"]))
    obj.add(AttrValue(name="FOR_REVERT", type=BOOL, values=[False]))
    obj.add(AttrValue(name="CACHE_VSTAMP", type=INT, values=[0]))
    return obj
Ejemplo n.º 13
0
def getErrors(session):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="OBJECT_TYPE", type=STRING, values=["dmError"]))
    return obj
Ejemplo n.º 14
0
def fetchType(session, typename, vstamp):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="TYPE_NAME", type=STRING, values=[typename]))
    obj.add(AttrValue(name="CACHE_VSTAMP", type=INT, values=[vstamp]))
    return obj
Ejemplo n.º 15
0
def fetchType(session, typename, vstamp):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="TYPE_NAME", type=STRING, values=[typename]))
    obj.add(AttrValue(name="CACHE_VSTAMP", type=INT, values=[vstamp]))
    return obj
Ejemplo n.º 16
0
def entryPoints(session):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="LANGUAGE", type=INT, values=[getLocaleId()]))
    obj.add(AttrValue(name="CHARACTER_SET", type=INT, values=[getCharsetId()]))
    obj.add(AttrValue(name="PLATFORM_ENUM", type=INT,
                      values=[getPlatformId()]))
    obj.add(
        AttrValue(name="PLATFORM_VERSION_IMAGE",
                  type=STRING,
                  values=["python"]))
    obj.add(
        AttrValue(name="UTC_OFFSET", type=INT, values=[getOffsetInSeconds()]))
    obj.add(AttrValue(name="SDF_AN_custom_date_order", type=INT, values=[0]))
    obj.add(AttrValue(name="SDF_AN_custom_scan_fields", type=INT, values=[0]))
    obj.add(AttrValue(name="SDF_AN_date_separator", type=STRING, values=["/"]))
    obj.add(AttrValue(name="SDF_AN_date_order", type=INT, values=[2]))
    obj.add(AttrValue(name="SDF_AN_day_leading_zero", type=BOOL,
                      values=[True]))
    obj.add(
        AttrValue(name="SDF_AN_month_leading_zero", type=BOOL, values=[True]))
    obj.add(AttrValue(name="SDF_AN_century", type=BOOL, values=[True]))
    obj.add(AttrValue(name="SDF_AN_time_separator", type=STRING, values=[":"]))
    obj.add(AttrValue(name="SDF_AN_hours_24", type=BOOL, values=[True]))
    obj.add(
        AttrValue(name="SDF_AN_hour_leading_zero", type=BOOL, values=[True]))
    obj.add(AttrValue(name="SDF_AN_noon_is_zero", type=BOOL, values=[False]))
    obj.add(AttrValue(name="SDF_AN_am", type=STRING, values=["AM"]))
    obj.add(AttrValue(name="SDF_AN_pm", type=STRING, values=["PM"]))
    obj.add(
        AttrValue(name="PLATFORM_EXTRA",
                  type=INT,
                  repeating=True,
                  values=[0, 0, 0, 0]))
    obj.add(AttrValue(name="APPLICATION_CODE", type=STRING, values=[""]))
    return obj
Ejemplo n.º 17
0
def getErrors(session):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="OBJECT_TYPE", type=STRING, values=["dmError"]))
    return obj
Ejemplo n.º 18
0
def sqlQuery(session, query, batchHint):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="QUERY", type=STRING, values=[query]))
    obj.add(AttrValue(name="BATCH_HINT", type=INT, values=[batchHint]))
    return obj
Ejemplo n.º 19
0
def indexAgentStatus(session, indexname, agentname):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="NAME", type=STRING, values=[indexname]))
    obj.add(AttrValue(name="AGENT_INSTANCE_NAME", type=STRING, values=[agentname]))
    obj.add(AttrValue(name="ACTION", type=STRING, values=["status"]))
    return obj
Ejemplo n.º 20
0
def folderByPath(session, path):
    obj = TypedObject(session=session)
    obj.add(AttrValue(name="_FOLDER_PATH_", type=STRING, values=[path]))
    return obj