Skip to content

Conversation

@EtienneLt
Copy link
Contributor

No description provided.

Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
@EtienneLt EtienneLt self-assigned this Oct 6, 2025
EtienneLt and others added 6 commits October 14, 2025 14:45
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
@ghazwarhili
Copy link
Contributor

#303 I'd like to propose this PR for the refacto

ghazwarhili and others added 3 commits October 29, 2025 09:29
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
@GetMapping(value = "/networks/{networkUuid}/voltage-levels/{voltageLevelId}/feeder-bays-and-bus-bar-sections", produces = APPLICATION_JSON_VALUE)
@Operation(summary = "get feeder bays and bus bar sections information")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = " feeder bays and bus bar sections information retrieved")})
public FeederBaysBusBarSectionsInfos getMoveVoltageLevelFeederBaysInfos(@Parameter(description = "Network UUID") @PathVariable("networkUuid") UUID networkUuid,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public FeederBaysBusBarSectionsInfos getMoveVoltageLevelFeederBaysInfos(@Parameter(description = "Network UUID") @PathVariable("networkUuid") UUID networkUuid,
public FeederBaysBusBarSectionsInfos getFeederBaysInfos(@Parameter(description = "Network UUID") @PathVariable("networkUuid") UUID networkUuid,

.open(sw.isOpen())
.build()));
return switchInfosList;
public FeederBaysBusBarSectionsInfos getMoveVoltageLevelFeederBaysInfos(UUID networkUuid, String voltageLevelId, String variantId) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public FeederBaysBusBarSectionsInfos getMoveVoltageLevelFeederBaysInfos(UUID networkUuid, String voltageLevelId, String variantId) {
public FeederBaysBusBarSectionsInfos getFeederBaysInfos(UUID networkUuid, String voltageLevelId, String variantId) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better that the network-map-server doesn't have network-modification notions

builder.isBusbarSectionPositionFound(vlTopologyInfos.isBusbarSectionPositionFound());
builder.busBarSectionInfos(vlTopologyInfos.getBusBarSectionInfosGrouped());
builder.feederBaysInfos(getFeederBaysInfos(voltageLevel));
VoltageLevelFormInfos busBarSectionsInfos = getVoltageLevelBusBarSectionsInfos(voltageLevel);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird code here. If we work with VoltageLevelFormInfos only, it's cleaner to do something like:
voltageLevelFormInfos.setTopologyInfos() in replacement of all this code

var extension = bbs.getExtension(BusbarSectionPosition.class);
if (extension == null) {
return VoltageLevelFormInfos.builder()
.busbarCount(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those values are ok ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the extension is null, we return the default values
VoltageLevelFormInfos.builder()
.busbarCount(1)
.sectionCount(1)
.topologyKind(NODE_BREAKER)
.switchKinds(Collections.emptyList())
.isSymmetrical(false)
.build();

Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 5, 2025

@EtienneLt EtienneLt merged commit ffab6df into main Nov 5, 2025
4 checks passed
@EtienneLt EtienneLt deleted the refactor-voltage-level-topology branch November 5, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants