Scalr\Service\OpenStack\Services\Network\V2\NetworkApi::deleteSubnet PHP Method

deleteSubnet() public method

This operation removes a subnet from a Quantum network. The operation fails if IP addresses from the subnet that you want to delete are still allocated.
public deleteSubnet ( string $subnetId ) : boolean
$subnetId string The ID of the subnet to remove.
return boolean Returns true on success or throws an exception otherwise
    public function deleteSubnet($subnetId)
    {
        $result = false;
        $response = $this->getClient()->call($this->service, sprintf('/subnets/%s', $this->escape($subnetId)), null, 'DELETE');
        if ($response->hasError() === false) {
            $result = json_decode($response->getContent());
            $result = true;
        }
        return $result;
    }