Skip to content
Snippets Groups Projects
Verified Commit 2f8c42b3 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

small formatting changes, nothing functional

parent df0cd9c9
No related branches found
No related tags found
1 merge request!20IPAM: create_device: LO, SI and LT_IAS; create_trunk: trunk networks.
......@@ -19,6 +19,7 @@ from gso.products.product_types import device
from gso.products.product_types.device import DeviceInactive, \
DeviceProvisioning
from gso.products.product_types.site import Site
# noinspection PyProtectedMember
from gso.services import _ipam
from gso.services import provisioning_proxy
from gso.services.provisioning_proxy import await_pp_results, \
......@@ -96,11 +97,14 @@ def get_info_from_ipam(subscription: DeviceProvisioning) -> State:
subscription.device.device_lo_iso_address \
= iso_from_ipv4(str(subscription.device.device_lo_ipv4_address))
subscription.device.device_si_ipv4_network \
= _ipam.allocate_service_ipv4_network(service_type='SI', comment=f"SI for {lo0_name}").v4
= _ipam.allocate_service_ipv4_network(service_type='SI',
comment=f'SI for {lo0_name}').v4
subscription.device.device_ias_lt_ipv4_network \
= _ipam.allocate_service_ipv4_network(service_type='LT_IAS', comment=f"LT for {lo0_name}").v4
= _ipam.allocate_service_ipv4_network(service_type='LT_IAS',
comment=f'LT for {lo0_name}').v4
subscription.device.device_ias_lt_ipv6_network \
= _ipam.allocate_service_ipv6_network(service_type='LT_IAS', comment=f"LT for {lo0_name}").v6
= _ipam.allocate_service_ipv6_network(service_type='LT_IAS',
comment=f'LT for {lo0_name}').v6
return {'subscription': subscription}
......
......@@ -17,6 +17,7 @@ from gso.products.product_blocks.iptrunk import IptrunkType
from gso.products.product_types.device import Device
from gso.products.product_types.iptrunk import IptrunkInactive, \
IptrunkProvisioning
# noinspection PyProtectedMember
from gso.services import provisioning_proxy, _ipam
from gso.services.provisioning_proxy import confirm_pp_results, \
await_pp_results
......@@ -92,11 +93,16 @@ def create_subscription(product: UUIDstr) -> State:
@step('Get information from IPAM')
def get_info_from_ipam(subscription: IptrunkProvisioning) -> State:
# TODO: get info about how these should be generated
subscription.iptrunk.iptrunk_ipv4_network \
= _ipam.allocate_service_ipv4_network(service_type="TRUNK", comment=subscription.iptrunk.iptrunk_description).v4
= _ipam.allocate_service_ipv4_network(
service_type='TRUNK',
comment=subscription.iptrunk.iptrunk_description
).v4
subscription.iptrunk.iptrunk_ipv6_network \
= _ipam.allocate_service_ipv6_network(service_type="TRUNK", comment=subscription.iptrunk.iptrunk_description).v6
= _ipam.allocate_service_ipv6_network(
service_type='TRUNK',
comment=subscription.iptrunk.iptrunk_description
).v6
return {'subscription': subscription}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment