diff --git a/gnpy/tools/json_io.py b/gnpy/tools/json_io.py index a31181be..a51f70c2 100644 --- a/gnpy/tools/json_io.py +++ b/gnpy/tools/json_io.py @@ -349,7 +349,7 @@ def network_from_json(json_data, equipment): temp = merge_amplifier_restrictions(temp, extra_params.__dict__) el_config['params'] = temp el_config['type_variety'] = variety - elif typ in ['Fiber', 'RamanFiber']: # catch it now because the code will crash later! + elif (typ in ['Fiber', 'RamanFiber']) or (typ == 'Edfa' and variety not in ['default', '']): raise ConfigurationError(f'The {typ} of variety type {variety} was not recognized:' '\nplease check it is properly defined in the eqpt_config json file') el = cls(**el_config) diff --git a/tests/data/twohops_roadm_power_test.json b/tests/data/twohops_roadm_power_test.json index c4e1797d..d1573e49 100644 --- a/tests/data/twohops_roadm_power_test.json +++ b/tests/data/twohops_roadm_power_test.json @@ -358,7 +358,7 @@ { "uid": "east edfa in node B to ila2", "type": "Edfa", - "type_variety": "std_high_gain", + "type_variety": "std_medium_gain", "operational": { "gain_target": 35.0, "delta_p": 0.0, @@ -411,7 +411,7 @@ { "uid": "Edfa0_roadm node B", "type": "Edfa", - "type_variety": "std_high_gain", + "type_variety": "std_medium_gain", "operational": { "gain_target": 19.0, "delta_p": -1.0, @@ -810,4 +810,4 @@ "to_node": "fiber (ila4 → ila3)-" } ] -} \ No newline at end of file +}