Skip to content

Commit

Permalink
Create additional nsgroup objects (#8)
Browse files Browse the repository at this point in the history
Container updates:

- update image to alpine 3.15
- install cryptography using apk

Updates to support infobloxopen/infoblox-ansible#56:

- update flaskapp.py to add support for additional nsgroup:delegation
- add more nsgroup objects
  • Loading branch information
badnetmask authored Dec 1, 2021
1 parent 7f94a62 commit 4aef206
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
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.15

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 python3 py3-wheel py3-pip py3-cryptography
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,
}
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': [],
}
# ZG5zLm5ldHdvcmtfdmlldyQw == dns.network_view$0
# ZG5zLm5ldHdvcmskZmU4MDo6LzY0LzA == dns.network$fe80::/64
Expand Down

0 comments on commit 4aef206

Please sign in to comment.