use of org.bf2.cos.fleet.manager.model.ConnectorDeploymentSpec in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class ConnectorTestSupport method createDeployment.
public static ConnectorDeployment createDeployment(long deploymentRevision, Supplier<JsonNode> connectorSpec, Supplier<JsonNode> connectorMeta) {
final String deploymentId = "did";
final String connectorId = "cid";
final String connectorTypeId = "ctid";
return new ConnectorDeployment().kind("ConnectorDeployment").id(deploymentId).metadata(new ConnectorDeploymentAllOfMetadata().resourceVersion(deploymentRevision)).spec(new ConnectorDeploymentSpec().connectorId(connectorId).connectorTypeId(connectorTypeId).connectorResourceVersion(1L).kafka(new KafkaConnectionSettings().url("kafka.acme.com:2181")).schemaRegistry(new SchemaRegistryConnectionSettings().url("schemaregistry.acme.com:2282")).serviceAccount(new ServiceAccount().clientId(UUID.randomUUID().toString()).clientSecret(toBase64(UUID.randomUUID().toString()))).connectorSpec(connectorSpec.get()).shardMetadata(connectorMeta.get()).desiredState(DESIRED_STATE_READY));
}
use of org.bf2.cos.fleet.manager.model.ConnectorDeploymentSpec in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class SyncTestSupport method deployment.
public static ConnectorDeployment deployment(String name, long revision, Consumer<ConnectorDeploymentSpec> consumer) {
ConnectorDeployment answer = new ConnectorDeployment().kind("ConnectorDeployment").id(name).metadata(new ConnectorDeploymentAllOfMetadata().resourceVersion(revision)).spec(new ConnectorDeploymentSpec());
consumer.accept(answer.getSpec());
return answer;
}
Aggregations