Reserve first 2 IPs from pool - vFWNG 33/72933/2
authorAlexis de Talhouët <adetalhouet89@gmail.com>
Fri, 16 Nov 2018 19:49:10 +0000 (14:49 -0500)
committerAlexis de Talhouët <adetalhouet89@gmail.com>
Fri, 16 Nov 2018 19:56:33 +0000 (14:56 -0500)
For vFWNG use cases, the ip pool gets created
prior to the use case even being designed.
Just noticed OpenStack is using .1 for Gateway
and .2 for DHCP, hence these two IPs can't be
assign to any port, else, process will fail.

Change-Id: Id8232ce2fe81f1e03ee8f97f3b251b5b22b4fcba
Issue-ID: OOM-1522
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
kubernetes/contrib/charts/netbox/charts/netbox-app/resources/config/provisioning/provision.sh

index adf10a1..78f79ce 100755 (executable)
@@ -103,3 +103,34 @@ curl --silent -X POST \
   "description": "IP Pool for ONAP - general purpose"
 }'
 
+# Reserve ports, gateway and dhcp, for each protected and unprotected networks.
+
+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'
+
+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'
+
+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'
+
+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'
+
+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'
+
+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'