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

deleteNetwork() public method

This operation deletes a Quantum network and its associated subnets provided that no port is currently configured on the network. If ports are still configured on the network that you want to delete, a 409 Network In Use error is returned.
public deleteNetwork ( string $networkId ) : boolean
$networkId string The ID of the network to remove.
return boolean Returns true on success or throws an exception otherwise
    public function deleteNetwork($networkId)
    {
        $result = false;
        $response = $this->getClient()->call($this->service, sprintf('/networks/%s', $this->escape($networkId)), null, 'DELETE');
        if ($response->hasError() === false) {
            $result = json_decode($response->getContent());
            $result = true;
        }
        return $result;
    }