Skip to content

sthwang-metal/ipam-api

 
 

Repository files navigation

Infratographer IP Address Management API

Infratographer IP Address Management implements a GraphQL API that provides a way to manage IP Addresses

IPAM Structure

erDiagram
    NODE ||--o| IPBlockType : "has"
    IPBlockType {
        string Name
        id OwnerID
    }

    IPBlockType ||--o{ IPBlock : "has"
    IPBlock {
        string Prefix
        id BlockTypeID
        id LocationID
        id ParentBlockID
        boolean AllowAutoSubnet
        boolean AllowAutoAllocate
    }

    IPBlock ||--o{ IPAddress : "has"
    IPAddress {
        string IP
        id BlockID
        id NodeID
        id NodeOwnerID
        boolean Reserved
    }
Loading

Development and Contributing

Example GraphQL Queries

Create IP Block Mutation

Input:

mutation{
  createIPBlockType(
    input: {
        name:"super-sweet-ip-block-type",
        ownerID:"tenants-df234a22-f849-11ed-b67e-0242ac120002"
    }
  )
  {
    ip_block_type{
      name,
      id
    }
  }
}

Output:

{
  "data": {
    "createIPBlockType": {
      "ip_block_type": {
        "name": "super-sweet-ip-block-type",
        "id": "ipamibt-9xaBQDAFmLOdceu9zO6Rj"
      }
    }
  }
}

Get IP Block by ID

Input:

query{
  ip_block_type(id:"ipamibt-9xaBQDAFmLOdceu9zO6Rj"){
    name,
    id
  }
}

Output:

{
  "data": {
    "ip_block_type": {
      "name": "super-sweet-ip-block-type",
      "id": "ipamibt-9xaBQDAFmLOdceu9zO6Rj"
    }
  }
}

Code of Conduct

Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Contact

To contact the maintainers, please open a GithHub Issue

License

Apache 2.0

About

Infratographer IP Address Management

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 90.5%
  • Makefile 3.1%
  • Dockerfile 2.5%
  • Smarty 2.4%
  • Shell 1.5%