Commit 7aca1ca9 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Add "unreachable_or_addresses" field.

Implements #21637.
parent 0c9e9b81
......@@ -5,6 +5,8 @@
- Skip unrecognized descriptors when importing archives rather than
aborting the entire import.
- Add new "host_name" parameter to filter by host name.
- Add new "unreachable_or_addresses" field with declared but
unreachable OR addresses.
# Changes in version 4.2-1.6.1 - 2017-10-26
......
......@@ -473,5 +473,15 @@ public class DetailsDocument extends Document {
public Boolean getMeasured() {
return this.measured;
}
private List<String> unreachable_or_addresses;
public void setUnreachableOrAddresses(List<String> unreachableOrAddresses) {
this.unreachable_or_addresses = unreachableOrAddresses;
}
public List<String> getUnreachableOrAddresses() {
return this.unreachable_or_addresses;
}
}
......@@ -530,5 +530,15 @@ public class DetailsStatus extends Document {
public String getHostName() {
return unescapeJson(this.host_name);
}
private List<String> advertised_or_addresses;
public void setAdvertisedOrAddresses(List<String> advertisedOrAddresses) {
this.advertised_or_addresses = advertisedOrAddresses;
}
public List<String> getAdvertisedOrAddresses() {
return this.advertised_or_addresses;
}
}
......@@ -199,6 +199,7 @@ public class NodeDetailsStatusUpdater implements DescriptorListener,
}
detailsStatus.setHibernating(descriptor.isHibernating() ? true :
null);
detailsStatus.setAdvertisedOrAddresses(descriptor.getOrAddresses());
this.documentStore.store(detailsStatus, fingerprint);
}
......
......@@ -155,6 +155,16 @@ public class DetailsDocumentWriter implements DocumentWriter {
exitAddressesWithoutOrAddresses));
}
detailsDocument.setMeasured(detailsStatus.getMeasured());
List<String> unreachableOrAddresses = new ArrayList<>();
if (null != detailsStatus.getAdvertisedOrAddresses()) {
unreachableOrAddresses.addAll(detailsStatus.getAdvertisedOrAddresses());
}
if (null != detailsStatus.getOrAddressesAndPorts()) {
unreachableOrAddresses.removeAll(detailsStatus.getOrAddressesAndPorts());
}
if (!unreachableOrAddresses.isEmpty()) {
detailsDocument.setUnreachableOrAddresses(unreachableOrAddresses);
}
this.documentStore.store(detailsDocument, fingerprint);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment