Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@
docs/sphinx/_build/
nipap-www/nipap_www.egg-info
nipap/nipap.egg-info

/.idea/
*.idea/
/**/target
*/target/*
*/target/**
*.iml
**dependency-reduced-pom.xml
*.project
*.classpath
*.settings
6 changes: 5 additions & 1 deletion Dockerfile.nipapd
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,8 @@ RUN pip3 --no-input install --break-system-packages --no-cache-dir envtpl==0.7.2
EXPOSE 1337
ENV LISTEN_ADDRESS=0.0.0.0 LISTEN_PORT=1337 SYSLOG=false DB_PORT=5432 DB_SSLMODE=disable DB_NAME=nipap

ENTRYPOINT ["/nipap/entrypoint.sh"]
RUN mkdir -p /etc/nipap/

VOLUME /etc/nipap/

ENTRYPOINT ["/nipap/entrypoint.sh"]
4 changes: 4 additions & 0 deletions Dockerfile.www
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ RUN cd /pynipap && pip3 --no-input install --break-system-packages --no-cache-di
EXPOSE 80
VOLUME [ "/var/log/apache2" ]

VOLUME /run/apache2
VOLUME /etc/apache2
VOLUME /etc/nipap

ENTRYPOINT [ "/nipap-www/entrypoint.sh" ]
2 changes: 1 addition & 1 deletion nipap/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

mkdir -p /etc/nipap/
envtpl --allow-missing --keep-template /usr/local/share/nipap/nipap.conf.dist -o /etc/nipap/nipap.conf
/bin/bash /nipap/wait-for-it.sh -t 60 $DB_HOST:$DB_PORT -- sleep 5
#/bin/bash /nipap/wait-for-it.sh -t 60 $DB_HOST:$DB_PORT -- sleep 5

/usr/local/bin/nipap-passwd create-database
if [ -n "$NIPAP_USERNAME" -a -n "$NIPAP_PASSWORD" ]; then
Expand Down
2 changes: 1 addition & 1 deletion nipap/nipap/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
'ro': False,
},
'member_prefixes_v6': {
'column': 'po.member_prefixes_v',
'column': 'po.member_prefixes_v6',
'ro': False,
},
'name': {
Expand Down
7 changes: 4 additions & 3 deletions nipap/sql/triggers.plsql
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ BEGIN
-- free addresses
NEW.free_addresses := NEW.total_addresses - NEW.used_addresses;


/*
--
---- Inherited Tags --------------------------------------------------------
-- Update inherited tags
Expand All @@ -322,7 +322,7 @@ BEGIN
IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN
NEW.inherited_tags := array_undup(array_cat(new_parent.inherited_tags, new_parent.tags));
END IF;

*/

-- all is well, return
RETURN NEW;
Expand Down Expand Up @@ -762,6 +762,7 @@ BEGIN
END IF;
END IF;

/*
--
---- Inherited Tags --------------------------------------------------------
-- Update inherited tags
Expand All @@ -788,7 +789,7 @@ BEGIN
PERFORM calc_tags(OLD.vrf_id, OLD.prefix);
PERFORM calc_tags(NEW.vrf_id, NEW.prefix);
END IF;

*/

-- all is well, return
RETURN NEW;
Expand Down