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

Create additional nsgroup objects #8

Merged
merged 6 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM alpine:3.6
FROM alpine:3.14
badnetmask marked this conversation as resolved.
Show resolved Hide resolved

ADD flaskapp.py /root/flaskapp.py
ADD requirements.txt /root/requirements.txt
RUN apk add --no-cache build-base openssl-dev libffi-dev python3 python3-dev py3-pip
RUN apk add --no-cache build-base openssl-dev libffi-dev python3 python3-dev py3-pip cargo
badnetmask marked this conversation as resolved.
Show resolved Hide resolved
RUN pip3 install -r /root/requirements.txt
EXPOSE 443
CMD /usr/bin/python3 /root/flaskapp.py
16 changes: 14 additions & 2 deletions flaskapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class NetworkView(object):
grid_primary = None
grid_secondaries = None
ns_group = None
delegate_to = []
forwarding_servers = []
external_servers = []
stub_members = []

def __init__(self, uid=None, isdefault=False, name=None, viewtype='network', network=None, comment=None):
# `ZG5zLm5ldHdvcmskMS4wLjAuMC8yNC8w` == `dns.network$1.0.0.0/24/0`
Expand Down Expand Up @@ -230,7 +234,11 @@ def to_dict(self, fields=[]):
'zone_format': self.zone_format,
'grid_primary': self.grid_primary,
'grid_secondaries': self.grid_secondaries,
'ns_group': self.ns_group
'ns_group': self.ns_group,
'delegate_to': self.delegate_to,
'forwarding_servers': self.forwarding_servers,
'external_servers': self.external_servers,
'stub_members': self.stub_members
badnetmask marked this conversation as resolved.
Show resolved Hide resolved
}
if fields:
for x in fields:
Expand Down Expand Up @@ -266,7 +274,11 @@ def __init__(self):
'record:mx': [],
'record:srv': [],
'record:naptr': [],
'record:txt': []
'record:txt': [],
'nsgroup:delegation': [],
'nsgroup:forwardingmember': [],
'nsgroup:forwardstubserver': [],
'nsgroup:stubmember': []
badnetmask marked this conversation as resolved.
Show resolved Hide resolved
}
# ZG5zLm5ldHdvcmtfdmlldyQw == dns.network_view$0
# ZG5zLm5ldHdvcmskZmU4MDo6LzY0LzA == dns.network$fe80::/64
Expand Down