From 153edea98ebcd87f64bff5dfa9833d2d841542ed Mon Sep 17 00:00:00 2001 From: Komal Thareja Date: Mon, 20 May 2024 17:01:51 -0400 Subject: [PATCH] pick location from config --- fimutil/ralph/fim_helper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fimutil/ralph/fim_helper.py b/fimutil/ralph/fim_helper.py index 69c3926..09b72b9 100644 --- a/fimutil/ralph/fim_helper.py +++ b/fimutil/ralph/fim_helper.py @@ -1,3 +1,4 @@ +import json from typing import Tuple, List, Dict, Any, Set import logging import re @@ -309,6 +310,10 @@ def site_to_fim(site: Site, address: str, config: Dict = None) -> SubstrateTopol loc = None if address is not None: loc = Location(postal=address) + loc.to_latlon() + + if config and config.get(site.name) and config.get(site.name).get('location'): + loc = Location.from_json(json_string=json.dumps(config.get(site.name).get('location'))) topo = SubstrateTopology()