Skip to content

Commit 3b11318

Browse files
committed
use nmap to discover free ip range blocks in the host's cidr
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent a1dfa0d commit 3b11318

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,11 @@ deploy_zone() {
259259
cmk update networkserviceprovider state=Enabled id=$nsp_id
260260
info "Configured VPC VR Network Service Provider for zone"
261261

262+
# TODO: use nmap to scan for free IPs in the range
263+
# sudo nmap -v -sn -n 192.168.1.0/24 -oG - | awk '/Status: Down/{print $2}'
262264
RANGE=$(echo $GATEWAY | sed 's/\..$//g')
263-
264265
pod_id=$(cmk create pod name=AdvPod1 zoneid=$zone_id gateway=$GATEWAY netmask=255.255.255.0 startip=$pod_start endip=$pod_end | jq '.pod.id')
266+
265267
}
266268

267269
display_url() {

0 commit comments

Comments
 (0)