diff --git a/packages/api-mock/_data_/kas-cloud-regions.json b/packages/api-mock/_data_/kas-cloud-regions.json index 17782bfd..cd68edff 100644 --- a/packages/api-mock/_data_/kas-cloud-regions.json +++ b/packages/api-mock/_data_/kas-cloud-regions.json @@ -155,7 +155,7 @@ "enabled": true, "supported_instance_types": [ "standard", - "eval", + "eval" ], "capacity": [ { diff --git a/packages/api-mock/_data_/kas-instance-types.json b/packages/api-mock/_data_/kas-instance-types.json new file mode 100644 index 00000000..3df311f7 --- /dev/null +++ b/packages/api-mock/_data_/kas-instance-types.json @@ -0,0 +1,52 @@ +{ + "instance_types": [ + { + "id": "developer", + "sizes": [ + { + "id": "x1", + "ingress_throughput_per_sec": { + "bytes": 31457280 + }, + "egress_throughput_per_sec": { + "bytes": 31457280 + }, + "total_max_connections": 3000, + "max_data_retention_size": { + "bytes": 1073741800000 + }, + "max_partitions": 1000, + "max_data_retention_period": "P14D", + "max_connection_attempts_per_sec": 100, + "quota_consumed": 1, + "quota_type": "rhosak", + "capacity_consumed": 1 + } + ] + }, + { + "id": "standard", + "sizes": [ + { + "id": "x1", + "ingress_throughput_per_sec": { + "bytes": 52428800 + }, + "egress_throughput_per_sec": { + "bytes": 104857600 + }, + "total_max_connections": 3000, + "max_data_retention_size": { + "bytes": 1073741800000 + }, + "max_partitions": 1500, + "max_data_retention_period": "P14D", + "max_connection_attempts_per_sec": 100, + "quota_consumed": 1, + "quota_type": "rhosak", + "capacity_consumed": 1 + } + ] + } + ] +} diff --git a/packages/api-mock/src/handlers/kafka-manager.js b/packages/api-mock/src/handlers/kafka-manager.js index be23512e..8de33dcf 100644 --- a/packages/api-mock/src/handlers/kafka-manager.js +++ b/packages/api-mock/src/handlers/kafka-manager.js @@ -170,33 +170,7 @@ function createKafkaHandlers(preSeed) { }, getInstanceTypesByCloudProviderAndRegion: async (c, req, res) => { - res.status(200).json({ - "kind": "SupportedKafkaInstanceTypesList", - "page": "1", - "size": "1", - "total": "1", - "item": { - "value": { - "kind": "SupportedKafkaInstanceType", - "id": "eval", - "sizes": [ - { - "id": "x1", - "ingress_throughput_per_sec": "30Mi", - "egress_throughput_per_sec": "30Mi", - "total_max_connections": 3000, - "max_data_retention_size": "1000Gi", - "max_partitions": 1000, - "max_data_retention_period": "P14D", - "max_connection_attempts_per_sec": 100, - "quota_consumed": 1, - "quota_type": "rhosak", - "capacity_consumed": 1 - } - ] - } - } - }); + res.status(200).json(require("../../_data_/kas-instance-types.json")); }, // Handling auth