gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/OzoneServiceModelGenerator.java [61:79]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public ServiceModel generateService(ApiService service,
                                 ApiServiceConfig serviceConfig,
                                 ApiRole role,
                                 ApiConfigList roleConfig, ApiServiceConfig coreSettingsConfig) throws ApiException {
    String hostname = role.getHostRef().getHostname();

    boolean sslEnabled = Boolean.parseBoolean(getRoleConfigValue(roleConfig, SSL_ENABLED));
    String scheme = sslEnabled ? "https" : "http";

    // Role config properties
    String httpPort = getRoleConfigValue(roleConfig, HTTP_PORT);
    String httpsPort = getRoleConfigValue(roleConfig, HTTPS_PORT);
    ServiceModel model = createServiceModel(String.format(Locale.getDefault(), "%s://%s:%s",
            scheme, hostname, sslEnabled ? httpsPort : httpPort));
    model.addRoleProperty(getRoleType(),SSL_ENABLED, getRoleConfigValue(roleConfig, SSL_ENABLED));
    model.addRoleProperty(getRoleType(),HTTP_PORT, httpPort);
    model.addRoleProperty(getRoleType(),HTTPS_PORT,httpsPort);
    return model;
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/ReconServiceModelGenerator.java [61:79]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public ServiceModel generateService(ApiService service,
                                 ApiServiceConfig serviceConfig,
                                 ApiRole role,
                                 ApiConfigList roleConfig, ApiServiceConfig coreSettingsConfig) throws ApiException {
    String hostname = role.getHostRef().getHostname();

    boolean sslEnabled = Boolean.parseBoolean(getRoleConfigValue(roleConfig, SSL_ENABLED));
    String scheme = sslEnabled ? "https" : "http";

    // Role config properties
    String httpPort = getRoleConfigValue(roleConfig, HTTP_PORT);
    String httpsPort = getRoleConfigValue(roleConfig, HTTPS_PORT);
    ServiceModel model = createServiceModel(String.format(Locale.getDefault(), "%s://%s:%s",
            scheme, hostname, sslEnabled ? httpsPort : httpPort));
    model.addRoleProperty(getRoleType(),SSL_ENABLED, getRoleConfigValue(roleConfig, SSL_ENABLED));
    model.addRoleProperty(getRoleType(),HTTP_PORT, httpPort);
    model.addRoleProperty(getRoleType(),HTTPS_PORT,httpsPort);
    return model;
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



