Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
55bf6bab
Commit
55bf6bab
authored
1 year ago
by
Mohammad Torkashvand
Browse files
Options
Downloads
Patches
Plain Diff
resolve review notes
parent
67d1e814
No related branches found
No related tags found
1 merge request
!176
added partner model
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
gso/cli/imports.py
+2
-2
2 additions, 2 deletions
gso/cli/imports.py
gso/schema/__init__.py
+1
-1
1 addition, 1 deletion
gso/schema/__init__.py
gso/services/partners.py
+4
-0
4 additions, 0 deletions
gso/services/partners.py
test/fixtures.py
+2
-1
2 additions, 1 deletion
test/fixtures.py
with
9 additions
and
4 deletions
gso/cli/imports.py
+
2
−
2
View file @
55bf6bab
...
...
@@ -3,7 +3,7 @@
import
csv
import
ipaddress
import
json
from
datetime
import
datetime
,
UTC
from
datetime
import
UTC
,
datetime
from
pathlib
import
Path
from
typing
import
TypeVar
...
...
@@ -216,7 +216,7 @@ def import_partners(file_path: str = typer.Argument(..., help="Path to the CSV f
"""
Import partners from a CSV file into the database.
"""
typer
.
echo
(
f
"
Importing partners from
{
file_path
}
...
"
)
partners
=
import_partners_from_csv
(
file_path
)
partners
=
import_partners_from_csv
(
Path
(
file_path
)
)
try
:
for
partner
in
partners
:
...
...
This diff is collapsed.
Click to expand it.
gso/schema/__init__.py
+
1
−
1
View file @
55bf6bab
"""
Partner schema modul
e.
"""
"""
It is used to group the schema files together as a packag
e.
"""
This diff is collapsed.
Click to expand it.
gso/services/partners.py
+
4
−
0
View file @
55bf6bab
...
...
@@ -47,6 +47,8 @@ def create_partner(
except
SQLAlchemyError
:
db
.
session
.
rollback
()
raise
finally
:
db
.
session
.
close
()
def
delete_partner_by_name
(
name
:
str
)
->
None
:
...
...
@@ -61,3 +63,5 @@ def delete_partner_by_name(name: str) -> None:
except
SQLAlchemyError
:
db
.
session
.
rollback
()
raise
finally
:
db
.
session
.
close
()
This diff is collapsed.
Click to expand it.
test/fixtures.py
+
2
−
1
View file @
55bf6bab
...
...
@@ -257,7 +257,8 @@ def iptrunk_subscription_factory(iptrunk_side_subscription_factory, faker, geant
iptrunk_side_b
=
iptrunk_side_subscription_factory
()
iptrunk_sides
=
iptrunk_sides
or
[
iptrunk_side_a
,
iptrunk_side_b
]
iptrunk_subscription
=
IptrunkInactive
.
from_product_id
(
product_id
,
customer_id
=
partner
[
"
partner_id
"
],
insync
=
True
)
iptrunk_subscription
=
IptrunkInactive
.
from_product_id
(
product_id
,
customer_id
=
partner
[
"
partner_id
"
],
insync
=
True
)
iptrunk_subscription
.
iptrunk
.
geant_s_sid
=
geant_s_sid
iptrunk_subscription
.
iptrunk
.
iptrunk_description
=
iptrunk_description
iptrunk_subscription
.
iptrunk
.
iptrunk_type
=
iptrunk_type
...
...
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