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
Léo-Paul Géneau
slapos.core
Commits
6654869a
Commit
6654869a
authored
Oct 16, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use workflow transition.
parent
12341a40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
27 deletions
+4
-27
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_registerNewComputer.xml
...al_skins/vifib_hosting/WebSection_registerNewComputer.xml
+4
-27
No files found.
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_registerNewComputer.xml
View file @
6654869a
...
...
@@ -51,35 +51,12 @@
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
\n
computer_portal_type = "Computer"\n
\n
reference = "COMP-%s" % portal.portal_ids.generateNewId(\n
id_group=\'slap_computer_reference\',\n
id_generator=\'uid\')\n
\n
certificate_dict = context.getPortalObject().portal_certificate_authority.getNewCertificate(reference)\n
\n
module = portal.getDefaultModule(portal_type=computer_portal_type)\n
computer = module.newContent(\n
portal_type=computer_portal_type,\n
title=title,\n
reference=reference,\n
destination_reference=certificate_dict["id"],\n
capacity_scope=\'open\',\n
)\n
\n
computer.requestComputerRegistration()\n
computer.approveComputerRegistration()\n
\n
computer = context.restrictedTraverse(computer.getRelativeUrl())\n
\n
context.REQUEST.set("computer_certificate", certificate_dict["certificate"])\n
context.REQUEST.set("computer_key", certificate_dict["key"])\n
context.REQUEST.set("computer_url", computer.absolute_url())\n
person = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
request_kw = dict(computer_title=title)\n
person.requestComputer(**request_kw)\n
computer = context.restrictedTraverse(context.REQUEST.get(\'computer\'))\n
message = "Registering Computer"\n
context.REQUEST.set("portal_status_message", message)\n
\n
return computer.Computer_viewConnectionInformationAsWeb()\n
</string>
</value>
</item>
...
...
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