From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH access-control/wt/manager v2] add realm sync jobs
Date: Tue, 6 Dec 2022 12:06:29 +0100 [thread overview]
Message-ID: <20221206110635.1885744-1-d.csapak@proxmox.com> (raw)
with this, users now can schedule realm sync jobs, instead of manually
pressing 'sync' or configuring a cronjob for 'pveum realm sync'
the access-control patch needs special care, since i try to sync
independent pve-scheduler calls across the cluster. in my tests here
it worked, but that does not mean i didn't overlook some things.
pve-manager depends on the new access-control and widget-toolkit
i tried to find a way to not add two levels of directories there,
while keeping the suggested 'PVE::API2::AccessControl::Job::RealmSync'
path, but the only other method i saw was to put all the code into
'Job.pm' which felt weird. So we introduce two levels of dirs
to properly split the perl packages.
the first patch of access-control and manager could be applied without
the rest, it clears up the confusion for using the checkboxes
and the realm default
the result is that now the user always gets what he sees when using
the sync window or realm sync job edit and never implicitly falling
back to the realm defaults. If we want that, i can do that and
send a v3 (basically i'd have to add a 'use default' checkbox
for the remove-vanished option)
since PVE::Jobs::Registry lives in pve-common now, there is no
cyclic dependency between manager/access control anymore
changes from v1:
* include thomas suggestions
* add patches to allow 'none' for remove-vanished
* add patch for wt that allows filtering for the realm combobox
* load the default values (if any) from the realm on sync job create,
but not on edit
pve-access-control:
Dominik Csapak (2):
realm: sync: allow 'none' for 'remove-vanished' option
add realmsync plugin for jobs and CRUD api for domainsync-jobs
src/PVE/API2/AccessControl.pm | 6 +
src/PVE/API2/AccessControl/Job.pm | 47 +++
src/PVE/API2/AccessControl/Job/Makefile | 6 +
src/PVE/API2/AccessControl/Job/RealmSync.pm | 324 ++++++++++++++++++++
src/PVE/API2/AccessControl/Makefile | 9 +
src/PVE/API2/Makefile | 4 +
src/PVE/Auth/Plugin.pm | 8 +-
src/PVE/Jobs/Makefile | 6 +
src/PVE/Jobs/RealmSync.pm | 193 ++++++++++++
src/PVE/Makefile | 1 +
10 files changed, 601 insertions(+), 3 deletions(-)
create mode 100644 src/PVE/API2/AccessControl/Job.pm
create mode 100644 src/PVE/API2/AccessControl/Job/Makefile
create mode 100644 src/PVE/API2/AccessControl/Job/RealmSync.pm
create mode 100644 src/PVE/API2/AccessControl/Makefile
create mode 100644 src/PVE/Jobs/Makefile
create mode 100644 src/PVE/Jobs/RealmSync.pm
proxmox-widget-toolkit:
Dominik Csapak (1):
RealmComboBox: add custom store filters for callers
src/form/RealmComboBox.js | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
pve-manager:
Dominik Csapak (3):
ui: realm: sync: don't use realm defaults for remove-vanished
Jobs: add RealmSync Plugin and register it
ui: add Realm Sync panel
PVE/Jobs.pm | 2 +
www/manager6/Makefile | 1 +
www/manager6/dc/Config.js | 7 +
www/manager6/dc/RealmSyncJob.js | 380 ++++++++++++++++++++++++++++++++
www/manager6/dc/SyncWindow.js | 2 +
5 files changed, 392 insertions(+)
create mode 100644 www/manager6/dc/RealmSyncJob.js
--
2.30.2
next reply other threads:[~2022-12-06 11:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 11:06 Dominik Csapak [this message]
2022-12-06 11:06 ` [pve-devel] [PATCH access-control v2 1/2] realm: sync: allow 'none' for 'remove-vanished' option Dominik Csapak
2022-12-14 11:16 ` [pve-devel] applied: " Thomas Lamprecht
2022-12-06 11:06 ` [pve-devel] [PATCH access-control v2 2/2] add realmsync plugin for jobs and CRUD api for domainsync-jobs Dominik Csapak
2022-12-13 13:43 ` Thomas Lamprecht
2022-12-14 9:53 ` Dominik Csapak
2022-12-06 11:06 ` [pve-devel] [PATCH widget-toolkit v2 1/1] RealmComboBox: add custom store filters for callers Dominik Csapak
2022-12-06 11:06 ` [pve-devel] [PATCH manager v2 1/3] ui: realm: sync: don't use realm defaults for remove-vanished Dominik Csapak
2022-12-06 11:08 ` Dominik Csapak
2022-12-13 14:15 ` [pve-devel] applied: " Thomas Lamprecht
2022-12-14 9:42 ` Dominik Csapak
2022-12-06 11:06 ` [pve-devel] [PATCH manager v2 2/3] Jobs: add RealmSync Plugin and register it Dominik Csapak
2022-12-06 11:06 ` [pve-devel] [PATCH manager v2 3/3] ui: add Realm Sync panel Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221206110635.1885744-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox