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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
slapos.core
Commits
948544a9
Commit
948544a9
authored
Aug 31, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: Drop unrequired script
It is easier to write better tales expressions
parent
5c29de81
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
157 deletions
+43
-157
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Base_getSoftwareReleaseUsageOnComputeNode.py
...slapos_cloud/Base_getSoftwareReleaseUsageOnComputeNode.py
+0
-9
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Base_getSoftwareReleaseUsageOnComputeNode.xml
...lapos_cloud/Base_getSoftwareReleaseUsageOnComputeNode.xml
+0
-62
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/ComputeNode_getSoftwareReleaseUsage.py
...skins/slapos_cloud/ComputeNode_getSoftwareReleaseUsage.py
+19
-6
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/ComputeNode_viewCurrentUsageReport/listbox_usage.xml
...loud/ComputeNode_viewCurrentUsageReport/listbox_usage.xml
+10
-2
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputeNodeWithoutSInstanceList.py
...ftwareRelease_getUsableComputeNodeWithoutSInstanceList.py
+0
-11
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputeNodeWithoutSInstanceList.xml
...twareRelease_getUsableComputeNodeWithoutSInstanceList.xml
+0
-62
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_viewUsableComputeNodeListReport/listbox_amount.xml
...elease_viewUsableComputeNodeListReport/listbox_amount.xml
+13
-1
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
...Item/portal_components/test.erp5.testSlapOSCodingStyle.py
+1
-4
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Base_getSoftwareReleaseUsageOnComputeNode.py
deleted
100644 → 0
View file @
5c29de81
current
=
context
.
REQUEST
.
get
(
'here'
)
if
current
.
getPortalType
()
==
'Software Release'
:
software_release
=
current
compute_node
=
context
else
:
compute_node
=
current
software_release
=
context
return
compute_node
.
ComputeNode_getSoftwareReleaseUsage
(
software_release
.
getUrlString
())
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Base_getSoftwareReleaseUsageOnComputeNode.xml
deleted
100644 → 0
View file @
5c29de81
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
*args, **kwargs
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getSoftwareReleaseUsageOnComputeNode
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/ComputeNode_getSoftwareReleaseUsage.py
View file @
948544a9
return
context
.
getPortalObject
().
portal_catalog
.
countResults
(
portal_type
=
'Compute Partition'
,
parent_uid
=
context
.
getUid
(),
free_for_request
=
0
,
software_release_url
=
software_release_url
)[
0
][
0
]
portal
=
context
.
getPortalObject
()
if
context
.
getParentValue
().
isMemberOf
(
'allocation_scope/open'
):
# This is faster but all values are free_for_request == 0 if the computer is closed
return
context
.
getPortalObject
().
portal_catalog
.
countResults
(
portal_type
=
'Compute Partition'
,
parent_uid
=
context
.
getUid
(),
free_for_request
=
0
,
software_release_url
=
software_release_url
)[
0
][
0
]
else
:
computer_uid_list
=
[
i
.
uid
for
i
in
portal
.
portal_catalog
(
portal_type
=
'Compute Partition'
,
parent_uid
=
context
.
getUid
()
)]
if
not
computer_uid_list
:
return
0
return
portal
.
portal_catalog
.
countResults
(
portal_type
=
'Software Instance'
,
default_aggregate_uid
=
computer_uid_list
,
url_string
=
software_release_url
)[
0
][
0
]
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/ComputeNode_viewCurrentUsageReport/listbox_usage.xml
View file @
948544a9
...
...
@@ -60,6 +60,10 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -72,6 +76,10 @@
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -101,7 +109,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
listbox_
installation_stat
e
</string>
</value>
<value>
<string>
listbox_
usag
e
</string>
</value>
</item>
</dictionary>
</value>
...
...
@@ -117,7 +125,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
cell/Base_getSoftwareReleaseUsageOnComputeNode
</string>
</value>
<value>
<string>
python: cell.getAggregateValue(portal_type="Compute Node").ComputeNode_getSoftwareReleaseUsage(cell.getUrlString())
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputeNodeWithoutSInstanceList.py
deleted
100644 → 0
View file @
5c29de81
compute_node_list
=
[]
for
si
in
context
.
portal_catalog
(
url_string
=
context
.
getUrlString
(),
portal_type
=
'Software Installation'
,
validation_state
=
'validated'
):
compute_node
=
si
.
getAggregateValue
()
if
si
.
getSlapState
()
==
'start_requested'
and
\
not
compute_node
.
ComputeNode_getSoftwareReleaseUsage
(
context
.
getUrlString
())
\
and
compute_node
.
getValidationState
()
==
'validated'
:
compute_node_list
.
append
(
compute_node
)
return
compute_node_list
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputeNodeWithoutSInstanceList.xml
deleted
100644 → 0
View file @
5c29de81
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SoftwareRelease_getUsableComputeNodeWithoutSInstanceList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_viewUsableComputeNodeListReport/listbox_amount.xml
View file @
948544a9
...
...
@@ -61,6 +61,14 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -73,6 +81,10 @@
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -122,7 +134,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.
Base_getSoftwareReleaseUsageOnComputeNode(
)
</string>
</value>
<value>
<string>
python: cell.
ComputeNode_getSoftwareReleaseUsage(context.getUrlString()
)
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
View file @
948544a9
...
...
@@ -71,8 +71,6 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_cloud/AlarmTool_checkComputeNodeMigrationConsistency'
,
'slapos_cloud/AlarmTool_checkInstanceTreeMigrationConsistency'
,
'slapos_cloud/AlarmTool_checkPredecessorToSuccessorMigrationConsistency'
,
'slapos_cloud/Base_getSoftwareReleaseStateOnComputeNode'
,
'slapos_cloud/Base_getSoftwareReleaseUsageOnComputeNode'
,
'slapos_cloud/ComputeNode_afterClone'
,
'slapos_cloud/ComputeNode_applyComputerModel'
,
'slapos_cloud/ComputeNode_getBusyComputePartitionList'
,
...
...
@@ -110,6 +108,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_cloud/Project_init'
,
'slapos_cloud/Resource_zGetTrackingList'
,
'slapos_cloud/SoftwareInstallation_requestDestruction'
,
'slapos_cloud/SoftwareInstallation_getInstallationState'
,
'slapos_cloud/SoftwareInstance_afterClone'
,
'slapos_cloud/SoftwareInstance_checkPredecessorToSuccessorMigrationConsistency'
,
'slapos_cloud/SoftwareInstance_getComputeNodeUrl'
,
...
...
@@ -118,10 +117,8 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_cloud/SoftwareInstance_getPartitionUrl'
,
'slapos_cloud/SoftwareInstance_init'
,
'slapos_cloud/SoftwareInstance_renameAndRequestStopAction'
,
'slapos_cloud/SoftwareRelease_getCurrentInstallationStateAsHtml'
,
'slapos_cloud/SoftwareRelease_getRelatedNetworkList'
,
'slapos_cloud/SoftwareRelease_getUsableComputeNodeList'
,
'slapos_cloud/SoftwareRelease_getUsableComputeNodeWithoutSInstanceList'
,
'slapos_cloud/SoftwareInstance_viewRenameAndRequestDestroyAction'
,
'slapos_cloud/Base_getSupportRequestInProgress'
,
'slapos_cloud/SoftwareInstance_checkDuplicationOnInstanceTreeConsistency'
,
...
...
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