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
Titouan Soulard
slapos.core
Commits
fb37a15e
Commit
fb37a15e
authored
Oct 19, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: Just a script to handle project_guid for now
parent
31ca6307
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
4 deletions
+82
-4
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.py
...ateItem/portal_skins/slapos_cloud/Person_findPartition.py
+4
-4
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Project_getComputerReferenceList.py
...al_skins/slapos_cloud/Project_getComputerReferenceList.py
+8
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Project_getComputerReferenceList.xml
...l_skins/slapos_cloud/Project_getComputerReferenceList.xml
+70
-0
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.py
View file @
fb37a15e
...
@@ -36,12 +36,10 @@ if 'project_guid' in filter_kw:
...
@@ -36,12 +36,10 @@ if 'project_guid' in filter_kw:
# Get Computer list from Tracking API
# Get Computer list from Tracking API
from
DateTime
import
DateTime
from
DateTime
import
DateTime
project
=
context
.
portal_catalog
(
portal_type
=
"Project"
,
referne
ce
=
project_reference
)
project
=
context
.
portal_catalog
.
getResultValue
(
portal_type
=
"Project"
,
referen
ce
=
project_reference
)
if
project
is
not
None
:
if
project
is
not
None
:
query_kw
[
"parent_reference"
]
=
SimpleQuery
(
parent_reference
=
[
i
.
getReference
()
query_kw
[
"parent_reference"
]
=
SimpleQuery
(
parent_reference
=
project
.
Project_getComputerReferenceList
())
for
i
in
context
.
portal_simulation
.
getCurrentTrackingList
(
{
"project_uid"
:
project
.
getUid
(),
"at_date"
:
DateTime
()})])
if
computer_network_query
:
if
computer_network_query
:
if
query_kw
.
get
(
"default_subordination_reference"
):
if
query_kw
.
get
(
"default_subordination_reference"
):
...
@@ -91,6 +89,7 @@ if subscription_reference is not None:
...
@@ -91,6 +89,7 @@ if subscription_reference is not None:
extra_query_kw
=
context
.
ComputerPartition_getCustomAllocationParameterDict
(
extra_query_kw
=
context
.
ComputerPartition_getCustomAllocationParameterDict
(
software_release_url
,
software_type
,
software_instance_portal_type
,
software_release_url
,
software_type
,
software_instance_portal_type
,
filter_kw_copy
,
computer_network_query
,
test_mode
)
filter_kw_copy
,
computer_network_query
,
test_mode
)
if
extra_query_kw
:
if
extra_query_kw
:
query_kw
.
update
(
extra_query_kw
)
query_kw
.
update
(
extra_query_kw
)
...
@@ -112,6 +111,7 @@ if offset >= SQL_WINDOW_SIZE:
...
@@ -112,6 +111,7 @@ if offset >= SQL_WINDOW_SIZE:
else
:
else
:
limit
=
(
0
,
SQL_WINDOW_SIZE
)
limit
=
(
0
,
SQL_WINDOW_SIZE
)
for
computer_partition_candidate
in
context
.
portal_catalog
(
for
computer_partition_candidate
in
context
.
portal_catalog
(
limit
=
limit
,
**
query_kw
):
limit
=
limit
,
**
query_kw
):
computer_partition_candidate
=
computer_partition_candidate
.
getObject
()
computer_partition_candidate
=
computer_partition_candidate
.
getObject
()
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Project_getComputerReferenceList.py
0 → 100644
View file @
fb37a15e
from
DateTime
import
DateTime
from
zExceptions
import
Unauthorized
if
REQUEST
is
not
None
:
raise
Unauthorized
return
[
i
.
getReference
()
for
i
in
context
.
portal_simulation
.
getCurrentTrackingList
(
**
{
"project_uid"
:
context
.
getUid
(),
"at_date"
:
DateTime
()})]
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Project_getComputerReferenceList.xml
0 → 100644
View file @
fb37a15e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Project_getComputerReferenceList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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