py-pve-cloud 0.0.1__py3-none-any.whl → 0.14.5rc0__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.

Potentially problematic release.


This version of py-pve-cloud might be problematic. Click here for more details.

Files changed (31) hide show
  1. pve_cloud/_version.py +1 -0
  2. pve_cloud/cli/pvcli.py +187 -0
  3. pve_cloud/cli/pvclu.py +146 -0
  4. pve_cloud/lib/inventory.py +276 -0
  5. pve_cloud/lib/validate.py +25 -0
  6. {orm → pve_cloud/orm}/alchemy.py +18 -22
  7. pve_cloud/orm/alembic.ini +147 -0
  8. pve_cloud/orm/migrations/env.py +83 -0
  9. pve_cloud/orm/migrations/versions/04398db10434_external_cp_extra_sans.py +44 -0
  10. pve_cloud/orm/migrations/versions/0ad803c51325_machine_type_refactor.py +65 -0
  11. pve_cloud/orm/migrations/versions/24a548bfce3e_len_rules_enforcements.py +133 -0
  12. pve_cloud/orm/migrations/versions/27724e407e2b_proxy_fqdn.py +32 -0
  13. pve_cloud/orm/migrations/versions/3c95509a5de9_fix.py +44 -0
  14. pve_cloud/orm/migrations/versions/7868bcd05006_migrate_old.py +83 -0
  15. pve_cloud/orm/migrations/versions/7dea8c4ee39f_init.py +36 -0
  16. pve_cloud/orm/migrations/versions/944a8fd5d5bc_ext_ctrl_plns.py +46 -0
  17. pve_cloud/orm/migrations/versions/d9b711555be8_ext_control_plane.py +37 -0
  18. pve_cloud/orm/migrations/versions/e60b9cc63413_ingress_generic.py +33 -0
  19. pve_cloud/orm/migrations/versions/fdcb5aa33b76_slop_firewall_seperation.py +54 -0
  20. py_pve_cloud-0.14.5rc0.dist-info/METADATA +14 -0
  21. py_pve_cloud-0.14.5rc0.dist-info/RECORD +25 -0
  22. py_pve_cloud-0.14.5rc0.dist-info/entry_points.txt +3 -0
  23. py_pve_cloud-0.14.5rc0.dist-info/licenses/LICENSE.md +660 -0
  24. py_pve_cloud-0.14.5rc0.dist-info/top_level.txt +1 -0
  25. cli/pvclu.py +0 -68
  26. py_pve_cloud-0.0.1.dist-info/METADATA +0 -11
  27. py_pve_cloud-0.0.1.dist-info/RECORD +0 -8
  28. py_pve_cloud-0.0.1.dist-info/entry_points.txt +0 -2
  29. py_pve_cloud-0.0.1.dist-info/licenses/LICENSE +0 -674
  30. py_pve_cloud-0.0.1.dist-info/top_level.txt +0 -2
  31. {py_pve_cloud-0.0.1.dist-info → py_pve_cloud-0.14.5rc0.dist-info}/WHEEL +0 -0
