Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jenny
Proxmox Doku Gen
Commits
3ea28f73
Verified
Commit
3ea28f73
authored
Oct 18, 2021
by
Jenny
Browse files
added proxmox 7 compatibility
parent
458bdcda
Changes
1
Hide whitespace changes
Inline
Side-by-side
genproxmoxdoku.py
View file @
3ea28f73
...
...
@@ -20,7 +20,7 @@ def print_dw_table(vmdata):
line
=
line
+
'[[technik:server:{0}|{0}]]'
.
format
(
data
[
'name'
])
line
=
line
+
' | '
lastnet
=
len
(
data
[
'net'
])
-
1
for
idx
,
net
in
enumerate
(
data
[
'net'
]):
for
idx
,
net
in
enumerate
(
sorted
(
data
[
'net'
])
)
:
if
idx
!=
lastnet
:
line
=
line
+
net
+
'
\\\\
'
else
:
...
...
@@ -114,7 +114,7 @@ def main():
vms
=
pve
.
nodes
(
args
.
node
).
qemu
.
get
()
vmdata
=
dict
()
for
vm
in
vms
:
if
not
vm
[
'template'
]:
if
'template'
not
in
vm
or
not
vm
[
'template'
]:
vmdata
[
vm
[
'vmid'
]]
=
dict
()
acls
=
pve
.
access
.
acl
.
get
()
...
...
@@ -153,9 +153,9 @@ def main():
data
[
'comment'
]
=
desc
[
'comment'
]
data
[
'users'
]
=
list
()
for
acl
in
acls
:
if
acl
[
'path'
]
==
'/vms/'
+
vmid
and
acl
[
'type'
]
==
'user'
:
if
acl
[
'path'
]
==
'/vms/'
+
str
(
vmid
)
and
acl
[
'type'
]
==
'user'
:
data
[
'users'
].
append
(
acl
[
'ugid'
])
elif
acl
[
'path'
]
==
'/vms/'
+
vmid
and
acl
[
'type'
]
==
'group'
:
elif
acl
[
'path'
]
==
'/vms/'
+
str
(
vmid
)
and
acl
[
'type'
]
==
'group'
:
data
[
'users'
]
=
data
[
'users'
]
+
usedgroups
[
acl
[
'ugid'
]]
print_dw_table
(
vmdata
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment