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
Jérome Perrin
slapos.core
Commits
981d654c
Commit
981d654c
authored
Mar 11, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
subscription_request: produce stable json for easier testing
sorted and with the usual workaround for trailing space bug
parent
70e171dd
Pipeline
#33381
canceled with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
26 deletions
+31
-26
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionCondition_renderKVMClusterParameter.py
...equest/SubscriptionCondition_renderKVMClusterParameter.py
+6
-1
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
...ortal_components/test.erp5.testSlapOSSubscriptionSkins.py
+25
-25
No files found.
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionCondition_renderKVMClusterParameter.py
View file @
981d654c
...
...
@@ -35,6 +35,11 @@ for i in range(amount):
xml_parameter
=
"""<?xml version="1.0" encoding="utf-8"?>
<instance>
<parameter id="_">%s</parameter>
</instance>"""
%
json
.
dumps
(
json_parameter
,
indent
=
2
)
</instance>"""
%
json
.
dumps
(
json_parameter
,
indent
=
2
,
sort_keys
=
True
,
# BBB PY2 https://github.com/python/cpython/issues/60537#issuecomment-1093598422
separators
=
(
','
,
': '
),
)
return
xml_parameter
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
View file @
981d654c
...
...
@@ -122,11 +122,11 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM
"KVM0": {
"cpu-count": 40,
"cpu-max-count": 41,
"ram-size": 245760,
"ram-max-size": 245761,
"disable-ansible-promise": true,
"disk-device-path": "/dev/sdb",
"project-guid": "PROJ-XXXX",
"disable-ansible-promise": true
"ram-max-size": 245761,
"ram-size": 245760
}
}
}</parameter>
...
...
@@ -144,13 +144,13 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM
<parameter id="_">{
"kvm-partition-dict": {
"KVM0": {
"cpu-count": 40,
"cpu-max-count": 41,
"disable-ansible-promise": true,
"disk-device-path": "/dev/sdb",
"
cpu-count": 40,
"
project-guid": "PROJ-XXXX",
"ram-max-size": 245761,
"ram-size": 245760,
"project-guid": "PROJ-XXXX",
"cpu-max-count": 41,
"sticky-computer": true
}
}
...
...
@@ -163,23 +163,23 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM
<parameter id="_">{
"kvm-partition-dict": {
"KVM0": {
"cpu-count": 40,
"cpu-max-count": 41,
"disable-ansible-promise": true,
"disk-device-path": "/dev/sdb",
"
cpu-count": 40,
"
project-guid": "PROJ-XXXX",
"ram-max-size": 245761,
"ram-size": 245760,
"project-guid": "PROJ-XXXX",
"cpu-max-count": 41,
"sticky-computer": true
},
"KVM1": {
"disk-device-path": "/dev/sdb",
"cpu-count": 40,
"ram-max-size": 245761,
"cpu-max-count": 41,
"disable-ansible-promise": true,
"ram-size": 245760,
"project-guid": "PROJ-XXXX"
"disk-device-path": "/dev/sdb",
"project-guid": "PROJ-XXXX",
"ram-max-size": 245761,
"ram-size": 245760
}
}
}</parameter>
...
...
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