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
bc499f13
Commit
bc499f13
authored
May 19, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XXXXXXXXXXXXXXXXXXXXXXXXXXX EXPAND
slapos_*: drop open/personal allocation_scope
parent
2846de64
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
46 deletions
+32
-46
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputeNodeList.py
.../slapos_cloud/SoftwareRelease_getUsableComputeNodeList.py
+1
-0
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/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
...slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
+5
-0
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_core/ComputeNode_getSecurityCategoryFromAllocationScope.py
...ore/ComputeNode_getSecurityCategoryFromAllocationScope.py
+0
-4
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
+19
-25
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
+6
-14
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Base_getOpenComputeNodeList.py
...kins/slapos_hal_json_style/Base_getOpenComputeNodeList.py
+1
-2
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/SoftwareRelease_getUsableComputeNodeList.py
View file @
bc499f13
...
@@ -3,6 +3,7 @@ portal = context.getPortalObject()
...
@@ -3,6 +3,7 @@ portal = context.getPortalObject()
compute_partition_list
=
portal
.
portal_catalog
(
compute_partition_list
=
portal
.
portal_catalog
(
software_release_url
=
context
.
getUrlString
(),
software_release_url
=
context
.
getUrlString
(),
free_for_request
=
1
,
free_for_request
=
1
,
follow_up__uid
=
context
.
getFollowUpUid
(),
group_by
=
(
"parent_uid"
,)
group_by
=
(
"parent_uid"
,)
)
)
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/compute_node_slap_interface_workflow/script_ComputeNode_approveRegistration.py
View file @
bc499f13
...
@@ -2,7 +2,6 @@ compute_node = state_change['object']
...
@@ -2,7 +2,6 @@ compute_node = state_change['object']
portal
=
compute_node
.
getPortalObject
()
portal
=
compute_node
.
getPortalObject
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
compute_node
.
edit
(
compute_node
.
edit
(
allocation_scope
=
'open/personal'
,
source_administration_value
=
person
,
source_administration_value
=
person
,
upgrade_scope
=
'auto'
,
upgrade_scope
=
'auto'
,
capacity_scope
=
'open'
capacity_scope
=
'open'
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
View file @
bc499f13
...
@@ -109,6 +109,11 @@ if aggregate_portal_type == "Instance Tree":
...
@@ -109,6 +109,11 @@ if aggregate_portal_type == "Instance Tree":
message_list
.
append
(
"%s has error (%s, %s at %s scope %s)"
%
(
instance
.
getReference
(),
instance
.
getTitle
(),
message_list
.
append
(
"%s has error (%s, %s at %s scope %s)"
%
(
instance
.
getReference
(),
instance
.
getTitle
(),
instance
.
getUrlString
(),
compute_node
.
getReference
(),
instance
.
getUrlString
(),
compute_node
.
getReference
(),
compute_node
.
getAllocationScope
()))
compute_node
.
getAllocationScope
()))
if
instance
.
getPortalType
()
==
"Software Instance"
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
())
)
else
:
else
:
message_list
.
append
(
"%s is not allocated"
%
instance
.
getReference
())
message_list
.
append
(
"%s is not allocated"
%
instance
.
getReference
())
return
","
.
join
(
message_list
)
return
","
.
join
(
message_list
)
...
...
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_core/ComputeNode_getSecurityCategoryFromAllocationScope.py
View file @
bc499f13
...
@@ -20,9 +20,5 @@ if scope == 'open/public':
...
@@ -20,9 +20,5 @@ if scope == 'open/public':
return
{
"Auditor"
:
[
"R-SHADOW-PERSON"
]}
return
{
"Auditor"
:
[
"R-SHADOW-PERSON"
]}
elif
scope
==
'open/subscription'
:
elif
scope
==
'open/subscription'
:
return
{
"Auditor"
:
[
"R-SHADOW-PERSON"
]}
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
()]}
return
category_list
return
category_list
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_compute_node_view_js.js
View file @
bc499f13
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
var
i
,
value
,
value_jio_key
,
len
=
result
.
data
.
total_rows
;
var
i
,
value
,
value_jio_key
,
len
=
result
.
data
.
total_rows
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
if
(
result
.
data
.
rows
[
i
].
value
.
getAccessStatus
)
{
if
(
1
||
(
result
.
data
.
rows
[
i
].
value
.
getAccessStatus
)
)
{
value
=
result
.
data
.
rows
[
i
].
value
.
getAccessStatus
;
value
=
result
.
data
.
rows
[
i
].
value
.
getAccessStatus
;
value_jio_key
=
result
.
data
.
rows
[
i
].
id
;
value_jio_key
=
result
.
data
.
rows
[
i
].
id
;
result
.
data
.
rows
[
i
].
value
.
getAccessStatus
=
{
result
.
data
.
rows
[
i
].
value
.
getAccessStatus
=
{
...
@@ -101,14 +101,13 @@
...
@@ -101,14 +101,13 @@
"
Closed for termination
"
,
"
Closed for termination
"
,
"
Closed forever
"
,
"
Closed forever
"
,
"
Closed outdated
"
,
"
Closed outdated
"
,
"
Open for Friends only
"
,
// Not used anymore
"
Open for Friends only
"
,
"
Open
"
,
"
Open Public
"
,
"
Open Public
"
,
"
Open for Subscribers only
"
,
"
Open for Subscribers only
"
,
"
Network
"
,
"
Network
"
,
"
Allocation Scope
"
,
"
Allocation Scope
"
,
"
Monitoring
"
,
"
Monitoring
"
,
"
Your Friends email
"
,
// Not used anymore
"
Your Friends email
"
,
"
Upgrade
"
,
"
Upgrade
"
,
"
The name of a document in ERP5
"
,
"
The name of a document in ERP5
"
,
"
Current Site
"
,
"
Current Site
"
,
...
@@ -163,23 +162,16 @@
...
@@ -163,23 +162,16 @@
[
results
[
2
][
10
],
'
auto
'
],
[
results
[
2
][
10
],
'
auto
'
],
[
results
[
2
][
11
],
'
ask_confirmation
'
],
[
results
[
2
][
11
],
'
ask_confirmation
'
],
[
results
[
2
][
12
],
'
never
'
]],
[
results
[
2
][
12
],
'
never
'
]],
supported_allocation_scope_list
=
[
''
,
'
close/maintenance
'
,
'
close/termination
'
,
'
close/forever
'
,
'
close/outdated
'
,
'
close/noallocation
'
,
'
open/personal
'
],
allocation_scope_list
=
[[
''
,
''
],
allocation_scope_list
=
[[
''
,
''
],
[
results
[
2
][
13
],
'
close/maintenance
'
],
[
results
[
2
][
13
],
'
close/maintenance
'
],
[
results
[
2
][
14
],
'
close/termination
'
],
[
results
[
2
][
14
],
'
close/termination
'
],
[
results
[
2
][
15
],
'
close/forever
'
],
[
results
[
2
][
15
],
'
close/forever
'
],
[
results
[
2
][
16
],
'
close/outdated
'
],
[
results
[
2
][
16
],
'
close/outdated
'
],
[
results
[
2
][
33
],
'
close/noallocation
'
],
[
results
[
2
][
33
],
'
close/noallocation
'
],
[
results
[
2
][
18
],
'
open/personal
'
]],
[
results
[
2
][
17
],
'
open/friend
'
],
[
results
[
2
][
18
],
'
open/public
'
],
[
results
[
2
][
19
],
'
open/subscription
'
]],
i
,
i
,
hidden_allocation_scope
=
{
'
open/public
'
:
results
[
2
][
19
],
'
open/subscription
'
:
results
[
2
][
20
]},
len
=
results
[
1
].
data
.
total_rows
;
len
=
results
[
1
].
data
.
total_rows
;
...
@@ -190,16 +182,6 @@
...
@@ -190,16 +182,6 @@
]);
]);
}
}
if
(
!
supported_allocation_scope_list
.
includes
(
gadget
.
state
.
doc
.
allocation_scope
)
&&
(
hidden_allocation_scope
.
hasOwnProperty
(
gadget
.
state
.
doc
.
allocation_scope
)))
{
allocation_scope_list
.
push
(
[
hidden_allocation_scope
[
gadget
.
state
.
doc
.
allocation_scope
],
gadget
.
state
.
doc
.
allocation_scope
]
);
}
return
form_gadget
.
render
({
return
form_gadget
.
render
({
erp5_document
:
{
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
@@ -261,6 +243,17 @@
...
@@ -261,6 +243,17 @@
"
hidden
"
:
0
,
"
hidden
"
:
0
,
"
type
"
:
"
ListField
"
"
type
"
:
"
ListField
"
},
},
"
my_subject_list
"
:
{
"
description
"
:
""
,
"
title
"
:
results
[
2
][
24
],
"
default
"
:
gadget
.
state
.
doc
.
subject_list
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
subject_list
"
,
"
hidden
"
:
(
gadget
.
state
.
doc
.
allocation_scope
===
"
open/friend
"
)
?
0
:
1
,
"
type
"
:
"
LinesField
"
},
"
my_upgrade_scope
"
:
{
"
my_upgrade_scope
"
:
{
"
description
"
:
""
,
"
description
"
:
""
,
"
title
"
:
results
[
2
][
25
],
"
title
"
:
results
[
2
][
25
],
...
@@ -367,7 +360,8 @@
...
@@ -367,7 +360,8 @@
],
[
],
[
"
right
"
,
"
right
"
,
[[
"
my_source
"
],
[
"
my_source_project
"
],
[
"
my_monitor_scope
"
],
[[
"
my_source
"
],
[
"
my_source_project
"
],
[
"
my_monitor_scope
"
],
[
"
my_upgrade_scope
"
],
[
"
my_allocation_scope
"
]]
[
"
my_upgrade_scope
"
],
[
"
my_allocation_scope
"
],
[
"
my_subject_list
"
]]
],
[
],
[
"
bottom
"
,
"
bottom
"
,
[[
"
ticket_listbox
"
],
[
"
listbox
"
]]
[[
"
ticket_listbox
"
],
[
"
listbox
"
]]
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_compute_node_view_js.xml
View file @
bc499f13
...
@@ -100,11 +100,9 @@
...
@@ -100,11 +100,9 @@
<value>
<value>
<object>
<object>
<klass>
<klass>
<global
name=
"
_reconstructor"
module=
"copy_reg
"
/>
<global
name=
"
DateTime"
module=
"DateTime.DateTime
"
/>
</klass>
</klass>
<tuple>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
<none/>
</tuple>
</tuple>
<state>
<state>
...
@@ -209,11 +207,9 @@
...
@@ -209,11 +207,9 @@
<value>
<value>
<object>
<object>
<klass>
<klass>
<global
name=
"
_reconstructor"
module=
"copy_reg
"
/>
<global
name=
"
DateTime"
module=
"DateTime.DateTime
"
/>
</klass>
</klass>
<tuple>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
<none/>
</tuple>
</tuple>
<state>
<state>
...
@@ -267,7 +263,7 @@
...
@@ -267,7 +263,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1010.39762.20916.26709
</string>
</value>
<value>
<string>
998.18207.59213.64375
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -278,16 +274,14 @@
...
@@ -278,16 +274,14 @@
<value>
<value>
<object>
<object>
<klass>
<klass>
<global
name=
"
_reconstructor"
module=
"copy_reg
"
/>
<global
name=
"
DateTime"
module=
"DateTime.DateTime
"
/>
</klass>
</klass>
<tuple>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
<none/>
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
700505669.5
6
</float>
<float>
1
652949235.8
6
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
@@ -341,11 +335,9 @@
...
@@ -341,11 +335,9 @@
<value>
<value>
<object>
<object>
<klass>
<klass>
<global
name=
"
_reconstructor"
module=
"copy_reg
"
/>
<global
name=
"
DateTime"
module=
"DateTime.DateTime
"
/>
</klass>
</klass>
<tuple>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
<none/>
</tuple>
</tuple>
<state>
<state>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Base_getOpenComputeNodeList.py
View file @
bc499f13
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
category_public
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/public"
,
None
)
category_public
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/public"
,
None
)
category_personal
=
portal
.
restrictedTraverse
(
"portal_categories/allocation_scope/open/personal"
,
None
)
return
portal
.
portal_catalog
(
return
portal
.
portal_catalog
(
portal_type
=
'Compute Node'
,
portal_type
=
'Compute Node'
,
default_allocation_scope_uid
=
[
default_allocation_scope_uid
=
[
category_public
.
getUid
(),
category_public
.
getUid
(),
category_personal
.
getUid
()
],
],
validation_state
=
"validated"
,
validation_state
=
"validated"
,
sort_on
=
((
"title"
,
"ASC"
),)
sort_on
=
((
"title"
,
"ASC"
),)
)
)
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