From 1d5a03f8bebed39bd3e4399fa3bab98a19da778e Mon Sep 17 00:00:00 2001 From: app-services-ci Date: Fri, 9 Dec 2022 00:18:23 +0000 Subject: [PATCH] fix(): update for SDK --- .openapi/connector_mgmt.yaml | 29 +++++-- .openapi/kas-fleet-manager.yaml | 139 ++++++++++++++++++++++++++++++++ 2 files changed, 161 insertions(+), 7 deletions(-) diff --git a/.openapi/connector_mgmt.yaml b/.openapi/connector_mgmt.yaml index c6b3a4af..31b4b040 100644 --- a/.openapi/connector_mgmt.yaml +++ b/.openapi/connector_mgmt.yaml @@ -1160,6 +1160,12 @@ components: # Connector Cluster # + ConnectorResourceAnnotations: + description: Name-value string annotations for resource + type: object + additionalProperties: + type: "string" + ConnectorClusterState: type: string enum: @@ -1168,9 +1174,12 @@ components: - deleting ConnectorClusterRequestMeta: + type: object properties: name: type: string + annotations: + $ref: "#/components/schemas/ConnectorResourceAnnotations" ConnectorClusterRequest: description: "Schema for the request to update a data plane cluster's name" @@ -1259,6 +1268,7 @@ components: type: object ConnectorRequestMeta: + type: object required: - name - connector_type_id @@ -1275,6 +1285,9 @@ components: $ref: "#/components/schemas/Channel" desired_state: $ref: "#/components/schemas/ConnectorDesiredState" + annotations: + $ref: "#/components/schemas/ConnectorResourceAnnotations" + ConnectorRequest: allOf: @@ -1353,12 +1366,14 @@ components: type: array items: type: string + annotations: + $ref: "#/components/schemas/ConnectorResourceAnnotations" featured_rank: description: Ranking for featured connectors type: integer format: int32 capabilities: - description: The capabilities supported by the conenctor + description: The capabilities supported by the connector type: array items: type: string @@ -1412,9 +1427,7 @@ components: pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$" description: Namespace name must match pattern `^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$`, or it may be empty to be auto-generated. annotations: - type: object - additionalProperties: - type: "string" + $ref: "#/components/schemas/ConnectorResourceAnnotations" ConnectorNamespaceQuota: type: object @@ -1625,7 +1638,7 @@ components: * Cluster: id, created_at, updated_at, owner, organisation_id, name, state, client_id * Namespace: id, created_at, updated_at, name, cluster_id, owner, expiration, tenant_user_id, tenant_organisation_id, state - * Connector Types: id, created_at, updated_at, version, name, description, label, channel, featured_rank + * Connector Types: id, created_at, updated_at, version, name, description, label, channel, featured_rank, pricing_tier * Connectors: id, created_at, updated_at, name, owner, organisation_id, connector_type_id, desired_state, state, channel, namespace_id, kafka_id, kafka_bootstrap_server, service_account_client_id, schema_registry_id, schema_registry_url Allowed operators are `<>`, `=`, `LIKE`, or `ILIKE`. @@ -1689,6 +1702,8 @@ components: icon_href: "/api/connector_mgmt/v1/kafka_connector_types/log_sink.png" labels: - sink + annotations: + - "cos.bf2.org/name": value capabilities: - data_shape - processors @@ -1814,12 +1829,12 @@ components: name: "MyNamespace" cluster_id: "9bsv0s7tne7g02gh5g4g" annotations: - "connector_mgmt.bf2.org/profile": "default-profile" + "cos.bf2.org/profile": "default-profile" ConnectorNamespaceEvalCreateExample: value: name: "MyEvalNamespace" annotations: - "connector_mgmt.bf2.org/profile": "evaluation-profile" + "cos.bf2.org/profile": "evaluation-profile" 400CreationExample: value: id: "103" diff --git a/.openapi/kas-fleet-manager.yaml b/.openapi/kas-fleet-manager.yaml index 5bd09d5c..a568a7a6 100644 --- a/.openapi/kas-fleet-manager.yaml +++ b/.openapi/kas-fleet-manager.yaml @@ -896,6 +896,79 @@ paths: $ref: '#/components/examples/500Example' parameters: - $ref: "#/components/parameters/id" + /api/kafkas_mgmt/v1/clusters: + post: + description: Register enterprise OSD cluster + operationId: registerEnterpriseOsdCluster + requestBody: + description: Enterprise OSD cluster details + content: + application/json: + schema: + $ref: '#/components/schemas/EnterpriseOsdClusterPayload' + examples: + USRegion: + $ref: '#/components/examples/USRegionExample' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/KafkaRequest' # change me + examples: + KafkaRequestPostResponseExample: + $ref: '#/components/examples/KafkaRequestExample' # change me + description: Enterprise cluster registered + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + examples: + 400InvalidClusterIdExample: + $ref: '#/components/examples/400InvalidClusterIdExample' + 400MInvalidExternalClusterIdExample: + $ref: '#/components/examples/400MInvalidExternalClusterIdExample' + description: Validation errors occurred + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + examples: + 401Example: + $ref: '#/components/examples/401Example' + description: Auth token is invalid + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + examples: + 403Example: + $ref: '#/components/examples/403Example' + description: User is not authorized to access the service + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + examples: + 409ClusterIdConflictExample: + $ref: '#/components/examples/409ClusterIdConflictExample' + description: A conflict has been detected in the creation of this resource + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + examples: + 500Example: + $ref: '#/components/examples/500Example' + description: An unexpected error occurred while registering Enterprise cluster + security: + - Bearer: [ ] components: schemas: @@ -1549,6 +1622,48 @@ components: description: Whether connection reauthentication is enabled or not. If set to true, connection reauthentication on the Kafka instance will be required every 5 minutes. type: boolean nullable: true + EnterpriseOsdClusterPayload: + description: Schema for the request body sent to /clusters POST + required: + - cluster_id + - cluster_external_id + - cluster_ingress_dns_name + type: object + properties: + cluster_id: + description: OSD cluster ID + type: string + cluster_external_id: + description: external cluster ID. Can be obtained from the response JSON of ocm get /api/clusters_mgmt/v1/clusters/ + type: string + cluster_ingress_dns_name: + description: dns name of the cluster. Can be obtained from the response JSON of the /api/clusters_mgmt/v1/clusters//ingresses (dns_name) + type: string + EnterpriseCluster: + description: Enterprise cluster registration endpoint response + allOf: + - type: object + properties: + cluster_id: + description: 'ocm cluster id of the registered Enterprise cluster' + type: string + status: + description: 'status of registered Enterprise cluster' + type: string + fleetshard_parameters: + type: array + items: + allOf: + - $ref: "#/components/schemas/FleetshardParameter" + + FleetshardParameter: + description: "Fleetshard parameter consumed by enterprise cluster" + type: object + properties: + id: + type: string + value: + type: string parameters: id: @@ -1945,6 +2060,22 @@ components: code: "KAFKAS-MGMT-21" reason: "missing path parameter: kafka id" operation_id: "1lWDGuybIrEnxrAem724gqkkiDv" + 400InvalidClusterIdExample: + value: + id: "45" + kind: "Error" + href: "/api/kafkas_mgmt/v1/errors/45" + code: "KAFKAS-MGMT-45" + reason: "Enterprise cluster ID is invalid" + operation_id: "1lWDGuybIrEnxrAem724gqkkiDv" + 400MInvalidExternalClusterIdExample: + value: + id: "46" + kind: "Error" + href: "/api/kafkas_mgmt/v1/errors/46" + code: "KAFKAS-MGMT-46" + reason: "Enterprise external cluster ID is invalid" + operation_id: "1lWDGuybIrEnxrAem724gqkkiDv" 404Example: value: id: "7" @@ -2000,6 +2131,14 @@ components: code: "KAFKAS-MGMT-36" reason: "Kafka cluster name is already used" operation_id: "6kY0UiEkzkXCzWPeI2oYehd3ED" + 409ClusterIdConflictExample: + value: + id: "44" + kind: "Error" + href: "/api/kafkas_mgmt/v1/errors/44" + code: "KAFKAS-MGMT-44" + reason: "Enterprise cluster ID is already used" + operation_id: "6kY0UiEkzkXCzWPeI2oYehd3ED" 500Example: value: id: "9"