Esempio n. 1
0
 @JsonIgnore
 @Override
 public void afterFromProto(Message proto) {
   subnetPrefix = subnetAddress.getAddress().toString();
   subnetLength = subnetAddress.getPrefixLen();
   if (dnsServerAddrs != null && dnsServerAddrs.isEmpty()) {
     dnsServerAddrs = null;
   }
 }
Esempio n. 2
0
 @JsonIgnore
 public void update(DhcpSubnet from) {
   id = from.id;
   subnetAddress = IPSubnet.fromString(subnetPrefix + "/" + subnetLength);
   bridgeId = from.bridgeId;
   dhcpHosts = from.dhcpHosts;
 }
Esempio n. 3
0
 @JsonIgnore
 public void create(UUID bridgeId) {
   if (null == id) {
     id = UUID.randomUUID();
   }
   this.bridgeId = bridgeId;
   subnetAddress = IPSubnet.fromString(subnetPrefix + "/" + subnetLength);
 }
Esempio n. 4
0
 @Override
 public URI getUri() {
   return absoluteUri(
       ResourceUris.BRIDGES, bridgeId, ResourceUris.DHCP, subnetAddress.toZkString());
 }