浏览代码

create devices on sage without regard for initialization

tags/v0.15.7^0
Jonathan Cobb 4 年前
父节点
当前提交
6912c99341
共有 2 个文件被更改,包括 6 次插入1 次删除
  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 查看文件

@@ -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 查看文件

@@ -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();
}


正在加载...
取消
保存