Skip to content

Commit

Permalink
fix: update regions mock
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Apr 4, 2022
1 parent fdab45e commit 00d5357
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 28 deletions.
2 changes: 1 addition & 1 deletion packages/api-mock/_data_/kas-cloud-regions.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"enabled": true,
"supported_instance_types": [
"standard",
"eval",
"eval"
],
"capacity": [
{
Expand Down
52 changes: 52 additions & 0 deletions packages/api-mock/_data_/kas-instance-types.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
]
}
28 changes: 1 addition & 27 deletions packages/api-mock/src/handlers/kafka-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 00d5357

Please sign in to comment.