Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
4ae4cf08
Commit
4ae4cf08
authored
Aug 03, 2020
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_ecoallocation: Make pylint happy
parent
057f0ec3
Pipeline
#10804
failed with stage
in 0 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
149 additions
and
147 deletions
+149
-147
master/bt5/slapos_ecoallocation/PathTemplateItem/service_module/zero_emission_ratio.xml
...n/PathTemplateItem/service_module/zero_emission_ratio.xml
+145
-141
master/bt5/slapos_ecoallocation/SkinTemplateItem/portal_skins/slapos_ecoallocation/ComputerConsumptionTioXMLFile_solveInvoicingGenerationEco.py
...puterConsumptionTioXMLFile_solveInvoicingGenerationEco.py
+1
-1
master/bt5/slapos_ecoallocation/SkinTemplateItem/portal_skins/slapos_ecoallocation/Person_findPartitionEcoAllocation.py
...slapos_ecoallocation/Person_findPartitionEcoAllocation.py
+3
-5
No files found.
master/bt5/slapos_ecoallocation/PathTemplateItem/service_module/zero_emission_ratio.xml
View file @
4ae4cf08
This diff is collapsed.
Click to expand it.
master/bt5/slapos_ecoallocation/SkinTemplateItem/portal_skins/slapos_ecoallocation/ComputerConsumptionTioXMLFile_solveInvoicingGenerationEco.py
View file @
4ae4cf08
from
zExceptions
import
Unauthorized
from
zExceptions
import
Unauthorized
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
pass
#
raise Unauthorized
raise
Unauthorized
document
=
context
document
=
context
portal
=
document
.
getPortalObject
()
portal
=
document
.
getPortalObject
()
...
...
master/bt5/slapos_ecoallocation/SkinTemplateItem/portal_skins/slapos_ecoallocation/Person_findPartitionEcoAllocation.py
View file @
4ae4cf08
import
random
import
random
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
,
ComplexQuery
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
,
ComplexQuery
person
=
context
computer_partition
=
None
computer_partition
=
None
query_kw
=
{
query_kw
=
{
...
@@ -19,14 +18,13 @@ else:
...
@@ -19,14 +18,13 @@ else:
# support SLA
# support SLA
# Explicit location
# Explicit location
explicit_location
=
False
#
explicit_location = False
if
"computer_guid"
in
filter_kw
:
if
"computer_guid"
in
filter_kw
:
explicit_location
=
True
#
explicit_location = True
query_kw
[
"parent_reference"
]
=
SimpleQuery
(
parent_reference
=
filter_kw
.
pop
(
"computer_guid"
))
query_kw
[
"parent_reference"
]
=
SimpleQuery
(
parent_reference
=
filter_kw
.
pop
(
"computer_guid"
))
if
"instance_guid"
in
filter_kw
:
if
"instance_guid"
in
filter_kw
:
explicit_location
=
True
#explicit_location = True
portal
=
context
.
getPortalObject
()
instance_guid
=
filter_kw
.
pop
(
"instance_guid"
)
instance_guid
=
filter_kw
.
pop
(
"instance_guid"
)
query_kw
[
"aggregate_related_reference"
]
=
SimpleQuery
(
aggregate_related_reference
=
instance_guid
)
query_kw
[
"aggregate_related_reference"
]
=
SimpleQuery
(
aggregate_related_reference
=
instance_guid
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment