Skip to content
Snippets Groups Projects

Ipam service

Merged JORGE SASIAIN requested to merge ipam-service into develop
3 unresolved threads
5 files
+ 206
5
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 4
4
import ipaddress
import json
import requests
from enum import Enum
from pydantic import BaseSettings
@@ -439,7 +438,7 @@ def allocate_service_host(hostname=None,
Below methods are not used for supported outside calls
"""
'''
def _find_containers(network=None, ip_version=4):
"""
If network is not None, find that container.
@@ -588,8 +587,8 @@ def _get_network_usage_status(network):
assert r.status_code >= 200 and r.status_code < 300, \
f"HTTP error {r.status_code}: {r.reason}\n\n{r.text}"
return r.json()
'''
'''
if __name__ == '__main__':
while True:
print("1. Find all containers")
@@ -679,3 +678,4 @@ if __name__ == '__main__':
else:
print("Invalid choice. Please try again.")
'''
Loading