Fix subnet api test case for non-default cidr

This patch removes the hardcoding and calculates the Gateway-ip
based on the configured value.

Change-Id: I186f3997500407ad26472e63b1d5a9b5bcfe1732
Closes-Bug: #1318667
Merge "Fix subnet api test case for non-default cidr"