Skip to content
Snippets Groups Projects
Commit 1d77588e authored by Mohammad Torkashvand's avatar Mohammad Torkashvand
Browse files

fix setup.py file requirements

parent a25ed7f8
No related branches found
No related tags found
1 merge request!75fix setup.py file requirements
Pipeline #84137 passed
......@@ -68,8 +68,12 @@ def run_migrations_online() -> None:
directives[:] = []
logger.info("No changes in schema detected.")
config_section = config.get_section(config.config_ini_section)
if config_section is None:
raise ValueError("Config section not found!")
engine = engine_from_config(
config.get_section(config.config_ini_section), prefix="sqlalchemy.", poolclass=pool.NullPool
config_section, prefix="sqlalchemy.", poolclass=pool.NullPool
)
connection = engine.connect()
......
import ipaddress
from uuid import UUID
from orchestrator import workflow
from orchestrator.forms import FormPage
......@@ -65,7 +64,7 @@ def initial_input_form_generator() -> FormGenerator:
@step("Create a new subscription")
def create_subscription(customer: str) -> State:
customer_id: UUID = get_customer_by_name(customer)["id"]
customer_id = get_customer_by_name(customer)["id"]
product_id = subscriptions.get_product_id_by_name(ProductType.IP_TRUNK)
subscription = IptrunkInactive.from_product_id(product_id, customer_id)
......
......@@ -36,7 +36,7 @@ def _get_site_by_name(site_name: str) -> Site:
@step("Create subscription")
def create_subscription(customer: str) -> State:
customer_id: UUID = get_customer_by_name(customer)["id"]
customer_id = get_customer_by_name(customer)["id"]
product_id: UUID = subscriptions.get_product_id_by_name(ProductType.ROUTER)
subscription = RouterInactive.from_product_id(product_id, customer_id)
......
......@@ -16,7 +16,7 @@ from gso.workflows.site.create_site import initialize_subscription
@step("Create subscription")
def create_subscription(customer: str) -> State:
customer_id: UUID = get_customer_by_name(customer)["id"]
customer_id = get_customer_by_name(customer)["id"]
product_id: UUID = subscriptions.get_product_id_by_name(ProductType.SITE)
subscription = SiteInactive.from_product_id(product_id, customer_id)
......
orchestrator-core==1.3.0
requests
requests==2.31.0
infoblox-client~=0.6.0
pycountry
pycountry==22.3.5
pytest
faker
responses
black
isort
flake8
mypy
ruff
sphinx
sphinx-rtd-theme
typer
\ No newline at end of file
pytest==7.4.2
faker==19.6.2
responses==0.23.3
black==23.9.1
isort==5.12.0
flake8==6.1.0
mypy==1.5.1
ruff==0.0.290
sphinx==7.2.6
sphinx-rtd-theme==1.3.0
......@@ -9,10 +9,9 @@ setup(
url="https://gitlab.software.geant.org/goat/gap/geant-service-orchestrator",
packages=find_packages(),
install_requires=[
"orchestrator-core==1.2.2",
"pydantic~=1.10.9",
"requests~=2.31.0",
"orchestrator-core==1.3.0",
"requests==2.31.0",
"infoblox-client~=0.6.0",
"pycountry",
"pycountry==22.3.5",
],
)
......@@ -171,7 +171,9 @@ def database(db_uri):
with engine.connect() as conn:
conn.execute(text("COMMIT;"))
conn.execute(
text("SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname=:dbname"), dbname=db_to_create
text("SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname=:db_name").bindparams(
db_name=db_to_create
)
)
conn.execute(text(f'DROP DATABASE IF EXISTS "{db_to_create}";'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment