예제 #1
0
def g_argsExtraSpecify(
    parser,
):
####+END:
    """Module Specific Command Line Parameters.
    g_argsExtraSpecify is passed to G_main and is executed before argsSetup (can not be decorated)
    """
    G = icm.IcmGlobalContext()
    icmParams = icm.ICM_ParamDict()

    icmParams.parDictAdd(
        parName='moduleVersion',
        parDescription="Module Version",
        parDataType=None,
        parDefault=None,
        parChoices=list(),
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--version',
    )

    
    bleep.commonParamsSpecify(icmParams)

    wsInvokerIcm.commonParamsSpecify(icmParams)        
       
    icm.argsparseBasedOnIcmParams(parser, icmParams)

    # So that it can be processed later as well.
    G.icmParamDictSet(icmParams)
    
    return
예제 #2
0
def g_paramsExtraSpecify(parser, ):
    ####+END:
    """Module Specific Command Line Parameters.
    g_argsExtraSpecify is passed to G_main and is executed before argsSetup (can not be decorated)
    """
    G = icm.IcmGlobalContext()
    icmParams = icm.ICM_ParamDict()

    bleep.commonParamsSpecify(icmParams)

    clsMethod.commonParamsSpecify(icmParams)  # --cls, --method

    fp.commonParamsSpecify(icmParams)  # --fpBase

    bpo.commonParamsSpecify(icmParams)

    #palsBpo.commonParamsSpecify(icmParams)
    #palsRepo.commonParamsSpecify(icmParams)

    palsSis.commonParamsSpecify(icmParams)

    PalsRepo_LiveParams_FPs.fps_asIcmParamsAdd(icmParams, )
    PalsRepo_Profile_FPs.fps_asIcmParamsAdd(icmParams, )

    # commonParamsSpecify(icmParams)

    icm.argsparseBasedOnIcmParams(parser, icmParams)

    # So that it can be processed later as well.
    G.icmParamDictSet(icmParams)

    return
예제 #3
0
def g_paramsExtraSpecify(parser, ):
    ####+END:
    """Module Specific Command Line Parameters.
    g_argsExtraSpecify is passed to G_main and is executed before argsSetup (can not be decorated)
    """
    G = icm.IcmGlobalContext()
    icmParams = icm.ICM_ParamDict()

    icm.argsparseBasedOnIcmParams(parser, icmParams)

    # So that it can be processed later as well.
    G.icmParamDictSet(icmParams)

    return
예제 #4
0
파일: toIcm.py 프로젝트: bisos-pip/things
def targetParamListCommonArgs(parser):
    """Module Specific Extra Arguments.
    """

    icmParams = icm.ICM_ParamDict()

    icmParams.parDictAdd(
        parName='empnaPkg',
        parDescription="Empna Detection And Notification Label",
        parDataType=None,
        parDefault=None,
        parChoices=None,
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--empnaPkg',
    )

    icmParams.parDictAdd(
        parName='dateVer',
        parDescription="",
        parDataType=None,
        parDefault=None,
        parChoices=None,
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--dateVer',
    )

    icmParams.parDictAdd(
        parName='collective',
        parDescription='Collective. Eg, int, ir, us, fr',
        parDataType=None,
        parDefault=None,
        parChoices=None,
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--collective',
    )

    icmParams.parDictAdd(
        parName='district',
        parDescription="District. Eg, libreCenter",
        parDataType=None,
        parDefault=None,
        parChoices=None,
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--district',
    )

    icmParams.parDictAdd(
        parName='targetType',
        parDescription="Target Type.",
        parDataType=None,
        parDefault=None,
        parChoices=None,
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--targetType',
    )

    icmParams.parDictAdd(
        parName='targetId',
        parDescription="Target ID.",
        parDataType=None,
        parDefault=None,
        parChoices=None,
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--targetId',
    )

    icmParams.parDictAdd(
        parName='targetFqdn',
        parDescription="Host name or IP Address",
        parDataType=None,
        parDefault=None,
        parChoices=None,
        #parCmndApplicability=['all'],
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseLongOpt='--targetFqdn',
    )

    icmParams.parDictAdd(
        parName='accessMethod',
        parDescription="Connect using the indicated accessMethod.",
        parDataType=None,
        parDefault=None,
        parChoices=None,
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseLongOpt='--accessMethod',
    )

    icmParams.parDictAdd(
        parName='userName',
        parDescription="Connect using the indicated userName.",
        parDataType=None,
        parDefault=None,
        parChoices=None,
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt='-u',
        argparseLongOpt='--userName',
    )

    icmParams.parDictAdd(
        parName='password',
        parDescription=
        "Use the indicated password to authenticate the connection.",
        parDataType=None,
        parDefault=None,
        parChoices=None,
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt='-p',
        argparseLongOpt='--password',
    )

    icm.argsparseBasedOnIcmParams(parser, icmParams)

    return
