-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9280d4d
commit 1e3f276
Showing
6 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
core/imageroot/var/lib/nethserver/cluster/actions/bind-user-domains/50bind_user_domains
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# | ||
# Copyright (C) 2024 Nethesis S.r.l. | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# | ||
|
||
import sys | ||
import json | ||
import agent | ||
import os | ||
|
||
request = json.load(sys.stdin) | ||
|
||
domain_list = request["domains"] | ||
module_id = os.environ["AGENT_TASK_USER"] | ||
|
||
# TODO: 1) store the new relation records in Redis | ||
# 2) raise the event |
29 changes: 29 additions & 0 deletions
29
core/imageroot/var/lib/nethserver/cluster/actions/bind-user-domains/validate-input.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "bind-user-domains-input", | ||
"$id": "http://schema.nethserver.org/cluster/bind-user-domains-input.json", | ||
"description": "Input schema of the bind-user-domains action", | ||
"examples": [ | ||
{ | ||
"domains": [ | ||
"mydom.test" | ||
] | ||
} | ||
], | ||
"type": "object", | ||
"required": [ | ||
"domains" | ||
], | ||
"properties": { | ||
"domains": { | ||
"description": "One or more domains to bind with the module calling this action", | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"description": "A user domain name", | ||
"type": "string", | ||
"minLength": 1 | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
core/imageroot/var/lib/nethserver/cluster/actions/unbind-user-domains/50unbind_user_domains
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# | ||
# Copyright (C) 2024 Nethesis S.r.l. | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# | ||
|
||
import sys | ||
import json | ||
import agent | ||
import os | ||
|
||
request = json.load(sys.stdin) | ||
|
||
domain_list = request["domains"] | ||
module_id = os.environ["AGENT_TASK_USER"] | ||
|
||
# TODO: 1) clear the relation records from Redis | ||
# 2) raise the event |
29 changes: 29 additions & 0 deletions
29
core/imageroot/var/lib/nethserver/cluster/actions/unbind-user-domains/validate-input.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "ubind-user-domains-input", | ||
"$id": "http://schema.nethserver.org/cluster/ubind-user-domains-input.json", | ||
"description": "Input schema of the ubind-user-domains action", | ||
"examples": [ | ||
{ | ||
"domains": [ | ||
"mydom.test" | ||
] | ||
} | ||
], | ||
"type": "object", | ||
"required": [ | ||
"domains" | ||
], | ||
"properties": { | ||
"domains": { | ||
"description": "One or more domains to ubind from the module calling this action", | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"description": "A user domain name", | ||
"type": "string", | ||
"minLength": 1 | ||
} | ||
} | ||
} | ||
} |