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
Arnaud Véron
slapos.core
Commits
a2941c55
Commit
a2941c55
authored
Oct 12, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow a software instance to access instance from its tree.
parent
24417bff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+6
-4
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
a2941c55
...
@@ -221,9 +221,6 @@ class SlapTool(BaseTool):
...
@@ -221,9 +221,6 @@ class SlapTool(BaseTool):
computer_id
,
user
,
full
)
computer_id
,
user
,
full
)
@
UnrestrictedMethod
@
UnrestrictedMethod
def
_getPartitionForSoftwareInstance
(
self
,
software_instance
):
return
software_instance
.
getAggregateValue
(
portal_type
=
'Computer Partition'
)
def
_getComputerInformation
(
self
,
computer_id
,
user
,
full
):
def
_getComputerInformation
(
self
,
computer_id
,
user
,
full
):
user_document
=
_assertACI
(
self
.
getPortalObject
().
portal_catalog
.
unrestrictedGetResultValue
(
user_document
=
_assertACI
(
self
.
getPortalObject
().
portal_catalog
.
unrestrictedGetResultValue
(
reference
=
user
,
portal_type
=
[
'Person'
,
'Computer'
,
'Software Instance'
]))
reference
=
user
,
portal_type
=
[
'Person'
,
'Computer'
,
'Software Instance'
]))
...
@@ -255,7 +252,12 @@ class SlapTool(BaseTool):
...
@@ -255,7 +252,12 @@ class SlapTool(BaseTool):
else
:
else
:
slap_computer
.
_software_release_list
=
[]
slap_computer
.
_software_release_list
=
[]
if
user_type
==
'Software Instance'
:
if
user_type
==
'Software Instance'
:
computer_partition_list
=
[
self
.
_getPartitionForSoftwareInstance
(
user_document
)]
computer
=
self
.
getPortalObject
().
portal_catalog
.
unrestrictedSearchResults
(
portal_type
=
'Computer'
,
reference
=
computer_id
,
validation_state
=
"validated"
)[
0
].
getObject
()
computer_partition_list
=
computer
.
contentValues
(
portal_type
=
"Computer Partition"
,
checked_permission
=
"View"
)
else
:
else
:
computer_partition_list
=
self
.
getPortalObject
().
portal_catalog
.
unrestrictedSearchResults
(
computer_partition_list
=
self
.
getPortalObject
().
portal_catalog
.
unrestrictedSearchResults
(
parent_uid
=
parent_uid
,
parent_uid
=
parent_uid
,
...
...
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