From a70a79151799f8654bac138e47f6210be3f0e525 Mon Sep 17 00:00:00 2001 From: Richard Thrippleton Date: Mon, 1 Feb 2021 20:57:24 +0000 Subject: [PATCH] Apama Analytics EPL Apps tools for 10.7.0.21 --- .../apamax/eplapplications/basetest.html | 16 +++++----- .../apamax/eplapplications/connection.html | 8 ++--- .../apamax/eplapplications/eplapps.html | 28 ++++++++++++----- .../apamax/eplapplications/platform.html | 8 ++--- doc/pydoc/_modules/index.html | 8 ++--- doc/pydoc/_static/documentation_options.js | 2 +- .../apamax.eplapplications.basetest.html | 29 ++++++------------ .../apamax.eplapplications.buildVersions.html | 8 ++--- .../apamax.eplapplications.connection.html | 8 ++--- .../apamax.eplapplications.eplapps.html | 8 ++--- .../autodocgen/apamax.eplapplications.html | 8 ++--- .../apamax.eplapplications.platform.html | 8 ++--- doc/pydoc/autodocgen/apamax.html | 8 ++--- doc/pydoc/genindex.html | 8 ++--- doc/pydoc/index.html | 8 ++--- doc/pydoc/objects.inv | Bin 904 -> 905 bytes doc/pydoc/py-modindex.html | 8 ++--- doc/pydoc/search.html | 8 ++--- doc/pydoc/searchindex.js | 2 +- doc/pydoc/testing-epl.html | 8 ++--- doc/pydoc/using-eplapp.html | 8 ++--- doc/pydoc/using-pysys.html | 8 ++--- .../apamax/eplapplications/basetest.py | 8 ++--- .../apamax/eplapplications/eplapps.py | 18 +++++++++-- 24 files changed, 125 insertions(+), 106 deletions(-) diff --git a/doc/pydoc/_modules/apamax/eplapplications/basetest.html b/doc/pydoc/_modules/apamax/eplapplications/basetest.html index 07715b2..235dc98 100644 --- a/doc/pydoc/_modules/apamax/eplapplications/basetest.html +++ b/doc/pydoc/_modules/apamax/eplapplications/basetest.html @@ -4,7 +4,7 @@ - apamax.eplapplications.basetest — EPL Apps Tools 10.7.0.1 documentation + apamax.eplapplications.basetest — EPL Apps Tools 10.7.0.21 documentation @@ -26,7 +26,7 @@

