aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/contrib/charts/netbox
diff options
context:
space:
mode:
authorMartin Ouimet <martin.ouimet@bell.ca>2018-09-11 14:24:24 -0400
committerMartin Ouimet <martin.ouimet@bell.ca>2018-09-11 14:36:51 -0400
commitae397d001bf2b649397b6ca69aff881ffc6653fd (patch)
tree25e5933f62e296a538a293f6dac2c1ac9b97be93 /kubernetes/contrib/charts/netbox
parent5d4009b3530ef2332122ab6bed115c43edb146f3 (diff)
Fix Netbox client assign IP 0
This patch assign the first IP (0) of the 3 networks. This prevent Netbox client from assigning IP 0 that is not supported in Openstack. Issue-ID: CCSDK-533 Change-Id: Id42f883d8dc8c12824669bb98e05b3944880def5 Signed-off-by: Martin Ouimet <martin.ouimet@bell.ca>
Diffstat (limited to 'kubernetes/contrib/charts/netbox')
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh b/kubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh
index 25717cedd8..f0439a50b3 100755
--- a/kubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh
+++ b/kubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh
@@ -102,3 +102,24 @@ curl --silent -X POST \
"is_pool": true,
"description": "IP Pool for ONAP - general purpose"
}'
+
+
+# Assign the first IP of the subnets in Netbox to avoid getting IP 0 from auto assignment.
+
+echo "Assign IP 0 from prefix for vFW protected network"
+curl --silent -X POST \
+ http://{{ .Values.service.name }}:{{ .Values.service.internalPort }}/api/ipam/prefixes/1/available-ips/ \
+ -H 'Authorization: Token onceuponatimeiplayedwithnetbox20180814' \
+ -H 'Content-Type: application/json'
+
+echo "Assign IP 0 from prefix for vFW unprotected network"
+curl --silent -X POST \
+ http://{{ .Values.service.name }}:{{ .Values.service.internalPort }}/api/ipam/prefixes/2/available-ips/ \
+ -H 'Authorization: Token onceuponatimeiplayedwithnetbox20180814' \
+ -H 'Content-Type: application/json'
+
+echo "Assign IP 0 from prefix for ONAP general purpose network"
+curl --silent -X POST \
+ http://{{ .Values.service.name }}:{{ .Values.service.internalPort }}/api/ipam/prefixes/3/available-ips/ \
+ -H 'Authorization: Token onceuponatimeiplayedwithnetbox20180814' \
+ -H 'Content-Type: application/json'