Skip to content
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

Merged
merged 14 commits into from
Jan 18, 2024

Conversation

stephdl
Copy link
Contributor

@stephdl stephdl commented Jan 15, 2024

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 reloads reconfigures the User portal frontend when a domain change event occurs.

Refs

Comment on lines 23 to 26
# 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'))
Copy link
Member

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"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@DavidePrincipi DavidePrincipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DavidePrincipi DavidePrincipi merged commit 505962a into main Jan 18, 2024
1 check passed
@DavidePrincipi DavidePrincipi deleted the feat-6814 branch January 18, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants