Skip to content

Commit 722c6bb

Browse files
authored
Merge pull request #1037 from Kwaizer/pgp_key
Add new parameter to platform
2 parents 0c1e33c + 2429645 commit 722c6bb

File tree

5 files changed

+37
-1
lines changed

5 files changed

+37
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""adding pgp_key for platform
2+
3+
Revision ID: 764a67b23038
4+
Revises: 444f9f1f0ac1
5+
Create Date: 2024-10-25 10:24:17.422595
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = '764a67b23038'
14+
down_revision = '444f9f1f0ac1'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
op.add_column('platforms', sa.Column('pgp_key', sa.Text(), nullable=True))
22+
# ### end Alembic commands ###
23+
24+
25+
def downgrade():
26+
# ### commands auto generated by Alembic - please adjust! ###
27+
op.drop_column('platforms', 'pgp_key')
28+
# ### end Alembic commands ###

alws/crud/platform.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ async def modify_platform(
3131
'type',
3232
'distr_type',
3333
'distr_version',
34+
'pgp_key',
3435
'arch_list',
3536
'data',
3637
'modularity',

alws/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ class Platform(PermissionsMixin, Base):
244244
type: Mapped[str] = mapped_column(sqlalchemy.Text, nullable=False)
245245
distr_type: Mapped[str] = mapped_column(sqlalchemy.Text, nullable=False)
246246
distr_version: Mapped[str] = mapped_column(sqlalchemy.Text, nullable=False)
247+
pgp_key: Mapped[Optional[str]] = mapped_column(sqlalchemy.Text, nullable=True)
247248
module_build_index: Mapped[int] = mapped_column(
248249
sqlalchemy.Integer, default=1
249250
)

alws/schemas/platform_schema.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class PlatformModify(BaseModel):
1414
type: typing.Optional[typing.Literal['rpm', 'deb']] = None
1515
distr_type: typing.Optional[str] = None
1616
distr_version: typing.Optional[str] = None
17+
pgp_key: typing.Optional[str] = None
1718
priority: typing.Optional[int] = None
1819
arch_list: typing.Optional[typing.List[str]] = None
1920
copy_priority_arches: typing.Optional[typing.List[str]] = None
@@ -32,6 +33,7 @@ class PlatformCreate(BaseModel):
3233
type: typing.Literal['rpm', 'deb']
3334
distr_type: str
3435
distr_version: str
36+
pgp_key: typing.Optional[str] = None
3537
priority: typing.Optional[int] = None
3638
test_dist_name: typing.Optional[str] = None
3739
arch_list: typing.List[str]
@@ -49,7 +51,7 @@ class Platform(BaseModel):
4951
name: str
5052
distr_type: str
5153
distr_version: str
52-
54+
pgp_key: typing.Optional[str] = None
5355
arch_list: typing.List[str]
5456
modularity: typing.Optional[typing.Dict] = None
5557

reference_data/platforms.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- name: AlmaLinux-8
33
distr_type: rhel
44
distr_version: '8'
5+
pgp_key: 2AE81E8ACED7258B
56
contact_mail: [email protected]
67
copyright: Copyright {{ year }} AlmaLinux OS
78
test_dist_name: almalinux
@@ -1711,6 +1712,7 @@
17111712
- name: AlmaLinux-9
17121713
distr_type: rhel
17131714
distr_version: '9'
1715+
pgp_key: D36CB86CB86B3716
17141716
contact_mail: [email protected]
17151717
copyright: Copyright {{ year }} AlmaLinux OS
17161718
test_dist_name: almalinux
@@ -3373,6 +3375,7 @@
33733375
- name: AlmaLinux-10
33743376
distr_type: rhel
33753377
distr_version: '10'
3378+
pgp_key: DEE5C11CC2A1E572
33763379
contact_mail: [email protected]
33773380
copyright: Copyright {{ year }} AlmaLinux OS
33783381
test_dist_name: almalinux
@@ -5303,6 +5306,7 @@
53035306
- name: AlmaLinux-Kitten-10
53045307
distr_type: rhel
53055308
distr_version: '10'
5309+
pgp_key: DEE5C11CC2A1E572
53065310
contact_mail: [email protected]
53075311
copyright: Copyright {{ year }} AlmaLinux OS
53085312
test_dist_name: almalinux

0 commit comments

Comments
 (0)