Search in sources :

Example 1 with ConnectorDeploymentSpec

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));
}
Also used : ConnectorDeployment(org.bf2.cos.fleet.manager.model.ConnectorDeployment) ServiceAccount(org.bf2.cos.fleet.manager.model.ServiceAccount) ConnectorDeploymentAllOfMetadata(org.bf2.cos.fleet.manager.model.ConnectorDeploymentAllOfMetadata) ConnectorDeploymentSpec(org.bf2.cos.fleet.manager.model.ConnectorDeploymentSpec) SchemaRegistryConnectionSettings(org.bf2.cos.fleet.manager.model.SchemaRegistryConnectionSettings) KafkaConnectionSettings(org.bf2.cos.fleet.manager.model.KafkaConnectionSettings)

Example 2 with ConnectorDeploymentSpec

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;
}
Also used : ConnectorDeployment(org.bf2.cos.fleet.manager.model.ConnectorDeployment) ConnectorDeploymentAllOfMetadata(org.bf2.cos.fleet.manager.model.ConnectorDeploymentAllOfMetadata) ConnectorDeploymentSpec(org.bf2.cos.fleet.manager.model.ConnectorDeploymentSpec)

Aggregations

ConnectorDeployment (org.bf2.cos.fleet.manager.model.ConnectorDeployment)2 ConnectorDeploymentAllOfMetadata (org.bf2.cos.fleet.manager.model.ConnectorDeploymentAllOfMetadata)2 ConnectorDeploymentSpec (org.bf2.cos.fleet.manager.model.ConnectorDeploymentSpec)2 KafkaConnectionSettings (org.bf2.cos.fleet.manager.model.KafkaConnectionSettings)1 SchemaRegistryConnectionSettings (org.bf2.cos.fleet.manager.model.SchemaRegistryConnectionSettings)1 ServiceAccount (org.bf2.cos.fleet.manager.model.ServiceAccount)1