Skip to content

Commit

Permalink
fix: add missing installation id from legacy node command
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumelamirand committed Apr 5, 2024
1 parent d311e25 commit 44beb7c
Show file tree
Hide file tree
Showing 36 changed files with 37 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<gravitee-bom.version>7.0.19</gravitee-bom.version>
<gravitee-node.version>5.12.2</gravitee-node.version>
<gravitee-alert-api.version>2.0.0</gravitee-alert-api.version>
<gravitee-exchange.version>1.2.1</gravitee-exchange.version>
<gravitee-exchange.version>1.2.3</gravitee-exchange.version>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public String supportType() {

@Override
public Single<BridgeCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.bridge.BridgeCommand command
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.bridge.BridgeCommand> adapt(
final String targetId,
final BridgeCommand command
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.bridge.BridgeReply> adapt(
final String targetId,
final BridgeMultiReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.bridge.BridgeReply> adapt(
final String targetId,
final BridgeSimpleReply reply
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public String supportType() {

@Override
public Single<BridgeReply> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.bridge.BridgeReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<DeployModelCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.designer.DeployModelCommand command
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.designer.DeployModelReply> adapt(
final String targetId,
final DeployModelReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<DisableEnvironmentCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.environment.DisableEnvironmentCommand command
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.environment.DisableEnvironmentReply> adapt(
final String targetId,
final DisableEnvironmentReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<EnvironmentCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.environment.EnvironmentCommand command
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.environment.EnvironmentReply> adapt(
final String targetId,
final EnvironmentReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.node.healthcheck.NodeHealthCheckCommand> adapt(
final String targetId,
final HealthCheckCommand command
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<HealthCheckReply> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.node.healthcheck.NodeHealthCheckReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.hello.HelloCommand> adapt(
final String targetId,
final HelloCommand command
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<HelloReply> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.hello.HelloReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<InstallationCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.installation.InstallationCommand command
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.installation.InstallationReply> adapt(
final String targetId,
final InstallationReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<UnlinkInstallationCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.installation.UnlinkInstallationCommand command
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.installation.UnlinkInstallationReply> adapt(
final String targetId,
final UnlinkInstallationReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<DeleteMembershipCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.membership.DeleteMembershipCommand command
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.membership.DeleteMembershipReply> adapt(
final String targetId,
final DeleteMembershipReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<MembershipCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.membership.MembershipCommand command
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.membership.MembershipReply> adapt(
final String targetId,
final MembershipReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.node.NodeCommand> adapt(
final String targetId,
final NodeCommand command
) {
return Single.just(
new io.gravitee.cockpit.api.command.v1.node.NodeCommand(
command.getId(),
command.getPayload()
command.getPayload().toBuilder().installationId(targetId).build()
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<NodeReply> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.node.NodeReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<DisableOrganizationCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.organization.DisableOrganizationCommand command
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.organization.DisableOrganizationReply> adapt(
final String targetId,
final DisableOrganizationReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<OrganizationCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.organization.OrganizationCommand command
) {
return Single.just(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.organization.OrganizationReply> adapt(
final String targetId,
final OrganizationReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<UserCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.user.UserCommand command
) {
return Single.just(new UserCommand(command.getId(), command.getPayload()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.user.UserReply> adapt(
final String targetId,
final UserReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public String supportType() {

@Override
public Single<V4ApiCommand> adapt(
final String targetId,
final io.gravitee.cockpit.api.command.v1.v4api.V4ApiCommand command
) {
return Single.just(new V4ApiCommand(command.getId(), command.getPayload()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public String supportType() {

@Override
public Single<io.gravitee.cockpit.api.command.v1.v4api.V4ApiReply> adapt(
final String targetId,
final V4ApiReply reply
) {
return Single.fromCallable(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @author Guillaume LAMIRAND (guillaume.lamirand at graviteesource.com)
* @author GraviteeSource Team
*/
@Builder
@Builder(toBuilder = true)
public record NodeCommandPayload(
/*
* The node ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @author Guillaume LAMIRAND (guillaume.lamirand at graviteesource.com)
* @author GraviteeSource Team
*/
@Builder
@Builder(toBuilder = true)
public record NodeHealthCheckCommandPayload(
String nodeId,
String installationId,
Expand Down

0 comments on commit 44beb7c

Please sign in to comment.