Giter Club home page Giter Club logo

azure_subnet_it's Introduction

subnet_it

Dynamically calculate available for further subnetting free CIDRs based on already reserved subnets/ranges and Virtual Network address spaces.

Example:

❯ python subnet_it.py
usage: subnet_it.py [-h] -s SUBSCRIPTION_ID [-v] [-f]
subnet_it.py: error: the following arguments are required: -s/--subscription_id

python subnet_it.py -s '< subscription id >' -f
...
2021-06-10 15:08:19,508 - subnet_it: INFO - Checking Resource Group [rg_group_name]
2021-06-10 15:08:20,183 - subnet_it: INFO - [rg_group_name]: VNet [vnet_name]
+---------------+------------------+---------------------------------+-----------------+
| Address Space | Available Ranges |        Reserved Subnets         | Reserved Ranges |
+---------------+------------------+---------------------------------+-----------------+
| 10.15.0.0/16  |   10.15.0.0/23   |             test                |  10.15.5.0/27   |
|               |   10.15.2.0/24   |             test                |  10.15.20.0/24  |
...
+---------------+------------------+---------------------------------+-----------------+
...

TODO:

  • Resource group/Vnet as arguments
  • State file? (track the changes)
  • Clean up requirements
  • Documentation

network_it

Dynamically calculate available for further subnetting free CIDRs based on already reserved subnets/ranges, Virtual Network address spaces, provided address space and expected size.

Example:

❯ python network_it.py -s '< subscription id >' -a '10.0.0.0/12' --size 22 -f
...
+-------------+-------------------+-----------------+--------------------------+
| Free range  | Available Subnets | Reserved Ranges |     Virtual Network      |
+-------------+-------------------+-----------------+--------------------------+
| 10.8.0.0/13 |    10.8.0.0/22    |   10.0.0.0/13   |         test             |
|             |    10.8.4.0/22    |                 |                          |
|             |    10.8.8.0/22    |                 |                          |
|             |   10.8.12.0/22    |                 |                          |
|             |   10.8.16.0/22    |                 |                          |
...

TODO:

  • validation
  • Documentation
  • Print limit (currently outputs all)

azure_subnet_it's People

Contributors

violetcranberry avatar

Stargazers

Harish R avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.