@@ -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,33 @@
1
+ """ingress generic
2
+
3
+ Revision ID: e60b9cc63413
4
+ Revises: 0ad803c51325
5
+ Create Date: 2025-12-22 21:29:59.987939
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 = 'e60b9cc63413'
16
+ down_revision: Union[str, Sequence[str], None] = '0ad803c51325'
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_ingress_rules', sa.Column('is_k8s', sa.Boolean(), nullable=False, server_default='true'))
25
+ op.alter_column('k8s_ingress_rules', 'is_k8s', server_default=None) # default create as true since to this point its only for k8s
26
+ # ### end Alembic commands ###
27
+
28
+
29
+ def downgrade() -> None:
30
+ """Downgrade schema."""
31
+ # ### commands auto generated by Alembic - please adjust! ###
32
+ op.drop_column('k8s_ingress_rules', 'is_k8s')
33
+ # ### 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.14.5rc0
4
+ Author-email: Tobias Huebner <tobias.huebner@vmzberlin.com>
5
+ License-Expression: GPL-3.0-or-later
6
+ License-File: LICENSE.md
7
+ Requires-Dist: PyYAML==6.0.3
8
+ Requires-Dist: psycopg2-binary==2.9.11
9
+ Requires-Dist: SQLAlchemy==2.0.45
10
+ Requires-Dist: alembic==1.18.0
11
+ Requires-Dist: paramiko==4.0.0
12
+ Requires-Dist: proxmoxer==2.2.0
13
+ Requires-Dist: dnspython==2.8.0
14
+ Dynamic: license-file
@@ -0,0 +1,25 @@
1
+ pve_cloud/_version.py,sha256=BBajeBv4hd6WdFNmoalJ5VnpqM65j_nSg7Tf4S-qupQ,26
2
+ pve_cloud/cli/pvcli.py,sha256=Sew-_ZVmugskLYncEzVE_-F1R90O9vM9rPZ2DuxumQQ,5977
3
+ pve_cloud/cli/pvclu.py,sha256=IZRhgbVbEP5wo3gHpiEs3zEu_xmgcpuQAPRWPi18APc,4660
4
+ pve_cloud/lib/inventory.py,sha256=76JVyYbVDKGHYnEab4DollNwxzZTzvgVBdqlPMIkGcw,10598
5
+ pve_cloud/lib/validate.py,sha256=IQ4_1pknjFt_tbqhl497aoaVDnUSgxq5eSLkantdub8,830
6
+ pve_cloud/orm/alchemy.py,sha256=fGDBpO22quf_d7jCeAkDPYxwXPDFSUH99DKe2JuJOUk,5031
7
+ pve_cloud/orm/alembic.ini,sha256=7140n-YUj06aAIHOHACm8U0xhUFUoBZ4Jw23KlYB9EA,4865
8
+ pve_cloud/orm/migrations/env.py,sha256=xtOgjF1KLmRUkG1-yb4eV4F2JzarDKFU1tdWJovNHDc,2200
9
+ pve_cloud/orm/migrations/versions/04398db10434_external_cp_extra_sans.py,sha256=HUrnRni5D_xpqVruXoywekA-u3bIjZb-LvyMi8Ea65E,1465
10
+ pve_cloud/orm/migrations/versions/0ad803c51325_machine_type_refactor.py,sha256=Tp3_KPp9SlEAc1Nh7BdIll_rTAWbQUFP1Evjdx_g-So,2480
11
+ pve_cloud/orm/migrations/versions/24a548bfce3e_len_rules_enforcements.py,sha256=rWVywDbSLs16bEcncdXuwcij1axp-K0mleTXqFRhs3s,5238
12
+ pve_cloud/orm/migrations/versions/27724e407e2b_proxy_fqdn.py,sha256=va2I9uPkn6QEQf_sn986-ogX9HeN08ScmFhzqk-eYsY,918
13
+ pve_cloud/orm/migrations/versions/3c95509a5de9_fix.py,sha256=yAfRQerPhlHoRrW6F2aAi2ZyY5IIuGUOCieyg7IK544,1491
14
+ pve_cloud/orm/migrations/versions/7868bcd05006_migrate_old.py,sha256=rU8Bw2tYDynM1Ny0zFolDbcn6Oe6JAhndbpJAewiTac,3475
15
+ pve_cloud/orm/migrations/versions/7dea8c4ee39f_init.py,sha256=iMDyHhtyvpSywMnLhiSEL3W12YSm6sPa18XRgzQcwDg,954
16
+ pve_cloud/orm/migrations/versions/944a8fd5d5bc_ext_ctrl_plns.py,sha256=LnVAShLaU1asz1L7TYs7oI9SnLxPp2IOA6K83kHNkN0,1674
17
+ pve_cloud/orm/migrations/versions/d9b711555be8_ext_control_plane.py,sha256=uBqv1r5pLX-RjqciKYx0zvWyygJMa5u58DTnVfIEAF0,1073
18
+ pve_cloud/orm/migrations/versions/e60b9cc63413_ingress_generic.py,sha256=fSVHYbRvkssMsxnuZ3TIOflBseuuQhgYa1G5Xrn5m88,1044
19
+ pve_cloud/orm/migrations/versions/fdcb5aa33b76_slop_firewall_seperation.py,sha256=1qM2weneVfnPFG921lnQSJ70QF9mW4oZmn0ZJguBO8U,1948
20
+ py_pve_cloud-0.14.5rc0.dist-info/licenses/LICENSE.md,sha256=ADUqsZhl4juwq34PRTMiBqumpm11s_PMli_dZQjWPqQ,34260
21
+ py_pve_cloud-0.14.5rc0.dist-info/METADATA,sha256=JBCv_nK4-UJ55zciZsChklCFSYCAebEtfFexJzIWMIo,432
22
+ py_pve_cloud-0.14.5rc0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ py_pve_cloud-0.14.5rc0.dist-info/entry_points.txt,sha256=VvncsKmTJ46irz-9wQZ4Zo1FgNBjRltGDBKR9ht18mE,84
24
+ py_pve_cloud-0.14.5rc0.dist-info/top_level.txt,sha256=mpT7ttGRyZJVt_obhPLBHyIBcjKhUdJ-qVsMEVX5WJg,10
25
+ py_pve_cloud-0.14.5rc0.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ pvcli = pve_cloud.cli.pvcli:main
3
+ pvclu = pve_cloud.cli.pvclu:main