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
941896e5
Commit
941896e5
authored
Aug 09, 2022
by
Cédric Le Ninivin
Committed by
Titouan Soulard
Nov 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos: slapgrid tests work with slaptool for backward compatibility
parent
80914cc3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4312 additions
and
28 deletions
+4312
-28
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+30
-28
slapos/tests/test_slapgrid_slaptool.py
slapos/tests/test_slapgrid_slaptool.py
+4282
-0
No files found.
slapos/grid/slapgrid.py
View file @
941896e5
...
@@ -580,8 +580,8 @@ stderr_logfile_backups=1
...
@@ -580,8 +580,8 @@ stderr_logfile_backups=1
launchSupervisord
(
instance_root
=
self
.
instance_root
,
logger
=
self
.
logger
)
launchSupervisord
(
instance_root
=
self
.
instance_root
,
logger
=
self
.
logger
)
def
getComputerPartitionList
(
self
):
def
getComputerPartitionList
(
self
):
if
self
.
computer_partition_list
is
None
:
if
not
self
.
api_backward_compatibility
:
if
not
self
.
api_backward_compatibility
:
if
self
.
computer_partition_list
is
None
:
self
.
computer_partition_list
=
self
.
slap
.
jio_api_connector
.
allDocs
({
self
.
computer_partition_list
=
self
.
slap
.
jio_api_connector
.
allDocs
({
"portal_type"
:
"Software Instance"
,
"portal_type"
:
"Software Instance"
,
"compute_node_id"
:
self
.
computer_id
,
"compute_node_id"
:
self
.
computer_id
,
...
@@ -598,17 +598,19 @@ stderr_logfile_backups=1
...
@@ -598,17 +598,19 @@ stderr_logfile_backups=1
software_release_uri
=
partition
.
getSoftwareRelease
().
getURI
()
software_release_uri
=
partition
.
getSoftwareRelease
().
getURI
()
except
(
NotFoundError
,
TypeError
,
NameError
):
except
(
NotFoundError
,
TypeError
,
NameError
):
software_release_uri
=
None
software_release_uri
=
None
parameter_dict
=
partition
.
getInstanceParameterDict
()
self
.
computer_partition_list
.
append
({
self
.
computer_partition_list
.
append
({
"reference"
:
partition
.
_instance_guid
,
"reference"
:
partition
.
_instance_guid
,
"portal_type"
:
"Software Instance"
,
"portal_type"
:
"Software Instance"
,
"compute_partition_id"
:
partition
.
getId
(),
"compute_partition_id"
:
partition
.
getId
(),
"state"
:
partition
.
getState
(),
"state"
:
partition
.
getState
(),
"software_type"
:
partition
.
getInstanceParameterDict
().
get
(
"software_type"
:
parameter_dict
.
get
(
'slap_software_type'
,
None
),
'slap_software_type'
,
None
),
"parameters"
:
parameter_dict
,
"parameters"
:
partition
.
getInstanceParameterDict
(),
"processing_timestamp"
:
parameter_dict
.
get
(
"timestamp"
),
"instance_processing_timestamp"
:
partition
.
getInstanceParameterDict
().
get
(
"timestamp"
),
"slap_partition"
:
partition
,
"slap_partition"
:
partition
,
"ip_list"
:
parameter_dict
[
"ip_list"
],
"full_ip_list"
:
parameter_dict
.
get
(
"full_ip_list"
,
[]),
"access_status_message"
:
partition
.
getAccessStatus
(),
"access_status_message"
:
partition
.
getAccessStatus
(),
"software_release_uri"
:
software_release_uri
,
"software_release_uri"
:
software_release_uri
,
"sla_parameters"
:
getattr
(
partition
,
'_filter_dict'
,
{}),
"sla_parameters"
:
getattr
(
partition
,
'_filter_dict'
,
{}),
...
...
slapos/tests/test_slapgrid_slaptool.py
0 → 100644
View file @
941896e5
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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