Skip to content

Commit

Permalink
Apama Analytics EPL Apps tools for 10.7.0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
rthrippleton committed Feb 1, 2021
1 parent 94d8484 commit a70a791
Show file tree
Hide file tree
Showing 24 changed files with 125 additions and 106 deletions.
16 changes: 8 additions & 8 deletions doc/pydoc/_modules/apamax/eplapplications/basetest.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>apamax.eplapplications.basetest &#8212; EPL Apps Tools 10.7.0.1 documentation</title>
<title>apamax.eplapplications.basetest &#8212; EPL Apps Tools 10.7.0.21 documentation</title>
<link rel="stylesheet" href="../../../_static/classic.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />

Expand All @@ -26,7 +26,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.21 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
</ul>
</div>
Expand Down Expand Up @@ -121,9 +121,9 @@ <h1>Source code for apamax.eplapplications.basetest</h1><div class="highlight"><

<span class="c1"># need to have a version independent addition or this will need to be maintained.</span>
<span class="n">apama_project</span><span class="o">.</span><span class="n">addBundle</span><span class="p">(</span><span class="s2">&quot;Automatic onApplicationInitialized&quot;</span><span class="p">)</span>
<span class="n">apama_project</span><span class="o">.</span><span class="n">addBundle</span><span class="p">(</span><span class="s2">&quot;Cumulocity IoT &gt; Cumulocity Client&quot;</span><span class="p">)</span>
<span class="n">apama_project</span><span class="o">.</span><span class="n">addBundle</span><span class="p">(</span><span class="s2">&quot;Cumulocity IoT &gt; Event Definitions for Cumulocity&quot;</span><span class="p">)</span>
<span class="n">apama_project</span><span class="o">.</span><span class="n">addBundle</span><span class="p">(</span><span class="s2">&quot;Cumulocity IoT &gt; Utilities for Cumulocity&quot;</span><span class="p">)</span>
<span class="n">apama_project</span><span class="o">.</span><span class="n">addBundle</span><span class="p">(</span><span class="s2">&quot;Cumulocity IoT &gt; Cumulocity Client 10.5+&quot;</span><span class="p">)</span>
<span class="n">apama_project</span><span class="o">.</span><span class="n">addBundle</span><span class="p">(</span><span class="s2">&quot;Cumulocity IoT &gt; Event Definitions for Cumulocity 10.5+&quot;</span><span class="p">)</span>
<span class="n">apama_project</span><span class="o">.</span><span class="n">addBundle</span><span class="p">(</span><span class="s2">&quot;Cumulocity IoT &gt; Utilities for Cumulocity 10.5+&quot;</span><span class="p">)</span>
<span class="n">apama_project</span><span class="o">.</span><span class="n">addBundle</span><span class="p">(</span><span class="s2">&quot;Correlator Management&quot;</span><span class="p">)</span>
<span class="n">apama_project</span><span class="o">.</span><span class="n">addBundle</span><span class="p">(</span><span class="s2">&quot;JSON Support&quot;</span><span class="p">)</span>
<span class="n">apama_project</span><span class="o">.</span><span class="n">addBundle</span><span class="p">(</span><span class="s2">&quot;Time Format&quot;</span><span class="p">)</span>
Expand Down Expand Up @@ -161,7 +161,7 @@ <h1>Source code for apamax.eplapplications.basetest</h1><div class="highlight"><
<span class="n">paramImpl</span><span class="p">[</span><span class="n">prop</span><span class="p">]</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="n">prop</span><span class="p">]</span>

<span class="n">propFileName</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">output</span><span class="p">,</span> <span class="s2">&quot;CumulocityIoT.properties&quot;</span><span class="p">)</span>
<span class="n">destFileName</span> <span class="o">=</span> <span class="s2">&quot;/connectivity/CumulocityClient/CumulocityIoT.properties&quot;</span>
<span class="n">destFileName</span> <span class="o">=</span> <span class="s2">&quot;/connectivity/CumulocityClient10.5+/CumulocityIoT.properties&quot;</span>
<span class="c1">#create a local props file </span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">propFileName</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="s1">&#39;utf8&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">propfile</span><span class="p">:</span>
<span class="n">propfile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\ufeff\n</span><span class="s1">&#39;</span><span class="p">)</span>
Expand Down Expand Up @@ -481,12 +481,12 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.21 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020 Software AG.
&#169; Copyright 2021 Software AG.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.1.
</div>
</body>
Expand Down
8 changes: 4 additions & 4 deletions doc/pydoc/_modules/apamax/eplapplications/connection.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>apamax.eplapplications.connection &#8212; EPL Apps Tools 10.7.0.1 documentation</title>
<title>apamax.eplapplications.connection &#8212; EPL Apps Tools 10.7.0.21 documentation</title>
<link rel="stylesheet" href="../../../_static/classic.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />

Expand All @@ -26,7 +26,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.21 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
</ul>
</div>
Expand Down Expand Up @@ -178,12 +178,12 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.21 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020 Software AG.
&#169; Copyright 2021 Software AG.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.1.
</div>
</body>
Expand Down
28 changes: 21 additions & 7 deletions doc/pydoc/_modules/apamax/eplapplications/eplapps.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>apamax.eplapplications.eplapps &#8212; EPL Apps Tools 10.7.0.1 documentation</title>
<title>apamax.eplapplications.eplapps &#8212; EPL Apps Tools 10.7.0.21 documentation</title>
<link rel="stylesheet" href="../../../_static/classic.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />

