Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
netvs-middleware
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
scc-net
netvs
netvs-middleware
Commits
2d28bf5e
Verified
Commit
2d28bf5e
authored
2 months ago
by
!! Julian Keck (old Account; do not use) !!
Browse files
Options
Downloads
Patches
Plain Diff
ADD: raw_path to json-attachment
parent
07cc9c1a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#401875
passed
2 months ago
Stage: lint
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/patch_request.py
+41
-0
41 additions, 0 deletions
api/patch_request.py
model/patch_request.py
+1
-0
1 addition, 0 deletions
model/patch_request.py
with
42 additions
and
0 deletions
api/patch_request.py
+
41
−
0
View file @
2d28bf5e
...
...
@@ -295,6 +295,47 @@ def validate_patch_request_actions(conn, user, actions: list[APIPatchRequestActi
r_name
=
inner_port
[
'
name
'
],
)
full_path_ta
=
[
{
"
name
"
:
"
nd.p_port.list
"
,
"
idx
"
:
"
orig_start_port
"
,
"
old
"
:
{
"
gpk
"
:
"
8af344b1-5529-4ff3-a0e7-060b0343bb3f
"
}
},
{
"
name
"
:
"
nd.p_port.list
"
,
"
idx
"
:
"
inner_start_port
"
,
"
inner_join_ref
"
:
{
"
orig_start_port
"
:
"
api_fkey_nd_p_port_conn_int
"
}
},
{
"
name
"
:
"
nd.p_port.list
"
,
"
idx
"
:
"
start_ports
"
,
"
union_join_ref
"
:
{
"
orig_start_port
"
:
"
self
"
,
"
inner_start_port
"
:
"
self
"
}
},
{
"
name
"
:
"
nd.p_port.list
"
,
"
idx
"
:
"
all_ports
"
,
"
inner_join_ref
"
:
{
"
start_ports
"
:
"
api_func_nd_p_port_is_contained_by_conn_id_gfk_list
"
}
}
]
full_path_result
=
execute_wapi_function
(
conn
,
full_path_ta
,
superuser
=
True
)
path_port_list
=
[]
if
len
(
full_path_result
[
'
all_ports
'
])
>
0
:
path_order
=
full_path_result
[
'
all_ports
'
][
0
][
'
connection_id_gfk_list
'
]
all_ports
=
map_array_of_dicts
(
full_path_result
[
'
all_ports
'
],
lambda
p
:
p
.
get
(
'
gpk
'
))
for
p_gpk
in
path_order
:
path_port_list
.
append
(
all_ports
.
get
(
p_gpk
,
{
'
gpk
'
:
None
}))
internal_action
.
raw_path
=
path_port_list
internal_action
.
p_port
=
Port
(
**
r
[
'
port_list
'
][
0
])
internal_action
.
module
=
Module
(
**
r
[
'
module_list
'
][
0
])
internal_action
.
room
=
Room
(
**
r
[
'
room_list
'
][
0
])
...
...
This diff is collapsed.
Click to expand it.
model/patch_request.py
+
1
−
0
View file @
2d28bf5e
...
...
@@ -46,6 +46,7 @@ class PatchRequestAction(BaseModel):
new_insert_type
:
Optional
[
str
]
=
Field
(
default
=
None
)
new_insert_assignment
:
list
[
APIInsertBCDAssignment
]
=
Field
(
default
=
[])
vlan_ids
:
list
[
str
]
=
Field
(
default
=
[])
raw_path
:
Optional
[
list
[
dict
]]
=
Field
(
default
=
None
)
class
PatchRequestFormRequest
(
BaseModel
):
...
...
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