You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: please--branches--0.12/core_concepts-1.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -155,9 +155,9 @@ <h1>Core concepts</h1>
155
155
<codeclass="inline">datetime("2022-06-27T16:27:40.254795Z")</code>.</li><li><codeclass="inline">binaryblob("<base64 encoded value>")</code> is used to pass <codeclass="inline">binaryblob</code> values in expressions. The
156
156
string contained in double quotes must be a valid Base64 encoding of the binary value. Example:
157
157
<codeclass="inline">binaryblob("Zm9vYmFy")</code> to encode the string <codeclass="inline">"foobar"</code>.</li></ul><h5>Attribute inclusion filter*</h5><p>*<em>This feature is planned for a future release</em></p><ul><li><codeclass="inline">"<value>" in attributes["<namespace>:<key>"]</code>: returns <codeclass="inline">true</code> if <codeclass="inline">value</code> is included in the
158
-
chosen attribute. Note that the attribute must be an array for the expression to be valid.</li></ul><h4>Examples</h4><p>To provide some examples, here is a Selector to target all out of order Devices in Milan:</p><pre><codeclass="makeup elixir" translate="no"><spanclass="s">"out-of-order"</span><spanclass="w"></span><spanclass="ow">in</span><spanclass="w"></span><spanclass="n">tags</span><spanclass="w"></span><spanclass="ow">and</span><spanclass="w"></span><spanclass="n">attributes</span><spanclass="p" data-group-id="0467245373-1">[</span><spanclass="s">"edgehog-synthetic:city"</span><spanclass="p" data-group-id="0467245373-1">]</span><spanclass="w"></span><spanclass="o">==</span><spanclass="w"></span><spanclass="s">"Milan"</span></code></pre><p>Here is a selector to target all Devices that have their service timestamp in the past so they have
158
+
chosen attribute. Note that the attribute must be an array for the expression to be valid.</li></ul><h4>Examples</h4><p>To provide some examples, here is a Selector to target all out of order Devices in Milan:</p><pre><codeclass="makeup elixir" translate="no"><spanclass="s">"out-of-order"</span><spanclass="w"></span><spanclass="ow">in</span><spanclass="w"></span><spanclass="n">tags</span><spanclass="w"></span><spanclass="ow">and</span><spanclass="w"></span><spanclass="n">attributes</span><spanclass="p" data-group-id="7424225557-1">[</span><spanclass="s">"edgehog-synthetic:city"</span><spanclass="p" data-group-id="7424225557-1">]</span><spanclass="w"></span><spanclass="o">==</span><spanclass="w"></span><spanclass="s">"Milan"</span></code></pre><p>Here is a selector to target all Devices that have their service timestamp in the past so they have
159
159
to be serviced, imagining this information is contained in the <codeclass="inline">com.foo.ServiceInfo</code> Astarte
160
-
interface in the <codeclass="inline">/serviceTimestamp</code>:</p><pre><codeclass="makeup elixir" translate="no"><spanclass="n">attributes</span><spanclass="p" data-group-id="5702236096-1">[</span><spanclass="s">"astarte-values:com.foo.ServiceInfo/serviceTimestamp"</span><spanclass="p" data-group-id="5702236096-1">]</span><spanclass="w"></span><spanclass="o"><=</span><spanclass="w"></span><spanclass="n">now</span><spanclass="p" data-group-id="5702236096-2">(</span><spanclass="p" data-group-id="5702236096-2">)</span></code></pre><h4>Caveats</h4><p>Note that numeric values are conflated in a single numeric type, i.e. a selector with
160
+
interface in the <codeclass="inline">/serviceTimestamp</code>:</p><pre><codeclass="makeup elixir" translate="no"><spanclass="n">attributes</span><spanclass="p" data-group-id="0775299450-1">[</span><spanclass="s">"astarte-values:com.foo.ServiceInfo/serviceTimestamp"</span><spanclass="p" data-group-id="0775299450-1">]</span><spanclass="w"></span><spanclass="o"><=</span><spanclass="w"></span><spanclass="n">now</span><spanclass="p" data-group-id="0775299450-2">(</span><spanclass="p" data-group-id="0775299450-2">)</span></code></pre><h4>Caveats</h4><p>Note that numeric values are conflated in a single numeric type, i.e. a selector with
161
161
<codeclass="inline">attributes["custom:foo"] == 42</code> will match either if <codeclass="inline">foo</code> is <codeclass="inline">integer</code>, <codeclass="inline">longinteger</code> or <codeclass="inline">double</code>
162
162
(e.g it will also match <codeclass="inline">42.0</code>).</p><p>Another important thing to notice is that using an Attribute Filter will implicitly match only
163
163
Devices that have that attribute. As an example, if there are 3 devices, one with attribute <codeclass="inline">foo:bar == 42</code>, the other with attribute <codeclass="inline">foo:bar == 3</code> and the third one with no <codeclass="inline">foo:bar</code> attribute, the
Copy file name to clipboardExpand all lines: please--branches--0.12/core_concepts-2.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ <h1>Core concepts</h1>
108
108
109
109
110
110
<p>This page illustrates the core concepts of Edgehog's container management system.</p><h2id="images" class="section-heading"><ahref="#images" class="hover-link"><iclass="ri-link-m" aria-hidden="true"></i></a><spanclass="text">Images</span></h2><p>Images in Edgehog are not managed directly by the platform. Instead, Edgehog treats images as external references that are passed to the device’s container runtime (such as Docker or Podman). Edgehog does not store, pull or validate images, it simply records the image reference string provided in a container definition.</p><h3id="image-reference-format" class="section-heading"><ahref="#image-reference-format" class="hover-link"><iclass="ri-link-m" aria-hidden="true"></i></a><spanclass="text">Image Reference Format</span></h3><p>The image reference represents the name of the image to pull.
</span><spanclass="p" data-group-id="8464770257-3">}</span><spanclass="p" data-group-id="8464770257-2">)</span></code></pre><p>Values to be replaced</p><ul><li><codeclass="inline">TENANT-NAME</code>: the name of the new tenant.</li><li><codeclass="inline">TENANT-SLUG</code>: the slug of the tenant, must contain only lowercase letters and hyphens.</li><li><codeclass="inline">TENANT-PUBLIC-KEY</code>: the content of <codeclass="inline">tenant_public.pem</code> created in the <ahref="#creating-a-keypair">previous step</a>. Open a multiline string with <codeclass="inline">"""</code>, press Enter, paste the content of
</span><spanclass="p" data-group-id="7810203349-3">}</span><spanclass="p" data-group-id="7810203349-2">)</span></code></pre><p>Values to be replaced</p><ul><li><codeclass="inline">TENANT-NAME</code>: the name of the new tenant.</li><li><codeclass="inline">TENANT-SLUG</code>: the slug of the tenant, must contain only lowercase letters and hyphens.</li><li><codeclass="inline">TENANT-PUBLIC-KEY</code>: the content of <codeclass="inline">tenant_public.pem</code> created in the <ahref="#creating-a-keypair">previous step</a>. Open a multiline string with <codeclass="inline">"""</code>, press Enter, paste the content of
595
595
the file in the <codeclass="inline">iex</code> shell and then close the multiline string with <codeclass="inline">"""</code> on a new line.</li><li><codeclass="inline">ASTARTE-BASE-API-URL</code>: the base API url of the Astarte instance (e.g.
596
596
<ahref="https://api.astarte.example.com">https://api.astarte.example.com</a>).</li><li><codeclass="inline">ASTARTE-REALM-NAME</code>: the name of the Astarte realm you're using.</li><li><codeclass="inline">ASTARTE-REALM-PRIVATE-KEY</code>: the content of the Astarte realm's private key. Open a multiline string with
597
597
<codeclass="inline">"""</code>, press Enter, paste the content of the file in the <codeclass="inline">iex</code> shell and then close the multiline
0 commit comments