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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
eea34b61
Commit
eea34b61
authored
Oct 06, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Plain Diff
Fixes: unit tests, computer renaming, tracking usage
See merge request
nexedi/slapos.core!335
parents
9523a793
c983d1f8
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
30 additions
and
30 deletions
+30
-30
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestComputeNode.py
...ap_interface_workflow/script_Person_requestComputeNode.py
+1
-1
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
+12
-12
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_administration/expected_alarm_tool_dumped_configuration.txt
...ministration/expected_alarm_tool_dumped_configuration.txt
+1
-1
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_administration/expected_portal_skins_dumped_configuration.txt
...nistration/expected_portal_skins_dumped_configuration.txt
+1
-1
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_viewAsHateoas/my_source_section_title.xml
...ComputerNetwork_viewAsHateoas/my_source_section_title.xml
+1
-1
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSInvoice.zpt
...eItem/portal_tests/slaposjs_zuite/testSlapOSJSInvoice.zpt
+1
-1
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSNetworkSharedByOrganisation.zpt
...laposjs_zuite/testSlapOSJSNetworkSharedByOrganisation.zpt
+10
-10
master/bt5/slapos_pdm/PathTemplateItem/portal_alarms/slapos_pdm_compute_node_create_upgrade_decision.xml
...larms/slapos_pdm_compute_node_create_upgrade_decision.xml
+1
-1
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Alarm_ComputeNodeCheckUpgradeSoftwareRelease.py
...lapos_pdm/Alarm_ComputeNodeCheckUpgradeSoftwareRelease.py
+0
-0
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Alarm_ComputeNodeCheckUpgradeSoftwareRelease.xml
...apos_pdm/Alarm_ComputeNodeCheckUpgradeSoftwareRelease.xml
+1
-1
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
...ateItem/portal_components/test.erp5.testSlapOSSlapTool.py
+1
-1
No files found.
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestComputeNode.py
View file @
eea34b61
...
...
@@ -10,7 +10,7 @@ try:
except
KeyError
:
raise
TypeError
,
"Person_requestComputeNode takes exactly 1 argument"
tag
=
"%s_%s_
compute_n
odeInProgress"
%
(
person
.
getUid
(),
tag
=
"%s_%s_
ComputeN
odeInProgress"
%
(
person
.
getUid
(),
compute_node_title
)
if
(
portal
.
portal_activities
.
countMessageWithTag
(
tag
)
>
0
):
# The software instance is already under creation but can not be fetched from catalog
...
...
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
View file @
eea34b61
...
...
@@ -649,7 +649,7 @@ class TestSlapOSComputeNode_notifyWrongAllocationScope(TestCRMSkinsMixin):
'reference=None'
,
'assert reference == "slapos-crm-compute_node_allocation_scope.notification"
\
n
'
\
'return context.restrictedTraverse('
\
'context.REQUEST["test_
compute_n
odeNotAllowedAllocationScope_OpenPublic"])'
)
'context.REQUEST["test_
ComputeN
odeNotAllowedAllocationScope_OpenPublic"])'
)
@
simulate
(
'SupportRequest_trySendNotificationMessage'
,
'message_title, message, destination_relative_url'
,
'context.portal_workflow.doActionFor('
\
...
...
@@ -657,11 +657,11 @@ class TestSlapOSComputeNode_notifyWrongAllocationScope(TestCRMSkinsMixin):
'comment="Visited by SupportRequest_trySendNotificationMessage '
\
'%s %s %s" % (message_title, message, destination_relative_url))
\
n
'
\
'return 1'
)
def
test_
compute_n
odeNotAllowedAllocationScope_OpenPublic
(
self
):
def
test_
ComputeN
odeNotAllowedAllocationScope_OpenPublic
(
self
):
compute_node
=
self
.
_makeComputeNode
(
owner
=
self
.
makePerson
(
user
=
0
))[
0
]
person
=
compute_node
.
getSourceAdministrationValue
()
self
.
portal
.
REQUEST
[
'test_
compute_n
odeNotAllowedAllocationScope_OpenPublic'
]
=
\
self
.
portal
.
REQUEST
[
'test_
ComputeN
odeNotAllowedAllocationScope_OpenPublic'
]
=
\
self
.
_makeNotificationMessage
(
compute_node
.
getReference
())
compute_node
.
edit
(
allocation_scope
=
'open/public'
)
...
...
@@ -685,7 +685,7 @@ class TestSlapOSComputeNode_notifyWrongAllocationScope(TestCRMSkinsMixin):
'reference=None'
,
'assert reference == "slapos-crm-compute_node_allocation_scope.notification"
\
n
'
\
'return context.restrictedTraverse('
\
'context.REQUEST["test_
compute_n
odeNotAllowedAllocationScope_OpenFriend"])'
)
'context.REQUEST["test_
ComputeN
odeNotAllowedAllocationScope_OpenFriend"])'
)
@
simulate
(
'SupportRequest_trySendNotificationMessage'
,
'message_title, message, destination_relative_url'
,
'context.portal_workflow.doActionFor('
\
...
...
@@ -693,11 +693,11 @@ class TestSlapOSComputeNode_notifyWrongAllocationScope(TestCRMSkinsMixin):
'comment="Visited by SupportRequest_trySendNotificationMessage '
\
'%s %s %s" % (message_title, message, destination_relative_url))
\
n
'
\
'return 1'
)
def
test_
compute_n
odeNotAllowedAllocationScope_OpenFriend
(
self
):
def
test_
ComputeN
odeNotAllowedAllocationScope_OpenFriend
(
self
):
compute_node
=
self
.
_makeComputeNode
(
owner
=
self
.
makePerson
(
user
=
0
))[
0
]
person
=
compute_node
.
getSourceAdministrationValue
()
self
.
portal
.
REQUEST
[
'test_
compute_n
odeNotAllowedAllocationScope_OpenFriend'
]
=
\
self
.
portal
.
REQUEST
[
'test_
ComputeN
odeNotAllowedAllocationScope_OpenFriend'
]
=
\
self
.
_makeNotificationMessage
(
compute_node
.
getReference
())
friend_person
=
self
.
makePerson
()
...
...
@@ -720,7 +720,7 @@ class TestSlapOSComputeNode_notifyWrongAllocationScope(TestCRMSkinsMixin):
'reference=None'
,
'assert reference == "slapos-crm-compute-node-allocation-scope-closed.notification"
\
n
'
\
'return context.restrictedTraverse('
\
'context.REQUEST["test_
compute_n
odeToCloseAllocationScope_OpenPersonal"])'
)
'context.REQUEST["test_
ComputeN
odeToCloseAllocationScope_OpenPersonal"])'
)
@
simulate
(
'SupportRequest_trySendNotificationMessage'
,
'message_title, message, destination_relative_url'
,
'context.portal_workflow.doActionFor('
\
...
...
@@ -728,12 +728,12 @@ class TestSlapOSComputeNode_notifyWrongAllocationScope(TestCRMSkinsMixin):
'comment="Visited by SupportRequest_trySendNotificationMessage '
\
'%s %s %s" % (message_title, message, destination_relative_url))
\
n
'
\
'return 1'
)
def
test_
compute_n
odeToCloseAllocationScope_OpenPersonal
(
self
):
def
test_
ComputeN
odeToCloseAllocationScope_OpenPersonal
(
self
):
compute_node
=
self
.
_makeComputeNode
(
owner
=
self
.
makePerson
(
user
=
0
))[
0
]
person
=
compute_node
.
getSourceAdministrationValue
()
target_allocation_scope
=
'close/outdated'
self
.
portal
.
REQUEST
[
'test_
compute_n
odeToCloseAllocationScope_OpenPersonal'
]
=
\
self
.
portal
.
REQUEST
[
'test_
ComputeN
odeToCloseAllocationScope_OpenPersonal'
]
=
\
self
.
_makeNotificationMessage
(
compute_node
.
getReference
())
compute_node
.
edit
(
allocation_scope
=
'open/personal'
)
...
...
@@ -749,7 +749,7 @@ class TestSlapOSComputeNode_notifyWrongAllocationScope(TestCRMSkinsMixin):
'Test NM content
\
n
%s
\
n
'
%
compute_node
.
getReference
(),
person
.
getRelativeUrl
()),
support_request
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
def
test_
compute_n
odeNormalAllocationScope_OpenPersonal
(
self
):
def
test_
ComputeN
odeNormalAllocationScope_OpenPersonal
(
self
):
compute_node
=
self
.
_makeComputeNode
(
owner
=
self
.
makePerson
(
user
=
0
))[
0
]
person
=
compute_node
.
getSourceAdministrationValue
()
self
.
_updatePersonAssignment
(
person
,
'role/service_provider'
)
...
...
@@ -759,7 +759,7 @@ class TestSlapOSComputeNode_notifyWrongAllocationScope(TestCRMSkinsMixin):
self
.
tic
()
self
.
assertEqual
(
compute_node
.
getAllocationScope
(),
'open/personal'
)
def
test_
compute_n
odeAllowedAllocationScope_OpenPublic
(
self
):
def
test_
ComputeN
odeAllowedAllocationScope_OpenPublic
(
self
):
compute_node
=
self
.
_makeComputeNode
(
owner
=
self
.
makePerson
(
user
=
0
))[
0
]
person
=
compute_node
.
getSourceAdministrationValue
()
self
.
_updatePersonAssignment
(
person
,
'role/service_provider'
)
...
...
@@ -769,7 +769,7 @@ class TestSlapOSComputeNode_notifyWrongAllocationScope(TestCRMSkinsMixin):
self
.
tic
()
self
.
assertEqual
(
compute_node
.
getAllocationScope
(),
'open/public'
)
def
test_
compute_n
odeAllowedAllocationScope_OpenFriend
(
self
):
def
test_
ComputeN
odeAllowedAllocationScope_OpenFriend
(
self
):
compute_node
=
self
.
_makeComputeNode
(
owner
=
self
.
makePerson
(
user
=
0
))[
0
]
friend_person
=
self
.
makePerson
()
person
=
compute_node
.
getSourceAdministrationValue
()
...
...
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_administration/expected_alarm_tool_dumped_configuration.txt
View file @
eea34b61
...
...
@@ -55,7 +55,7 @@ portal_alarms/slapos_manage_building_calculating_delivery;1;None;Alarm_manageBui
portal_alarms/slapos_payzen_update_confirmed_payment;1;None;Alarm_updatePayzenConfirmedPaymentTransaction;None;None;None;();None;();5;();();None;2010/10/26 00:00:00 GMT;None;();None;None
portal_alarms/slapos_payzen_update_started_payment;1;None;Alarm_updatePayzenStartedPaymentTransaction;None;None;None;();None;();2;();();None;2010/10/26 00:00:00 GMT;None;();None;None
portal_alarms/slapos_pdm_auto_cancel_upgrade_decision;1;None;Alarm_cancelUpgradeDecision;None;None;1;(5,);None;(0,);None;();();None;2014/07/23 00:00:00 GMT;None;();None;None
portal_alarms/slapos_pdm_compute_node_create_upgrade_decision;1;None;Alarm_
compute_n
odeCheckUpgradeSoftwareRelease;None;None;1;(0,);None;(8,);None;();();None;2014/07/23 00:00:00 GMT;None;();None;None
portal_alarms/slapos_pdm_compute_node_create_upgrade_decision;1;None;Alarm_
ComputeN
odeCheckUpgradeSoftwareRelease;None;None;1;(0,);None;(8,);None;();();None;2014/07/23 00:00:00 GMT;None;();None;None
portal_alarms/slapos_pdm_destroy_software_installation_with_archived_software_release;1;None;Alarm_destroySoftwareInstallationWithArchivedSoftwareRelease;None;None;None;(20,);None;(8,);None;();();None;1970/01/01 00:00:00 GMT;None;();None;None
portal_alarms/slapos_pdm_instance_tree_create_upgrade_decision;1;None;Alarm_checkAndUpgradeInstanceTree;None;None;1;(5,);None;(0,);None;();();None;2014/07/23 00:00:00 GMT;None;();None;None
portal_alarms/slapos_pdm_upgrade_decision_process_planned;1;None;Alarm_processPlannedUpgradeDecision;None;None;None;();None;();5;();();None;1970/01/01 01:01:00 GMT;None;();None;None
...
...
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_administration/expected_portal_skins_dumped_configuration.txt
View file @
eea34b61
...
...
@@ -4452,7 +4452,7 @@ slapos_payzen;payzen.wsdl;File;71210653c1ed6904cd6d2f4e66b6e15d
slapos_payzen;payzen_payment;Page Template;d41d8cd98f00b204e9800998ecf8427e
slapos_pdm;Alarm_cancelUpgradeDecision;Script (Python);c2ca352a00dd4dc6f8cbaca79fbd78be
slapos_pdm;Alarm_checkAndUpgradeInstanceTree;Script (Python);4a687cc0b1ad02501d1c56650e523b8e
slapos_pdm;Alarm_
compute_n
odeCheckUpgradeSoftwareRelease;Script (Python);1451976e53fc989b79e665260f8f6bb8
slapos_pdm;Alarm_
ComputeN
odeCheckUpgradeSoftwareRelease;Script (Python);1451976e53fc989b79e665260f8f6bb8
slapos_pdm;Alarm_destroySoftwareInstallationWithArchivedSoftwareRelease;Script (Python);95a9c4e745626df3b4856ebd2b4a255e
slapos_pdm;Alarm_processPlannedUpgradeDecision;Script (Python);15e937ba48f4cc8a88951f72eb8e0aa6
slapos_pdm;Alarm_processStartedUpgradeDecision;Script (Python);adde733f9ffdcfd8362a4da6e83c11a2
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/ComputerNetwork_viewAsHateoas/my_source_section_title.xml
View file @
eea34b61
...
...
@@ -126,7 +126,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: here.Item_getCurrent
Site
Title()
</string>
</value>
<value>
<string>
python: here.Item_getCurrent
Owner
Title()
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSInvoice.zpt
View file @
eea34b61
...
...
@@ -74,7 +74,7 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/wait_for_content_loaded"
/>
<!-- check invoice view -->
<tal:block
tal:define=
"header python: '
Invoice: ${title}'
;
<tal:block
tal:define=
"header python: '
%s ${title}' % (here.Base_translateString('Invoice:', lang=lang))
;
dummy python: context.REQUEST.set('mapping', {'title': '1'})"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header"
/>
</tal:block>
...
...
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSNetworkSharedByOrganisation.zpt
View file @
eea34b61
...
...
@@ -22,7 +22,7 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/create_user_organisation"
/>
</tal:block>
<tal:block
define=
"document_title python: 'TEST-SLAPOSJS-NETWORK-BY-ORGA
S
NISATION 0';"
>
<tal:block
define=
"document_title python: 'TEST-SLAPOSJS-NETWORK-BY-ORGANISATION 0';"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/create_simple_network"
/>
</tal:block>
...
...
@@ -43,17 +43,17 @@
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGA
S
NISATION 0"]
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGANISATION 0"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGA
S
NISATION 0"]
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGANISATION 0"]
</td>
<td></td>
</tr>
<tal:block
tal:define=
"header python: 'Computer Network :${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-NETWORK-BY-ORGA
S
NISATION 0'}) "
>
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-NETWORK-BY-ORGANISATION 0'}) "
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header"
/>
</tal:block>
...
...
@@ -101,17 +101,17 @@
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGA
S
NISATION 0"]
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGANISATION 0"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGA
S
NISATION 0"]
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGANISATION 0"]
</td>
<td></td>
</tr>
<tal:block
tal:define=
"header python: 'Computer Network :${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-NETWORK-BY-ORGA
S
NISATION 0'}) "
>
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-NETWORK-BY-ORGANISATION 0'}) "
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header"
/>
</tal:block>
...
...
@@ -260,17 +260,17 @@
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGA
S
NISATION 0"]
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGANISATION 0"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGA
S
NISATION 0"]
</td>
<td>
//a[text()="TEST-SLAPOSJS-NETWORK-BY-ORGANISATION 0"]
</td>
<td></td>
</tr>
<tal:block
tal:define=
"header python: 'Computer Network :${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-NETWORK-BY-ORGA
S
NISATION 0'}) "
>
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-NETWORK-BY-ORGANISATION 0'}) "
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header"
/>
</tal:block>
...
...
master/bt5/slapos_pdm/PathTemplateItem/portal_alarms/slapos_pdm_compute_node_create_upgrade_decision.xml
View file @
eea34b61
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_
compute_n
odeCheckUpgradeSoftwareRelease
</string>
</value>
<value>
<string>
Alarm_
ComputeN
odeCheckUpgradeSoftwareRelease
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Alarm_
compute_n
odeCheckUpgradeSoftwareRelease.py
→
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Alarm_
ComputeN
odeCheckUpgradeSoftwareRelease.py
View file @
eea34b61
File moved
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Alarm_
compute_n
odeCheckUpgradeSoftwareRelease.xml
→
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/Alarm_
ComputeN
odeCheckUpgradeSoftwareRelease.xml
View file @
eea34b61
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_
compute_n
odeCheckUpgradeSoftwareRelease
</string>
</value>
<value>
<string>
Alarm_
ComputeN
odeCheckUpgradeSoftwareRelease
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
View file @
eea34b61
...
...
@@ -3219,7 +3219,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
[{
'recargs'
:
args
,
'reckwargs'
:
kwargs
,
'recmethod'
:
'requestSoftwareRelease'
}])
def
test_
compute_n
odeSupply
(
self
):
def
test_
ComputeN
odeSupply
(
self
):
self
.
compute_node_supply_simulator
=
tempfile
.
mkstemp
()[
1
]
try
:
self
.
login
(
self
.
person_user_id
)
...
...
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