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
e7901e5b
Commit
e7901e5b
authored
Mar 14, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setup correct periodicity later.
Periodicity is known when service is available.
parent
27525363
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Person_getOpenOrderDifference.xml
...portal_skins/vifib_slap/Person_getOpenOrderDifference.xml
+6
-1
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Person_updateOpenOrder.xml
...teItem/portal_skins/vifib_slap/Person_updateOpenOrder.xml
+5
-2
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/scripts/Person_requestSoftwareInstance.xml
...rface_workflow/scripts/Person_requestSoftwareInstance.xml
+0
-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/Person_getOpenOrderDifference.xml
View file @
e7901e5b
...
@@ -86,6 +86,7 @@ for add_kw in add_kw_list:\n
...
@@ -86,6 +86,7 @@ for add_kw in add_kw_list:\n
add_kw_kw[add_kw[\'aggregate\']] = add_kw.copy()\n
add_kw_kw[add_kw[\'aggregate\']] = add_kw.copy()\n
\n
\n
modify_kw_kw = {}\n
modify_kw_kw = {}\n
hs_modify_kw_kw = {}\n
for start_date_tuple in start_date_tuple_list:\n
for start_date_tuple in start_date_tuple_list:\n
start_date = getClosestDate(target_date=addToDate(start_date_tuple[1], to_add={\'day\': 1}), precision=\'day\')\n
start_date = getClosestDate(target_date=addToDate(start_date_tuple[1], to_add={\'day\': 1}), precision=\'day\')\n
if start_date.day() >= 29:\n
if start_date.day() >= 29:\n
...
@@ -97,6 +98,10 @@ for start_date_tuple in start_date_tuple_list:\n
...
@@ -97,6 +98,10 @@ for start_date_tuple in start_date_tuple_list:\n
modify_kw_kw[line.getAggregate(portal_type=\'Hosting Subscription\')] = {\'start_date\': start_date_tuple[1]}\n
modify_kw_kw[line.getAggregate(portal_type=\'Hosting Subscription\')] = {\'start_date\': start_date_tuple[1]}\n
elif start_date_tuple[0] in add_kw_kw:\n
elif start_date_tuple[0] in add_kw_kw:\n
add_kw_kw[start_date_tuple[0]][\'start_date\'] = start_date\n
add_kw_kw[start_date_tuple[0]][\'start_date\'] = start_date\n
hs = portal.restrictedTraverse(start_date_tuple[0])\n
if hs.getPeriodicityMonthDayList() != [start_date.day()]:\n
hs_modify_kw_kw.setdefault(start_date_tuple[0], {})\n
hs_modify_kw_kw[start_date_tuple[0]][\'periodicity_month_day_list\'] = [start_date.day()]\n
\n
\n
if previous_open_sale_order is not None:\n
if previous_open_sale_order is not None:\n
for line in previous_open_sale_order.contentValues(portal_type=\'Open Sale Order Line\'):\n
for line in previous_open_sale_order.contentValues(portal_type=\'Open Sale Order Line\'):\n
...
@@ -133,7 +138,7 @@ if previous_open_sale_order is not None:\n
...
@@ -133,7 +138,7 @@ if previous_open_sale_order is not None:\n
line =
previous_open_sale_order[hosting_subscription_mapping.get(remove_hosting)]\n
line =
previous_open_sale_order[hosting_subscription_mapping.get(remove_hosting)]\n
if
line.getStartDate()
is
not
None
and
line.getStopDate()
is
not
None
and
line.getStartDate()
<
line.getStopDate():\n
if
line.getStartDate()
is
not
None
and
line.getStopDate()
is
not
None
and
line.getStartDate()
<
line.getStopDate():\n
remove_id_list.add(line.getId())\n
remove_id_list.add(line.getId())\n
return
add_kw_kw,
modify_kw_kw,
list(remove_id_list)\n
return
add_kw_kw,
modify_kw_kw,
hs_modify_kw_kw,
list(remove_id_list)\n
]]
></string>
</value>
]]
></string>
</value>
...
...
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Person_updateOpenOrder.xml
View file @
e7901e5b
...
@@ -62,12 +62,15 @@ if portal.portal_activities.countMessageWithTag(tag) > 0:\n
...
@@ -62,12 +62,15 @@ if portal.portal_activities.countMessageWithTag(tag) > 0:\n
# nothing to do\n
# nothing to do\n
return\n
return\n
\n
\n
add_kw_kw, modify_kw_kw, remove_id_list = context.Person_getOpenOrderDifference(\n
add_kw_kw, modify_kw_kw,
hs_modify_kw_kw,
remove_id_list = context.Person_getOpenOrderDifference(\n
remove_hosting_list=remove_hosting_list, add_kw_list=add_kw_list,\n
remove_hosting_list=remove_hosting_list, add_kw_list=add_kw_list,\n
stop_date=stop_date, start_date_tuple_list=start_date_tuple_list)\n
stop_date=stop_date, start_date_tuple_list=start_date_tuple_list)\n
\n
\n
if src__== 1:\n
if src__== 1:\n
return add_kw_kw, modify_kw_kw, remove_id_list\n
return add_kw_kw, modify_kw_kw, hs_modify_kw_kw, remove_id_list\n
\n
for hs, kw in hs_modify_kw_kw.iteritems():\n
portal.restrictedTraverse(hs).edit(**kw)\n
\n
\n
if not(add_kw_kw or modify_kw_kw or remove_id_list):\n
if not(add_kw_kw or modify_kw_kw or remove_id_list):\n
return # nothing to do\n
return # nothing to do\n
...
...
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/scripts/Person_requestSoftwareInstance.xml
View file @
e7901e5b
...
@@ -111,9 +111,6 @@ if (request_hosting_subscription is None):\n
...
@@ -111,9 +111,6 @@ if (request_hosting_subscription is None):\n
root_software_release_url=software_release_url_string,\n
root_software_release_url=software_release_url_string,\n
root_slave=is_slave,\n
root_slave=is_slave,\n
root_state=state,\n
root_state=state,\n
periodicity_hour_list=[0],\n
periodicity_minute_list=[0],\n
periodicity_month_day=[1],\n
activate_kw={\'tag\': tag},\n
activate_kw={\'tag\': tag},\n
)\n
)\n
request_hosting_subscription.portal_workflow.doActionFor(request_hosting_subscription,\n
request_hosting_subscription.portal_workflow.doActionFor(request_hosting_subscription,\n
...
...
master/bt5/vifib_slap/bt/revision
View file @
e7901e5b
649
650
\ 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