def examples_pkgThis(): ####+END: """.""" def cpsInit(): return collections.OrderedDict() def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) ####+BEGIN: bx:icm:python:cmnd:subSection :title "This Package Bases" :context "func-1" """ ** [[elisp:(beginning-of-buffer)][Top]] ============== [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]] *This Package Bases* [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] """ ####+END: icm.cmndExampleMenuChapter('*This Package Bases*') cmndName = "thisPkgBases" cmndArgs = "" cps = cpsInit() menuItem(verbosity='none') cmndName = "thisPkgBases" cmndArgs = "pkgBase_baseDir" cps = cpsInit() menuItem(verbosity='none') return
def cmnd(self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate(callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() icm.cmndExampleMenuChapter('*argsProc*') cmndName = "argsProc" ; cmndArgs = "list argOne twoArg arg3" ; cps = collections.OrderedDict() ; icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') return(cmndOutcome)
def examples_bxPipPkgsFull(): ####+END: """ ** Common examples. """ def cpsInit(): return collections.OrderedDict() def menuItem(): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) #bxRootBase = bxpRoot_baseObtain(None) #examples_bxPlatformBaseDirsCommon() icm.cmndExampleMenuChapter('* =Module= Overview (desc, usage, status)') cmndName = "overview_bxpBaseDir" ; cmndArgs = "moduleDescription moduleUsage moduleStatus" ; cps = collections.OrderedDict() icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') icm.cmndExampleMenuChapter(' =BxP DirBases= *pbdShow/pbdVerify/pbdUpdate Of Relevant PBDs*') icm.cmndExampleMenuSection(' =BxP DirBases= *pbdShow*') cmndName = "pbdShow" ; cmndArgs = "/ dist" ; cps = collections.OrderedDict() ; icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little', comment="# default pbdName")
def examples_pkgThis(): ####+END: """.""" def cpsInit(): return collections.OrderedDict() def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) ####+BEGIN: bx:icm:python:cmnd:subSection :title "This Package Bases" :context "func-1" """ ** [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] [[elisp:(show-children 10)][|V]] [[elisp:(bx:orgm:indirectBufOther)][|>]] [[elisp:(bx:orgm:indirectBufMain)][|I]] [[elisp:(blee:ppmm:org-mode-toggle)][|N]] [[elisp:(org-top-overview)][|O]] [[elisp:(progn (org-shifttab) (org-content))][|C]] [[elisp:(delete-other-windows)][|1]] *This Package Bases* [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] """ ####+END: icm.cmndExampleMenuChapter('*This Package Bases*') cmndName = "thisPkgBases" cmndArgs = "" cps = cpsInit() menuItem(verbosity='none') cmndName = "thisPkgBases" cmndArgs = "pkgBase_baseDir" cps = cpsInit() menuItem(verbosity='none') return
def examples_remoteOperations( roListLoadFiles, roExpectListLoadFiles, ): ####+END: """.""" def cpsInit(): return collections.OrderedDict() #def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) icm.cmndExampleMenuChapter('/Remote Operation Scenario Files/ *roListInv*') if roListLoadFiles: loadOpScenariosArgs="" for each in roListLoadFiles: loadOpScenariosArgs="""{loadOpScenariosArgs} --load {each}""".format( loadOpScenariosArgs=loadOpScenariosArgs, each=each,) thisCmndAction= " -i roListInv" icm.cmndExampleMenuItem(format(loadOpScenariosArgs + thisCmndAction), verbosity='none') if roExpectListLoadFiles: loadOpScenariosArgs="" for each in roExpectListLoadFiles: loadOpScenariosArgs="""{loadOpScenariosArgs} --load {each}""".format( loadOpScenariosArgs=loadOpScenariosArgs, each=each,) thisCmndAction= " -i roListExpectations" icm.cmndExampleMenuItem(format(loadOpScenariosArgs + thisCmndAction), verbosity='none')
def examples_icmBasic(): ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') #def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) icm.cmndExampleMenuChapter( '*Blee ICM Player (Update, Start, StartUpdated)*') cmndName = "bleepUpdate" cps = cpsInit() cmndArgs = "" menuItem() cmndName = "bleepPlay" cps = cpsInit() cmndArgs = "" menuItem() cmndName = "bleepPlayUpdated" cps = cpsInit() cmndArgs = "" menuItem()
def examples_pkgInfoParsFull( icmsPkgName, icmsPkgInfoBaseDir=None, icmsPkgModuleBaseDir=None, icmsPkgControlBaseDir=None, icmsPkgRunBaseDir=None, ): """ ** Auxiliary examples to be commonly used. """ icm.cmndExampleMenuChapter(' =Pkg/Module BaseDirs= *Admin Panel*') print( ("{icmsPkgInfoBaseDir} # pkgInfo/fp/icmsPkgName ## Rest is obsolete". format(icmsPkgInfoBaseDir=icmsPkgInfoBaseDir))) print(("{icmsPkgModuleBaseDir} # admin,inputs".format( icmsPkgModuleBaseDir=icmsPkgModuleBaseDir))) print(("{panel}".format( panel=os.path.join(icmsPkgModuleBaseDir, "admin", "Panel.org")))) icm.cmndExampleMenuChapter(' =FP Values= *pkgInfo Get Parameters*') cmndName = "pkgInfoParsGet" cmndArgs = "" cps = collections.OrderedDict() cps['icmsPkgInfoBaseDir'] = icmsPkgInfoBaseDir icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little')
def moduleOverviewMenuItem(overviewCmndName): icm.cmndExampleMenuChapter( '* =Module= Overview (desc, usage, status)') cmndName = "overview_bxpBaseDir" cmndArgs = "moduleDescription moduleUsage moduleStatus" cps = collections.OrderedDict() icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='none') # 'little' or 'none'
def cmnd( self, interactive=False, # Can also be called non-interactively bpoId=None, # or Cmnd-Input ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = { 'bpoId': bpoId, } if not icm.cmndCallParamsValidate( callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome bpoId = callParamsDict['bpoId'] ####+END: def cpsInit(): return collections.OrderedDict() #def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def extMenuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmName=icmExName, verbosity=verbosity) # 'little' or 'none' oneBpo = "pmi_ByD-100001" if bpoId: oneBpo = bpoId logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() bpo.examples_bpo_basicAccess(oneBpo) baseLiveTargets.examples_baseLiveTargets().cmnd(bpoId=oneBpo, ) icm.cmndExampleMenuChapter('*Related ICMs*') icmExName = "palsRepoLiveParams.py" cmndName = "examples" cmndArgs = "" cps = cpsInit() cps['bpoId'] = oneBpo extMenuItem(verbosity='none') return (cmndOutcome)
def cmnd(self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate(callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) ##### IMPORTANT PARAMS SPECIFICATIONS BEGIN svcSpecUrl="http://localhost:8080/swagger.json" svcSpecFile="../svcSpec/deploySvc-api.json" perfSap="http://localhost:8080" headersFileName = "../bearerToken.headers" includeOpsListInExamples = False ##### IMPORTANT PARAMS SPECIFICATIONS END icmsPkgInfoBaseDir = mmwsIcmPkgThis.pkgBase_baseDir() logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() icm.cmndExampleMenuChapter('*Scenarios Selection*') # ../unisos/mmwsIcm-base/opScn-1.py opScn1="{pkgBaseDir}/opScn-1.py".format(pkgBaseDir=icmsPkgInfoBaseDir) execLineEx("""ln -s {pkgBaseDir}/opScenarios.py opScenarios.py""".format(pkgBaseDir=icmsPkgInfoBaseDir)) execLineEx("""ln -s {pkgBaseDir}/opScnrioExpect.py opScnrioExpect.py""".format(pkgBaseDir=icmsPkgInfoBaseDir)) ro.examples_remoteOperations( roListLoadFiles=[ opScn1, ], roExpectListLoadFiles=[opScn1,], ) return(cmndOutcome)
def targetParamSelectCommonExamples( loadTargetArgs="", loadParamsArgs="", ): """ """ icm.cmndExampleMenuChapter( '*Common: Select TargetList and Target Parameters*') icm.cmndExampleExternalCmndItem( """./empnaProc.sh""", comment=""" # Used For Selecting Current Target List""") icm.cmndExampleExternalCmndItem("""./empnaProc.sh -i effectiveLisLs""")
def examples_pkgInfoPars(): """ ** Auxiliary examples to be commonly used. """ icm.cmndExampleMenuChapter('* =FP Values= pkgInfo Parameters') cmndAction = " -i inMailAcctParsGet" ; cmndArgs = "" menuLine = """{cmndAction} {cmndArgs}""".format(cmndAction=cmndAction, cmndArgs=cmndArgs) icm.cmndExampleMenuItem(menuLine, verbosity='none') menuLine = """""" icm.cmndExampleMenuItem(menuLine, icmName="pkgManage.py", verbosity='none')
def thisBlock(): icm.cmndExampleMenuChapter('*Remain In Sycn With Template*') templateFile = "/bisos/git/bxRepos/bisos-pip/examples/dev/bisos/examples/icmLibPkgBegin.py" thisFile = __file__ execLineEx("""diff {thisFile} {templateFile}""".format( thisFile=thisFile, templateFile=templateFile)) execLineEx("""cp {thisFile} {templateFile}""".format( thisFile=thisFile, templateFile=templateFile)) execLineEx("""cp {templateFile} {thisFile}""".format( thisFile=thisFile, templateFile=templateFile))
def thisBlock(): icm.cmndExampleMenuChapter('*Remain In Sycn With Template*') #templateFile = "/de/bx/nne/dev-py/pypi/pkgs/bisos/examples/dev/bin/icmBegin.py" templateFile = "/de/bx/nne/dev-py/pypi/pkgs/unisos/icmExamples/dev/bin/icmBegin.py" thisFile = __file__ execLineEx("""diff {thisFile} {templateFile}""".format( thisFile=thisFile, templateFile=templateFile)) execLineEx("""cp {thisFile} {templateFile}""".format( thisFile=thisFile, templateFile=templateFile)) execLineEx("""cp {templateFile} {thisFile}""".format( thisFile=thisFile, templateFile=templateFile))
def examples_icmBasic(): ####+END: """ ** Auxiliary examples to be commonly used. """ icm.cmndExampleMenuChapter(' =PkgBase= *PkgBase Get Dirs*') cmndName = "pkgBase" ; cmndArgs = "configDir" ; cps = collections.OrderedDict() ; icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') cmndName = "pkgBase" ; cmndArgs = "rootDir" ; cps = collections.OrderedDict() ; icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little')
def cmnd( self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate( callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() icm.cmndExampleMenuChapter('*General Dev and Testing CMNDs*') cmndName = "argsAndParamsProc" cmndArgs = "list argOne twoArg arg3" cps = cpsInit() menuItem() icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') icm.cmndExampleMenuChapter('*Other Than ICM Execution Line Examples*') execLineEx("""ls -l""") # icmMainProxy.mainsInfo() return (cmndOutcome)
def cmnd(self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate(callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() #def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def extMenuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmName=icmExName, verbosity=verbosity) # 'little' or 'none' logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() # bpo.examples_bpo_basicAccess(oneBpo) cntnrCurParamsBaseDir = curFps.baseDirObtain() # pattern.sameInstance(Cntnr_CurParams, cntnrCurParamsBaseDir,) fp.examples_fpBase( cntnrCurParamsBaseDir, 'PalsRepo_LiveParams_FPs' ) curFps.examples_curFps().cmnd() icm.cmndExampleMenuChapter('*Related ICMs*') icmExName = "palsBaseLiveTargets.py" ; cmndName = "examples" ; cmndArgs = "" ; cps=cpsInit() ; extMenuItem(verbosity='none') return(cmndOutcome)
def cmnd(self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate(callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(verbosity, **kwargs): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity, **kwargs) # def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() ####+BEGIN: bx:icm:python:cmnd:subSection :title "Create (Update) Vagrant File -- With Defaults" """ ** [[elisp:(beginning-of-buffer)][Top]] ============== [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]] *Create (Update) Vagrant File -- With Defaults* [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] """ ####+END: icm.cmndExampleMenuChapter('*Simple Example Of shRun*') cmndName = "shRunSimple" ; cmndArgs = "" cps=cpsInit() ; menuItem(verbosity='none', comment="# run cmnds -- dont echo cmnds and don't show stdout/err") cmndName = "shRunSimple" ; cmndArgs = "" cps=cpsInit() ; menuItem(verbosity='full', comment="# full verbosity") cmndName = "shRunSimple" ; cmndArgs = "" cps=cpsInit() ; menuItem(verbosity='little', comment="# show stdout/err but dont echo cmnds") cmndName = "shRunSimple" ; cmndArgs = "" cps=cpsInit() ; cps['callTrackings'] = 'monitor+' ; menuItem(verbosity='little', comment="# echo cmnds and show stdout/err") return(cmndOutcome)
def examples_main(): ####+END: """ ** Common examples. """ def cpsInit(): return collections.OrderedDict() def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' icm.cmndExampleMenuChapter('=Misc= *Facilities*') cmndName = "sameInstanceEx" cmndArgs = "" cps = cpsInit() menuItem(verbosity='little')
def targetParamListCommonExamples( loadTargetArgs="", loadParamsArgs="", ): """ """ icm.cmndExampleMenuChapter( '*Common: TargetList And ParameterList and TICMO (Output) Information*' ) icm.cmndExampleMenuSection( 'targetsAccessListShow -- Based on targetsAccessListGet') thisCmndAction = " -i empna.targetsAccessListShow" icm.cmndExampleMenuItem(format(loadTargetArgs + thisCmndAction), verbosity='none') thisCmndAction = " -i empna.targetsAccessListGet" icm.cmndExampleMenuItem(format(loadTargetArgs + thisCmndAction), verbosity='none') icm.cmndExampleMenuSection( 'targetParametersListShow -- Based on targetParametersListGet') thisCmndAction = " -i empna.targetParamsListShow" icm.cmndExampleMenuItem(format(loadTargetArgs + loadParamsArgs + thisCmndAction), comment="# Targets List + T_Params List", verbosity='none') thisCmndAction = " -i empna.targetParamsListGet" icm.cmndExampleMenuItem(format(loadTargetArgs + loadParamsArgs + thisCmndAction), verbosity='none') icm.cmndExampleMenuSection( """TICMO: Target Path Base -- Give A Target's DN, Produce its Path Base""" ) thisCmndAction = " -i empna.targetBaseGet" targetSpecOptions = " --collective int --district libreCenter --targetType bxp --targetId localhost" icm.cmndExampleMenuItem(format(loadTargetArgs + targetSpecOptions + thisCmndAction), verbosity='none')
def cmnd( self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate( callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() selectedPipPkg = "unisos.marme" icm.cmndExampleMenuChapter('*General Dev and Testing CMNDs*') cmndName = "unitTest" cmndArgs = "" cps = cpsInit() # cps['icmsPkgName'] = icmsPkgName menuItem() icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') icm.cmndExampleMenuChapter('*Input and Output Examples CMNDs*') cmndName = "outStreamsExamples" cmndArgs = "" cps = collections.OrderedDict() # cps['icmsPkgName'] = icmsPkgName icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') icm.cmndExampleMenuChapter('*Other Than ICM Execution Line Examples*') execLineEx("""ls -l""") return (cmndOutcome)
def examples_deliveryTrackings(): ####+END: """.""" def cpsInit(): return collections.OrderedDict() def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) icm.cmndExampleMenuChapter('* =INFO= Delivery Trackings Show*') cmndName = "deliveryTrackingsShow" cmndArgs = "" cps = cpsInit() cmndParsCurBxoSr(cps) menuItem(verbosity='none') menuItem(verbosity='little') return
def cmnd(self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate(callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) ##### IMPORTANT PARAMS SPECIFICATIONS BEGIN svcSpecUrl="http://petstore.swagger.io/v2/swagger.json" svcSpecFile="./swagger.json" perfSap="http://localhost:8080/v2/swagger.json" headersFileName = "./bearerToken.headers" includeOpsListInExamples = True ##### IMPORTANT PARAMS SPECIFICATIONS END logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() icm.cmndExampleMenuChapter('*Config And Prepare The Invoker -- Create Header Files -- Obtain Swagger Spec*') cmndName = "prepInvoker" cmndArgs = ""; cps = cpsInit(); menuItem(verbosity='little') cmndName = "headersCreate" cmndArgs = ""; cps = cpsInit(); menuItem(verbosity='none') execLineEx("""{myName} -i headersCreate > {headersFileName}""".format( myName=G.icmMyName(), headersFileName=headersFileName, )) execLineEx("""wget {svcSpecUrl}""".format( svcSpecUrl=svcSpecUrl, )) # # svcOpsList examples from wsInvokerIcm # wsInvokerIcm.examples_commonInvoker( svcSpecUrl=svcSpecUrl, svcSpecFile=svcSpecFile, perfSap=perfSap, headers=headersFileName, ) icm.cmndExampleMenuChapter('*Operations Invokations*') cmndName = "rinvoke" # #rinvoker.py --svcSpec=http://petstore.swagger.io/v2/swagger.json --perfSap=http://localhost:8080/v2/swagger.json --headers=./bearerToken.headers --resource=user --opName=loginUser -i rinvoke username=usernameVALUE password=passwordVALUE # icm.cmndExampleMenuSection('* -i rinvoke loginUser svcSpecUrl*') cps = cpsInit(); cps['svcSpec'] = svcSpecUrl cps['resource'] = "user" cps['opName'] = "loginUser" cmndArgs = "username=someUser password=somePasswd" menuItem(verbosity='none') icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') cps = cpsInit(); cps['svcSpec'] = svcSpecUrl cps['headers'] = headersFileName cps['resource'] = "user" cps['opName'] = "loginUser" cmndArgs = "username=someUser password=somePasswd" menuItem(verbosity='none') icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') icm.cmndExampleMenuSection('* -i rinvoke Create User svcSpecFile*') bodyStr="{'xml': {'name': 'User'}, 'x-model': 'User', 'type': 'object', 'properties': {'username': {'type': 'string'}, 'firstName': {'type': 'string'}, 'lastName': {'type': 'string'}, 'userStatus': {'type': 'integer', 'description': 'User Status', 'format': 'int32'}, 'id': {'type': 'integer', 'format': 'int64'}, 'phone': {'type': 'string'}, 'password': {'type': 'string'}, 'email': {'type': 'string'}}}" cps = cpsInit(); cps['svcSpec'] = svcSpecUrl cps['resource'] = "user" cps['opName'] = "createUser" cmndArgs = "bodyStr=\"{}\"".format(bodyStr) menuItem(verbosity='none') menuItem(verbosity='little') if includeOpsListInExamples: icm.cmndExampleMenuChapter('*List Of Service Operation Invokations*') if svcSpecFile: if os.path.isfile(svcSpecFile): svcSpec = svcSpecFile else: svcSpec = svcSpecUrl else: svcSpec = svcSpecUrl cmndOutcome = wsInvokerIcm.svcOpsList().cmnd( interactive=False, svcSpec=svcSpec, perfSap=None, headers=None, ) else: icm.cmndExampleMenuChapter('*Enable includeOpsListInExamples For An Example List Of Service Operation Invokations*') return(cmndOutcome) ####+BEGIN: bx:icm:python:cmnd:subSection :title "Remain In Sycn With Template" """ ** [[elisp:(beginning-of-buffer)][Top]] ================ [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]] *Remain In Sycn With Template* [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] """ ####+END: icm.cmndExampleMenuChapter('*Remain In Sycn With Template*') #templateFile = "/de/bx/nne/dev-py/pypi/pkgs/bisos/examples/dev/bin/icmBegin.py" templateFile = "/de/bx/nne/dev-py/pypi/pkgs/unisos/icmExamples/dev/bin/icmBegin.py" thisFile = __file__ execLineEx("""diff {thisFile} {templateFile}""".format(thisFile=thisFile, templateFile=templateFile)) execLineEx("""cp {thisFile} {templateFile}""".format(thisFile=thisFile, templateFile=templateFile)) execLineEx("""cp {templateFile} {thisFile}""".format(thisFile=thisFile, templateFile=templateFile)) return(cmndOutcome)
def cmnd( self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate( callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) icmsPkgInfoBaseDir = gossonotPkgThis.pkgBase_baseDir() #print icmsPkgInfoBaseDir logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() ####+BEGIN: bx:icm:python:cmnd:subSection :title "Dev And Testing" """ ** [[elisp:(beginning-of-buffer)][Top]] ================ [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]] *Dev And Testing* [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] """ ####+END: icm.cmndExampleMenuChapter('*General Dev and Testing CMNDs*') cmndName = "unitTest" cmndArgs = "" cps = collections.OrderedDict() # cps['icmsPkgName'] = icmsPkgName icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') ####+BEGIN: bx:icm:python:cmnd:subSection :title "Simplified Targets Selection" """ ** [[elisp:(beginning-of-buffer)][Top]] ================ [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]] *Simplified Targets Selection* [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] """ ####+END: icm.cmndExampleMenuChapter('*Simplified Targets Selection*') # execLineEx("""ln -s /de/bx/current/district/librecenter/tiimi/targets/bxp/tList/ts-librecenter-localhostIcm.py liTargets.py""") # execLineEx("""ln -s /de/bx/current/district/librecenter/tiimi/targets/bxp/paramList/bxpUsageParamsIcm.py liParams.py""") execLineEx( """ln -s {pkgBaseDir}/ts-librecenter-localhostIcm.py liTargets.py""" .format(pkgBaseDir=icmsPkgInfoBaseDir)) execLineEx( """ln -s {pkgBaseDir}/bxpUsageParamsIcm.py liParams.py""".format( pkgBaseDir=icmsPkgInfoBaseDir)) execLineEx( """stress --cpu 2 --io 1 --vm 1 --vm-bytes 128M --timeout 10s --verbose""" ) loadTargetArgs = """ --load ./liTargets.py""" loadParamsArgs = """ --load ./liParams.py """ #ticmoFullInfo=format(commonArgs + loadTargetArgs) toIcm.targetParamSelectCommonExamples() toIcm.targetParamListCommonExamples(loadTargetArgs=loadTargetArgs, loadParamsArgs=loadParamsArgs) #fileParamPath1 = "/de/bx/coll/libreCenter/platforms/bue/0015/params/access/cur/" #fileParamPath2 = "/de/bx/coll/libreCenter/platforms/bue/0015/params/access/cur/" ####+BEGIN: bx:icm:python:cmnd:subSection :title "Run With Targets" """ ** [[elisp:(beginning-of-buffer)][Top]] ================ [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]] *Run With Targets* [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] """ ####+END: icm.cmndExampleMenuChapter( '/TOICM: Monitor/ *targetsParamsToIcmMonitor*') thisCmndAction = " -i linuxUsageKpisRetrieve" # accessParams = " --targetFqdn " + thisTargetFqdn + " --userName " + thisUser + " --password " + thisPassword # icm.cmndExampleMenuItem(format(toIcmMonitorArgs + accessParams + thisCmndAction), # verbosity='none') icm.cmndExampleMenuItem(format(loadTargetArgs + loadParamsArgs + thisCmndAction), verbosity='none') icm.cmndExampleMenuItem(format(loadTargetArgs + loadParamsArgs + thisCmndAction), verbosity='full')
def examples_tokenGenerator( userName, role, acGroups, ): ####+END: """.""" def cpsInit(): return collections.OrderedDict() def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) icm.cmndExampleMenuChapter( '*= bearerToken CmndsLib: Token Manager -- Output / Input =*') icm.cmndExampleMenuSection('* -i jwtPlain*') cmndName = "jwtPlainOutStr" cps = cpsInit() cps['userName'] = userName cps['role'] = role cps['acGroups'] = acGroups cmndArgs = "" menuItem(verbosity='none') #icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') cmndName = "jwtPlainOutFile" cps = cpsInit() cps['userName'] = userName cps['role'] = role cps['acGroups'] = acGroups cmndArgs = "/tmp/bearerPlain.json" menuItem(verbosity='none') icm.cmndExampleMenuSection('* -i jwtSigned*') cmndName = "jwtSignedOutStr" cps = cpsInit() cps['userName'] = userName cps['role'] = role cps['acGroups'] = acGroups cmndArgs = "" menuItem(verbosity='none') cmndName = "jwtSignedOutFile" cps = cpsInit() cps['userName'] = userName cps['role'] = role cps['acGroups'] = acGroups cmndArgs = "/tmp/bearerSigned.jwt" menuItem(verbosity='none') icm.cmndExampleMenuSection('* -i jwtPlainInput*') cmndName = "jwtPlainInFiles" cps = cpsInit() cmndArgs = "/tmp/bearerPlain.json" menuItem(verbosity='none')
def cmnd( self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate( callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() ####+BEGIN: bx:icm:python:cmnd:subSection :title "Dev And Testing" """ ** [[elisp:(beginning-of-buffer)][Top]] ================ [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]] *Dev And Testing* [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] """ ####+END: icm.cmndExampleMenuChapter('*General Dev and Testing IIFs*') cmndName = "unitTest" cmndArgs = "" cps = cpsInit() # cps['icmsPkgName'] = icmsPkgName menuItem() icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') ####+BEGIN: bx:icm:python:cmnd:subSection :title "Remain In Sycn With Template" """ ** [[elisp:(beginning-of-buffer)][Top]] ================ [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]] *Remain In Sycn With Template* [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] """ ####+END: icm.cmndExampleMenuChapter('*Remain In Sycn With Template*') #templateFile = "/de/bx/nne/dev-py/pypi/pkgs/bisos/examples/dev/bin/icmBegin.py" templateFile = "/de/bx/nne/dev-py/pypi/pkgs/unisos/icmExamples/dev/bin/icmBegin.py" thisFile = __file__ execLineEx("""diff {thisFile} {templateFile}""".format( thisFile=thisFile, templateFile=templateFile)) execLineEx("""cp {thisFile} {templateFile}""".format( thisFile=thisFile, templateFile=templateFile)) execLineEx("""cp {templateFile} {thisFile}""".format( thisFile=thisFile, templateFile=templateFile)) return (cmndOutcome)
def cmnd( self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate( callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() ####+BEGIN: bx:icm:python:cmnd:subSection :title "Dev And Testing" """ ** [[elisp:(beginning-of-buffer)][Top]] ================ [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] [[elisp:(delete-other-windows)][(1)]] *Dev And Testing* [[elisp:(org-cycle)][| ]] [[elisp:(org-show-subtree)][|=]] """ ####+END: icm.cmndExampleMenuChapter('*General Dev and Testing IIFs*') cmndName = "unitTest" cmndArgs = "" cps = cpsInit() # cps['icmsPkgName'] = icmsPkgName icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') icm.cmndExampleMenuChapter('*BinsPreps*') cmndAction = " -i binsPreps" cmndArgs = "" menuLine = """{cmndAction} {cmndArgs}""".format(cmndAction=cmndAction, cmndArgs=cmndArgs) icm.cmndExampleMenuItem(menuLine, verbosity='none') cmndAction = " -i binsPrepsCurInfo" cmndArgs = "" menuLine = """{cmndAction} {cmndArgs}""".format(cmndAction=cmndAction, cmndArgs=cmndArgs) icm.cmndExampleMenuItem(menuLine, verbosity='none') icm.cmndExampleMenuSection('*Install ICMs Needed Linux Packages*') cmndAction = " -i canon_linuxPkgInstall" cmndArgs = "" menuLine = """{cmndAction} {cmndArgs}""".format(cmndAction=cmndAction, cmndArgs=cmndArgs) icm.cmndExampleMenuItem(menuLine, verbosity='none') icm.cmndExampleMenuSection('*Install ICMs Needed Python Packages*') cmndAction = " -i canon_pythonPkgInstall" cmndArgs = "" menuLine = """{cmndAction} {cmndArgs}""".format(cmndAction=cmndAction, cmndArgs=cmndArgs) icm.cmndExampleMenuItem(menuLine, verbosity='none') # # ICMs PKG Information # icmsPkgInfoBaseDir = marmePkgThis.pkgBase_configDir() icmsPkgModuleBaseDir = marmePkgThis.pkgBase_baseDir() icmsPkgLib.examples_pkgInfoParsFull( icmsPkgNameSpecification(), icmsPkgInfoBaseDir=icmsPkgInfoBaseDir, icmsPkgModuleBaseDir=icmsPkgModuleBaseDir, icmsPkgControlBaseDir=icmsPkgControlBaseDirDefault(), icmsPkgRunBaseDir=icmsPkgRunBaseDirDefault(), )
def cmnd( self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate( callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def extMenuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, icmName=icmExName, verbosity=verbosity) # 'little' or 'none' # def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() oneBpo = "pmi_ByD-100001" # oneSiRelPath = "plone3/main" bpo.examples_bpo_basicAccess(oneBpo) # palsBpo.examples_palsBpo_basicAccess(oneBpo, oneSiRelPath, menuLevel='chapter') icm.cmndExampleMenuChapter('*PALS-BASES Update*') cmndName = "basesUpdate" cmndArgs = "" cps = cpsInit() cps['bpoId'] = oneBpo menuItem(verbosity='little') cmndName = "palsToBxBash" cmndArgs = "" cps = cpsInit() cps['bpoId'] = oneBpo menuItem(verbosity='little') icmExName = "palsBaseLiveTargets.py" cmndName = "examples" cmndArgs = "" cps = cpsInit() cps['bpoId'] = oneBpo extMenuItem(verbosity='none') icm.cmndExampleMenuChapter('*PALS-REPOs Example-Cmnds*') icmExName = "palsRepoProfile.py" cmndName = "examples" cmndArgs = "" cps = cpsInit() cps['bpoId'] = oneBpo extMenuItem(verbosity='none') icmExName = "palsRepoLiveParams.py" cmndName = "examples" cmndArgs = "" cps = cpsInit() cps['bpoId'] = oneBpo extMenuItem(verbosity='none') icm.cmndExampleMenuChapter('*Digest-SIs Example-Cmnds*') cmndName = "enabledSisInfo" cmndArgs = "" cps = cpsInit() cps['bpoId'] = oneBpo menuItem(verbosity='none') icm.cmndExampleMenuChapter('*PALS-SIs Example-Cmnds*') thisBpo = palsBpo.obtainBpo(oneBpo, ) thisBpo.sis.sisDigest() icmExName = "palsSiPlone3.py" cmndName = "examples" cmndArgs = "" cps = cpsInit() cps['bpoId'] = oneBpo for eachSiPath in thisBpo.sis.svcInst_primary_enabled: cps['si'] = palsSis.siPathToSiId( oneBpo, eachSiPath, ) extMenuItem(verbosity='none') icm.cmndExampleMenuChapter('*PALS-VirDom-SIs Example-Cmnds*') icmExName = "palsSivdApache2.py" cmndName = "examples" cmndArgs = "" cps = cpsInit() cps['bpoId'] = oneBpo for eachSiPath in thisBpo.sis.svcInst_virDom_enabled: cps['si'] = palsSis.siPathToSiId( oneBpo, eachSiPath, ) extMenuItem(verbosity='none') return (cmndOutcome)
def examples_commonInvoker( svcSpecUrl, svcSpecFile, perfSap, headers, ): ####+END: """.""" def cpsInit(): return collections.OrderedDict() def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) def headersParam(cps, headers): if headers: cps['headers'] = headers icm.cmndExampleMenuChapter('*Service Specification Digestion*') cmndName = "svcOpsList" if svcSpecUrl: icm.cmndExampleMenuSection('* -i svcOpsList svcSpecUrl*') cps = cpsInit() cps['svcSpec'] = svcSpecUrl headersParam(cps, headers) cmndArgs = "" menuItem(verbosity='none') #icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') cps = cpsInit() cps['svcSpec'] = svcSpecUrl cps['perfSap'] = perfSap headersParam(cps, headers) cmndArgs = "" menuItem(verbosity='none') if svcSpecFile: icm.cmndExampleMenuSection('* -i svcOpsList svcSpecFile*') # cps = cpsInit(); # cps['svcSpec'] = svcSpecFile # headersParam(cps, headers) # cmndArgs = ""; # menuItem(verbosity='none') # #icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') cps = cpsInit() cps['svcSpec'] = svcSpecFile cps['perfSap'] = perfSap headersParam(cps, headers) cmndArgs = "" menuItem(verbosity='none')
def cmnd( self, interactive=False, # Can also be called non-interactively ): cmndOutcome = self.getOpOutcome() if interactive: if not self.cmndLineValidate(outcome=cmndOutcome): return cmndOutcome callParamsDict = {} if not icm.cmndCallParamsValidate( callParamsDict, interactive, outcome=cmndOutcome): return cmndOutcome ####+END: def cpsInit(): return collections.OrderedDict() def menuItem(verbosity): icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none' def execLineEx(cmndStr): icm.ex_gExecMenuItem(execLine=cmndStr) ##### IMPORTANT PARAMS SPECIFICATIONS BEGIN svcSpecUrl = "http://petstore.swagger.io/v2/swagger.json" svcSpecFile = "./swagger.json" perfSap = "http://localhost:8080/v2/swagger.json" headersFileName = "./bearerToken.headers" includeOpsListInExamples = True ##### IMPORTANT PARAMS SPECIFICATIONS END logControler = icm.LOG_Control() logControler.loggerSetLevel(20) icm.icmExampleMyName(G.icmMyName(), G.icmMyFullName()) icm.G_commonBriefExamples() bleep.examples_icmBasic() icm.cmndExampleMenuChapter( '*Config And Prepare The Invoker -- Create Header Files -- Obtain Swagger Spec*' ) cmndName = "prepInvoker" cmndArgs = "" cps = cpsInit() menuItem(verbosity='little') execLineEx("""wget {svcSpecUrl}""".format(svcSpecUrl=svcSpecUrl, )) # # svcOpsList examples from wsInvokerIcm # wsInvokerIcm.examples_commonInvoker( svcSpecUrl=svcSpecUrl, svcSpecFile=svcSpecFile, perfSap=perfSap, headers=None, ) icm.cmndExampleMenuChapter('*Operations Invokations*') cmndName = "rinvoke" # #rinvoker.py --svcSpec=http://petstore.swagger.io/v2/swagger.json --perfSap=http://localhost:8080/v2/swagger.json --headers=./bearerToken.headers --resource=user --opName=loginUser -i rinvoke username=usernameVALUE password=passwordVALUE # icm.cmndExampleMenuSection('* -i rinvoke loginUser svcSpecUrl*') cps = cpsInit() cps['svcSpec'] = svcSpecUrl cps['resource'] = "user" cps['opName'] = "loginUser" cmndArgs = "username=someUser password=somePasswd" menuItem(verbosity='none') #icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') cps = cpsInit() cps['svcSpec'] = svcSpecFile cps['perfSap'] = perfSap cps['headers'] = headersFileName cps['resource'] = "user" cps['opName'] = "loginUser" cmndArgs = "username=someUser password=somePasswd" menuItem(verbosity='none') #icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='full') icm.cmndExampleMenuSection('* -i rinvoke getPetById*') cps = cpsInit() #cps['svcSpec'] = svcSpecFile cps['svcSpec'] = svcSpecUrl #cps['perfSap'] = perfSap cps['resource'] = "pet" cps['opName'] = "getPetById" cmndArgs = "petId=1" menuItem(verbosity='none') icm.ex_gCmndMenuItem(cmndName, cps, cmndArgs, verbosity='little') cps = cpsInit() #cps['svcSpec'] = svcSpecFile cps['svcSpec'] = svcSpecUrl #cps['perfSap'] = perfSap cps['resource'] = "pet" cps['opName'] = "getPetById" cmndArgs = "petId=2" menuItem(verbosity='none') if includeOpsListInExamples: icm.cmndExampleMenuChapter( '*List Of Service Operation Invokations*') if svcSpecFile: if os.path.isfile(svcSpecFile): svcSpec = svcSpecFile else: svcSpec = svcSpecUrl else: svcSpec = svcSpecUrl cmndOutcome = wsInvokerIcm.svcOpsList().cmnd( interactive=False, svcSpec=svcSpec, perfSap=None, headers=None, ) else: icm.cmndExampleMenuChapter( '*Enable includeOpsListInExamples For An Example List Of Service Operation Invokations*' ) return (cmndOutcome)