Commit eb59b889 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_ecoallocation: Use proxy manager on get Current and Future DeltaCO2

parent c97ea88b
......@@ -50,7 +50,10 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>computer_partition_list = context.getAggregateValueList(portal_type="Computer Partition")\n
<value> <string>if REQUEST is not None:\n
raise Unauthorized\n
\n
computer_partition_list = context.getAggregateValueList(portal_type="Computer Partition")\n
\n
current_watt = context.SoftwareRelease_getDeltaCO2List(\n
computer_partition_list, context.SoftwareInstance_getAverageCPULoad()\n
......@@ -61,7 +64,15 @@ return current_watt.keys()[0]\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>REQUEST=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -50,7 +50,10 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>computer_partition_list = context.getAggregateValueList(portal_type="Computer Partition")\n
<value> <string>if REQUEST is not None:\n
raise Unauthorized\n
\n
computer_partition_list = context.getAggregateValueList(portal_type="Computer Partition")\n
\n
future_watt = "Not Applicable"\n
\n
......@@ -66,7 +69,15 @@ return future_watt\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>REQUEST=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment