<div dir="ltr">Hi root causers<div><br></div><div>I have been inspecting the code about aggregated state recently and have a question regarding the rules.</div><div><br></div><div>The "not" operator in the if clause confuses me. If it is not a configured data source, how do we apply the aggregation rules? It seems this is handled in else clause.</div><div><br></div><div><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:14px"><code>        if datasource_name in self.datasources_state_confs or \
                datasource_name <b>not</b> in self.conf.datasources.types:            ...
</code></pre><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:14px"><code>        else:
            self.category_normalizer[vitrage_category].set_aggregated_value(
                new_vertex, self.UNDEFINED_DATASOURCE)
            self.category_normalizer[vitrage_category].set_operational_value(
                new_vertex, self.UNDEFINED_DATASOURCE)</code></pre><pre style="padding:0px;margin-top:0px;margin-bottom:0px;font-size:14px"><div style="font-family:sans-serif;font-size:small;white-space:normal"><br class="inbox-inbox-Apple-interchange-newline">There are some test case describing the expected behavior. But I couldn't understand the design philosophy behind it. What is expected when </div><div style="font-family:sans-serif;font-size:small;white-space:normal"><ol><li>the data source is not defined</li><li>data source defined but state config not exist</li><li>data source defined, state config exist but the state is not found.<br></li></ol><div>Could somebody shed some light on it?</div><div><br></div></div></pre></div></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Yujun Zhang</div></div>