-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from bf2fc6cc711aee1a0c2a/breaking-api
BREAKING: Add metadata container for the KafkaConnection
- Loading branch information
Showing
11 changed files
with
70 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
source/rhoas/src/main/java/com/openshift/cloud/utils/ConnectionResourcesMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.openshift.cloud.utils; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** Contains generic metadata for the resource connection instances */ | ||
public class ConnectionResourcesMetadata { | ||
|
||
private static final String UI_REF_TEMPLATE = | ||
"https://cloud.redhat.com/beta/application-services/openshift-streams/kafkas/%s"; | ||
|
||
/** | ||
* Contains hardcoded values for all metadata for Kafka specific properties | ||
* | ||
* @param kafkaId | ||
* @return | ||
*/ | ||
public static Map<String, String> buildKafkaMetadata(String kafkaId) { | ||
var map = new HashMap<String, String>(); | ||
map.put("saslMechanism", "PLAIN"); | ||
map.put("securityProtocol", "SASL_SSL"); | ||
map.put("cloudUI", String.format(UI_REF_TEMPLATE, kafkaId)); | ||
map.put("provider", "rhoas"); | ||
map.put("type", "kafka"); | ||
return map; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters