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
Łukasz Nowak
slapos.core
Commits
5a031c27
Commit
5a031c27
authored
May 16, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allocate after confirmation.
It allows interaction to work in correct sequence.
parent
32df7a5c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SaleOrderLine_tryToAllocatePartition.xml
...skins/vifib_slap/SaleOrderLine_tryToAllocatePartition.xml
+4
-3
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
No files found.
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SaleOrderLine_tryToAllocatePartition.xml
View file @
5a031c27
...
@@ -85,13 +85,13 @@ def assignComputerPartition(order):\n
...
@@ -85,13 +85,13 @@ def assignComputerPartition(order):\n
software_instance.getPortalType(), software_instance.getSlaXmlAsDict()])\n
software_instance.getPortalType(), software_instance.getSlaXmlAsDict()])\n
order_line.edit(\n
order_line.edit(\n
aggregate_list=order_line.getAggregateList()+[computer_partition_relative_url])\n
aggregate_list=order_line.getAggregateList()+[computer_partition_relative_url])\n
software_instance.allocatePartition(computer_partition=
computer_partition_relative_url)\n
return (software_instance,
computer_partition_relative_url)\n
return computer_partition_relative_url
\n
return (None, None)
\n
\n
\n
sale_order = context.getParentValue()\n
sale_order = context.getParentValue()\n
if sale_order.getSimulationState() == \'ordered\':\n
if sale_order.getSimulationState() == \'ordered\':\n
try:\n
try:\n
computer_partition = assignComputerPartition(sale_order)\n
software_instance,
computer_partition = assignComputerPartition(sale_order)\n
except ValueError:\n
except ValueError:\n
# It was not possible to find free Computer Partition\n
# It was not possible to find free Computer Partition\n
pass\n
pass\n
...
@@ -108,6 +108,7 @@ if sale_order.getSimulationState() == \'ordered\':\n
...
@@ -108,6 +108,7 @@ if sale_order.getSimulationState() == \'ordered\':\n
else:\n
else:\n
sale_order.setStartDate(DateTime())\n
sale_order.setStartDate(DateTime())\n
sale_order.confirm()\n
sale_order.confirm()\n
software_instance.allocatePartition(computer_partition=computer_partition)\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
master/bt5/vifib_slap/bt/revision
View file @
5a031c27
726
727
\ 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