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
0b1e88d5
Commit
0b1e88d5
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
c3b37c97
Changes
5
Show 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 @
0b1e88d5
...
@@ -8,6 +8,7 @@ open_sale_order_movement_list = portal.portal_catalog(
...
@@ -8,6 +8,7 @@ open_sale_order_movement_list = portal.portal_catalog(
validation_state
=
'validated'
,
validation_state
=
'validated'
,
limit
=
1
limit
=
1
)
)
context
.
log
(
"%s %s"
%
(
service
.
getRelativeUrl
(),
len
(
open_sale_order_movement_list
)))
if
len
(
open_sale_order_movement_list
)
==
0
:
if
len
(
open_sale_order_movement_list
)
==
0
:
return
"not_subscribed"
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 @
0b1e88d5
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
Service
_getSubscriptionStatus
</string>
</value>
<value>
<string>
Item
_getSubscriptionStatus
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.py
View file @
0b1e88d5
...
@@ -195,8 +195,7 @@ for compute_partition_candidate in portal.portal_catalog(
...
@@ -195,8 +195,7 @@ for compute_partition_candidate in portal.portal_catalog(
compute_node
=
compute_partition_candidate
.
getParentValue
()
compute_node
=
compute_partition_candidate
.
getParentValue
()
if
compute_node
.
getPortalType
()
==
'Compute Node'
:
if
compute_node
.
getPortalType
()
==
'Compute Node'
:
subscription_state
=
compute_node
.
Service_getSubscriptionStatus
()
subscription_state
=
compute_node
.
Item_getSubscriptionStatus
()
compute_node
.
log
(
'subscription_state for Compute Node %s: %s'
%
(
compute_node
.
getRelativeUrl
(),
subscription_state
))
if
subscription_state
in
(
'not_subscribed'
,
'nopaid'
):
if
subscription_state
in
(
'not_subscribed'
,
'nopaid'
):
continue
continue
elif
subscription_state
in
(
'subscribed'
,
'todestroy'
):
elif
subscription_state
in
(
'subscribed'
,
'todestroy'
):
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
View file @
0b1e88d5
...
@@ -592,7 +592,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -592,7 +592,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
url_string
=
'type%s'
%
self
.
generateNewId
(),
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"
,
def
bootstrapAllocableInstanceTree
(
self
,
allocation_state
=
'possible'
,
shared
=
False
,
node
=
"compute"
,
is_accountable
=
False
,
base_price
=
None
,
has_organisation
=
False
):
is_accountable
=
False
,
base_price
=
None
,
has_organisation
=
False
):
if
allocation_state
not
in
(
'impossible'
,
'possible'
,
'allocated'
):
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 @
0b1e88d5
...
@@ -28,7 +28,7 @@ if requester_instance.getPortalType() == "Instance Tree":
...
@@ -28,7 +28,7 @@ if requester_instance.getPortalType() == "Instance Tree":
# Do not propagate instante tree changes if current user
# Do not propagate instante tree changes if current user
# subscription status is not OK
# subscription status is not OK
subscription_state
=
instance_tree
.
Service
_getSubscriptionStatus
()
subscription_state
=
instance_tree
.
Item
_getSubscriptionStatus
()
if
subscription_state
in
(
'not_subscribed'
,
'nopaid'
):
if
subscription_state
in
(
'not_subscribed'
,
'nopaid'
):
context
.
REQUEST
.
set
(
'request_instance'
,
None
)
context
.
REQUEST
.
set
(
'request_instance'
,
None
)
return
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