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

deleteRouter() public method

This operation removes a logical router; The operation will fail if the router still has some internal interfaces. Users must remove all router interfaces before deleting the router, by removing all internal interfaces through remove router interface operation.
public deleteRouter ( string $routerId ) : boolean
$routerId string The ID of the router to remove.
return boolean Returns true on success or throws an exception otherwise
    public function deleteRouter($routerId)
    {
        $result = false;
        $response = $this->getClient()->call($this->service, sprintf('/routers/%s', $this->escape($routerId)), null, 'DELETE');
        if ($response->hasError() === false) {
            $result = json_decode($response->getContent());
            $result = true;
        }
        return $result;
    }