Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
open-exposure-gateway
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OOP
code
open-exposure-gateway
Commits
200f5228
Commit
200f5228
authored
1 month ago
by
George Papathanail
Browse files
Options
Downloads
Patches
Plain Diff
change edge_cloud_zones
parent
14a961a9
No related branches found
No related tags found
Loading
Pipeline
#15089
passed
1 month ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.coverage
+0
-0
0 additions, 0 deletions
.coverage
coverage.xml
+9
-9
9 additions, 9 deletions
coverage.xml
edge_cloud_management_api/controllers/edge_cloud_controller.py
+8
-7
8 additions, 7 deletions
...cloud_management_api/controllers/edge_cloud_controller.py
with
17 additions
and
16 deletions
.coverage
+
0
−
0
View file @
200f5228
No preview for this file type
This diff is collapsed.
Click to expand it.
coverage.xml
+
9
−
9
View file @
200f5228
<?xml version="1.0" ?>
<coverage
version=
"7.9.1"
timestamp=
"1751027
168921
"
lines-valid=
"609"
lines-covered=
"130"
line-rate=
"0.2135"
branches-covered=
"0"
branches-valid=
"0"
branch-rate=
"0"
complexity=
"0"
>
<coverage
version=
"7.9.1"
timestamp=
"1751027
832353
"
lines-valid=
"609"
lines-covered=
"130"
line-rate=
"0.2135"
branches-covered=
"0"
branches-valid=
"0"
branch-rate=
"0"
complexity=
"0"
>
<!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.9.1 -->
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
<sources>
...
...
@@ -210,17 +210,17 @@
<line
number=
"69"
hits=
"1"
/>
<line
number=
"83"
hits=
"1"
/>
<line
number=
"84"
hits=
"1"
/>
<line
number=
"90"
hits=
"1"
/>
<line
number=
"92"
hits=
"0"
/>
<line
number=
"94"
hits=
"1"
/>
<line
number=
"96"
hits=
"0"
/>
<line
number=
"93"
hits=
"1"
/>
<line
number=
"94"
hits=
"0"
/>
<line
number=
"98"
hits=
"1"
/>
<line
number=
"99"
hits=
"
1
"
/>
<line
number=
"99"
hits=
"
0
"
/>
<line
number=
"101"
hits=
"1"
/>
<line
number=
"102"
hits=
"1"
/>
<line
number=
"107"
hits=
"0"
/>
<line
number=
"108"
hits=
"0"
/>
<line
number=
"113"
hits=
"0"
/>
<line
number=
"104"
hits=
"1"
/>
<line
number=
"105"
hits=
"1"
/>
<line
number=
"110"
hits=
"0"
/>
<line
number=
"111"
hits=
"0"
/>
<line
number=
"116"
hits=
"0"
/>
</lines>
</class>
<class
name=
"federation_manager_controller.py"
filename=
"controllers/federation_manager_controller.py"
complexity=
"0"
line-rate=
"0"
branch-rate=
"0"
>
...
...
This diff is collapsed.
Click to expand it.
edge_cloud_management_api/controllers/edge_cloud_controller.py
+
8
−
7
View file @
200f5228
...
...
@@ -87,13 +87,14 @@ def get_edge_cloud_zones(x_correlator: str | None = None, region=None, status=No
status
=
status
,
)
def
query_region_matches
(
zone
:
str
)
->
bool
:
"""
If region is None, return True (don
'
t apply region filtering), otherwise check if the zone region matches the query region
"""
return
query_params
.
region
is
None
or
zone
[
"
edgeCloudRegion
"
]
==
query_params
.
region
def
query_status_matches
(
zone
:
str
)
->
bool
:
"""
If status is None, return True (don
'
t apply status filtering), otherwise check if the zone status matches the query status
"""
return
(
query_params
.
status
is
None
)
or
(
zone
[
"
edgeCloudZoneStatus
"
]
==
query_params
.
status
)
#def query_region_matches(zone: str) -> bool:
# return query_params.region is None or zone["edgeCloudRegion"] == query_params.region
def
query_region_matches
(
zone
:
EdgeCloudZone
)
->
bool
:
return
query_params
.
region
is
None
or
zone
.
edgeCloudRegion
==
query_params
.
region
#def query_status_matches(zone: str) -> bool:
# return (query_params.status is None) or (zone["edgeCloudZoneStatus"] == query_params.status)
def
query_status_matches
(
zone
:
EdgeCloudZone
)
->
bool
:
return
query_params
.
status
is
None
or
zone
.
edgeCloudZoneStatus
==
query_params
.
status
response
=
[
EdgeCloudZone
(
**
zone
).
model_dump
()
for
zone
in
get_all_cloud_zones
()]
return
jsonify
(
response
),
200
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment