From ae397d001bf2b649397b6ca69aff881ffc6653fd Mon Sep 17 00:00:00 2001 From: Martin Ouimet Date: Tue, 11 Sep 2018 14:24:24 -0400 Subject: 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 --- .../resources/config/provisioning/provision.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'kubernetes/contrib/charts') 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' -- cgit 1.2.3-korg