Ver a proveniência

create devices on sage without regard for initialization

tags/v0.15.7^0
Jonathan Cobb há 4 anos
ascendente
cometimento
6912c99341
2 ficheiros alterados com 6 adições e 1 eliminações
  1. +1
    -1
      bubble-server/src/main/java/bubble/dao/device/DeviceDAO.java
  2. +5
    -0
      bubble-server/src/main/java/bubble/server/BubbleConfiguration.java

+ 1
- 1
bubble-server/src/main/java/bubble/dao/device/DeviceDAO.java Ver ficheiro

@@ -67,7 +67,7 @@ public class DeviceDAO extends AccountOwnedEntityDAO<Device> {

@Transactional
@Override public Device create(@NonNull final Device device) {
if (isRawMode() || device.uninitialized() || device.getDeviceType().isNonVpnDevice()) {
if (isRawMode() || device.uninitialized() || device.getDeviceType().isNonVpnDevice() || configuration.isSage()) {
return super.create(device);
}



+ 5
- 0
bubble-server/src/main/java/bubble/server/BubbleConfiguration.java Ver ficheiro

@@ -140,6 +140,11 @@ public class BubbleConfiguration extends PgRestServerConfiguration
return isSelfSage() || !hasSageNode();
}

@JsonIgnore @Transient public boolean isSage() {
final BubbleNetwork thisNetwork = getThisNetwork();
return thisNetwork != null && thisNetwork.getInstallType() == AnsibleInstallType.sage;
}

@JsonIgnore @Transient public synchronized BubbleNetwork getThisNetwork () {
return getBean(StandardSelfNodeService.class).getThisNetwork();
}


Carregando…
Cancelar
Guardar