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
Hardik Juneja
slapos.core
Commits
e10c6ea3
Commit
e10c6ea3
authored
Aug 03, 2012
by
Romain Courteaud
Committed by
Łukasz Nowak
Aug 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update validation_state too.
It allows to use catalog for searching.
parent
56059209
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Computer_updateFromDict.xml
...eItem/portal_skins/vifib_slap/Computer_updateFromDict.xml
+14
-1
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/Computer_updateFromDict.xml
View file @
e10c6ea3
...
@@ -94,18 +94,31 @@ context.edit(\n
...
@@ -94,18 +94,31 @@ context.edit(\n
)\n
)\n
\n
\n
compareAndUpdateAddressList(context, [{\'addr\': computer_dict[\'address\'], \'netmask\': computer_dict[\'netmask\']}])\n
compareAndUpdateAddressList(context, [{\'addr\': computer_dict[\'address\'], \'netmask\': computer_dict[\'netmask\']}])\n
expected_partition_dict = {}\n
for send_partition in computer_dict[\'partition_list\']:\n
for send_partition in computer_dict[\'partition_list\']:\n
partition = existing_partition_dict.get(send_partition[\'reference\'], None)\n
partition = existing_partition_dict.get(send_partition[\'reference\'], None)\n
expected_partition_dict[send_partition[\'reference\']] = True\n
if partition is None:\n
if partition is None:\n
partition = context.newContent(portal_type=\'Computer Partition\')\n
partition = context.newContent(portal_type=\'Computer Partition\')\n
partition.validate()\n
partition.validate()\n
partition.markFree()\n
partition.markFree()\n
elif partition.getSlapState() == \'inactive\':\n
elif partition.getSlapState() == \'inactive\':\n
# Reactivate partition\n
# Reactivate partition\n
partition.markFree()\n
partition.markFree(comment="Reactivated by slapformat")\n
\n
if partition.getValidationState() == "invalidated":\n
partition.validate(comment="Reactivated by slapformat")\n
partition.edit(reference=send_partition[\'reference\'])\n
partition.edit(reference=send_partition[\'reference\'])\n
network_interface = send_partition[\'tap\'][\'name\']\n
network_interface = send_partition[\'tap\'][\'name\']\n
compareAndUpdateAddressList(partition, send_partition[\'address_list\'], {\'network_interface\': network_interface})\n
compareAndUpdateAddressList(partition, send_partition[\'address_list\'], {\'network_interface\': network_interface})\n
\n
# Desactivate all other partitions\n
for key, value in existing_partition_dict.items():\n
if key not in expected_partition_dict:\n
if value.getSlapState() == "free":\n
value.markInactive(comment="Desactivated by slapformat")\n
if value.getValidationState() == "validated":\n
value.invalidate(comment="Desactivated by slapformat")\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
master/bt5/vifib_slap/bt/revision
View file @
e10c6ea3
790
791
\ 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