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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
eb13c474
Commit
eb13c474
authored
May 19, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_*: drop open/personal allocation_scope
parent
c959af77
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
8 additions
and
597 deletions
+8
-597
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputeNodeList.py
.../slapos_cloud/SoftwareRelease_getUsableComputeNodeList.py
+1
-1
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/compute_node_slap_interface_workflow/script_ComputeNode_approveRegistration.py
...erface_workflow/script_ComputeNode_approveRegistration.py
+0
-1
master/bt5/slapos_crm/PathTemplateItem/portal_alarms/slapos_crm_check_update_allocation_scope.xml
...ortal_alarms/slapos_crm_check_update_allocation_scope.xml
+0
-97
master/bt5/slapos_crm/PathTemplateItem/portal_alarms/slapos_crm_check_update_personal_allocation_scope.xml
...rms/slapos_crm_check_update_personal_allocation_scope.xml
+0
-101
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkAndUpdateComputeNodeAllocationScope.py
...itoring/Alarm_checkAndUpdateComputeNodeAllocationScope.py
+0
-16
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkAndUpdateComputeNodeAllocationScope.xml
...toring/Alarm_checkAndUpdateComputeNodeAllocationScope.xml
+0
-62
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkAndUpdatePersonalComputeNodeAllocationScope.py
...Alarm_checkAndUpdatePersonalComputeNodeAllocationScope.py
+0
-19
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkAndUpdatePersonalComputeNodeAllocationScope.xml
...larm_checkAndUpdatePersonalComputeNodeAllocationScope.xml
+0
-62
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNodeModule_getComputeNodeTicketReportList.py
...oring/ComputeNodeModule_getComputeNodeTicketReportList.py
+1
-4
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkAndUpdateAllocationScope.py
...m_monitoring/ComputeNode_checkAndUpdateAllocationScope.py
+0
-80
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkAndUpdateAllocationScope.xml
..._monitoring/ComputeNode_checkAndUpdateAllocationScope.xml
+0
-62
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkAndUpdatePersonalAllocationScope.py
...ring/ComputeNode_checkAndUpdatePersonalAllocationScope.py
+0
-8
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkAndUpdatePersonalAllocationScope.xml
...ing/ComputeNode_checkAndUpdatePersonalAllocationScope.xml
+0
-62
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
...slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
+1
-1
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_core/ComputeNode_getSecurityCategoryFromAllocationScope.py
...ore/ComputeNode_getSecurityCategoryFromAllocationScope.py
+0
-4
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/slapos_erp5_interaction_workflow/script_ComputeNode_updateAllocation.py
...teraction_workflow/script_ComputeNode_updateAllocation.py
+0
-8
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_compute_node_view_js.js
..._module/rjs_gadget_erp5_page_slap_compute_node_view_js.js
+2
-4
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_compute_node_view_js.xml
...module/rjs_gadget_erp5_page_slap_compute_node_view_js.xml
+2
-2
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Base_getOpenComputeNodeList.py
...kins/slapos_hal_json_style/Base_getOpenComputeNodeList.py
+1
-3
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputeNodeList.py
View file @
eb13c474
...
...
@@ -4,7 +4,7 @@ kw['url_string'] = context.getUrlString()
software_installation_list
=
context
.
portal_catalog
(
**
kw
)
compute_node_list
=
[]
allocation_scope_list
=
[
'open/p
ersonal'
,
'open/p
ublic'
,
'open/friend'
]
allocation_scope_list
=
[
'open/public'
,
'open/friend'
]
for
software_installation
in
software_installation_list
:
compute_node
=
software_installation
.
getAggregateValue
()
if
software_installation
.
getSlapState
()
==
'start_requested'
and
\
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/compute_node_slap_interface_workflow/script_ComputeNode_approveRegistration.py
View file @
eb13c474
...
...
@@ -2,7 +2,6 @@ compute_node = state_change['object']
portal
=
compute_node
.
getPortalObject
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
compute_node
.
edit
(
allocation_scope
=
'open/personal'
,
source_administration_value
=
person
,
upgrade_scope
=
'auto'
,
capacity_scope
=
'open'
...
...
master/bt5/slapos_crm/PathTemplateItem/portal_alarms/slapos_crm_check_update_allocation_scope.xml
deleted
100644 → 0
View file @
c959af77
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Alarm"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_checkAndUpdateComputeNodeAllocationScope
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Automatically turn allocation scope of public and friend compute_node to personnal if the owner is not a service provider.
</string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_crm_check_update_allocation_scope
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple>
<int>
5
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1399420800.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
sense_method_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Check and Update Compute Node Allocation Scope
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/PathTemplateItem/portal_alarms/slapos_crm_check_update_personal_allocation_scope.xml
deleted
100644 → 0
View file @
c959af77
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Alarm"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_checkAndUpdatePersonalComputeNodeAllocationScope
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Automatically turn allocation scope of personal compute_node to closed if the compute_node were never used.
</string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_crm_check_update_personal_allocation_scope
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple>
<int>
22
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple>
<int>
30
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1399420800.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
sense_method_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Check and Update Personal Compute Node Allocation Scope
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkAndUpdateComputeNodeAllocationScope.py
deleted
100644 → 0
View file @
c959af77
portal
=
context
.
getPortalObject
()
category_public
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/public"
,
None
)
category_subscription
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/subscription"
,
None
)
category_friend
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/friend"
,
None
)
if
category_public
is
not
None
:
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
'Compute Node'
,
default_allocation_scope_uid
=
[
category_public
.
getUid
(),
category_friend
.
getUid
(),
category_subscription
.
getUid
()],
validation_state
=
"validated"
,
method_id
=
'ComputeNode_checkAndUpdateAllocationScope'
,
activate_kw
=
{
'tag'
:
tag
}
)
context
.
activate
(
after_tag
=
tag
).
getId
()
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkAndUpdateComputeNodeAllocationScope.xml
deleted
100644 → 0
View file @
c959af77
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
tag, fixit, params
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_checkAndUpdateComputeNodeAllocationScope
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkAndUpdatePersonalComputeNodeAllocationScope.py
deleted
100644 → 0
View file @
c959af77
from
DateTime
import
DateTime
# from erp5.component.module.DateUtils import addToDate
# from Products.ZSQLCatalog.SQLCatalog import Query
portal
=
context
.
getPortalObject
()
category_personal
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/personal"
,
None
)
if
category_personal
is
not
None
:
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
'Compute Node'
,
validation_state
=
'validated'
,
# XXX - creation_date is not indexed for compute_node
# creation_date=Query(range="max", creation_date=addToDate(DateTime(), {'day': -30})),
default_allocation_scope_uid
=
category_personal
.
getUid
(),
method_id
=
'ComputeNode_checkAndUpdatePersonalAllocationScope'
,
activate_kw
=
{
'tag'
:
tag
})
context
.
activate
(
after_tag
=
tag
).
getId
()
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/Alarm_checkAndUpdatePersonalComputeNodeAllocationScope.xml
deleted
100644 → 0
View file @
c959af77
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
tag, fixit, params
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_checkAndUpdatePersonalComputeNodeAllocationScope
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNodeModule_getComputeNodeTicketReportList.py
View file @
eb13c474
...
...
@@ -8,9 +8,6 @@ public_category_uid = portal.restrictedTraverse(
friend_category_uid
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/friend"
,
None
).
getUid
()
personal_category_uid
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/personal"
,
None
).
getUid
()
l
=
[]
...
...
@@ -24,7 +21,7 @@ def checkForError(reference):
return
1
for
compute_node
in
portal
.
portal_catalog
(
default_allocation_scope_uid
=
[
p
ersonal_category_uid
,
p
ublic_category_uid
,
friend_category_uid
],
default_allocation_scope_uid
=
[
public_category_uid
,
friend_category_uid
],
select_list
=
{
"reference"
:
None
},
**
kw
):
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkAndUpdateAllocationScope.py
deleted
100644 → 0
View file @
c959af77
from
DateTime
import
DateTime
compute_node
=
context
portal
=
context
.
getPortalObject
()
allocation_scope
=
compute_node
.
getAllocationScope
()
compute_node_reference
=
compute_node
.
getReference
()
if
allocation_scope
not
in
[
'open/public'
,
'open/friend'
,
'open/personal'
]:
return
if
allocation_scope
==
target_allocation_scope
:
# already changed
return
person
=
compute_node
.
getSourceAdministrationValue
(
portal_type
=
"Person"
)
if
not
person
:
return
if
check_service_provider
and
person
.
Person_isServiceProvider
():
return
edit_kw
=
{
'allocation_scope'
:
target_allocation_scope
,
}
# Create a ticket (or re-open it) for this issue!
request_title
=
'Allocation scope of %s changed to %s'
%
(
compute_node_reference
,
target_allocation_scope
)
request_description
=
'Allocation scope has been changed to '
\
'%s for %s'
%
(
target_allocation_scope
,
compute_node_reference
)
support_request
=
person
.
Base_getSupportRequestInProgress
(
title
=
request_title
,
aggregate
=
context
.
getRelativeUrl
()
)
if
support_request
is
None
:
person
.
notify
(
support_request_title
=
request_title
,
support_request_description
=
request_description
,
aggregate
=
context
.
getRelativeUrl
())
support_request_relative_url
=
context
.
REQUEST
.
get
(
"support_request_relative_url"
)
support_request
=
portal
.
restrictedTraverse
(
support_request_relative_url
)
if
support_request
is
not
None
:
if
support_request
.
getSimulationState
()
!=
"validated"
:
support_request
.
validate
()
# Send notification message
message
=
request_description
notification_message
=
portal
.
portal_notifications
.
getDocumentValue
(
reference
=
notification_message_reference
)
if
notification_message
is
not
None
:
mapping_dict
=
{
'compute_node_title'
:
compute_node
.
getTitle
(),
'compute_node_id'
:
compute_node_reference
,
'compute_node_url'
:
compute_node
.
getRelativeUrl
(),
'allocation_scope'
:
allocation_scope
}
message
=
notification_message
.
asText
(
substitution_method_parameter_dict
=
{
'mapping_dict'
:
mapping_dict
})
event
=
support_request
.
SupportRequest_getLastEvent
(
request_title
)
if
event
is
None
:
support_request
.
notify
(
message_title
=
request_title
,
message
=
message
)
event
=
support_request
.
REQUEST
.
get
(
"ticket_notified_item"
)
if
event
is
not
None
:
# event added, suspend ticket
if
portal
.
portal_workflow
.
isTransitionPossible
(
support_request
,
'suspend'
):
support_request
.
suspend
()
elif
not
force
:
return
support_request
compute_node
.
edit
(
**
edit_kw
)
return
support_request
elif
force
:
# Update compute_node event if ticket is not created
compute_node
.
edit
(
**
edit_kw
)
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkAndUpdateAllocationScope.xml
deleted
100644 → 0
View file @
c959af77
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
target_allocation_scope=\'open/personal\', notification_message_reference=\'slapos-crm-compute_node_allocation_scope.notification\', check_service_provider=True, force=False
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ComputeNode_checkAndUpdateAllocationScope
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkAndUpdatePersonalAllocationScope.py
deleted
100644 → 0
View file @
c959af77
if
context
.
ComputeNode_hasContactedRecently
():
return
return
context
.
ComputeNode_checkAndUpdateAllocationScope
(
target_allocation_scope
=
'close/outdated'
,
notification_message_reference
=
'slapos-crm-compute-node-allocation-scope-closed.notification'
,
check_service_provider
=
False
,
force
=
True
)
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_checkAndUpdatePersonalAllocationScope.xml
deleted
100644 → 0
View file @
c959af77
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
ComputeNode_checkAndUpdatePersonalAllocationScope
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
View file @
eb13c474
...
...
@@ -80,7 +80,7 @@ if aggregate_portal_type == "Instance Tree":
instance
.
getUrlString
(),
compute_node
.
getReference
(),
compute_node
.
getAllocationScope
()))
if
instance
.
getPortalType
()
==
"Software Instance"
and
\
compute_node
.
getAllocationScope
()
in
[
"closed/outdated"
,
"open/personal"
]
and
\
compute_node
.
getAllocationScope
()
in
[
"closed/outdated"
]
and
\
instance
.
getSlapState
()
==
"start_requested"
and
\
instance
.
SoftwareInstance_hasReportedError
():
message_list
.
append
(
"%s on a %s compute_node"
%
(
instance
.
getReference
(),
compute_node
.
getAllocationScope
())
)
...
...
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_core/ComputeNode_getSecurityCategoryFromAllocationScope.py
View file @
eb13c474
...
...
@@ -20,10 +20,6 @@ if scope == 'open/public':
return
{
"Auditor"
:
[
"R-SHADOW-PERSON"
]}
elif
scope
==
'open/subscription'
:
return
{
"Auditor"
:
[
"R-SHADOW-PERSON"
]}
elif
scope
==
'open/personal'
:
person
=
compute_node
.
getSourceAdministrationValue
(
portal_type
=
"Person"
)
if
person
is
not
None
:
return
{
"Auditor"
:
[
"SHADOW-%s"
%
person
.
getUserId
()]}
elif
scope
==
'open/friend'
:
person_list
=
compute_node
.
getDestinationSectionValueList
(
portal_type
=
"Person"
)
if
person_list
:
...
...
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/slapos_erp5_interaction_workflow/script_ComputeNode_updateAllocation.py
View file @
eb13c474
...
...
@@ -9,10 +9,6 @@ elif allocation_scope == 'open/friend':
# Capacity is not handled for 'private' compute_nodes
capacity_scope
=
'open'
monitor_scope
=
'enabled'
elif
allocation_scope
==
'open/personal'
:
capacity_scope
=
'open'
# Keep the same.
monitor_scope
=
compute_node
.
getMonitorScope
(
"disabled"
)
else
:
monitor_scope
=
'disabled'
capacity_scope
=
'close'
...
...
@@ -32,10 +28,6 @@ if allocation_scope in ['open/public', 'open/subscription']:
# reset friends and update in place
edit_kw
[
'subject_list'
]
=
[
''
]
edit_kw
[
'destination_section'
]
=
None
elif
allocation_scope
==
'open/personal'
:
# reset friends to self and update in place
edit_kw
[
'subject_list'
]
=
[
self_email
]
edit_kw
[
'destination_section'
]
=
self_person
.
getRelativeUrl
()
else
:
subject_list
=
compute_node
.
getSubjectList
()
if
self_email
not
in
subject_list
:
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_compute_node_view_js.js
View file @
eb13c474
...
...
@@ -106,7 +106,6 @@
"
Closed forever
"
,
"
Closed outdated
"
,
"
Open for Friends only
"
,
"
Open for Personal use only
"
,
"
Open Public
"
,
"
Open for Subscribers only
"
,
"
Network
"
,
...
...
@@ -172,9 +171,8 @@
[
results
[
2
][
15
],
'
close/forever
'
],
[
results
[
2
][
16
],
'
close/outdated
'
],
[
results
[
2
][
17
],
'
open/friend
'
],
[
results
[
2
][
18
],
'
open/personal
'
],
[
results
[
2
][
19
],
'
open/public
'
],
[
results
[
2
][
20
],
'
open/subscription
'
]],
[
results
[
2
][
18
],
'
open/public
'
],
[
results
[
2
][
19
],
'
open/subscription
'
]],
i
,
len
=
results
[
1
].
data
.
total_rows
;
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_compute_node_view_js.xml
View file @
eb13c474
...
...
@@ -263,7 +263,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1000.58064.4435.24422
</string>
</value>
<value>
<string>
998.18207.59213.64375
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -281,7 +281,7 @@
</tuple>
<state>
<tuple>
<float>
165
6716026.45
</float>
<float>
165
2949235.86
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Base_getOpenComputeNodeList.py
View file @
eb13c474
...
...
@@ -2,13 +2,11 @@ portal = context.getPortalObject()
category_public
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/public"
,
None
)
category_friend
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/friend"
,
None
)
category_personal
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/personal"
,
None
)
return
portal
.
portal_catalog
(
portal_type
=
'Compute Node'
,
default_allocation_scope_uid
=
[
category_public
.
getUid
(),
category_friend
.
getUid
(),
category_personal
.
getUid
()],
category_friend
.
getUid
()],
validation_state
=
"validated"
,
)
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