Navigation

  • modules |
  • - + @@ -121,9 +121,9 @@

    Source code for apamax.eplapplications.basetest

    < # need to have a version independent addition or this will need to be maintained. apama_project.addBundle("Automatic onApplicationInitialized") - apama_project.addBundle("Cumulocity IoT > Cumulocity Client") - apama_project.addBundle("Cumulocity IoT > Event Definitions for Cumulocity") - apama_project.addBundle("Cumulocity IoT > Utilities for Cumulocity") + apama_project.addBundle("Cumulocity IoT > Cumulocity Client 10.5+") + apama_project.addBundle("Cumulocity IoT > Event Definitions for Cumulocity 10.5+") + apama_project.addBundle("Cumulocity IoT > Utilities for Cumulocity 10.5+") apama_project.addBundle("Correlator Management") apama_project.addBundle("JSON Support") apama_project.addBundle("Time Format") @@ -161,7 +161,7 @@

    Source code for apamax.eplapplications.basetest

    < paramImpl[prop] = params[prop] propFileName = os.path.join(self.output, "CumulocityIoT.properties") - destFileName = "/connectivity/CumulocityClient/CumulocityIoT.properties" + destFileName = "/connectivity/CumulocityClient10.5+/CumulocityIoT.properties" #create a local props file with open(propFileName, "w", encoding='utf8') as propfile: propfile.write('\ufeff\n') @@ -481,12 +481,12 @@

    Navigation

  • modules |
  • - +
    diff --git a/doc/pydoc/_modules/apamax/eplapplications/connection.html b/doc/pydoc/_modules/apamax/eplapplications/connection.html index 3916b86..637404e 100644 --- a/doc/pydoc/_modules/apamax/eplapplications/connection.html +++ b/doc/pydoc/_modules/apamax/eplapplications/connection.html @@ -4,7 +4,7 @@ - apamax.eplapplications.connection — EPL Apps Tools 10.7.0.1 documentation + apamax.eplapplications.connection — EPL Apps Tools 10.7.0.21 documentation @@ -26,7 +26,7 @@

    Navigation

  • modules |
  • - +
    @@ -178,12 +178,12 @@

    Navigation

  • modules |
  • - + diff --git a/doc/pydoc/_modules/apamax/eplapplications/eplapps.html b/doc/pydoc/_modules/apamax/eplapplications/eplapps.html index 881a20c..3b37c81 100644 --- a/doc/pydoc/_modules/apamax/eplapplications/eplapps.html +++ b/doc/pydoc/_modules/apamax/eplapplications/eplapps.html @@ -4,7 +4,7 @@ - apamax.eplapplications.eplapps — EPL Apps Tools 10.7.0.1 documentation + apamax.eplapplications.eplapps — EPL Apps Tools 10.7.0.21 documentation @@ -26,7 +26,7 @@

    Navigation

  • modules |
  • - + @@ -51,6 +51,7 @@

    Source code for apamax.eplapplications.eplapps

    import json import os import urllib +import codecs from pathlib import Path @@ -103,7 +104,7 @@

    Source code for apamax.eplapplications.eplapps

    else: raise FileExistsError(f'Deploy failed. \'{name}\' already exists in Apama EPL Apps.') try: - file_contents = Path(file).read_text() + file_contents = self.__read_text_withBOM(file) except Exception as err: raise IOError(f"Deploy failed. {err}") try: @@ -164,7 +165,7 @@

    Source code for apamax.eplapplications.eplapps

    elif os.path.splitext(file)[1] != '.mon': raise TypeError(f'Update failed. \'{file}\' is not a valid .mon file.') try: - contents = Path(file).read_text() + contents = self.__read_text_withBOM(file) except Exception as err: raise IOError(f"Update failed. {err}") body['contents'] = contents @@ -220,7 +221,20 @@

    Source code for apamax.eplapplications.eplapps

    try: self.connection.request('DELETE', f'/service/cep/eplfiles/{appId}') except Exception as err: - raise OSError(f'Unable to delete EPL app \'{name}\' using DELETE on {self.connection.base_url}/service/cep/eplfiles. {err}')

    + raise OSError(f'Unable to delete EPL app \'{name}\' using DELETE on {self.connection.base_url}/service/cep/eplfiles. {err}')
    + + def __read_text_withBOM(self, path): + """ + Thin wrapper for Path(<path>).read_text() . It assumes the file is UTF-8 encoded if it starts with the UTF-8 BOM, despite the current locale. + This method is used internally to make the tool behave consistently with many text editors and IDEs on Windows, which also honour the UTF-8 BOM. + Such a file is rendered correctly, therefore it should also be deployed correctly, else user expectations are confounded. + + :param path: The path to extract the text from + """ + if Path(path).read_bytes().startswith(codecs.BOM_UTF8): + return Path(path).read_text(encoding="utf8") + else: + return Path(path).read_text()
    @@ -259,12 +273,12 @@

    Navigation

  • modules |
  • - + diff --git a/doc/pydoc/_modules/apamax/eplapplications/platform.html b/doc/pydoc/_modules/apamax/eplapplications/platform.html index 399bd49..faa76fd 100644 --- a/doc/pydoc/_modules/apamax/eplapplications/platform.html +++ b/doc/pydoc/_modules/apamax/eplapplications/platform.html @@ -4,7 +4,7 @@ - apamax.eplapplications.platform — EPL Apps Tools 10.7.0.1 documentation + apamax.eplapplications.platform — EPL Apps Tools 10.7.0.21 documentation @@ -26,7 +26,7 @@

    Navigation

  • modules |
  • - + @@ -197,12 +197,12 @@

    Navigation

  • modules |
  • - + diff --git a/doc/pydoc/_modules/index.html b/doc/pydoc/_modules/index.html index b93c615..cfc13d2 100644 --- a/doc/pydoc/_modules/index.html +++ b/doc/pydoc/_modules/index.html @@ -4,7 +4,7 @@ - Overview: module code — EPL Apps Tools 10.7.0.1 documentation + Overview: module code — EPL Apps Tools 10.7.0.21 documentation @@ -26,7 +26,7 @@

    Navigation

  • modules |
  • - + @@ -78,11 +78,11 @@

    Navigation

  • modules |
  • - + diff --git a/doc/pydoc/_static/documentation_options.js b/doc/pydoc/_static/documentation_options.js index 6fd1b02..e13c636 100644 --- a/doc/pydoc/_static/documentation_options.js +++ b/doc/pydoc/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '10.7.0.1', + VERSION: '10.7.0.21', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/doc/pydoc/autodocgen/apamax.eplapplications.basetest.html b/doc/pydoc/autodocgen/apamax.eplapplications.basetest.html index e0d3364..cd3f81e 100644 --- a/doc/pydoc/autodocgen/apamax.eplapplications.basetest.html +++ b/doc/pydoc/autodocgen/apamax.eplapplications.basetest.html @@ -4,7 +4,7 @@ - apamax.eplapplications.basetest — EPL Apps Tools 10.7.0.1 documentation + apamax.eplapplications.basetest — EPL Apps Tools 10.7.0.21 documentation @@ -34,7 +34,7 @@

    Navigation

  • previous |
  • - + @@ -128,11 +128,8 @@

    ApamaC8YBaseTestsetup()[source]

    Contains setup actions to be executed before the test is executed.

    The setup method may be overridden by individual test classes, or (more commonly) in a custom BaseTest -subclass that provides common functionality for multiple individual tests. However before implementing a custom -BaseTest subclass with its own setup() method, consider whether the PySys concept of test plugins would meet -your needs.

    -

    If you do override this method, be sure to call super(BASETEST_CLASS_HERE, self).setup() to allow the -setup commands from the base test to run.

    +subclass that provides common functionality for multiple individual tests. If you override this method, be +sure to call super(BASETEST_CLASS_HERE, self).setup() to allow the setup commands from the base test to run.

    If setup throws an exception, the cleanup method will still be called, to allow for clean up resources that were already allocated.

    @@ -172,11 +169,8 @@

    LocalCorrelatorSimpleTestsetup()[source]

    Contains setup actions to be executed before the test is executed.

    The setup method may be overridden by individual test classes, or (more commonly) in a custom BaseTest -subclass that provides common functionality for multiple individual tests. However before implementing a custom -BaseTest subclass with its own setup() method, consider whether the PySys concept of test plugins would meet -your needs.

    -

    If you do override this method, be sure to call super(BASETEST_CLASS_HERE, self).setup() to allow the -setup commands from the base test to run.

    +subclass that provides common functionality for multiple individual tests. If you override this method, be +sure to call super(BASETEST_CLASS_HERE, self).setup() to allow the setup commands from the base test to run.

    If setup throws an exception, the cleanup method will still be called, to allow for clean up resources that were already allocated.

    @@ -216,11 +210,8 @@

    EPLAppsSimpleTestsetup()[source]

    Contains setup actions to be executed before the test is executed.

    The setup method may be overridden by individual test classes, or (more commonly) in a custom BaseTest -subclass that provides common functionality for multiple individual tests. However before implementing a custom -BaseTest subclass with its own setup() method, consider whether the PySys concept of test plugins would meet -your needs.

    -

    If you do override this method, be sure to call super(BASETEST_CLASS_HERE, self).setup() to allow the -setup commands from the base test to run.

    +subclass that provides common functionality for multiple individual tests. If you override this method, be +sure to call super(BASETEST_CLASS_HERE, self).setup() to allow the setup commands from the base test to run.

    If setup throws an exception, the cleanup method will still be called, to allow for clean up resources that were already allocated.

    @@ -300,13 +291,13 @@

    Navigation

  • previous |
  • - + diff --git a/doc/pydoc/autodocgen/apamax.eplapplications.buildVersions.html b/doc/pydoc/autodocgen/apamax.eplapplications.buildVersions.html index 0711898..15b49e0 100644 --- a/doc/pydoc/autodocgen/apamax.eplapplications.buildVersions.html +++ b/doc/pydoc/autodocgen/apamax.eplapplications.buildVersions.html @@ -4,7 +4,7 @@ - apamax.eplapplications.buildVersions — EPL Apps Tools 10.7.0.1 documentation + apamax.eplapplications.buildVersions — EPL Apps Tools 10.7.0.21 documentation @@ -34,7 +34,7 @@

    Navigation

  • previous |
  • - + @@ -102,13 +102,13 @@

    Navigation

  • previous |
  • - + diff --git a/doc/pydoc/autodocgen/apamax.eplapplications.connection.html b/doc/pydoc/autodocgen/apamax.eplapplications.connection.html index fcb60d5..15681d9 100644 --- a/doc/pydoc/autodocgen/apamax.eplapplications.connection.html +++ b/doc/pydoc/autodocgen/apamax.eplapplications.connection.html @@ -4,7 +4,7 @@ - apamax.eplapplications.connection — EPL Apps Tools 10.7.0.1 documentation + apamax.eplapplications.connection — EPL Apps Tools 10.7.0.21 documentation @@ -34,7 +34,7 @@

    Navigation

  • previous |
  • - + @@ -174,13 +174,13 @@

    Navigation

  • previous |
  • - + diff --git a/doc/pydoc/autodocgen/apamax.eplapplications.eplapps.html b/doc/pydoc/autodocgen/apamax.eplapplications.eplapps.html index 09dd9d0..ffed6e5 100644 --- a/doc/pydoc/autodocgen/apamax.eplapplications.eplapps.html +++ b/doc/pydoc/autodocgen/apamax.eplapplications.eplapps.html @@ -4,7 +4,7 @@ - apamax.eplapplications.eplapps — EPL Apps Tools 10.7.0.1 documentation + apamax.eplapplications.eplapps — EPL Apps Tools 10.7.0.21 documentation @@ -34,7 +34,7 @@

    Navigation

  • previous |
  • - + @@ -195,13 +195,13 @@

    Navigation

  • previous |
  • - + diff --git a/doc/pydoc/autodocgen/apamax.eplapplications.html b/doc/pydoc/autodocgen/apamax.eplapplications.html index 89772c6..5ccf319 100644 --- a/doc/pydoc/autodocgen/apamax.eplapplications.html +++ b/doc/pydoc/autodocgen/apamax.eplapplications.html @@ -4,7 +4,7 @@ - apamax.eplapplications — EPL Apps Tools 10.7.0.1 documentation + apamax.eplapplications — EPL Apps Tools 10.7.0.21 documentation @@ -34,7 +34,7 @@

    Navigation

  • previous |
  • - + @@ -124,12 +124,12 @@

    Navigation

  • previous |
  • - + diff --git a/doc/pydoc/autodocgen/apamax.eplapplications.platform.html b/doc/pydoc/autodocgen/apamax.eplapplications.platform.html index 2aa8106..3fab9a6 100644 --- a/doc/pydoc/autodocgen/apamax.eplapplications.platform.html +++ b/doc/pydoc/autodocgen/apamax.eplapplications.platform.html @@ -4,7 +4,7 @@ - apamax.eplapplications.platform — EPL Apps Tools 10.7.0.1 documentation + apamax.eplapplications.platform — EPL Apps Tools 10.7.0.21 documentation @@ -30,7 +30,7 @@

    Navigation

  • previous |
  • - + @@ -154,13 +154,13 @@

    Navigation

  • previous |
  • - + diff --git a/doc/pydoc/autodocgen/apamax.html b/doc/pydoc/autodocgen/apamax.html index b3e38d0..a7415ed 100644 --- a/doc/pydoc/autodocgen/apamax.html +++ b/doc/pydoc/autodocgen/apamax.html @@ -4,7 +4,7 @@ - PySys helpers for Apama EPL Apps — EPL Apps Tools 10.7.0.1 documentation + PySys helpers for Apama EPL Apps — EPL Apps Tools 10.7.0.21 documentation @@ -34,7 +34,7 @@

    Navigation

  • previous |
  • - + @@ -104,11 +104,11 @@

    Navigation

  • previous |
  • - + diff --git a/doc/pydoc/genindex.html b/doc/pydoc/genindex.html index f16523d..6a827a5 100644 --- a/doc/pydoc/genindex.html +++ b/doc/pydoc/genindex.html @@ -5,7 +5,7 @@ - Index — EPL Apps Tools 10.7.0.1 documentation + Index — EPL Apps Tools 10.7.0.21 documentation @@ -27,7 +27,7 @@

    Navigation

  • modules |
  • - + @@ -322,11 +322,11 @@

    Navigation

  • modules |
  • - + diff --git a/doc/pydoc/index.html b/doc/pydoc/index.html index 11c4a9c..5c6ae71 100644 --- a/doc/pydoc/index.html +++ b/doc/pydoc/index.html @@ -4,7 +4,7 @@ - EPL Apps Tools — EPL Apps Tools 10.7.0.1 documentation + EPL Apps Tools — EPL Apps Tools 10.7.0.21 documentation @@ -30,7 +30,7 @@

    Navigation

  • next |
  • - + @@ -140,11 +140,11 @@

    Navigation

  • next |
  • - + diff --git a/doc/pydoc/objects.inv b/doc/pydoc/objects.inv index 8dbc8796b530cc520ded4bc9a1a2fad12331e614..64ed08e8674120975115f8808e1ee3e0af10b96c 100644 GIT binary patch delta 12 TcmeBR?_{6g$!N6E)1Das7x4pV delta 10 RcmeBV?_i(cxzWp>82}Rm12zBv diff --git a/doc/pydoc/py-modindex.html b/doc/pydoc/py-modindex.html index 92e00a5..1b072e9 100644 --- a/doc/pydoc/py-modindex.html +++ b/doc/pydoc/py-modindex.html @@ -4,7 +4,7 @@ - Python Module Index — EPL Apps Tools 10.7.0.1 documentation + Python Module Index — EPL Apps Tools 10.7.0.21 documentation @@ -29,7 +29,7 @@

    Navigation

  • modules |
  • - + @@ -124,11 +124,11 @@

    Navigation

  • modules |
  • - + diff --git a/doc/pydoc/search.html b/doc/pydoc/search.html index d6da9a2..cd5ce59 100644 --- a/doc/pydoc/search.html +++ b/doc/pydoc/search.html @@ -4,7 +4,7 @@ - Search — EPL Apps Tools 10.7.0.1 documentation + Search — EPL Apps Tools 10.7.0.21 documentation @@ -31,7 +31,7 @@

    Navigation

  • modules |
  • - + @@ -88,11 +88,11 @@

    Navigation

  • modules |
  • - + diff --git a/doc/pydoc/searchindex.js b/doc/pydoc/searchindex.js index d0cbb30..cf65bcd 100644 --- a/doc/pydoc/searchindex.js +++ b/doc/pydoc/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["autodocgen/apamax","autodocgen/apamax.eplapplications","autodocgen/apamax.eplapplications.basetest","autodocgen/apamax.eplapplications.buildVersions","autodocgen/apamax.eplapplications.connection","autodocgen/apamax.eplapplications.eplapps","autodocgen/apamax.eplapplications.platform","index","testing-epl","using-eplapp","using-pysys"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":2,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["autodocgen/apamax.rst","autodocgen/apamax.eplapplications.rst","autodocgen/apamax.eplapplications.basetest.rst","autodocgen/apamax.eplapplications.buildVersions.rst","autodocgen/apamax.eplapplications.connection.rst","autodocgen/apamax.eplapplications.eplapps.rst","autodocgen/apamax.eplapplications.platform.rst","index.rst","testing-epl.rst","using-eplapp.rst","using-pysys.rst"],objects:{"":{apamax:[0,0,0,"-"]},"apamax.eplapplications":{basetest:[2,0,0,"-"],buildVersions:[3,0,0,"-"],connection:[4,0,0,"-"],eplapps:[5,0,0,"-"],platform:[6,0,0,"-"]},"apamax.eplapplications.basetest":{ApamaC8YBaseTest:[2,1,1,""],EPLAppsSimpleTest:[2,1,1,""],LocalCorrelatorSimpleTest:[2,1,1,""]},"apamax.eplapplications.basetest.ApamaC8YBaseTest":{addC8YPropertiesToProject:[2,2,1,""],createAppKey:[2,2,1,""],createProject:[2,2,1,""],getTestSubjectEPLApps:[2,2,1,""],prepareTenant:[2,2,1,""],setup:[2,2,1,""]},"apamax.eplapplications.basetest.EPLAppsSimpleTest":{execute:[2,2,1,""],prepareTenant:[2,2,1,""],setup:[2,2,1,""],shutdown:[2,2,1,""],validate:[2,2,1,""]},"apamax.eplapplications.basetest.LocalCorrelatorSimpleTest":{addEPLAppsToProject:[2,2,1,""],execute:[2,2,1,""],getMonitorsFromInjectedFile:[2,2,1,""],setup:[2,2,1,""],validate:[2,2,1,""]},"apamax.eplapplications.connection":{C8yConnection:[4,1,1,""]},"apamax.eplapplications.connection.C8yConnection":{do_get:[4,2,1,""],do_request_json:[4,2,1,""],request:[4,2,1,""]},"apamax.eplapplications.eplapps":{EPLApps:[5,1,1,""]},"apamax.eplapplications.eplapps.EPLApps":{"delete":[5,2,1,""],deploy:[5,2,1,""],getAppId:[5,2,1,""],getEPLApps:[5,2,1,""],update:[5,2,1,""]},"apamax.eplapplications.platform":{CumulocityPlatform:[6,1,1,""]},"apamax.eplapplications.platform.CumulocityPlatform":{getApamaLogFile:[6,2,1,""],getC8YConnection:[6,2,1,""],getC8yConnectionDetails:[6,2,1,""],shutdown:[6,2,1,""]},apamax:{eplapplications:[1,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method"},terms:{"boolean":5,"case":[4,7,8,10],"class":[2,4,5,6,10],"default":[5,9,10],"export":10,"float":8,"function":2,"import":[8,10],"new":[2,8,9],"return":[2,4,5,6,8],"super":2,"throw":2,"true":[4,5,6,10],"while":[2,7,8],Added:[6,10],For:[6,9,10],The:[2,4,5,6,8,9,10],There:10,These:[7,8,10],Using:[7,8],With:8,abl:8,abov:[8,10],access:10,accord:10,act:8,action:[2,8],activ:[2,5,6,8,9,10],add:[2,8,10],addc8ypropertiestoproject:[2,10],added:2,addeplappstoproject:2,adding:8,addit:[8,9],advanc:7,after:[8,10],against:2,agreement:7,alarm:[2,8,10],alarm_typ:8,alarm_wait_timeout:8,alarmonmeasurementthreshold:[8,10],alarmonmeasurementthresholdtest:[8,10],alert:8,all:[2,5,8,9,10],alloc:2,allow:[2,7,9,10],along:10,alongsid:8,alreadi:[2,10],also:[7,8,9,10],altern:8,analyt:10,ani:[8,10],anoth:8,anyon:10,apach:7,apama:[5,6,7,10],apama_hom:[2,10],apamac8ybasetest:10,apamacommun:7,apamaproject:2,apamax:[7,10],app:[2,5],appear:8,applic:[2,6,10],appnam:5,approach:8,appundertest:10,argument:[8,9],arrang:8,assertgrep:10,associ:8,assum:10,attempt:4,authent:[2,10],automat:[7,8,10],avail:[9,10],avoid:10,base:[2,4,5,6,8,9],basetest:10,basetest_class_her:2,basic:10,been:[2,8,10],befor:[2,8,10],behav:10,behavior:8,being:[2,5,8],below:[8,10],best:8,between:10,blank:10,block:10,bodi:4,both:[8,10],builder:10,bundl:[2,10],c8y:10,c8y_isdevic:8,c8yconnect:[5,6],call:2,can:[8,9,10],cannot:7,capabl:10,caus:8,chang:[8,9],channel:8,check:[2,8,10],clean:[2,8,10],cleanup:[2,8],clear:[2,10],cloud:[7,8],code:[8,10],collect:5,com:[7,10],come:10,command:[2,7,10],common:[2,8],commonli:2,complet:[8,10],compris:10,concept:2,config:10,configur:[2,6,10],confirm:8,conjunct:8,connect:[2,5,6,8,9,10],consid:2,consist:8,constitut:7,construct:8,constuct:8,contain:[2,5,9,10],content:[5,9],contribut:7,convent:8,copi:10,correct:8,correctli:8,correl:[2,8,10],correlatorhelp:10,cover:8,creat:[2,4,6,7,10],createappkei:2,createnewdevic:8,createproject:[2,10],creation:8,credenti:10,cumuloc:[2,4,5,6,7],cumulocity_authority_fil:2,cumulocity_measurement_format:2,cumulocity_password:[2,6,10],cumulocity_server_url:[2,6,10],cumulocity_ten:[2,6],cumulocity_url:9,cumulocity_usernam:[2,6,10],cumulocityplatform:10,currenttim:8,custom:2,data:[2,8,10],deactiv:[2,10],dedic:10,def:10,defin:[2,6,8],delet:[2,5,7,8,10],demonstr:8,deploi:[5,6,7,10],deployeddir:10,describ:10,descript:[5,8,9,10],descriptor:2,detail:[9,10],determin:8,devic:[2,7,10],device_typ:8,devicecr:8,deviceid:8,devicesimul:8,dictionari:[2,8],die:[8,10],differ:10,dir:10,direct:2,directli:10,directori:[2,8,9,10],disrupt:10,do_get:4,do_request_json:4,doc:7,document:[8,9,10],documentaion:10,doe:10,don:10,done:[2,8,10],each:[2,8,9],earli:8,easili:8,edg:[8,10],either:[8,9,10],els:8,empti:[2,10],enabl:10,ensur:[2,8],env:10,environ:[2,10],epl:[2,5,6],epl_app:[2,10],epl_testing_sdk:[2,10],eplapp:[2,6,7,10],eplappl:[7,10],eplappssimpletest:10,eplapptobetest:2,eplfil:[6,10],error:[2,8,9,10],event:[7,10],everi:7,exampl:[8,9,10],except:[2,5],execut:[2,8,10],exist:[2,5,7,8,10],existingproject:2,exit:7,expect:[4,8],expectingalarm:8,explic:10,explicit:10,explicitli:8,expr:[6,10],extens:[7,10],extern:2,facil:10,fail:[8,10],failur:8,fals:[5,8,10],fatal:[8,10],fetch:5,field:[8,9],file:[2,5,6,9,10],findalarm:8,findalarmrespons:8,findalarmresponseack:8,fine:10,finish:[6,8,10],first:[2,8],firstli:8,flush:10,follow:[2,6,8,9,10],fork:7,found:[8,10],framework:[7,8,10],free:7,from:[2,6,7,9,10],further:7,gener:8,generatereqid:8,get:[2,4,5,10],getapamalogfil:[6,10],getappid:5,getc8yconnect:[6,10],getc8yconnectiondetail:6,geteplapp:5,getmonitorsfrominjectedfil:2,getoradddefault:8,gettestsubjecteplapp:2,github:[7,10],give:10,given:5,guarante:7,guid:[7,8],has:[2,8,9,10],have:[2,8,9,10],header:4,help:9,helper:[7,10],histor:[8,10],host:2,how:[8,10],howev:[2,10],http:[2,4,7,10],identifi:[8,10],implement:2,inact:[5,9],includ:[7,8,10],includecont:5,indic:8,individu:2,info:8,inform:8,initi:8,inject:10,input:[2,6,8,10],instal:10,instead:[2,8],integ:8,interact:[5,9],interfer:10,involv:8,iot:[2,7],its:2,join:10,json:[4,5],jsoneplappslist:5,jsonresp:4,just:[2,10],kei:2,kind:8,know:10,kwarg:4,least:9,like:[9,10],line:7,linux:10,list:[2,7],listen:[8,10],load:10,local:[2,5,6,7,9],localcorrelatorsimpletest:10,locat:[4,10],log:[2,6,8,10],logfil:10,look:[8,9,10],made:10,mai:[2,10],main:7,mainli:4,major:8,make:[8,10],makeproject:10,manag:[7,8],managedobject:8,mandatori:9,measur:8,measurement_typ:8,measurementreqid:8,meet:2,messag:[8,9],method:[2,4],mimic:2,minim:9,mock:8,model:10,modifi:7,modul:10,mon:[2,5,6,9,10],monfil:9,monitor:[2,6,8,10],monitorsdir:10,more:[2,8,9,10],most:8,much:10,multipl:[2,8],must:[8,10],mypassword:10,myten:10,myusernam:10,name:[2,5,8,9,10],need:[2,8,9,10],new_nam:[5,9],next:8,none:[2,4,5,8,10],note:8,notic:8,object:[2,4,5,6,8],objectcommit:8,objectcommitfail:8,occur:8,old_nam:9,one:[2,8,9,10],onli:[2,10],oper:8,option:[5,9,10],order:[8,10],org:7,other:[8,10],our:[8,10],out:[8,10],outcom:7,outlin:8,output:[4,8],outsubdir:2,overrid:2,overridden:2,overwrit:[5,9],own:2,parallel:8,param:[2,4,8],paramet:[2,4,5,6],parent:6,pars:4,part:7,particular:[2,10],pass:8,password:[2,4,6,9,10],path:[2,4,5,6,9,10],path_to_sdk:10,perform:[4,9],period:8,pip:10,platform:[2,5,10],pleas:10,plug:8,plugin:2,point:10,port:2,possibilit:8,possibl:[2,8,10],post:4,potenti:10,prefix:[8,10],prepar:2,prepareten:2,previou:[2,10],previous:10,print:7,process:[8,10],produc:8,product:[7,10],project:[2,7,10],projecthelp:2,prompt:10,properti:[2,6,8,10],provid:[2,7,8,10],purpos:10,put:10,pysi:[2,6,7,8],pysys_:[8,10],pysys_test_:10,pysysproject:[2,6,10],pysystest:[2,10],python:[4,10],queri:[4,5,7],quickli:8,rais:[2,5,8],rather:8,reason:8,receiv:7,recommend:[8,10],redeploi:[5,9,10],relai:8,relev:8,remov:10,renam:10,report:7,repositori:10,repres:8,reqid:8,request:[2,4,9],requir:[2,6,10],resolv:8,resourc:[2,4,10],resp:8,respoitori:7,respond:8,respons:[4,8],rest:[4,9],retriev:[2,8],rule:8,run:[2,7,8],runner:2,same:[9,10],sampl:10,script:[7,9],sdk:[8,9,10],second:8,section:[8,10],see:[7,8,10],self:[2,6,10],send:7,send_channel:8,sendmeasur:8,sent:8,server:10,set:[2,6,8,9,10],setup:2,should:[5,8,10],shutdown:[2,6],similarli:8,simpl:4,simpli:[7,10],simul:7,sinc:8,snippet:8,softwar:7,some:[8,10],someth:10,sourc:[2,4,5,6,8],specifi:[4,9,10],spool:6,start:10,state:[5,9],statement:[8,10],still:2,stop:6,str:5,string:[2,4,8],subclass:2,subject:7,subscrib:8,subscribe_channel:8,success:8,successfulli:8,suit:7,suitabl:2,summari:7,support:7,sure:[2,8],t1234567:10,tag:2,take:[8,9,10],tenant:[2,8,9,10],tenantid:6,termin:[2,8,10],test:[2,6,7],test_channel:8,testcas:10,testframework:10,testineplapp:10,testlocalcorrel:10,testnam:10,than:[2,8],thei:[7,8,10],them:7,therefor:8,thi:[2,5,6,7,8,9,10],those:[2,8],through:10,thu:[8,9],time:8,timeout:8,titl:10,tool:8,tostr:8,transport:8,tune:10,two:8,type:8,typic:2,unabl:8,unaffect:10,under:[7,10],unexpect:8,uniqu:[8,10],until:[8,10],updat:[5,7,8],upload:[2,5,6,7,9,10],url:[2,4,6,9,10],usag:9,use:[4,6,7,8,9,10],used:[8,10],uselocationheaderpostresp:4,user:[2,5,7,10],usernam:[2,4,6,9,10],uses:8,using:[2,6,8,9,10],usual:8,util:8,valid:[2,10],valu:[2,8,10],valuabl:10,value_fragment_typ:8,value_series_typ:8,variabl:10,verifi:8,via:10,view:10,wai:10,wait:[8,10],waitforgrep:[6,10],want:[8,10],warn:9,warranti:7,welcom:7,were:[2,10],what:[8,10],when:[2,5,6,8,10],whenev:[8,10],where:[9,10],whether:[2,4,5,8],which:[2,8,9,10],whilst:10,who:10,window:10,wish:[5,8,9],within:[6,8,10],without:7,withrepons:8,withrespons:8,work:[7,10],would:[2,8,9],write:[7,10],written:10,www:7,xml:[2,6,10],you:[2,7,8,9,10],your:[2,7]},titles:["PySys helpers for Apama EPL Apps","apamax.eplapplications","apamax.eplapplications.basetest","apamax.eplapplications.buildVersions","apamax.eplapplications.connection","apamax.eplapplications.eplapps","apamax.eplapplications.platform","EPL Apps Tools","Writing tests for EPL apps","Using the eplapp.py command line tool","Using PySys to test your EPL apps"],titleterms:{Using:[9,10],advanc:10,apama:[0,9],apamac8ybasetest:2,apamax:[1,2,3,4,5,6],app:[0,7,8,9,10],basetest:2,buildvers:3,c8yconnect:4,cloud:10,command:9,connect:4,content:7,creat:8,cumuloc:[8,9,10],cumulocityplatform:6,delet:9,deploi:9,devic:8,disclaim:7,epl:[0,7,8,9,10],eplapp:[5,9],eplappl:[1,2,3,4,5,6],eplappssimpletest:2,event:8,exist:9,exit:8,from:8,helper:0,introduct:[7,8,9,10],iot:[8,9,10],licens:7,line:9,list:9,local:10,localcorrelatorsimpletest:2,outcom:8,platform:6,print:9,pysi:[0,10],queri:8,receiv:8,report:8,run:10,sampl:8,send:8,simul:8,summari:8,test:[8,10],tool:[7,9],updat:9,write:8,your:[8,9,10]}}) \ No newline at end of file +Search.setIndex({docnames:["autodocgen/apamax","autodocgen/apamax.eplapplications","autodocgen/apamax.eplapplications.basetest","autodocgen/apamax.eplapplications.buildVersions","autodocgen/apamax.eplapplications.connection","autodocgen/apamax.eplapplications.eplapps","autodocgen/apamax.eplapplications.platform","index","testing-epl","using-eplapp","using-pysys"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":2,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["autodocgen/apamax.rst","autodocgen/apamax.eplapplications.rst","autodocgen/apamax.eplapplications.basetest.rst","autodocgen/apamax.eplapplications.buildVersions.rst","autodocgen/apamax.eplapplications.connection.rst","autodocgen/apamax.eplapplications.eplapps.rst","autodocgen/apamax.eplapplications.platform.rst","index.rst","testing-epl.rst","using-eplapp.rst","using-pysys.rst"],objects:{"":{apamax:[0,0,0,"-"]},"apamax.eplapplications":{basetest:[2,0,0,"-"],buildVersions:[3,0,0,"-"],connection:[4,0,0,"-"],eplapps:[5,0,0,"-"],platform:[6,0,0,"-"]},"apamax.eplapplications.basetest":{ApamaC8YBaseTest:[2,1,1,""],EPLAppsSimpleTest:[2,1,1,""],LocalCorrelatorSimpleTest:[2,1,1,""]},"apamax.eplapplications.basetest.ApamaC8YBaseTest":{addC8YPropertiesToProject:[2,2,1,""],createAppKey:[2,2,1,""],createProject:[2,2,1,""],getTestSubjectEPLApps:[2,2,1,""],prepareTenant:[2,2,1,""],setup:[2,2,1,""]},"apamax.eplapplications.basetest.EPLAppsSimpleTest":{execute:[2,2,1,""],prepareTenant:[2,2,1,""],setup:[2,2,1,""],shutdown:[2,2,1,""],validate:[2,2,1,""]},"apamax.eplapplications.basetest.LocalCorrelatorSimpleTest":{addEPLAppsToProject:[2,2,1,""],execute:[2,2,1,""],getMonitorsFromInjectedFile:[2,2,1,""],setup:[2,2,1,""],validate:[2,2,1,""]},"apamax.eplapplications.connection":{C8yConnection:[4,1,1,""]},"apamax.eplapplications.connection.C8yConnection":{do_get:[4,2,1,""],do_request_json:[4,2,1,""],request:[4,2,1,""]},"apamax.eplapplications.eplapps":{EPLApps:[5,1,1,""]},"apamax.eplapplications.eplapps.EPLApps":{"delete":[5,2,1,""],deploy:[5,2,1,""],getAppId:[5,2,1,""],getEPLApps:[5,2,1,""],update:[5,2,1,""]},"apamax.eplapplications.platform":{CumulocityPlatform:[6,1,1,""]},"apamax.eplapplications.platform.CumulocityPlatform":{getApamaLogFile:[6,2,1,""],getC8YConnection:[6,2,1,""],getC8yConnectionDetails:[6,2,1,""],shutdown:[6,2,1,""]},apamax:{eplapplications:[1,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method"},terms:{"boolean":5,"case":[4,7,8,10],"class":[2,4,5,6,10],"default":[5,9,10],"export":10,"float":8,"function":2,"import":[8,10],"new":[2,8,9],"return":[2,4,5,6,8],"super":2,"throw":2,"true":[4,5,6,10],"while":[2,7,8],Added:[6,10],For:[6,9,10],The:[2,4,5,6,8,9,10],There:10,These:[7,8,10],Using:[7,8],With:8,abl:8,abov:[8,10],access:10,accord:10,act:8,action:[2,8],activ:[2,5,6,8,9,10],add:[2,8,10],addc8ypropertiestoproject:[2,10],added:2,addeplappstoproject:2,adding:8,addit:[8,9],advanc:7,after:[8,10],against:2,agreement:7,alarm:[2,8,10],alarm_typ:8,alarm_wait_timeout:8,alarmonmeasurementthreshold:[8,10],alarmonmeasurementthresholdtest:[8,10],alert:8,all:[2,5,8,9,10],alloc:2,allow:[2,7,9,10],along:10,alongsid:8,alreadi:[2,10],also:[7,8,9,10],altern:8,analyt:10,ani:[8,10],anoth:8,anyon:10,apach:7,apama:[5,6,7,10],apama_hom:[2,10],apamac8ybasetest:10,apamacommun:7,apamaproject:2,apamax:[7,10],app:[2,5],appear:8,applic:[2,6,10],appnam:5,approach:8,appundertest:10,argument:[8,9],arrang:8,assertgrep:10,associ:8,assum:10,attempt:4,authent:[2,10],automat:[7,8,10],avail:[9,10],avoid:10,base:[2,4,5,6,8,9],basetest:10,basetest_class_her:2,basic:10,been:[2,8,10],befor:[2,8,10],behav:10,behavior:8,being:[2,5,8],below:[8,10],best:8,between:10,blank:10,block:10,bodi:4,both:[8,10],builder:10,bundl:[2,10],c8y:10,c8y_isdevic:8,c8yconnect:[5,6],call:2,can:[8,9,10],cannot:7,capabl:10,caus:8,chang:[8,9],channel:8,check:[2,8,10],clean:[2,8,10],cleanup:[2,8],clear:[2,10],cloud:[7,8],code:[8,10],collect:5,com:[7,10],come:10,command:[2,7,10],common:[2,8],commonli:2,complet:[8,10],compris:10,config:10,configur:[2,6,10],confirm:8,conjunct:8,connect:[2,5,6,8,9,10],consist:8,constitut:7,construct:8,constuct:8,contain:[2,5,9,10],content:[5,9],contribut:7,convent:8,copi:10,correct:8,correctli:8,correl:[2,8,10],correlatorhelp:10,cover:8,creat:[2,4,6,7,10],createappkei:2,createnewdevic:8,createproject:[2,10],creation:8,credenti:10,cumuloc:[2,4,5,6,7],cumulocity_authority_fil:2,cumulocity_measurement_format:2,cumulocity_password:[2,6,10],cumulocity_server_url:[2,6,10],cumulocity_ten:[2,6],cumulocity_url:9,cumulocity_usernam:[2,6,10],cumulocityplatform:10,currenttim:8,custom:2,data:[2,8,10],deactiv:[2,10],dedic:10,def:10,defin:[2,6,8],delet:[2,5,7,8,10],demonstr:8,deploi:[5,6,7,10],deployeddir:10,describ:10,descript:[5,8,9,10],descriptor:2,detail:[9,10],determin:8,devic:[2,7,10],device_typ:8,devicecr:8,deviceid:8,devicesimul:8,dictionari:[2,8],die:[8,10],differ:10,dir:10,direct:2,directli:10,directori:[2,8,9,10],disrupt:10,do_get:4,do_request_json:4,doc:7,document:[8,9,10],documentaion:10,doe:10,don:10,done:[2,8,10],each:[2,8,9],earli:8,easili:8,edg:[8,10],either:[8,9,10],els:8,empti:[2,10],enabl:10,ensur:[2,8],env:10,environ:[2,10],epl:[2,5,6],epl_app:[2,10],epl_testing_sdk:[2,10],eplapp:[2,6,7,10],eplappl:[7,10],eplappssimpletest:10,eplapptobetest:2,eplfil:[6,10],error:[2,8,9,10],event:[7,10],everi:7,exampl:[8,9,10],except:[2,5],execut:[2,8,10],exist:[2,5,7,8,10],existingproject:2,exit:7,expect:[4,8],expectingalarm:8,explic:10,explicit:10,explicitli:8,expr:[6,10],extens:[7,10],extern:2,facil:10,fail:[8,10],failur:8,fals:[5,8,10],fatal:[8,10],fetch:5,field:[8,9],file:[2,5,6,9,10],findalarm:8,findalarmrespons:8,findalarmresponseack:8,fine:10,finish:[6,8,10],first:[2,8],firstli:8,flush:10,follow:[2,6,8,9,10],fork:7,found:[8,10],framework:[7,8,10],free:7,from:[2,6,7,9,10],further:7,gener:8,generatereqid:8,get:[2,4,5,10],getapamalogfil:[6,10],getappid:5,getc8yconnect:[6,10],getc8yconnectiondetail:6,geteplapp:5,getmonitorsfrominjectedfil:2,getoradddefault:8,gettestsubjecteplapp:2,github:[7,10],give:10,given:5,guarante:7,guid:[7,8],has:[2,8,9,10],have:[2,8,9,10],header:4,help:9,helper:[7,10],histor:[8,10],host:2,how:[8,10],howev:10,http:[2,4,7,10],identifi:[8,10],inact:[5,9],includ:[7,8,10],includecont:5,indic:8,individu:2,info:8,inform:8,initi:8,inject:10,input:[2,6,8,10],instal:10,instead:[2,8],integ:8,interact:[5,9],interfer:10,involv:8,iot:[2,7],join:10,json:[4,5],jsoneplappslist:5,jsonresp:4,just:[2,10],kei:2,kind:8,know:10,kwarg:4,least:9,like:[9,10],line:7,linux:10,list:[2,7],listen:[8,10],load:10,local:[2,5,6,7,9],localcorrelatorsimpletest:10,locat:[4,10],log:[2,6,8,10],logfil:10,look:[8,9,10],made:10,mai:[2,10],main:7,mainli:4,major:8,make:[8,10],makeproject:10,manag:[7,8],managedobject:8,mandatori:9,measur:8,measurement_typ:8,measurementreqid:8,messag:[8,9],method:[2,4],mimic:2,minim:9,mock:8,model:10,modifi:7,modul:10,mon:[2,5,6,9,10],monfil:9,monitor:[2,6,8,10],monitorsdir:10,more:[2,8,9,10],most:8,much:10,multipl:[2,8],must:[8,10],mypassword:10,myten:10,myusernam:10,name:[2,5,8,9,10],need:[8,9,10],new_nam:[5,9],next:8,none:[2,4,5,8,10],note:8,notic:8,object:[2,4,5,6,8],objectcommit:8,objectcommitfail:8,occur:8,old_nam:9,one:[2,8,9,10],onli:[2,10],oper:8,option:[5,9,10],order:[8,10],org:7,other:[8,10],our:[8,10],out:[8,10],outcom:7,outlin:8,output:[4,8],outsubdir:2,overrid:2,overridden:2,overwrit:[5,9],parallel:8,param:[2,4,8],paramet:[2,4,5,6],parent:6,pars:4,part:7,particular:[2,10],pass:8,password:[2,4,6,9,10],path:[2,4,5,6,9,10],path_to_sdk:10,perform:[4,9],period:8,pip:10,platform:[2,5,10],pleas:10,plug:8,point:10,port:2,possibilit:8,possibl:[2,8,10],post:4,potenti:10,prefix:[8,10],prepar:2,prepareten:2,previou:[2,10],previous:10,print:7,process:[8,10],produc:8,product:[7,10],project:[2,7,10],projecthelp:2,prompt:10,properti:[2,6,8,10],provid:[2,7,8,10],purpos:10,put:10,pysi:[2,6,7,8],pysys_:[8,10],pysys_test_:10,pysysproject:[2,6,10],pysystest:[2,10],python:[4,10],queri:[4,5,7],quickli:8,rais:[2,5,8],rather:8,reason:8,receiv:7,recommend:[8,10],redeploi:[5,9,10],relai:8,relev:8,remov:10,renam:10,report:7,repositori:10,repres:8,reqid:8,request:[2,4,9],requir:[2,6,10],resolv:8,resourc:[2,4,10],resp:8,respoitori:7,respond:8,respons:[4,8],rest:[4,9],retriev:[2,8],rule:8,run:[2,7,8],runner:2,same:[9,10],sampl:10,script:[7,9],sdk:[8,9,10],second:8,section:[8,10],see:[7,8,10],self:[2,6,10],send:7,send_channel:8,sendmeasur:8,sent:8,server:10,set:[2,6,8,9,10],setup:2,should:[5,8,10],shutdown:[2,6],similarli:8,simpl:4,simpli:[7,10],simul:7,sinc:8,snippet:8,softwar:7,some:[8,10],someth:10,sourc:[2,4,5,6,8],specifi:[4,9,10],spool:6,start:10,state:[5,9],statement:[8,10],still:2,stop:6,str:5,string:[2,4,8],subclass:2,subject:7,subscrib:8,subscribe_channel:8,success:8,successfulli:8,suit:7,suitabl:2,summari:7,support:7,sure:[2,8],t1234567:10,tag:2,take:[8,9,10],tenant:[2,8,9,10],tenantid:6,termin:[2,8,10],test:[2,6,7],test_channel:8,testcas:10,testframework:10,testineplapp:10,testlocalcorrel:10,testnam:10,than:[2,8],thei:[7,8,10],them:7,therefor:8,thi:[2,5,6,7,8,9,10],those:[2,8],through:10,thu:[8,9],time:8,timeout:8,titl:10,tool:8,tostr:8,transport:8,tune:10,two:8,type:8,typic:2,unabl:8,unaffect:10,under:[7,10],unexpect:8,uniqu:[8,10],until:[8,10],updat:[5,7,8],upload:[2,5,6,7,9,10],url:[2,4,6,9,10],usag:9,use:[4,6,7,8,9,10],used:[8,10],uselocationheaderpostresp:4,user:[2,5,7,10],usernam:[2,4,6,9,10],uses:8,using:[2,6,8,9,10],usual:8,util:8,valid:[2,10],valu:[2,8,10],valuabl:10,value_fragment_typ:8,value_series_typ:8,variabl:10,verifi:8,via:10,view:10,wai:10,wait:[8,10],waitforgrep:[6,10],want:[8,10],warn:9,warranti:7,welcom:7,were:[2,10],what:[8,10],when:[2,5,6,8,10],whenev:[8,10],where:[9,10],whether:[4,5,8],which:[2,8,9,10],whilst:10,who:10,window:10,wish:[5,8,9],within:[6,8,10],without:7,withrepons:8,withrespons:8,work:[7,10],would:[8,9],write:[7,10],written:10,www:7,xml:[2,6,10],you:[2,7,8,9,10],your:7},titles:["PySys helpers for Apama EPL Apps","apamax.eplapplications","apamax.eplapplications.basetest","apamax.eplapplications.buildVersions","apamax.eplapplications.connection","apamax.eplapplications.eplapps","apamax.eplapplications.platform","EPL Apps Tools","Writing tests for EPL apps","Using the eplapp.py command line tool","Using PySys to test your EPL apps"],titleterms:{Using:[9,10],advanc:10,apama:[0,9],apamac8ybasetest:2,apamax:[1,2,3,4,5,6],app:[0,7,8,9,10],basetest:2,buildvers:3,c8yconnect:4,cloud:10,command:9,connect:4,content:7,creat:8,cumuloc:[8,9,10],cumulocityplatform:6,delet:9,deploi:9,devic:8,disclaim:7,epl:[0,7,8,9,10],eplapp:[5,9],eplappl:[1,2,3,4,5,6],eplappssimpletest:2,event:8,exist:9,exit:8,from:8,helper:0,introduct:[7,8,9,10],iot:[8,9,10],licens:7,line:9,list:9,local:10,localcorrelatorsimpletest:2,outcom:8,platform:6,print:9,pysi:[0,10],queri:8,receiv:8,report:8,run:10,sampl:8,send:8,simul:8,summari:8,test:[8,10],tool:[7,9],updat:9,write:8,your:[8,9,10]}}) \ No newline at end of file diff --git a/doc/pydoc/testing-epl.html b/doc/pydoc/testing-epl.html index 617c9b2..9223113 100644 --- a/doc/pydoc/testing-epl.html +++ b/doc/pydoc/testing-epl.html @@ -4,7 +4,7 @@ - Writing tests for EPL apps — EPL Apps Tools 10.7.0.1 documentation + Writing tests for EPL apps — EPL Apps Tools 10.7.0.21 documentation @@ -34,7 +34,7 @@

    Navigation

  • previous |
  • - + @@ -284,11 +284,11 @@

    Navigation

  • previous |
  • - + diff --git a/doc/pydoc/using-eplapp.html b/doc/pydoc/using-eplapp.html index 51d8939..5f49156 100644 --- a/doc/pydoc/using-eplapp.html +++ b/doc/pydoc/using-eplapp.html @@ -4,7 +4,7 @@ - Using the eplapp.py command line tool — EPL Apps Tools 10.7.0.1 documentation + Using the eplapp.py command line tool — EPL Apps Tools 10.7.0.21 documentation @@ -34,7 +34,7 @@

    Navigation

  • previous |
  • - + @@ -180,11 +180,11 @@

    Navigation

  • previous |
  • - + diff --git a/doc/pydoc/using-pysys.html b/doc/pydoc/using-pysys.html index ddccc6f..cb8c353 100644 --- a/doc/pydoc/using-pysys.html +++ b/doc/pydoc/using-pysys.html @@ -4,7 +4,7 @@ - Using PySys to test your EPL apps — EPL Apps Tools 10.7.0.1 documentation + Using PySys to test your EPL apps — EPL Apps Tools 10.7.0.21 documentation @@ -34,7 +34,7 @@

    Navigation

  • previous |
  • - + @@ -290,11 +290,11 @@

    Navigation

  • previous |
  • - + diff --git a/testframework/apamax/eplapplications/basetest.py b/testframework/apamax/eplapplications/basetest.py index d936f50..fffdb82 100755 --- a/testframework/apamax/eplapplications/basetest.py +++ b/testframework/apamax/eplapplications/basetest.py @@ -82,9 +82,9 @@ def createProject(self, name, existingProject=None): # need to have a version independent addition or this will need to be maintained. apama_project.addBundle("Automatic onApplicationInitialized") - apama_project.addBundle("Cumulocity IoT > Cumulocity Client") - apama_project.addBundle("Cumulocity IoT > Event Definitions for Cumulocity") - apama_project.addBundle("Cumulocity IoT > Utilities for Cumulocity") + apama_project.addBundle("Cumulocity IoT > Cumulocity Client 10.5+") + apama_project.addBundle("Cumulocity IoT > Event Definitions for Cumulocity 10.5+") + apama_project.addBundle("Cumulocity IoT > Utilities for Cumulocity 10.5+") apama_project.addBundle("Correlator Management") apama_project.addBundle("JSON Support") apama_project.addBundle("Time Format") @@ -122,7 +122,7 @@ def addC8YPropertiesToProject(self, apamaProject, params=None): paramImpl[prop] = params[prop] propFileName = os.path.join(self.output, "CumulocityIoT.properties") - destFileName = "/connectivity/CumulocityClient/CumulocityIoT.properties" + destFileName = "/connectivity/CumulocityClient10.5+/CumulocityIoT.properties" #create a local props file with open(propFileName, "w", encoding='utf8') as propfile: propfile.write('\ufeff\n') diff --git a/testframework/apamax/eplapplications/eplapps.py b/testframework/apamax/eplapplications/eplapps.py index 576f52e..f9d2fa4 100755 --- a/testframework/apamax/eplapplications/eplapps.py +++ b/testframework/apamax/eplapplications/eplapps.py @@ -12,6 +12,7 @@ import json import os import urllib +import codecs from pathlib import Path @@ -64,7 +65,7 @@ def deploy(self, file, name='', description=None, inactive=False, redeploy=False else: raise FileExistsError(f'Deploy failed. \'{name}\' already exists in Apama EPL Apps.') try: - file_contents = Path(file).read_text() + file_contents = self.__read_text_withBOM(file) except Exception as err: raise IOError(f"Deploy failed. {err}") try: @@ -125,7 +126,7 @@ def update(self, name, new_name=None, file=None, description=None, state=None): elif os.path.splitext(file)[1] != '.mon': raise TypeError(f'Update failed. \'{file}\' is not a valid .mon file.') try: - contents = Path(file).read_text() + contents = self.__read_text_withBOM(file) except Exception as err: raise IOError(f"Update failed. {err}") body['contents'] = contents @@ -182,3 +183,16 @@ def delete(self, name: str): self.connection.request('DELETE', f'/service/cep/eplfiles/{appId}') except Exception as err: raise OSError(f'Unable to delete EPL app \'{name}\' using DELETE on {self.connection.base_url}/service/cep/eplfiles. {err}') + + def __read_text_withBOM(self, path): + """ + Thin wrapper for Path().read_text() . It assumes the file is UTF-8 encoded if it starts with the UTF-8 BOM, despite the current locale. + This method is used internally to make the tool behave consistently with many text editors and IDEs on Windows, which also honour the UTF-8 BOM. + Such a file is rendered correctly, therefore it should also be deployed correctly, else user expectations are confounded. + + :param path: The path to extract the text from + """ + if Path(path).read_bytes().startswith(codecs.BOM_UTF8): + return Path(path).read_text(encoding="utf8") + else: + return Path(path).read_text()