py-pve-cloud 0.5.16__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,83 @@
1
+ from logging.config import fileConfig
2
+
3
+ from sqlalchemy import engine_from_config
4
+ from sqlalchemy import pool
5
+
6
+ from alembic import context
7
+ import os
8
+
9
+ # this is the Alembic Config object, which provides
10
+ # access to the values within the .ini file in use.
11
+ config = context.config
12
+
13
+ # Interpret the config file for Python logging.
14
+ # This line sets up loggers basically.
15
+ if config.config_file_name is not None:
16
+ fileConfig(config.config_file_name)
17
+
18
+ # Use env variable if set
19
+ db_url = os.getenv("PG_CONN_STR")
20
+ if db_url:
21
+ config.set_main_option("sqlalchemy.url", db_url)
22
+
23
+ # add your model's MetaData object here
24
+ # for 'autogenerate' support
25
+ import alchemy
26
+ target_metadata = alchemy.Base.metadata
27
+
28
+ # other values from the config, defined by the needs of env.py,
29
+ # can be acquired:
30
+ # my_important_option = config.get_main_option("my_important_option")
31
+ # ... etc.
32
+
33
+
34
+ def run_migrations_offline() -> None:
35
+ """Run migrations in 'offline' mode.
36
+
37
+ This configures the context with just a URL
38
+ and not an Engine, though an Engine is acceptable
39
+ here as well. By skipping the Engine creation
40
+ we don't even need a DBAPI to be available.
41
+
42
+ Calls to context.execute() here emit the given string to the
43
+ script output.
44
+
45
+ """
46
+ url = config.get_main_option("sqlalchemy.url")
47
+ context.configure(
48
+ url=url,
49
+ target_metadata=target_metadata,
50
+ literal_binds=True,
51
+ dialect_opts={"paramstyle": "named"},
52
+ )
53
+
54
+ with context.begin_transaction():
55
+ context.run_migrations()
56
+
57
+
58
+ def run_migrations_online() -> None:
59
+ """Run migrations in 'online' mode.
60
+
61
+ In this scenario we need to create an Engine
62
+ and associate a connection with the context.
63
+
64
+ """
65
+ connectable = engine_from_config(
66
+ config.get_section(config.config_ini_section, {}),
67
+ prefix="sqlalchemy.",
68
+ poolclass=pool.NullPool,
69
+ )
70
+
71
+ with connectable.connect() as connection:
72
+ context.configure(
73
+ connection=connection, target_metadata=target_metadata
74
+ )
75
+
76
+ with context.begin_transaction():
77
+ context.run_migrations()
78
+
79
+
80
+ if context.is_offline_mode():
81
+ run_migrations_offline()
82
+ else:
83
+ run_migrations_online()
@@ -0,0 +1,44 @@
1
+ """external cp extra sans
2
+
3
+ Revision ID: 04398db10434
4
+ Revises: 24a548bfce3e
5
+ Create Date: 2025-11-20 09:45:26.563717
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = '04398db10434'
16
+ down_revision: Union[str, Sequence[str], None] = '24a548bfce3e'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # ### commands auto generated by Alembic - please adjust! ###
24
+ op.add_column('k8s_ext_control_planes', sa.Column('extra_sans', sa.String(length=2530), nullable=True))
25
+
26
+ op.execute("""
27
+ UPDATE k8s_ext_control_planes
28
+ SET extra_sans = name || '.' || zone
29
+ """)
30
+
31
+ op.alter_column('k8s_ext_control_planes', 'extra_sans', nullable=False)
32
+
33
+ op.drop_column('k8s_ext_control_planes', 'name')
34
+ op.drop_column('k8s_ext_control_planes', 'zone')
35
+ # ### end Alembic commands ###
36
+
37
+
38
+ def downgrade() -> None:
39
+ """Downgrade schema."""
40
+ # ### commands auto generated by Alembic - please adjust! ###
41
+ op.add_column('k8s_ext_control_planes', sa.Column('zone', sa.VARCHAR(length=253), autoincrement=False, nullable=False))
42
+ op.add_column('k8s_ext_control_planes', sa.Column('name', sa.VARCHAR(length=253), autoincrement=False, nullable=False))
43
+ op.drop_column('k8s_ext_control_planes', 'extra_sans')
44
+ # ### end Alembic commands ###
@@ -0,0 +1,133 @@
1
+ """len rules + enforcements
2
+
3
+ Revision ID: 24a548bfce3e
4
+ Revises: 944a8fd5d5bc
5
+ Create Date: 2025-09-10 17:12:21.594162
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = '24a548bfce3e'
16
+ down_revision: Union[str, Sequence[str], None] = '944a8fd5d5bc'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # ### commands auto generated by Alembic - please adjust! ###
24
+ op.alter_column('k8s_ext_control_planes', 'zone',
25
+ existing_type=sa.VARCHAR(length=253),
26
+ nullable=False)
27
+ op.alter_column('k8s_ext_control_planes', 'name',
28
+ existing_type=sa.VARCHAR(length=253),
29
+ nullable=False)
30
+ op.alter_column('k8s_ext_control_planes', 'proxy_stack_fqdn',
31
+ existing_type=sa.VARCHAR(length=253),
32
+ nullable=False)
33
+
34
+ # custom migration logic
35
+ op.add_column('k8s_ingress_rules', sa.Column('rule_len', sa.Integer(), nullable=True))
36
+
37
+ conn = op.get_bind()
38
+ conn.execute(sa.text("""
39
+ UPDATE k8s_ingress_rules
40
+ SET rule_len = length(zone) + length(name)
41
+ """))
42
+
43
+ op.alter_column('k8s_ingress_rules', 'rule_len', nullable=False)
44
+
45
+ op.alter_column('k8s_ingress_rules', 'proxy_stack_fqdn',
46
+ existing_type=sa.VARCHAR(length=253),
47
+ nullable=False)
48
+ op.alter_column('k8s_masters', 'hostname',
49
+ existing_type=sa.VARCHAR(length=253),
50
+ nullable=False)
51
+ op.alter_column('k8s_masters', 'stack_fqdn',
52
+ existing_type=sa.VARCHAR(length=253),
53
+ nullable=False)
54
+ op.alter_column('k8s_masters', 'proxy_stack_fqdn',
55
+ existing_type=sa.VARCHAR(length=253),
56
+ nullable=False)
57
+ op.alter_column('k8s_tcp_proxies', 'proxy_name',
58
+ existing_type=sa.VARCHAR(length=253),
59
+ nullable=False)
60
+ op.alter_column('k8s_tcp_proxies', 'node_port',
61
+ existing_type=sa.SMALLINT(),
62
+ nullable=False)
63
+ op.alter_column('k8s_tcp_proxies', 'stack_fqdn',
64
+ existing_type=sa.VARCHAR(length=253),
65
+ nullable=False)
66
+ op.alter_column('k8s_workers', 'hostname',
67
+ existing_type=sa.VARCHAR(length=253),
68
+ nullable=False)
69
+ op.alter_column('k8s_workers', 'stack_fqdn',
70
+ existing_type=sa.VARCHAR(length=253),
71
+ nullable=False)
72
+ op.alter_column('k8s_workers', 'proxy_stack_fqdn',
73
+ existing_type=sa.VARCHAR(length=253),
74
+ nullable=False)
75
+ op.alter_column('kea_reservations', 'hostname',
76
+ existing_type=sa.VARCHAR(length=253),
77
+ nullable=False)
78
+ op.alter_column('kea_reservations', 'stack_fqdn',
79
+ existing_type=sa.VARCHAR(length=253),
80
+ nullable=False)
81
+ # ### end Alembic commands ###
82
+
83
+
84
+ def downgrade() -> None:
85
+ """Downgrade schema."""
86
+ # ### commands auto generated by Alembic - please adjust! ###
87
+ op.alter_column('kea_reservations', 'stack_fqdn',
88
+ existing_type=sa.VARCHAR(length=253),
89
+ nullable=True)
90
+ op.alter_column('kea_reservations', 'hostname',
91
+ existing_type=sa.VARCHAR(length=253),
92
+ nullable=True)
93
+ op.alter_column('k8s_workers', 'proxy_stack_fqdn',
94
+ existing_type=sa.VARCHAR(length=253),
95
+ nullable=True)
96
+ op.alter_column('k8s_workers', 'stack_fqdn',
97
+ existing_type=sa.VARCHAR(length=253),
98
+ nullable=True)
99
+ op.alter_column('k8s_workers', 'hostname',
100
+ existing_type=sa.VARCHAR(length=253),
101
+ nullable=True)
102
+ op.alter_column('k8s_tcp_proxies', 'stack_fqdn',
103
+ existing_type=sa.VARCHAR(length=253),
104
+ nullable=True)
105
+ op.alter_column('k8s_tcp_proxies', 'node_port',
106
+ existing_type=sa.SMALLINT(),
107
+ nullable=True)
108
+ op.alter_column('k8s_tcp_proxies', 'proxy_name',
109
+ existing_type=sa.VARCHAR(length=253),
110
+ nullable=True)
111
+ op.alter_column('k8s_masters', 'proxy_stack_fqdn',
112
+ existing_type=sa.VARCHAR(length=253),
113
+ nullable=True)
114
+ op.alter_column('k8s_masters', 'stack_fqdn',
115
+ existing_type=sa.VARCHAR(length=253),
116
+ nullable=True)
117
+ op.alter_column('k8s_masters', 'hostname',
118
+ existing_type=sa.VARCHAR(length=253),
119
+ nullable=True)
120
+ op.alter_column('k8s_ingress_rules', 'proxy_stack_fqdn',
121
+ existing_type=sa.VARCHAR(length=253),
122
+ nullable=True)
123
+ op.drop_column('k8s_ingress_rules', 'rule_len')
124
+ op.alter_column('k8s_ext_control_planes', 'proxy_stack_fqdn',
125
+ existing_type=sa.VARCHAR(length=253),
126
+ nullable=True)
127
+ op.alter_column('k8s_ext_control_planes', 'name',
128
+ existing_type=sa.VARCHAR(length=253),
129
+ nullable=True)
130
+ op.alter_column('k8s_ext_control_planes', 'zone',
131
+ existing_type=sa.VARCHAR(length=253),
132
+ nullable=True)
133
+ # ### end Alembic commands ###
@@ -0,0 +1,32 @@
1
+ """proxy fqdn
2
+
3
+ Revision ID: 27724e407e2b
4
+ Revises: 3c95509a5de9
5
+ Create Date: 2025-09-10 16:08:17.079028
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = '27724e407e2b'
16
+ down_revision: Union[str, Sequence[str], None] = '3c95509a5de9'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # ### commands auto generated by Alembic - please adjust! ###
24
+ op.add_column('k8s_ext_control_plane', sa.Column('proxy_stack_fqdn', sa.String(length=253), nullable=True))
25
+ # ### end Alembic commands ###
26
+
27
+
28
+ def downgrade() -> None:
29
+ """Downgrade schema."""
30
+ # ### commands auto generated by Alembic - please adjust! ###
31
+ op.drop_column('k8s_ext_control_plane', 'proxy_stack_fqdn')
32
+ # ### end Alembic commands ###
@@ -0,0 +1,44 @@
1
+ """fix
2
+
3
+ Revision ID: 3c95509a5de9
4
+ Revises: d9b711555be8
5
+ Create Date: 2025-09-10 16:03:18.769927
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = '3c95509a5de9'
16
+ down_revision: Union[str, Sequence[str], None] = 'd9b711555be8'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # ### commands auto generated by Alembic - please adjust! ###
24
+ op.create_table('k8s_ext_control_plane',
25
+ sa.Column('stack_fqdn', sa.String(length=253), nullable=False),
26
+ sa.Column('zone', sa.String(length=253), nullable=True),
27
+ sa.Column('name', sa.String(length=253), nullable=True),
28
+ sa.PrimaryKeyConstraint('stack_fqdn')
29
+ )
30
+ op.drop_table('k8s_ext_control_plan')
31
+ # ### end Alembic commands ###
32
+
33
+
34
+ def downgrade() -> None:
35
+ """Downgrade schema."""
36
+ # ### commands auto generated by Alembic - please adjust! ###
37
+ op.create_table('k8s_ext_control_plan',
38
+ sa.Column('stack_fqdn', sa.VARCHAR(length=253), autoincrement=False, nullable=False),
39
+ sa.Column('zone', sa.VARCHAR(length=253), autoincrement=False, nullable=True),
40
+ sa.Column('name', sa.VARCHAR(length=253), autoincrement=False, nullable=True),
41
+ sa.PrimaryKeyConstraint('stack_fqdn', name=op.f('k8s_ext_control_plan_pkey'))
42
+ )
43
+ op.drop_table('k8s_ext_control_plane')
44
+ # ### end Alembic commands ###
@@ -0,0 +1,83 @@
1
+ """migrate old
2
+
3
+ Revision ID: 7868bcd05006
4
+ Revises: 7dea8c4ee39f
5
+ Create Date: 2025-09-09 18:09:39.760976
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+ from sqlalchemy.dialects import postgresql
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = '7868bcd05006'
16
+ down_revision: Union[str, Sequence[str], None] = '7dea8c4ee39f'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # ### commands auto generated by Alembic - please adjust! ###
24
+ op.create_table('acme_x509',
25
+ sa.Column('stack_fqdn', sa.String(length=253), nullable=False),
26
+ sa.Column('config', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
27
+ sa.Column('ec_csr', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
28
+ sa.Column('ec_crt', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
29
+ sa.Column('k8s', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
30
+ sa.PrimaryKeyConstraint('stack_fqdn')
31
+ )
32
+ op.create_table('k8s_ingress_rules',
33
+ sa.Column('zone', sa.String(length=253), nullable=False),
34
+ sa.Column('name', sa.String(length=253), nullable=False),
35
+ sa.Column('stack_fqdn', sa.String(length=253), nullable=False),
36
+ sa.Column('proxy_stack_fqdn', sa.String(length=253), nullable=True),
37
+ sa.Column('external', sa.Boolean(), nullable=True),
38
+ sa.PrimaryKeyConstraint('zone', 'name', 'stack_fqdn')
39
+ )
40
+ op.create_table('k8s_masters',
41
+ sa.Column('ip', postgresql.INET(), nullable=False),
42
+ sa.Column('hostname', sa.String(length=253), nullable=True),
43
+ sa.Column('stack_fqdn', sa.String(length=253), nullable=True),
44
+ sa.Column('proxy_stack_fqdn', sa.String(length=253), nullable=True),
45
+ sa.PrimaryKeyConstraint('ip')
46
+ )
47
+ op.create_table('k8s_tcp_proxies',
48
+ sa.Column('proxy_name', sa.String(length=253), nullable=True),
49
+ sa.Column('haproxy_port', sa.SmallInteger(), nullable=False),
50
+ sa.Column('node_port', sa.SmallInteger(), nullable=True),
51
+ sa.Column('stack_fqdn', sa.String(length=253), nullable=True),
52
+ sa.Column('proxy_snippet', sa.Text(), nullable=True),
53
+ sa.Column('proxy_stack_fqdn', sa.String(length=253), nullable=False),
54
+ sa.Column('external', sa.Boolean(), server_default='false', nullable=True),
55
+ sa.PrimaryKeyConstraint('haproxy_port', 'proxy_stack_fqdn')
56
+ )
57
+ op.create_table('k8s_workers',
58
+ sa.Column('ip', postgresql.INET(), nullable=False),
59
+ sa.Column('hostname', sa.String(length=253), nullable=True),
60
+ sa.Column('stack_fqdn', sa.String(length=253), nullable=True),
61
+ sa.Column('proxy_stack_fqdn', sa.String(length=253), nullable=True),
62
+ sa.PrimaryKeyConstraint('ip')
63
+ )
64
+ op.create_table('kea_reservations',
65
+ sa.Column('mac', postgresql.MACADDR(), nullable=False),
66
+ sa.Column('ip', postgresql.INET(), nullable=False),
67
+ sa.Column('hostname', sa.String(length=253), nullable=True),
68
+ sa.Column('stack_fqdn', sa.String(length=253), nullable=True),
69
+ sa.PrimaryKeyConstraint('ip')
70
+ )
71
+ # ### end Alembic commands ###
72
+
73
+
74
+ def downgrade() -> None:
75
+ """Downgrade schema."""
76
+ # ### commands auto generated by Alembic - please adjust! ###
77
+ op.drop_table('kea_reservations')
78
+ op.drop_table('k8s_workers')
79
+ op.drop_table('k8s_tcp_proxies')
80
+ op.drop_table('k8s_masters')
81
+ op.drop_table('k8s_ingress_rules')
82
+ op.drop_table('acme_x509')
83
+ # ### end Alembic commands ###
@@ -0,0 +1,36 @@
1
+ """init
2
+
3
+ Revision ID: 7dea8c4ee39f
4
+ Revises:
5
+ Create Date: 2025-09-09 14:30:52.222907
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = '7dea8c4ee39f'
16
+ down_revision: Union[str, Sequence[str], None] = None
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # ### commands auto generated by Alembic - please adjust! ###
24
+ op.create_table('bind_domains',
25
+ sa.Column('domain', sa.String(), nullable=False),
26
+ sa.Column('stack_fqdn', sa.String(), nullable=False),
27
+ sa.PrimaryKeyConstraint('domain', 'stack_fqdn')
28
+ )
29
+ # ### end Alembic commands ###
30
+
31
+
32
+ def downgrade() -> None:
33
+ """Downgrade schema."""
34
+ # ### commands auto generated by Alembic - please adjust! ###
35
+ op.drop_table('bind_domains')
36
+ # ### end Alembic commands ###
@@ -0,0 +1,46 @@
1
+ """ext ctrl plns
2
+
3
+ Revision ID: 944a8fd5d5bc
4
+ Revises: 27724e407e2b
5
+ Create Date: 2025-09-10 16:18:19.742118
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = '944a8fd5d5bc'
16
+ down_revision: Union[str, Sequence[str], None] = '27724e407e2b'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # ### commands auto generated by Alembic - please adjust! ###
24
+ op.create_table('k8s_ext_control_planes',
25
+ sa.Column('stack_fqdn', sa.String(length=253), nullable=False),
26
+ sa.Column('zone', sa.String(length=253), nullable=True),
27
+ sa.Column('name', sa.String(length=253), nullable=True),
28
+ sa.Column('proxy_stack_fqdn', sa.String(length=253), nullable=True),
29
+ sa.PrimaryKeyConstraint('stack_fqdn')
30
+ )
31
+ op.drop_table('k8s_ext_control_plane')
32
+ # ### end Alembic commands ###
33
+
34
+
35
+ def downgrade() -> None:
36
+ """Downgrade schema."""
37
+ # ### commands auto generated by Alembic - please adjust! ###
38
+ op.create_table('k8s_ext_control_plane',
39
+ sa.Column('stack_fqdn', sa.VARCHAR(length=253), autoincrement=False, nullable=False),
40
+ sa.Column('zone', sa.VARCHAR(length=253), autoincrement=False, nullable=True),
41
+ sa.Column('name', sa.VARCHAR(length=253), autoincrement=False, nullable=True),
42
+ sa.Column('proxy_stack_fqdn', sa.VARCHAR(length=253), autoincrement=False, nullable=True),
43
+ sa.PrimaryKeyConstraint('stack_fqdn', name=op.f('k8s_ext_control_plane_pkey'))
44
+ )
45
+ op.drop_table('k8s_ext_control_planes')
46
+ # ### end Alembic commands ###
@@ -0,0 +1,37 @@
1
+ """ext control plane
2
+
3
+ Revision ID: d9b711555be8
4
+ Revises: 7868bcd05006
5
+ Create Date: 2025-09-10 09:05:05.736095
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = 'd9b711555be8'
16
+ down_revision: Union[str, Sequence[str], None] = '7868bcd05006'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # ### commands auto generated by Alembic - please adjust! ###
24
+ op.create_table('k8s_ext_control_plan',
25
+ sa.Column('stack_fqdn', sa.String(length=253), nullable=False),
26
+ sa.Column('zone', sa.String(length=253), nullable=True),
27
+ sa.Column('name', sa.String(length=253), nullable=True),
28
+ sa.PrimaryKeyConstraint('stack_fqdn')
29
+ )
30
+ # ### end Alembic commands ###
31
+
32
+
33
+ def downgrade() -> None:
34
+ """Downgrade schema."""
35
+ # ### commands auto generated by Alembic - please adjust! ###
36
+ op.drop_table('k8s_ext_control_plan')
37
+ # ### end Alembic commands ###
@@ -0,0 +1,54 @@
1
+ """slop firewall seperation
2
+
3
+ Revision ID: fdcb5aa33b76
4
+ Revises: 04398db10434
5
+ Create Date: 2025-11-21 17:33:31.778613
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+ from sqlalchemy.dialects import postgresql
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = 'fdcb5aa33b76'
16
+ down_revision: Union[str, Sequence[str], None] = '04398db10434'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # ### commands auto generated by Alembic - please adjust! ###
24
+ op.create_table('kea_client_class_defs',
25
+ sa.Column('stack_fqdn', sa.String(length=253), nullable=False),
26
+ sa.Column('class_name', sa.String(length=253), nullable=False),
27
+ sa.Column('class_content', postgresql.JSONB(astext_type=sa.Text()), nullable=False),
28
+ sa.PrimaryKeyConstraint('class_name')
29
+ )
30
+
31
+ # manual pkey change
32
+ op.drop_constraint('kea_reservations_pkey', 'kea_reservations', type_='primary')
33
+ op.create_primary_key('kea_reservations_pkey', 'kea_reservations', ['mac'])
34
+
35
+ op.add_column('kea_reservations', sa.Column('client_classes', sa.String(length=1000), nullable=True))
36
+ op.alter_column('kea_reservations', 'ip',
37
+ existing_type=postgresql.INET(),
38
+ nullable=True)
39
+ # ### end Alembic commands ###
40
+
41
+
42
+ def downgrade() -> None:
43
+ """Downgrade schema."""
44
+ # manual change
45
+ op.drop_constraint('kea_reservations_pkey', 'kea_reservations', type_='primary')
46
+ op.create_primary_key('kea_reservations_pkey', 'kea_reservations', ['ip'])
47
+
48
+ # ### commands auto generated by Alembic - please adjust! ###
49
+ op.alter_column('kea_reservations', 'ip',
50
+ existing_type=postgresql.INET(),
51
+ nullable=False)
52
+ op.drop_column('kea_reservations', 'client_classes')
53
+ op.drop_table('kea_client_class_defs')
54
+ # ### end Alembic commands ###
@@ -0,0 +1,14 @@
1
+ Metadata-Version: 2.4
2
+ Name: py-pve-cloud
3
+ Version: 0.5.16
4
+ Author-email: Tobias Huebner <tobias.huebner@vmzberlin.com>
5
+ License-Expression: GPL-3.0-or-later
6
+ License-File: LICENSE
7
+ Requires-Dist: PyYAML==6.0.2
8
+ Requires-Dist: psycopg2-binary==2.9.10
9
+ Requires-Dist: SQLAlchemy==2.0.43
10
+ Requires-Dist: alembic==1.16.5
11
+ Requires-Dist: paramiko==4.0.0
12
+ Requires-Dist: proxmoxer==2.2.0
13
+ Requires-Dist: dnspython==2.7.0
14
+ Dynamic: license-file
@@ -0,0 +1,22 @@
1
+ pve_cloud/_version.py,sha256=n5QSM4vnUUdmglsGavjALmg_0KNH7BfHYHUyz2Houzs,23
2
+ pve_cloud/cli/pvcli.py,sha256=FddKnieBy2y4PxuE0iFqnJ_Vpi16j8Y_m6kii9cKpHY,5419
3
+ pve_cloud/cli/pvclu.py,sha256=GWO5m_REyhr1gZWQRsj9jB5E1X9LjgqzzzZRYdQrSro,5738
4
+ pve_cloud/lib/inventory.py,sha256=CcXW3utyuHrwwAXxglOBHbMnkGXUCwo-vcf-pUeOzJU,41
5
+ pve_cloud/orm/alchemy.py,sha256=7BAx_ryS7tqneTFoIoZnXjnb_nh8iSxIhhx4qxC3ay0,5264
6
+ pve_cloud/orm/alembic.ini,sha256=7140n-YUj06aAIHOHACm8U0xhUFUoBZ4Jw23KlYB9EA,4865
7
+ pve_cloud/orm/migrations/env.py,sha256=xtOgjF1KLmRUkG1-yb4eV4F2JzarDKFU1tdWJovNHDc,2200
8
+ pve_cloud/orm/migrations/versions/04398db10434_external_cp_extra_sans.py,sha256=HUrnRni5D_xpqVruXoywekA-u3bIjZb-LvyMi8Ea65E,1465
9
+ pve_cloud/orm/migrations/versions/24a548bfce3e_len_rules_enforcements.py,sha256=rWVywDbSLs16bEcncdXuwcij1axp-K0mleTXqFRhs3s,5238
10
+ pve_cloud/orm/migrations/versions/27724e407e2b_proxy_fqdn.py,sha256=va2I9uPkn6QEQf_sn986-ogX9HeN08ScmFhzqk-eYsY,918
11
+ pve_cloud/orm/migrations/versions/3c95509a5de9_fix.py,sha256=yAfRQerPhlHoRrW6F2aAi2ZyY5IIuGUOCieyg7IK544,1491
12
+ pve_cloud/orm/migrations/versions/7868bcd05006_migrate_old.py,sha256=rU8Bw2tYDynM1Ny0zFolDbcn6Oe6JAhndbpJAewiTac,3475
13
+ pve_cloud/orm/migrations/versions/7dea8c4ee39f_init.py,sha256=iMDyHhtyvpSywMnLhiSEL3W12YSm6sPa18XRgzQcwDg,954
14
+ pve_cloud/orm/migrations/versions/944a8fd5d5bc_ext_ctrl_plns.py,sha256=LnVAShLaU1asz1L7TYs7oI9SnLxPp2IOA6K83kHNkN0,1674
15
+ pve_cloud/orm/migrations/versions/d9b711555be8_ext_control_plane.py,sha256=uBqv1r5pLX-RjqciKYx0zvWyygJMa5u58DTnVfIEAF0,1073
16
+ pve_cloud/orm/migrations/versions/fdcb5aa33b76_slop_firewall_seperation.py,sha256=1qM2weneVfnPFG921lnQSJ70QF9mW4oZmn0ZJguBO8U,1948
17
+ py_pve_cloud-0.5.16.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
18
+ py_pve_cloud-0.5.16.dist-info/METADATA,sha256=e8abKQR9yAMUOzWkcMAvPwFU_tjITX2kd7g1pcnUnOQ,426
19
+ py_pve_cloud-0.5.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ py_pve_cloud-0.5.16.dist-info/entry_points.txt,sha256=VvncsKmTJ46irz-9wQZ4Zo1FgNBjRltGDBKR9ht18mE,84
21
+ py_pve_cloud-0.5.16.dist-info/top_level.txt,sha256=mpT7ttGRyZJVt_obhPLBHyIBcjKhUdJ-qVsMEVX5WJg,10
22
+ py_pve_cloud-0.5.16.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ pvcli = pve_cloud.cli.pvcli:main
3
+ pvclu = pve_cloud.cli.pvclu:main