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
Thomas Gambier
slapos.core
Commits
8d407893
Commit
8d407893
authored
Oct 03, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_slap_tool: Update Metadata related to SlapOS
parent
3327feb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
master/bt5/slapos_slap_tool/SkinTemplateItem/portal_skins/slapos_slap_tool/Computer_updateFromDict.py
.../portal_skins/slapos_slap_tool/Computer_updateFromDict.py
+21
-1
No files found.
master/bt5/slapos_slap_tool/SkinTemplateItem/portal_skins/slapos_slap_tool/Computer_updateFromDict.py
View file @
8d407893
...
...
@@ -43,9 +43,29 @@ for c in context.contentValues(portal_type="Computer Partition"):
existing_partition_dict
[
c
.
getReference
()]
=
c
# update computer data
edit_kw
=
{}
quantity
=
len
(
computer_dict
[
'partition_list'
])
if
context
.
getQuantity
()
!=
quantity
:
context
.
edit
(
quantity
=
quantity
)
edit_kw
[
'quantity'
]
=
quantity
os_type
=
computer_dict
.
get
(
'os_type'
,
None
)
if
context
.
getOsType
()
!=
os_type
:
edit_kw
[
'os_type'
]
=
os_type
public_ipv4_address
=
computer_dict
.
get
(
'public_ipv4_address'
,
None
)
if
context
.
getPublicIpv4Address
()
!=
public_ipv4_address
:
edit_kw
[
'public_ipv4_address'
]
=
public_ipv4_address
python_version
=
computer_dict
.
get
(
'python_version'
,
None
)
if
context
.
getPythonVersion
()
!=
python_version
:
edit_kw
[
'python_version'
]
=
python_version
slapos_version
=
computer_dict
.
get
(
'slapos_version'
,
None
)
if
context
.
getSlaposVersion
()
!=
slapos_version
:
edit_kw
[
'slapos_version'
]
=
slapos_version
if
edit_kw
:
context
.
edit
(
**
edit_kw
)
compareAndUpdateAddressList
(
context
,
[{
'addr'
:
computer_dict
[
'address'
],
'netmask'
:
computer_dict
[
'netmask'
]}])
expected_partition_dict
=
{}
...
...
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