Skip to content

CiscoDNA IPAM Driver cannot delete pools #136

@techpriest002

Description

@techpriest002

Deleting IP pools (IP4Blocks) using the CiscoDNA IPAM driver appears to be broken due to the specification of pool including the slash "/" character, causing the route matching mechanism of Flask to fail.

Steps to reproduce

  1. Create Gateway installation running 21.8.1
  2. Attempt to delete a block using HTTP DELETE /ipam/pool/:view/:poolcidr where poolcidr is any block containing a forward slash, e.g. "172.16.16.0/20"

Current behavior

Because the path to any pool looks like another URL segment, for example the "/20" portion above, Flask does not find a matching route. This results in a HTTP 404 not found error with the following payload:

{
    "code": 404,
    "description": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.",
    "status": "Not Found"
}

In short, this endpoint can never delete a pool because the specification of a pool and mask creates an incompatible URL path.

Expected behavior

The "delete pool" API endpoint /ipam/pool/:view/:poolcidr needs to be modified to properly parse URLs that contain the additional forward clash included in the CIDR notation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions