Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to odlparent 13.1.2 versions #1876

Merged
merged 8 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ do \
assertHttpStatusCode $(curl -o /dev/null -s -w "%{http_code} GET %{url_effective}\n" --user admin:admin -H "Content-Type: application/json" --insecure http://$pod_controller_ip:8558/cluster/members) \
;done
sleep 1
: ' FIXME uncomment this after NETCONF-1285 is resolved

#Pods healthcheck (:8888/restconf/operations)

for pod_controller_ip in $POD_CONTROLLER_IPS; \
Expand All @@ -100,7 +100,7 @@ sleep 1

#Service healthcheck (:30888/restconf/operations)
assertHttpStatusCode $(curl -o /dev/null -s -w "%{http_code} GET %{url_effective}\n" --user admin:admin -H "Content-Type: application/json" --insecure http://$MINIKUBE_IP:$CONTROLLER_PORT/restconf/operations)
'

# add gNMI node into gNMI topology
assertHttpStatusCode $(curl -X PUT -o /dev/null -s -w "%{http_code} PUT %{url_effective}\n" \
http://"$MINIKUBE_IP":$CONTROLLER_PORT/restconf/data/network-topology:network-topology/topology=gnmi-topology/node=node-"${MINIKUBE_IP//.}" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ do \
"http://$pod_controller_ip:8558/cluster/members")" \
;done
validateTestStatus
: ' FIXME uncomment this after NETCONF-1285 is resolved

# Pods health check (:8888/restconf/operations)
for pod_controller_ip in $POD_CONTROLLER_IPS; \
do \
assertHttpStatusCode "$(curl -o /dev/null -s -w "%{http_code} GET %{url_effective}\n" \
-H "Content-Type: application/json" \
"http://$pod_controller_ip:$CONTROLLER_PORT/restconf/operations")" \
;done
'

# Add node into topology
assertHttpStatusCode "$(curl -X PUT -o /dev/null -s -w "%{http_code} PUT %{url_effective}\n" \
"http://$CTRL0_IP:$CONTROLLER_PORT/restconf/data/network-topology:network-topology/topology=topology-netconf/node=node-${SIMULATOR_IP//.}" \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lighty-rnc-app/tests-lighty-rnc-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ do \
assertHttpStatusCode $(curl -o /dev/null -s -w "%{http_code} GET %{url_effective}\n" --user admin:admin -H "Content-Type: application/json" --insecure http://$pod_controller_ip:8558/cluster/members) \
;done
sleep 1
: ' FIXME uncomment this after NETCONF-1285 is resolved

# Pods healthcheck (:8888/restconf/operations)

for pod_controller_ip in $POD_CONTROLLER_IPS; \
Expand All @@ -92,7 +92,7 @@ sleep 1
# Service healthcheck (:30888/restconf/operations)
assertHttpStatusCode $(curl -o /dev/null -s -w "%{http_code} GET %{url_effective}\n" --user admin:admin -H "Content-Type: application/json" --insecure http://$MINIKUBE_IP:$CONTROLLER_PORT/restconf/operations)
sleep 1
'

# add node into topology
assertHttpStatusCode $(curl -X PUT -o /dev/null -s -w "%{http_code} PUT %{url_effective}\n" http://"$MINIKUBE_IP":$CONTROLLER_PORT/restconf/data/network-topology:network-topology/topology=topology-netconf/node=node-"${SIMULATOR_IP//.}" \
-H 'Content-Type: application/json' \
Expand Down
16 changes: 8 additions & 8 deletions lighty-core/dependency-versions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dependency>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
<version>13.0.11</version>
<version>13.1.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -34,49 +34,49 @@
<dependency>
<groupId>org.opendaylight.aaa</groupId>
<artifactId>aaa-artifacts</artifactId>
<version>0.19.3</version>
<version>0.19.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>controller-artifacts</artifactId>
<version>9.0.2</version>
<version>9.0.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.infrautils</groupId>
<artifactId>infrautils-artifacts</artifactId>
<version>6.0.6</version>
<version>6.0.8</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-artifacts</artifactId>
<version>13.0.1</version>
<version>13.0.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-artifacts</artifactId>
<version>7.0.4</version>
<version>7.0.5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yangtools-artifacts</artifactId>
<version>13.0.2</version>
<version>13.0.5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.bgpcep</groupId>
<artifactId>bgpcep-artifacts</artifactId>
<version>0.21.4</version>
<version>0.21.5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions lighty-core/lighty-binding-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
<plugin>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-maven-plugin</artifactId>
<version>13.0.2</version>
<version>13.0.5</version>
<dependencies>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-java-api-generator</artifactId>
<version>13.0.1</version>
<version>13.0.3</version>
</dependency>
</dependencies>
<executions>
Expand Down
4 changes: 2 additions & 2 deletions lighty-core/lighty-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
<dependency>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>checkstyle</artifactId>
<version>13.0.11</version>
<version>13.1.2</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -220,7 +220,7 @@
<dependency>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>spotbugs</artifactId>
<version>13.0.11</version>
<version>13.1.2</version>
</dependency>
<!-- The SpotBugs Maven plugin uses SLF4J-2 -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import org.opendaylight.mdsal.dom.api.DOMActionImplementation;
import org.opendaylight.mdsal.dom.api.DOMActionResult;
import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
import org.opendaylight.mdsal.dom.spi.SimpleDOMActionResult;
import org.opendaylight.mdsal.dom.api.DOMRpcResult;
import org.opendaylight.mdsal.dom.spi.DefaultDOMRpcResult;
import org.opendaylight.yang.gen.v1.urn.example.data.center.rev180807.device.StartInput;
import org.opendaylight.yang.gen.v1.urn.example.data.center.rev180807.device.StartOutput;
import org.opendaylight.yangtools.yang.common.QName;
Expand All @@ -30,11 +30,11 @@ public final class DeviceStartActionImpl implements DOMActionImplementation {
private static final QName OUTPUT_LEAF_QNAME = QName.create(StartOutput.QNAME, "start-finished-at").intern();

@Override
public ListenableFuture<? extends DOMActionResult> invokeAction(final Absolute type,
public ListenableFuture<? extends DOMRpcResult> invokeAction(final Absolute type,
final DOMDataTreeIdentifier path, final ContainerNode input) {
final var inputValue = input.findChildByArg(NodeIdentifier.create(INPUT_LEAF_QNAME))
.map(NormalizedNode::body).orElseThrow();
return Futures.immediateFuture(new SimpleDOMActionResult(ImmutableNodes.newContainerBuilder()
return Futures.immediateFuture(new DefaultDOMRpcResult(ImmutableNodes.newContainerBuilder()
.withNodeIdentifier(NodeIdentifier.create(StartOutput.QNAME))
.withChild(ImmutableNodes.newLeafBuilder().withNodeIdentifier(NodeIdentifier.create(OUTPUT_LEAF_QNAME))
.withValue(inputValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@ public void simpleApplicationTest() throws Exception {
}
]
}""");
/* FIXME uncomment this after NETCONF-1285 is resolved
operations = restClient.GET("restconf/operations");
assertEquals(operations.statusCode(), 200);
*/
operations = restClient.GET("restconf/data/network-topology:network-topology?content=config");
assertEquals(operations.statusCode(), 200);
operations = restClient.GET("restconf/data/network-topology:network-topology?content=nonconfig");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ public void simpleApplicationTest() throws IOException, InterruptedException {
]
}""");

/* FIXME uncomment this after NETCONF-1285 is resolved
operations = restClient.GET("rests/operations");
Assert.assertEquals(operations.statusCode(), 200);
*/
operations = restClient.GET("rests/data/network-topology:network-topology?content=config");
Assert.assertEquals(operations.statusCode(), 200);
operations = restClient.GET("rests/data/network-topology:network-topology?content=nonconfig");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.opendaylight.aaa.api.password.service.PasswordHashService;
import org.opendaylight.aaa.cert.api.ICertificateManager;
import org.opendaylight.aaa.datastore.h2.H2Store;
import org.opendaylight.aaa.datastore.h2.H2TokenStore;
import org.opendaylight.aaa.datastore.h2.IdmLightConfig;
import org.opendaylight.aaa.datastore.h2.IdmLightConfigBuilder;
import org.opendaylight.aaa.datastore.h2.IdmLightSimpleConnectionProvider;
Expand Down Expand Up @@ -69,7 +68,6 @@ public final class AAALightyShiroProvider {
private final ShiroConfiguration shiroConfiguration;
private final AuthenticationService authenticationService;
private final DefaultPasswordHashService defaultPasswordHashService;
private final H2TokenStore tokenStore;
private TokenAuthenticators tokenAuthenticators;
private CredentialAuth<PasswordCredentials> credentialAuth;
private ClaimCache claimCache;
Expand Down Expand Up @@ -99,12 +97,9 @@ private AAALightyShiroProvider(final DataBroker dataBroker,
"SHA-512").setIterations(20000).build();
this.defaultPasswordHashService = new DefaultPasswordHashService(passwordServiceConfig);
iidmStore = new H2Store(new IdmLightSimpleConnectionProvider(config), defaultPasswordHashService);
this.tokenStore = new H2TokenStore(datastoreConfig.getTimeToLive().longValue(),
datastoreConfig.getTimeToWait().longValue());
} else {
this.defaultPasswordHashService = null;
iidmStore = null;
this.tokenStore = null;
LOG.info("AAA Datastore has not been initialized");
return;
}
Expand Down Expand Up @@ -149,7 +144,6 @@ private void initAAAonServer(final LightyServerBuilder server) {
certificateManager,
authenticationService,
tokenAuthenticators,
tokenStore,
passwordHashService,
new JerseyServletSupport());

Expand Down Expand Up @@ -218,10 +212,6 @@ public TokenAuthenticators getTokenAuthenticators() {
return this.tokenAuthenticators;
}

public H2TokenStore getTokenStore() {
return tokenStore;
}

public DefaultPasswordHashService getDefaultPasswordHashService() {
return defaultPasswordHashService;
}
Expand Down Expand Up @@ -255,9 +245,6 @@ public void close() {
handler.destroy();
}
});
if (this.tokenStore != null) {
this.tokenStore.close();
}
}

private static TokenAuthenticators buildTokenAuthenticators(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
Expand Down Expand Up @@ -47,6 +48,7 @@ public void topLevelElementTest() throws Exception {
assertUpdateEquals(prepared.getValue(), result);
}

@Disabled("Disabled until YANGTOOLS-1575 is resolved")
@Test
public void listEntryCase() throws Exception {
final Map.Entry<ImmutablePair<YangInstanceIdentifier, NormalizedNode>, Gnmi.Update> prepared =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.json.JSONException;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.skyscreamer.jsonassert.JSONAssert;
import org.slf4j.Logger;
Expand Down Expand Up @@ -638,7 +639,7 @@ public void crudComplexAugmentedValue() throws ExecutionException, InterruptedEx
assertThrows(ExecutionException.class, () -> sessionProvider.getGnmiSession().get(getRequest).get());
}


@Disabled("Disabled until YANGTOOLS-1575 is resolved")
@Test
public void getListEntryTest() throws ExecutionException, InterruptedException, IOException, JSONException {
final Gnmi.Path path = Gnmi.Path.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.skyscreamer.jsonassert.JSONAssert;
import org.slf4j.Logger;
Expand Down Expand Up @@ -162,6 +163,7 @@ public void getLeafIdentityRefTest() throws InterruptedException, IOException, J
assertEquals(OC_INTERFACE_ETH3_CONFIG_TYPE_EXPECTED, ocInterfaceEth3ConfigType);
}

@Disabled("Disabled until YANGTOOLS-1575 is resolved")
@Test
public void getListEntryTest() throws InterruptedException, IOException, JSONException {
//assert list entry in openconfig-interfaces - interface - eth3, and also if it is only one with that key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.skyscreamer.jsonassert.JSONAssert;
import org.slf4j.Logger;
Expand Down Expand Up @@ -152,6 +153,7 @@ public void setContainerTest() throws InterruptedException, IOException, JSONExc
restoreDeviceToOriginalState();
}

@Disabled("Disabled until YANGTOOLS-1575 is resolved")
@Test
public void setAugmentedInterfaceListFromOuterModelTest() throws Exception {
final String payload = getAugmentedTestInterfaceBody();
Expand Down Expand Up @@ -269,6 +271,7 @@ public void deleteLeafTest() throws InterruptedException, IOException, JSONExcep
restoreDeviceToOriginalState();
}

@Disabled("Disabled until YANGTOOLS-1575 is resolved")
@Test
public void setSimpleListEntryTest() throws IOException, InterruptedException, JSONException {
// Set simple list with
Expand Down Expand Up @@ -355,6 +358,7 @@ public void setNestedListInWrongWayTest() throws IOException, InterruptedExcepti
assertEquals(HttpURLConnection.HTTP_INTERNAL_ERROR, nestedListResponse.statusCode());
}

@Disabled("Disabled until YANGTOOLS-1575 is resolved")
@Test
public void setNestedListTest() throws IOException, InterruptedException, JSONException {
// Create data in base list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.SettableFuture;
import java.util.Set;
import org.opendaylight.mdsal.dom.api.DOMActionResult;
import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
import org.opendaylight.mdsal.dom.spi.SimpleDOMActionResult;
import org.opendaylight.mdsal.dom.api.DOMRpcResult;
import org.opendaylight.mdsal.dom.spi.DefaultDOMRpcResult;
import org.opendaylight.netconf.api.messages.NetconfMessage;
import org.opendaylight.netconf.client.mdsal.api.ActionTransformer;
import org.opendaylight.netconf.client.mdsal.api.RemoteDeviceCommunicator;
Expand All @@ -41,10 +41,10 @@ public LightyDOMActionService(final ActionTransformer messageTransformer,
}

@Override
public ListenableFuture<? extends DOMActionResult> invokeAction(final Absolute type,
public ListenableFuture<? extends DOMRpcResult> invokeAction(final Absolute type,
final DOMDataTreeIdentifier path, final ContainerNode input) {
final NetconfMessage actionRequest = this.messageTransformer.toActionRequest(type, path, input);
final SettableFuture<DOMActionResult> settableFuture = SettableFuture.create();
final SettableFuture<DOMRpcResult> settableFuture = SettableFuture.create();
final ListenableFuture<RpcResult<NetconfMessage>> responseFuture = this.communicator.sendRequest(actionRequest,
type.lastNodeIdentifier());
Futures.addCallback(responseFuture, new FutureCallback<RpcResult<NetconfMessage>>() {
Expand All @@ -53,18 +53,18 @@ public ListenableFuture<? extends DOMActionResult> invokeAction(final Absolute t
public void onSuccess(final RpcResult<NetconfMessage> result) {
Preconditions.checkNotNull(result);
if (result.getErrors().isEmpty()) {
final DOMActionResult actionResult = LightyDOMActionService.this.messageTransformer.toActionResult(
final DOMRpcResult actionResult = LightyDOMActionService.this.messageTransformer.toActionResult(
type, result.getResult());
settableFuture.set(actionResult);
} else {
final SimpleDOMActionResult simpleDOMActionResult = new SimpleDOMActionResult(result.getErrors());
final DefaultDOMRpcResult simpleDOMActionResult = new DefaultDOMRpcResult(result.getErrors());
settableFuture.set(simpleDOMActionResult);
}
}

@Override
public void onFailure(final Throwable cause) {
settableFuture.set(new SimpleDOMActionResult(Set.of(new ActionRpcError(cause))));
settableFuture.set(new DefaultDOMRpcResult(Set.of(new ActionRpcError(cause))));
}
}, MoreExecutors.directExecutor());
return settableFuture;
Expand Down
Loading
Loading