Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LITE-28073: Refactoring process code. Adding validation for deploymen… #39

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion connect_ext_ppr/models/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Deployment(Model):
created_at = db.Column(db.DateTime(), default=datetime.utcnow)
updated_at = db.Column(db.DateTime(), onupdate=datetime.utcnow, default=datetime.utcnow)

product = relationship('Product', backref="deployments")
product = relationship('Product', foreign_keys="Deployment.product_id")


class DeploymentRequest(Model):
Expand Down
6 changes: 6 additions & 0 deletions connect_ext_ppr/models/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ class TasksStatusChoices(str, enum.Enum):
ABORTED = 'aborted'


class TaskTypesChoices(str, enum.Enum):
PPR_VALIDATION = 'ppr_validation'
APPLY_AND_DELEGATE = 'apply_ppr_and_delegate_to_marketplace'
DELEGATE_TO_L2 = 'delegate_to_l2'


class MimeTypeChoices(str, enum.Enum):
application_json = 'application/json'
application_manifest_json = 'application/manifest+json'
Expand Down
3 changes: 2 additions & 1 deletion connect_ext_ppr/models/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sqlalchemy as db

from connect_ext_ppr.db import Model
from connect_ext_ppr.models.enums import TasksStatusChoices
from connect_ext_ppr.models.enums import TasksStatusChoices, TaskTypesChoices
from connect_ext_ppr.models.deployment import DeploymentRequest


Expand All @@ -20,6 +20,7 @@ class Task(Model):
deployment_request = db.Column(db.ForeignKey(DeploymentRequest.id))
title = db.Column(db.String(100))
error_message = db.Column(db.String((4000)))
type = db.Column(db.Enum(TaskTypesChoices, validate_strings=True))

created_at = db.Column(db.DateTime(), default=datetime.utcnow)
created_by = db.Column(db.String(20))
Expand Down
292 changes: 0 additions & 292 deletions connect_ext_ppr/static/deployment-details.272e874bc9496204df16.js

This file was deleted.

Loading