Skip to content

Commit

Permalink
Merge branch 'release-1.111.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitamarchenko committed Jan 10, 2022
2 parents 74fe625 + 7c20a8a commit 09f7688
Show file tree
Hide file tree
Showing 342 changed files with 12,543 additions and 2,891 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## v1.111.0 (04/01/2022)

### Features:
- [#4627](https://github.com/telstra/open-kilda/pull/4627) Rule Manager Floodlight integration [**floodlight**]
- [#4635](https://github.com/telstra/open-kilda/pull/4635) Implement YFlow validation feature
- [#4636](https://github.com/telstra/open-kilda/pull/4636) Add Rule Manager to Y-Flow FSMs (Issue: [#4632](https://github.com/telstra/open-kilda/issues/4632)) [**floodlight**]

### Bug Fixes:
- [#4631](https://github.com/telstra/open-kilda/pull/4631) Fix null pointer into flowmonitoring flow cache init
- [#4639](https://github.com/telstra/open-kilda/pull/4639) Fix incorrect JSON deserialization. [**storm-topologies**]
- [#4641](https://github.com/telstra/open-kilda/pull/4641) Fix speaker response timeout handling for y-flow reroute operation

### Improvements:
- [#4620](https://github.com/telstra/open-kilda/pull/4620) [test] fix getActiveServer42Switches [**tests**]
- [#4626](https://github.com/telstra/open-kilda/pull/4626) Upgrade log4j dependency version to mitigate log4shell
- [#4632](https://github.com/telstra/open-kilda/pull/4632) Introduce real staged execution in floodlight [**floodlight**]
- [#4633](https://github.com/telstra/open-kilda/pull/4633) Reconfigure switch connections transaction retry policy [**storm-topologies**]
- [#4634](https://github.com/telstra/open-kilda/pull/4634) fix restoring swProps in ConfigurationSpec [**tests**]
- [#4637](https://github.com/telstra/open-kilda/pull/4637) improve defaultRuleSpec(temporary add sleep) [**tests**]
- [#4638](https://github.com/telstra/open-kilda/pull/4638) Of match converter [**floodlight**]
- [#4642](https://github.com/telstra/open-kilda/pull/4642) [test] ignore validateSwitch in yflow specs [**tests**]

### Other changes:
- [#4621](https://github.com/telstra/open-kilda/pull/4621) Extend stats topology by adding support for y-flow objects set [**storm-topologies**]
- [#4595](https://github.com/telstra/open-kilda/pull/4595) Initial commit of y-flow tests prototypes [**tests**]

For the complete list of changes, check out [the commit log](https://github.com/telstra/open-kilda/compare/v1.110.0...v1.111.0).

### Affected Components:
stats, flow-monitor, network, fl, flow-hs


## v1.110.0 (21/12/2021)

### Features:
Expand Down
2 changes: 2 additions & 0 deletions docker/opentsdb/conf/opentsdb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ tsd.storage.hbase.zk_quorum = zookeeper.pendev:2181
# Whether or not to enable incoming chunk support for the HTTP RPC
tsd.http.request.enable_chunked = true
tsd.http.request.max_chunk = 16384

tsd.storage.max_tags = 12
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@
* limitations under the License.
*/

package org.openkilda.wfm.topology.stats.model;
package org.openkilda.messaging.payload.yflow;

import org.openkilda.model.MeterId;
import org.openkilda.model.SwitchId;

import lombok.NonNull;
import lombok.Value;

import java.io.Serializable;

@Value
public class FlowCacheEntry implements Serializable {
@NonNull
String flowId;
long cookie;
@NonNull
MeasurePoint measurePoint;
public class YFlowEndpointResources implements Serializable {
SwitchId switchId;
MeterId meterId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,14 @@ public static String getParentKey(String key) {
}
return key;
}

/**
* Get child key.
*/
public static String getChildKey(String key) {
if (key.contains(SEPARATOR)) {
return key.substring(0, key.indexOf(SEPARATOR));
}
return key;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ public List<SimpleSwitchRule> convertFlowPathToSimpleSwitchRules(Flow flow, Flow
return rules;
}

private List<SimpleSwitchRule> buildIngressSimpleSwitchRules(Flow flow, FlowPath flowPath,
/**
* Build ingress rules ({@link SimpleSwitchRule}) for provided {@link FlowPath}.
*/
public List<SimpleSwitchRule> buildIngressSimpleSwitchRules(Flow flow, FlowPath flowPath,
EncapsulationId encapsulationId,
long flowMeterMinBurstSizeInKbits,
double flowMeterBurstCoefficient) {
Expand Down Expand Up @@ -194,7 +197,10 @@ private List<SimpleSwitchRule> buildTransitAndEgressSimpleSwitchRules(Flow flow,
return rules;
}

private SimpleSwitchRule buildTransitSimpleSwitchRule(Flow flow, FlowPath flowPath,
/**
* Build transit rule ({@link SimpleSwitchRule}) between the segments of provided {@link FlowPath}.
*/
public SimpleSwitchRule buildTransitSimpleSwitchRule(Flow flow, FlowPath flowPath,
PathSegment srcPathSegment, PathSegment dstPathSegment,
EncapsulationId encapsulationId) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
public class TestFlowBuilder {

private String flowId = UUID.randomUUID().toString();
private String yFlowId = null;
@Setter(AccessLevel.NONE)
private final Endpoint source = new Endpoint();
private int srcVlan;
Expand All @@ -63,7 +64,7 @@ public class TestFlowBuilder {
private int destVlan;
private final List<Endpoint> transit = new ArrayList<>();
private final List<Endpoint> protectedTransit = new ArrayList<>();
private long unmaskedCookie = 1;
private long unmaskedCookie = 1; // TODO(surabujin): must be named "effectiveFlowId"
private long protectedUnmaskedCookie = 2;
private long bandwidth;
private boolean ignoreBandwidth = false;
Expand Down Expand Up @@ -148,6 +149,7 @@ public Flow build() {

Flow flow = Flow.builder()
.flowId(flowId)
.yFlowId(yFlowId)
.srcSwitch(srcSwitch)
.srcPort(source.port)
.srcVlan(srcVlan)
Expand Down Expand Up @@ -272,7 +274,7 @@ private EncapsulationResources buildEncapsulationResources(PathId pathId, int en
@Data
@AllArgsConstructor
@NoArgsConstructor
private class Endpoint {
private static class Endpoint {
Switch sw;
int port;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
/* Copyright 2021 Telstra Open Source
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.openkilda.wfm.share.yflow;

import static com.google.common.base.Preconditions.checkArgument;

import org.openkilda.model.FlowEncapsulationType;
import org.openkilda.model.FlowStatus;
import org.openkilda.model.MeterId;
import org.openkilda.model.PathComputationStrategy;
import org.openkilda.model.SwitchId;
import org.openkilda.model.YFlow;
import org.openkilda.model.YSubFlow;

import lombok.AccessLevel;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.Instant;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;

@Setter
@Accessors(fluent = true)
public class TestYFlowBuilder {
private String yFlowId = UUID.randomUUID().toString();

private YFlow.SharedEndpoint sharedEndpoint;
private MeterId sharedEndpointMeterId;

private SwitchId yPoint;
private MeterId meterId;

private SwitchId protectedPathYPoint;
private MeterId protectedPathMeterId;

private long maximumBandwidth;
private boolean ignoreBandwidth;
private boolean strictBandwidth;
private String description;
private boolean periodicPings;
private FlowEncapsulationType encapsulationType;
private FlowStatus status;
private Long maxLatency;
private Long maxLatencyTier2;
private Integer priority;
private Instant timeCreate;
private Instant timeModify;
private boolean pinned;
private PathComputationStrategy pathComputationStrategy;

@Setter(AccessLevel.NONE)
private List<TestYSubFlowBuilder> subFlows = new ArrayList<>();

public TestYFlowBuilder subFlow(TestYSubFlowBuilder subFlowBuilder) {
subFlows.add(subFlowBuilder);
return this;
}

/**
* Build {@link YFlow} instance.
*/
public YFlow build() {
boolean allocateProtectedPath = false;
if (protectedPathYPoint != null || protectedPathMeterId != null) {
checkArgument(
protectedPathYPoint != null && protectedPathMeterId != null,
"Insufficient data provided to make YFlow with protected path");
allocateProtectedPath = true;
}

YFlow.YFlowBuilder yFlowBuilder = YFlow.builder()
.yFlowId(yFlowId)
.sharedEndpoint(sharedEndpoint)
.sharedEndpointMeterId(sharedEndpointMeterId)
.yPoint(yPoint)
.meterId(meterId)
.allocateProtectedPath(allocateProtectedPath)
.maximumBandwidth(maximumBandwidth)
.ignoreBandwidth(ignoreBandwidth)
.strictBandwidth(strictBandwidth)
.description(description)
.periodicPings(periodicPings)
.encapsulationType(encapsulationType)
.status(status)
.maxLatency(maxLatency)
.maxLatencyTier2(maxLatencyTier2)
.priority(priority)
.pinned(pinned)
.pathComputationStrategy(pathComputationStrategy);
if (allocateProtectedPath) {
yFlowBuilder = yFlowBuilder
.protectedPathYPoint(protectedPathYPoint)
.protectedPathMeterId(protectedPathMeterId);
}

YFlow yFlow = yFlowBuilder.build();

Set<YSubFlow> subFlowsGoal = new HashSet<>();
for (TestYSubFlowBuilder subFlowBuilder : subFlows) {
subFlowsGoal.add(subFlowBuilder
.yFlow(yFlow)
.build());
}
yFlow.setSubFlows(subFlowsGoal);

yFlow.setTimeCreate(timeCreate);
yFlow.setTimeModify(timeModify);

return yFlow;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/* Copyright 2021 Telstra Open Source
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.openkilda.wfm.share.yflow;

import static com.google.common.base.Preconditions.checkArgument;

import org.openkilda.model.Flow;
import org.openkilda.model.FlowEndpoint;
import org.openkilda.model.YFlow;
import org.openkilda.model.YSubFlow;

import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.Instant;

@Setter
@Accessors(fluent = true)
public class TestYSubFlowBuilder {
private YFlow yFlow;
private Flow flow;
private int sharedEndpointVlan;
private int sharedEndpointInnerVlan;

private FlowEndpoint endpoint;

private Instant timeCreate;
private Instant timeModify;

/**
* Build {@link YSubFlow} instance.
*/
public YSubFlow build() {
checkArgument(endpoint != null, "YSubFlow endpoint must be defined");

YSubFlow subFlow = YSubFlow.builder()
.yFlow(yFlow)
.flow(flow)
.sharedEndpointVlan(sharedEndpointVlan)
.sharedEndpointInnerVlan(sharedEndpointInnerVlan)
.endpointSwitchId(endpoint.getSwitchId())
.endpointPort(endpoint.getPortNumber())
.endpointVlan(endpoint.getOuterVlanId())
.endpointInnerVlan(endpoint.getInnerVlanId())
.build();

subFlow.setTimeCreate(timeCreate);
subFlow.setTimeModify(timeModify);

return subFlow;
}
}
1 change: 1 addition & 0 deletions src-java/floodlight-service/floodlight-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
description = 'Floodlight Service API'
dependencies {
api project(':base-messaging')
implementation project(':rule-manager-api')

implementation 'com.fasterxml.jackson.core:jackson-core'
implementation 'com.fasterxml.jackson.core:jackson-annotations'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright 2021 Telstra Open Source
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.openkilda.floodlight.api;

import org.openkilda.floodlight.api.request.rulemanager.DeleteSpeakerCommandsRequest;
import org.openkilda.floodlight.api.request.rulemanager.InstallSpeakerCommandsRequest;

public interface BatchCommandProcessor {

void processBatchInstall(InstallSpeakerCommandsRequest request, String key);

void processBatchDelete(DeleteSpeakerCommandsRequest request, String key);


}
Loading

0 comments on commit 09f7688

Please sign in to comment.