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
b6834e2d
Commit
b6834e2d
authored
May 24, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: rename Service_getSubscriptionStatus to Item_getSubscriptionStatus
parent
046beb0c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Item_getSubscriptionStatus.py
...m/portal_skins/slapos_cloud/Item_getSubscriptionStatus.py
+1
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Item_getSubscriptionStatus.xml
.../portal_skins/slapos_cloud/Item_getSubscriptionStatus.xml
+1
-1
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.py
...ateItem/portal_skins/slapos_cloud/Person_findPartition.py
+1
-2
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
...teItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
+1
-1
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/script_RequesterInstance_request.py
...ap_interface_workflow/script_RequesterInstance_request.py
+1
-1
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/
Service
_getSubscriptionStatus.py
→
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/
Item
_getSubscriptionStatus.py
View file @
b6834e2d
...
...
@@ -8,6 +8,7 @@ open_sale_order_movement_list = portal.portal_catalog(
validation_state
=
'validated'
,
limit
=
1
)
context
.
log
(
"%s %s"
%
(
service
.
getRelativeUrl
(),
len
(
open_sale_order_movement_list
)))
if
len
(
open_sale_order_movement_list
)
==
0
:
return
"not_subscribed"
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/
Service
_getSubscriptionStatus.xml
→
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/
Item
_getSubscriptionStatus.xml
View file @
b6834e2d
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Service
_getSubscriptionStatus
</string>
</value>
<value>
<string>
Item
_getSubscriptionStatus
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.py
View file @
b6834e2d
...
...
@@ -195,8 +195,7 @@ for compute_partition_candidate in portal.portal_catalog(
compute_node
=
compute_partition_candidate
.
getParentValue
()
if
compute_node
.
getPortalType
()
==
'Compute Node'
:
subscription_state
=
compute_node
.
Service_getSubscriptionStatus
()
compute_node
.
log
(
'subscription_state for Compute Node %s: %s'
%
(
compute_node
.
getRelativeUrl
(),
subscription_state
))
subscription_state
=
compute_node
.
Item_getSubscriptionStatus
()
if
subscription_state
in
(
'not_subscribed'
,
'nopaid'
):
continue
elif
subscription_state
in
(
'subscribed'
,
'todestroy'
):
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
View file @
b6834e2d
...
...
@@ -600,7 +600,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
url_string
=
'type%s'
%
self
.
generateNewId
(),
)
@
simulate
(
'
Service
_getSubscriptionStatus'
,
'*args, **kwargs'
,
'return "subscribed"'
)
@
simulate
(
'
Item
_getSubscriptionStatus'
,
'*args, **kwargs'
,
'return "subscribed"'
)
def
bootstrapAllocableInstanceTree
(
self
,
allocation_state
=
'possible'
,
shared
=
False
,
node
=
"compute"
,
is_accountable
=
False
,
base_price
=
None
,
has_organisation
=
False
):
if
allocation_state
not
in
(
'impossible'
,
'possible'
,
'allocated'
):
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/script_RequesterInstance_request.py
View file @
b6834e2d
...
...
@@ -28,7 +28,7 @@ if requester_instance.getPortalType() == "Instance Tree":
# Do not propagate instante tree changes if current user
# subscription status is not OK
subscription_state
=
instance_tree
.
Service
_getSubscriptionStatus
()
subscription_state
=
instance_tree
.
Item
_getSubscriptionStatus
()
if
subscription_state
in
(
'not_subscribed'
,
'nopaid'
):
context
.
REQUEST
.
set
(
'request_instance'
,
None
)
return
...
...
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