Skip to content

Commit

Permalink
Feat: configurator.Cluster: add remove_domain
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Louis Leroy <[email protected]>
  • Loading branch information
jll63 committed Nov 19, 2024
1 parent b390620 commit 1d6d7c1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/python/blazingmq/dev/configurator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,19 @@ def _add_domain(self, domain: "Domain") -> "Domain":

return domain

def remove_domain(self, name: str) -> None:
"""
Remove a domain from the Cluster's map and all the domain's maps.
The domain must exist in `Cluster.domains`. It can be missing from the
broker's domain maps.
"""

del self.domains[name]

for node in self.nodes.values():
node.domains.pop(name, None)


class Cluster(AbstractCluster):
def domain(self, parameters: mqbconf.Domain) -> "Domain":
Expand Down

0 comments on commit 1d6d7c1

Please sign in to comment.