Skip to content

Commit

Permalink
♻️ RUT: add pricing plan LICENSE type (#6922)
Browse files Browse the repository at this point in the history
  • Loading branch information
matusdrobuliak66 authored Dec 10, 2024
1 parent ed17770 commit e9bc718
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class CreditClassification(StrAutoEnum):

class PricingPlanClassification(StrAutoEnum):
TIER = auto()
LICENSE = auto()


class PricingInfo(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""add LICENSE type to pricing plan
Revision ID: 4d007819e61a
Revises: 38c9ac332c58
Create Date: 2024-12-09 14:25:45.024814+00:00
"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "4d007819e61a"
down_revision = "38c9ac332c58"
branch_labels = None
depends_on = None


def upgrade():
op.execute(sa.DDL("ALTER TYPE pricingplanclassification ADD VALUE 'LICENSE'"))


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class PricingPlanClassification(str, enum.Enum):
"""

TIER = "TIER"
LICENSE = "LICENSE"


resource_tracker_pricing_plans = sa.Table(
Expand Down
3 changes: 2 additions & 1 deletion services/api-server/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6469,7 +6469,8 @@
"PricingPlanClassification": {
"type": "string",
"enum": [
"TIER"
"TIER",
"LICENSE"
],
"title": "PricingPlanClassification"
},
Expand Down
3 changes: 2 additions & 1 deletion services/resource-usage-tracker/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@
"PricingPlanClassification": {
"type": "string",
"enum": [
"TIER"
"TIER",
"LICENSE"
],
"title": "PricingPlanClassification"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11432,6 +11432,7 @@ components:
type: string
enum:
- TIER
- LICENSE
title: PricingPlanClassification
PricingPlanToServiceAdminGet:
properties:
Expand Down

0 comments on commit e9bc718

Please sign in to comment.