Skip to content

Commit

Permalink
hotfix for topology modifications (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
haniotak authored Jul 25, 2024
1 parent e8626a2 commit cc3f7f9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# OSCARS Release Notes
### 1.2.13
> Jul 2024
- Topology hotfix

### 1.2.12
> Jul 2024
- Add LSP waypoint search API
Expand Down
6 changes: 3 additions & 3 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.5</version>
<version>3.3.2</version>
<relativePath/>
</parent>

<groupId>net.es.oscars</groupId>
<artifactId>backend</artifactId>
<name>backend</name>
<version>1.2.12</version>
<version>1.2.13</version>

<description>OSCARS backend</description>
<properties>
Expand Down Expand Up @@ -86,7 +86,7 @@
<dependency>
<groupId>net.es.topo.common</groupId>
<artifactId>topo-common</artifactId>
<version>0.0.24</version>
<version>0.0.28</version>
</dependency>
<dependency>
<groupId>net.es.nsi</groupId>
Expand Down
4 changes: 3 additions & 1 deletion backend/src/main/java/net/es/oscars/topo/enums/Layer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ public enum Layer {
INTERNAL,
MPLS,
LOGICAL,
EDGE;
EDGE,
TAGGED,
UNTAGGED;


}
13 changes: 6 additions & 7 deletions backend/src/main/java/net/es/oscars/topo/pop/TopoPopulator.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package net.es.oscars.topo.pop;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.instrumentation.spring.web.v3_1.SpringWebTelemetry;
Expand Down Expand Up @@ -132,11 +131,11 @@ public Topology loadTopology() throws TopoException, ResourceAccessException, IO

for (OscarsOneDevice discDevice : oscarsOneTopo.getDevices()) {
Set<Layer> deviceCaps = new HashSet<>();
for (String capString : discDevice.getCapabilities()) {
deviceCaps.add(Layer.valueOf(capString));
for (OscarsOneCapability os1Cap : discDevice.getCapabilities()) {
deviceCaps.add(Layer.valueOf(os1Cap.toString()));
}
Set<IntRange> devResVlans = new HashSet<>();
for (OscarsOneVlan vlan : discDevice.getReservableVlans()) {
for (net.es.topo.common.model.oscars1.IntRange vlan : discDevice.getReservableVlans()) {
devResVlans.add(IntRange.builder()
.ceiling(vlan.getCeiling())
.floor(vlan.getFloor())
Expand All @@ -160,11 +159,11 @@ public Topology loadTopology() throws TopoException, ResourceAccessException, IO
devices.put(d.getUrn(), d);
for (OscarsOnePort discPort : discDevice.getPorts()) {
Set<Layer> portCaps = new HashSet<>();
for (String capString : discPort.getCapabilities()) {
portCaps.add(Layer.valueOf(capString));
for (OscarsOneCapability os1Cap : discPort.getCapabilities()) {
portCaps.add(Layer.valueOf(os1Cap.toString()));
}
Set<IntRange> portResVlans = new HashSet<>();
for (OscarsOneVlan vlan : discPort.getReservableVlans()) {
for (net.es.topo.common.model.oscars1.IntRange vlan : discPort.getReservableVlans()) {
portResVlans.add(IntRange.builder()
.ceiling(vlan.getCeiling())
.floor(vlan.getFloor())
Expand Down

0 comments on commit cc3f7f9

Please sign in to comment.