diff --git a/gso/workflows/device/create_device.py b/gso/workflows/device/create_device.py index 391b48b4a919e5a900c16c39d4e798e6227cc35b..e3cc74acb2319176a8b2da824a10150dc53a9aa8 100644 --- a/gso/workflows/device/create_device.py +++ b/gso/workflows/device/create_device.py @@ -96,13 +96,11 @@ def get_info_from_ipam(subscription: DeviceProvisioning) -> State: def initialize_subscription( subscription: device.DeviceInactive, hostname: str, - ts_address: ipaddress.IPv4Address, ts_port: int, device_vendor: device_pb.DeviceVendor, device_site: str, device_role: device_pb.DeviceRole, ) -> State: - subscription.device.device_ts_address = str(ts_address) subscription.device.device_ts_port = ts_port subscription.device.device_vendor = device_vendor subscription.device.device_site = Site.from_subscription(device_site).site diff --git a/gso/workflows/site/create_site.py b/gso/workflows/site/create_site.py index 30dc2c17e180024f67b83901ad4b343aaee36026..b597a91357d952809539cc691952222fa9d26e61 100644 --- a/gso/workflows/site/create_site.py +++ b/gso/workflows/site/create_site.py @@ -25,6 +25,7 @@ def initial_input_form_generator(product_name: str) -> FormGenerator: site_bgp_community_id: int site_internal_id: int site_tier: site_pb.SiteTier + site_ts_address: str user_input = yield CreateSiteForm @@ -53,6 +54,7 @@ def initialize_subscription( site_bgp_community_id: int, site_internal_id: int, site_tier: site_pb.SiteTier, + site_ts_address: str, ) -> State: subscription.site.site_name = site_name subscription.site.site_city = site_city @@ -63,6 +65,7 @@ def initialize_subscription( subscription.site.site_bgp_community_id = site_bgp_community_id subscription.site.site_internal_id = site_internal_id subscription.site.site_tier = site_tier + subscription.site.site_ts_address = site_ts_address subscription.description = f"Site {site_name}" @@ -85,4 +88,4 @@ def create_site() -> StepList: >> set_status(SubscriptionLifecycle.ACTIVE) >> resync >> done - ) + site_tier)