예제 #5
0
def g_argsExtraSpecify(parser, ):
    ####+END:
    """Module Specific Command Line Parameters.
    g_argsExtraSpecify is passed to G_main and is executed before argsSetup (can not be decorated)
    """
    G = icm.IcmGlobalContext()
    icmParams = icm.ICM_ParamDict()

    marmeAcctsLib.commonParamsSpecify(icmParams)

    icmParams.parDictAdd(
        parName='moduleVersion',
        parDescription="Module Version",
        parDataType=None,
        parDefault=None,
        parChoices=list(),
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--version',
    )

    icmParams.parDictAdd(
        parName='inFile',
        parDescription="Input File",
        parDataType=None,
        # ../control/outMail/common/template/bynameUtf8.mail
        parDefault=os.path.join(
            marmeAcctsLib.outMailCommonDirGet(
                marmeAcctsLib.enabledControlProfileObtain(
                    curGet_bxoId(), curGet_sr())), "template/bynameUtf8.mail"),
        parChoices=["someFile", "UserInput"],
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--inFile',
    )

    icmParams.parDictAdd(
        parName='fromLine',
        parDescription="From Line",
        parDataType=None,
        parDefault="*****@*****.**",
        parChoices=["*****@*****.**", "UserInput"],
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--fromLine',
    )

    icmParams.parDictAdd(
        parName='toLine',
        parDescription="To Line",
        parDataType=None,
        parDefault="*****@*****.**",
        parChoices=["*****@*****.**", "UserInput"],
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--toLine',
    )

    bleep.commonParamsSpecify(icmParams)

    icm.argsparseBasedOnIcmParams(parser, icmParams)

    # So that it can be processed later as well.
    G.icmParamDictSet(icmParams)

    return
예제 #6
0
def g_argsExtraSpecify(parser, ):
    ####+END:
    """Module Specific Command Line Parameters.
    g_argsExtraSpecify is passed to G_main and is executed before argsSetup (can not be decorated)
    """
    G = icm.IcmGlobalContext()
    icmParams = icm.ICM_ParamDict()

    icmParams.parDictAdd(
        parName='moduleVersion',
        parDescription="Module Version",
        parDataType=None,
        parDefault=None,
        parChoices=list(),
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--version',
    )

    icmParams.parDictAdd(
        parName='rsrc',
        parDescription="Resource",
        parDataType=None,
        parDefault=None,
        parChoices=["someResource", "UserInput"],
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--rsrc',
    )

    icmParams.parDictAdd(
        parName='inFile',
        parDescription="Input File",
        parDataType=None,
        parDefault=None,
        parChoices=["someFile", "UserInput"],
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--inFile',
    )

    icmParams.parDictAdd(
        parName='baseDir',
        parDescription="Base Directory Name",
        parDataType=None,
        parDefault=None,
        parChoices=[],
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--baseDir',
    )

    icmParams.parDictAdd(
        parName='policy',
        parDescription="Encryption Policy",
        parDataType=None,
        parDefault=None,
        parChoices=[],
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--policy',
    )

    icmParams.parDictAdd(
        parName='keyringPolicy',
        parDescription="Policy For Setting Passwd In Keyring",
        parDataType=None,
        parDefault=None,
        parChoices=[
            'prompt',
            'default',
        ],
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--keyringPolicy',
    )

    icmParams.parDictAdd(
        parName='alg',
        parDescription="Symetric Encryption Algorithem",
        parDataType=None,
        parDefault=None,
        parChoices=[
            'default',
            'someAlg',
        ],
        parScope=icm.ICM_ParamScope.TargetParam,
        argparseShortOpt=None,
        argparseLongOpt='--alg',
    )

    bleep.commonParamsSpecify(icmParams)

    cryptKeyring.commonParamsSpecify(icmParams)

    icm.argsparseBasedOnIcmParams(parser, icmParams)

    # So that it can be processed later as well.
    G.icmParamDictSet(icmParams)

    return