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 @@ ...@@ -50,7 +50,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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 \n
current_watt = context.SoftwareRelease_getDeltaCO2List(\n current_watt = context.SoftwareRelease_getDeltaCO2List(\n
computer_partition_list, context.SoftwareInstance_getAverageCPULoad()\n computer_partition_list, context.SoftwareInstance_getAverageCPULoad()\n
...@@ -61,7 +64,15 @@ return current_watt.keys()[0]\n ...@@ -61,7 +64,15 @@ return current_watt.keys()[0]\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <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>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -50,7 +50,10 @@ ...@@ -50,7 +50,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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 \n
future_watt = "Not Applicable"\n future_watt = "Not Applicable"\n
\n \n
...@@ -66,7 +69,15 @@ return future_watt\n ...@@ -66,7 +69,15 @@ return future_watt\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <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>
<item> <item>
<key> <string>id</string> </key> <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