Expand All @@ -26,7 +26,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.21 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
</ul>
</div>
Expand All @@ -51,6 +51,7 @@ <h1>Source code for apamax.eplapplications.eplapps</h1><div class="highlight"><p
<span class="kn">import</span> <span class="nn">json</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">urllib</span>
<span class="kn">import</span> <span class="nn">codecs</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>


Expand Down Expand Up @@ -103,7 +104,7 @@ <h1>Source code for apamax.eplapplications.eplapps</h1><div class="highlight"><p
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">FileExistsError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Deploy failed. </span><span class="se">\&#39;</span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="se">\&#39;</span><span class="s1"> already exists in Apama EPL Apps.&#39;</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">file_contents</span> <span class="o">=</span> <span class="n">Path</span><span class="p">(</span><span class="n">file</span><span class="p">)</span><span class="o">.</span><span class="n">read_text</span><span class="p">()</span>
<span class="n">file_contents</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__read_text_withBOM</span><span class="p">(</span><span class="n">file</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">err</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">IOError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Deploy failed. </span><span class="si">{</span><span class="n">err</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
Expand Down Expand Up @@ -164,7 +165,7 @@ <h1>Source code for apamax.eplapplications.eplapps</h1><div class="highlight"><p
<span class="k">elif</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">splitext</span><span class="p">(</span><span class="n">file</span><span class="p">)[</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">&#39;.mon&#39;</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Update failed. </span><span class="se">\&#39;</span><span class="si">{</span><span class="n">file</span><span class="si">}</span><span class="se">\&#39;</span><span class="s1"> is not a valid .mon file.&#39;</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">contents</span> <span class="o">=</span> <span class="n">Path</span><span class="p">(</span><span class="n">file</span><span class="p">)</span><span class="o">.</span><span class="n">read_text</span><span class="p">()</span>
<span class="n">contents</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">__read_text_withBOM</span><span class="p">(</span><span class="n">file</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">err</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">IOError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Update failed. </span><span class="si">{</span><span class="n">err</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">body</span><span class="p">[</span><span class="s1">&#39;contents&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">contents</span>
Expand Down Expand Up @@ -220,7 +221,20 @@ <h1>Source code for apamax.eplapplications.eplapps</h1><div class="highlight"><p
<span class="k">try</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">connection</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s1">&#39;DELETE&#39;</span><span class="p">,</span> <span class="sa">f</span><span class="s1">&#39;/service/cep/eplfiles/</span><span class="si">{</span><span class="n">appId</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">err</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">OSError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Unable to delete EPL app </span><span class="se">\&#39;</span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="se">\&#39;</span><span class="s1"> using DELETE on </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">connection</span><span class="o">.</span><span class="n">base_url</span><span class="si">}</span><span class="s1">/service/cep/eplfiles. </span><span class="si">{</span><span class="n">err</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">)</span></div></div>
<span class="k">raise</span> <span class="ne">OSError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Unable to delete EPL app </span><span class="se">\&#39;</span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="se">\&#39;</span><span class="s1"> using DELETE on </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">connection</span><span class="o">.</span><span class="n">base_url</span><span class="si">}</span><span class="s1">/service/cep/eplfiles. </span><span class="si">{</span><span class="n">err</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">)</span></div>

<span class="k">def</span> <span class="nf">__read_text_withBOM</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Thin wrapper for Path(&lt;path&gt;).read_text() . It assumes the file is UTF-8 encoded if it starts with the UTF-8 BOM, despite the current locale.</span>
<span class="sd"> 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.</span>
<span class="sd"> Such a file is rendered correctly, therefore it should also be deployed correctly, else user expectations are confounded.</span>

<span class="sd"> :param path: The path to extract the text from</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">Path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span><span class="o">.</span><span class="n">read_bytes</span><span class="p">()</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="n">codecs</span><span class="o">.</span><span class="n">BOM_UTF8</span><span class="p">):</span>
<span class="k">return</span> <span class="n">Path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span><span class="o">.</span><span class="n">read_text</span><span class="p">(</span><span class="n">encoding</span><span class="o">=</span><span class="s2">&quot;utf8&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">Path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span><span class="o">.</span><span class="n">read_text</span><span class="p">()</span></div>
</pre></div>

</div>
Expand Down Expand Up @@ -259,12 +273,12 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.21 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020 Software AG.
&#169; Copyright 2021 Software AG.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.1.
</div>
</body>
Expand Down
8 changes: 4 additions & 4 deletions doc/pydoc/_modules/apamax/eplapplications/platform.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>apamax.eplapplications.platform &#8212; EPL Apps Tools 10.7.0.1 documentation</title>
<title>apamax.eplapplications.platform &#8212; EPL Apps Tools 10.7.0.21 documentation</title>
<link rel="stylesheet" href="../../../_static/classic.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />

Expand All @@ -26,7 +26,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.21 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</li>
</ul>
</div>
Expand Down Expand Up @@ -197,12 +197,12 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">EPL Apps Tools 10.7.0.21 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020 Software AG.
&#169; Copyright 2021 Software AG.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.1.
</div>
</body>
Expand Down
Loading

0 comments on commit a70a791

Please sign in to comment.