-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scripts to manage Samba DC service based on domain change event #39
Conversation
This commit adds a new configuration file, api-moduled-overwrite.conf, and removes the print-bound-domain-list command from the samba-dc.service file.
# Parse response['output'] and push to modules_set the name of each module | ||
names_set=set() | ||
for item in response['output']: | ||
names_set.add(item.get('name')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are missing an important information from response['output']
: the id
field. A module instance has module_id
== id + some numeric suffix. You should match it with id, not "name".
Examples of id, name retrieved from response['output']:
"grafana": "Grafana"
"webserver": "WebServer"
"mariadb": "MariaDB"
"nextcloud": "Nextcloud"
"mail": "Mail"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Role definition and update must be moved to the core, to PR NethServer/ns8-core#545. This step can be removed.
Co-authored-by: Davide Principi <[email protected]>
Co-authored-by: Davide Principi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request adds two scripts: "write-user-portal-config" and "10reload_services" to manage the api-moduled.service based on a domain change event. The "write-user-portal-config" script write the bound domain list, while the "10reload_services" script
reloadsreconfigures the User portal frontend when a domain change event occurs.Refs