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
Xavier Thompson
slapos.core
Commits
b1f7ad54
Commit
b1f7ad54
authored
Oct 19, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not rename to an already existing title
parent
a971f8c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/scripts/RequestedInstance_rename.xml
...p_interface_workflow/scripts/RequestedInstance_rename.xml
+14
-0
master/bt5/vifib_slapos_core/bt/revision
master/bt5/vifib_slapos_core/bt/revision
+1
-1
No files found.
master/bt5/vifib_slapos_core/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/scripts/RequestedInstance_rename.xml
View file @
b1f7ad54
...
@@ -68,6 +68,20 @@ if (portal.portal_activities.countMessageWithTag(tag) > 0):\n
...
@@ -68,6 +68,20 @@ if (portal.portal_activities.countMessageWithTag(tag) > 0):\n
# As it is not possible to fetch informations, it is better to raise an error\n
# As it is not possible to fetch informations, it is better to raise an error\n
raise NotImplementedError(tag)\n
raise NotImplementedError(tag)\n
\n
\n
# Check if it already exists\n
request_software_instance_list = portal.portal_catalog(\n
# Fetch all portal type, as it is not allowed to change it\n
portal_type=["Software Instance", "Slave Instance"],\n
title={\'query\': software_title, \'key\': \'ExactMatch\'},\n
specialise_uid=hosting_subscription.getUid(),\n
# Do not fetch destroyed instances\n
# XXX slap_state=["start_requested", "stop_requested"],\n
validation_state="validated",\n
limit=1,\n
)\n
if len(request_software_instance_list) == 1:\n
raise ValueError, "Too many instances \'%s\' found: %s" % (software_title, [x.path for x in request_software_instance_list])\n
\n
# Change the title\n
# Change the title\n
instance.edit(title=software_title, activate_kw={\'tag\': tag})\n
instance.edit(title=software_title, activate_kw={\'tag\': tag})\n
...
...
master/bt5/vifib_slapos_core/bt/revision
View file @
b1f7ad54
50
51
\ No newline at end of file
\ No newline at end of file
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