org.apache.brooklyn.location.winrm.WinRmMachineLocation.getConfig()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.apache.brooklyn.location.winrm.WinRmMachineLocation.getConfig()方法的一些代码示例,展示了WinRmMachineLocation.getConfig()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WinRmMachineLocation.getConfig()方法的具体详情如下:
包路径:org.apache.brooklyn.location.winrm.WinRmMachineLocation
类名称:WinRmMachineLocation
方法名:getConfig

WinRmMachineLocation.getConfig介绍

暂无

代码示例

代码示例来源:origin: org.apache.brooklyn/brooklyn-software-winrm

@Override
public InetAddress getAddress() {
  return getConfig(ADDRESS);
}

代码示例来源:origin: org.apache.brooklyn/brooklyn-software-winrm

private int getDefaultPort() {
  return getConfig(USE_HTTPS_WINRM) ? 5986 : 5985;
}

代码示例来源:origin: org.apache.brooklyn/brooklyn-software-winrm

@Override
public Set<String> getPrivateAddresses() {
  Iterable<String> result = getConfig(PRIVATE_ADDRESSES);
  return (result == null) ? ImmutableSet.<String>of() : ImmutableSet.copyOf(result);
}

代码示例来源:origin: org.apache.brooklyn/brooklyn-software-winrm

@Override
public void init() {
  super.init();
  // Register any pre-existing port-mappings with the PortForwardManager
  Map<Integer, String> tcpPortMappings = getConfig(TCP_PORT_MAPPINGS);
  if (tcpPortMappings != null) {
    PortForwardManager pfm = (PortForwardManager) getManagementContext().getLocationRegistry().getLocationManaged(PortForwardManagerLocationResolver.PFM_GLOBAL_SPEC);
    for (Map.Entry<Integer, String> entry : tcpPortMappings.entrySet()) {
      int targetPort = entry.getKey();
      HostAndPort publicEndpoint = HostAndPort.fromString(entry.getValue());
      if (!publicEndpoint.hasPort()) {
        throw new IllegalArgumentException("Invalid portMapping ('"+entry.getValue()+"') for port "+targetPort+" in machine "+this);
      }
      pfm.associate(publicEndpoint.getHostText(), publicEndpoint, this, targetPort);
    }
  }
}

代码示例来源:origin: org.apache.brooklyn/brooklyn-camp

private void assertMachine(WinRmMachineLocation machine, UserAndHostAndPort conn, Map<String, ?> config) {
  assertEquals(machine.getAddress().getHostAddress(), conn.getHostAndPort().getHostText());
  assertEquals(machine.getPort(), conn.getHostAndPort().getPort());
  assertEquals(machine.getUser(), conn.getUser());
  for (Map.Entry<String, ?> entry : config.entrySet()) {
    Object actualVal = machine.getConfig(ConfigKeys.newConfigKey(Object.class, entry.getKey()));
    assertEquals(actualVal, entry.getValue());
  }
}

代码示例来源:origin: org.apache.brooklyn/brooklyn-software-winrm

args.configure(WinRmTool.USE_NTLM, getConfig(WinRmMachineLocation.USE_NTLM));
args.configure(WinRmTool.PROP_PORT, getPort());

相关文章