use correct term for token. Similar to mgmt API.
Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -82,7 +82,7 @@ public class AmqpMessageDispatcherService extends BaseAmqpService {
|
|||||||
.getSoftwareModules();
|
.getSoftwareModules();
|
||||||
final DownloadAndUpdateRequest downloadAndUpdateRequest = new DownloadAndUpdateRequest();
|
final DownloadAndUpdateRequest downloadAndUpdateRequest = new DownloadAndUpdateRequest();
|
||||||
downloadAndUpdateRequest.setActionId(targetAssignDistributionSetEvent.getActionId());
|
downloadAndUpdateRequest.setActionId(targetAssignDistributionSetEvent.getActionId());
|
||||||
downloadAndUpdateRequest.setTargetToken(targetAssignDistributionSetEvent.getTargetToken());
|
downloadAndUpdateRequest.setTargetSecurityToken(targetAssignDistributionSetEvent.getTargetToken());
|
||||||
|
|
||||||
for (final org.eclipse.hawkbit.repository.model.SoftwareModule softwareModule : modules) {
|
for (final org.eclipse.hawkbit.repository.model.SoftwareModule softwareModule : modules) {
|
||||||
final SoftwareModule amqpSoftwareModule = convertToAmqpSoftwareModule(controllerId, softwareModule);
|
final SoftwareModule amqpSoftwareModule = convertToAmqpSoftwareModule(controllerId, softwareModule);
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ public class AmqpMessageDispatcherServiceTest extends AbstractIntegrationTestWit
|
|||||||
downloadAndUpdateRequest.getActionId(), Long.valueOf(1));
|
downloadAndUpdateRequest.getActionId(), Long.valueOf(1));
|
||||||
assertEquals("The topic of the event shuold contain DOWNLOAD_AND_INSTALL", EventTopic.DOWNLOAD_AND_INSTALL,
|
assertEquals("The topic of the event shuold contain DOWNLOAD_AND_INSTALL", EventTopic.DOWNLOAD_AND_INSTALL,
|
||||||
sendMessage.getMessageProperties().getHeaders().get(MessageHeaderKey.TOPIC));
|
sendMessage.getMessageProperties().getHeaders().get(MessageHeaderKey.TOPIC));
|
||||||
assertEquals("Security token of target", downloadAndUpdateRequest.getTargetToken(), TEST_TOKEN);
|
assertEquals("Security token of target", downloadAndUpdateRequest.getTargetSecurityToken(), TEST_TOKEN);
|
||||||
|
|
||||||
return downloadAndUpdateRequest;
|
return downloadAndUpdateRequest;
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class DownloadAndUpdateRequest {
|
|||||||
private Long actionId;
|
private Long actionId;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private String targetToken;
|
private String targetSecurityToken;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private final List<SoftwareModule> softwareModules = new LinkedList<>();
|
private final List<SoftwareModule> softwareModules = new LinkedList<>();
|
||||||
@@ -40,12 +40,12 @@ public class DownloadAndUpdateRequest {
|
|||||||
this.actionId = correlator;
|
this.actionId = correlator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTargetToken() {
|
public String getTargetSecurityToken() {
|
||||||
return targetToken;
|
return targetSecurityToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTargetToken(final String targetToken) {
|
public void setTargetSecurityToken(final String targetSecurityToken) {
|
||||||
this.targetToken = targetToken;
|
this.targetSecurityToken = targetSecurityToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SoftwareModule> getSoftwareModules() {
|
public List<SoftwareModule> getSoftwareModules() {
|
||||||
|
|||||||
Reference in New Issue
Block a user