mirror of
https://github.com/Telecominfraproject/openlan-cgw.git
synced 2026-03-20 03:39:42 +00:00
577 lines
22 KiB
YAML
577 lines
22 KiB
YAML
---
|
|
# Kafka 'cnc_res' (default) topic API list that defines response messages format
|
|
# for each of the cnc request.
|
|
# The request messages for which these results are generated can be found in the
|
|
# 'cnc_api.yaml' file.
|
|
infrastructure_group_create_response:
|
|
description:
|
|
Response to corresponding 'infrastructure_group_create'
|
|
or 'infrastructure_group_create_to_shard' request(s).
|
|
type:
|
|
description: MANDATORY field. Type should be parsed by NB services for matching.
|
|
type: string
|
|
enum:
|
|
- infrastructure_group_create_response
|
|
reporter_shard_id:
|
|
description: MANDATORY field.
|
|
ID of the shard that handled request and generated this response.
|
|
type: integer
|
|
infra_group_id:
|
|
description: MANDATORY field.
|
|
Infrastructure group ID to which original request was directed to.
|
|
type: integer
|
|
uuid:
|
|
description: MANDATORY field.
|
|
The underlying unique identifier of the request, to which
|
|
this response is being generated.
|
|
type: string
|
|
format: uuid
|
|
success:
|
|
type: boolean
|
|
error_message:
|
|
description: MANDATORY field (could be empty / null).
|
|
Error message reporting why the request failed.
|
|
Filled only if 'success' is false (e.g. request failed).
|
|
Empty otherwise.
|
|
type: string
|
|
consumer_metadata:
|
|
description: OPTIONAL field.
|
|
Information (metadata) about the original caller of the API.
|
|
Only sender_partition is used directly - CGW will try to post
|
|
respons / reply messages to response topic within specified
|
|
partition id.
|
|
Complete object is carried on back in the reply body.
|
|
Can be used later on to find out original caller, if kafka
|
|
broker rebalanced partitions mapping of the underlying consumers.
|
|
type: object
|
|
value:
|
|
sender_partition:
|
|
description: OPTIONAL field.
|
|
The partition to which CGW should post messages (replies) back to.
|
|
type: integer
|
|
sender_id:
|
|
description: OPTIONAL field.
|
|
The unique identifier of the sender (kafka consumer id, for example),
|
|
that uniquely identifies the single consumer within consumer group.
|
|
type: string
|
|
timestamp:
|
|
description: MANDATORY field.
|
|
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
|
|
the response had been generated.
|
|
type: integer
|
|
|
|
infrastructure_group_delete_response:
|
|
description:
|
|
Response to corresponding 'infrastructure_group_delete' request.
|
|
type:
|
|
description: MANDATORY field. Type should be parsed by NB services for matching.
|
|
type: string
|
|
enum:
|
|
- infrastructure_group_delete_response
|
|
reporter_shard_id:
|
|
description: MANDATORY field.
|
|
ID of the shard that handled request and generated this response.
|
|
type: integer
|
|
infra_group_id:
|
|
description: MANDATORY field.
|
|
Infrastructure group ID to which original request was directed to.
|
|
type: integer
|
|
uuid:
|
|
description: MANDATORY field.
|
|
The underlying unique identifier of the request, to which
|
|
this response is being generated.
|
|
type: string
|
|
format: uuid
|
|
success:
|
|
type: boolean
|
|
error_message:
|
|
description: MANDATORY field (could be empty / null).
|
|
Error message reporting why the request failed.
|
|
Filled only if 'success' is false (e.g. request failed).
|
|
Empty otherwise.
|
|
type: string
|
|
consumer_metadata:
|
|
description: OPTIONAL field.
|
|
Information (metadata) about the original caller of the API.
|
|
Only sender_partition is used directly - CGW will try to post
|
|
respons / reply messages to response topic within specified
|
|
partition id.
|
|
Complete object is carried on back in the reply body.
|
|
Can be used later on to find out original caller, if kafka
|
|
broker rebalanced partitions mapping of the underlying consumers.
|
|
type: object
|
|
value:
|
|
sender_partition:
|
|
description: OPTIONAL field.
|
|
The partition to which CGW should post messages (replies) back to.
|
|
type: integer
|
|
sender_id:
|
|
description: OPTIONAL field.
|
|
The unique identifier of the sender (kafka consumer id, for example),
|
|
that uniquely identifies the single consumer within consumer group.
|
|
type: string
|
|
timestamp:
|
|
description: MANDATORY field.
|
|
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
|
|
the response had been generated.
|
|
type: integer
|
|
|
|
infrastructure_group_infras_add_response:
|
|
description:
|
|
Response to corresponding 'infrastructure_group_infras_add' request.
|
|
type:
|
|
description: MANDATORY field. Type should be parsed by NB services for matching.
|
|
type: string
|
|
enum:
|
|
- infrastructure_group_infras_add_response
|
|
reporter_shard_id:
|
|
description: MANDATORY field.
|
|
ID of the shard that handled request and generated this response.
|
|
type: integer
|
|
infra_group_id:
|
|
description: MANDATORY field.
|
|
Infrastructure group ID to which original request was directed to.
|
|
type: integer
|
|
uuid:
|
|
description: MANDATORY field.
|
|
The underlying unique identifier of the request, to which
|
|
type: string
|
|
format: uuid
|
|
success:
|
|
type: boolean
|
|
error_message:
|
|
description: MANDATORY field (could be empty / null).
|
|
Error message reporting why the request failed.
|
|
Filled only if 'success' is false (e.g. request failed).
|
|
Empty otherwise.
|
|
type: string
|
|
failed_infras:
|
|
description: MANDATORY field. Can be empty.
|
|
Array of infras (MAC address / mac serial, any form is accepted) that
|
|
should were not added (failed to) to specified infra group.
|
|
Potential cause - infra is a duplicate (already member of specified group),
|
|
or it is already a member of some other group and should be removed
|
|
from old group first.
|
|
type: array
|
|
items:
|
|
type: string
|
|
kafka_partition_key:
|
|
description: MANDATORY field. CGW can return a special string value - kafka partition key,
|
|
that can be used by generating consecutive cnc request,
|
|
that will result in direct addressing of the shard that replied
|
|
to the original request.
|
|
It's an optimization technique to overcome the need of
|
|
using relaying mechanism all the time.
|
|
NOTE - this kafka key in replies _could_ be used by the callers,
|
|
but it's not required. It's optional.
|
|
Can be empty.
|
|
Can be present even if request failed.
|
|
type: string
|
|
consumer_metadata:
|
|
description: OPTIONAL field.
|
|
Information (metadata) about the original caller of the API.
|
|
Only sender_partition is used directly - CGW will try to post
|
|
respons / reply messages to response topic within specified
|
|
partition id.
|
|
Complete object is carried on back in the reply body.
|
|
Can be used later on to find out original caller, if kafka
|
|
broker rebalanced partitions mapping of the underlying consumers.
|
|
type: object
|
|
value:
|
|
sender_partition:
|
|
description: OPTIONAL field.
|
|
The partition to which CGW should post messages (replies) back to.
|
|
type: integer
|
|
sender_id:
|
|
description: OPTIONAL field.
|
|
The unique identifier of the sender (kafka consumer id, for example),
|
|
that uniquely identifies the single consumer within consumer group.
|
|
type: string
|
|
timestamp:
|
|
description: MANDATORY field.
|
|
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
|
|
the response had been generated.
|
|
type: integer
|
|
|
|
infrastructure_group_infras_del_response:
|
|
description:
|
|
Response to corresponding 'infrastructure_group_infras_del' request.
|
|
type:
|
|
description: MANDATORY field. Type should be parsed by NB services for matching.
|
|
type: string
|
|
enum:
|
|
- infrastructure_group_infras_del_response
|
|
reporter_shard_id:
|
|
description: MANDATORY field.
|
|
ID of the shard that handled request and generated this response.
|
|
type: integer
|
|
infra_group_id:
|
|
description: MANDATORY field.
|
|
Infrastructure group ID to which original request was directed to.
|
|
type: integer
|
|
uuid:
|
|
description: MANDATORY field.
|
|
The underlying unique identifier of the request, to which
|
|
type: string
|
|
format: uuid
|
|
success:
|
|
type: boolean
|
|
error_message:
|
|
description: MANDATORY field (could be empty / null).
|
|
Error message reporting why the request failed.
|
|
Filled only if 'success' is false (e.g. request failed).
|
|
Empty otherwise.
|
|
type: string
|
|
failed_infras:
|
|
description: MANDATORY field. Can be empty.
|
|
Array of infras (MAC address / mac serial, any form is accepted) that
|
|
should were not removed (failed to) from specified infra group.
|
|
Potential cause - infra is not member of specified group.
|
|
type: array
|
|
items:
|
|
type: string
|
|
kafka_partition_key:
|
|
description: MANDATORY field. CGW can return a special string value - kafka partition key,
|
|
that can be used by generating consecutive cnc request,
|
|
that will result in direct addressing of the shard that replied
|
|
to the original request.
|
|
It's an optimization technique to overcome the need of
|
|
using relaying mechanism all the time.
|
|
NOTE - this kafka key in replies _could_ be used by the callers,
|
|
but it's not required. It's optional.
|
|
Can be empty.
|
|
Can be present even if request failed.
|
|
type: string
|
|
consumer_metadata:
|
|
description: OPTIONAL field.
|
|
Information (metadata) about the original caller of the API.
|
|
Only sender_partition is used directly - CGW will try to post
|
|
respons / reply messages to response topic within specified
|
|
partition id.
|
|
Complete object is carried on back in the reply body.
|
|
Can be used later on to find out original caller, if kafka
|
|
broker rebalanced partitions mapping of the underlying consumers.
|
|
type: object
|
|
value:
|
|
sender_partition:
|
|
description: OPTIONAL field.
|
|
The partition to which CGW should post messages (replies) back to.
|
|
type: integer
|
|
sender_id:
|
|
description: OPTIONAL field.
|
|
The unique identifier of the sender (kafka consumer id, for example),
|
|
that uniquely identifies the single consumer within consumer group.
|
|
type: string
|
|
timestamp:
|
|
description: MANDATORY field.
|
|
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
|
|
the response had been generated.
|
|
type: integer
|
|
|
|
infrastructure_group_infra_message_enqueue_response:
|
|
description:
|
|
Response to corresponding 'infrastructure_group_infra_message_enqueue' request.
|
|
type:
|
|
description: MANDATORY field. Type should be parsed by NB services for matching.
|
|
type: string
|
|
enum:
|
|
- infrastructure_group_infra_message_enqueue_response
|
|
reporter_shard_id:
|
|
description: MANDATORY field.
|
|
ID of the shard that handled request and generated this response.
|
|
type: integer
|
|
infra_group_id:
|
|
description: MANDATORY field.
|
|
Infrastructure group ID to which original request was directed to.
|
|
type: integer
|
|
uuid:
|
|
description: MANDATORY field.
|
|
The underlying unique identifier of the request, to which
|
|
type: string
|
|
format: uuid
|
|
success:
|
|
type: boolean
|
|
error_message:
|
|
description: MANDATORY field (could be empty / null).
|
|
Error message reporting why the request failed.
|
|
Filled only if 'success' is false (e.g. request failed).
|
|
Empty otherwise.
|
|
type: string
|
|
kafka_partition_key:
|
|
description: MANDATORY field. CGW can return a special string value - kafka partition key,
|
|
that can be used by generating consecutive cnc request,
|
|
that will result in direct addressing of the shard that replied
|
|
to the original request.
|
|
It's an optimization technique to overcome the need of
|
|
using relaying mechanism all the time.
|
|
NOTE - this kafka key in replies _could_ be used by the callers,
|
|
but it's not required. It's optional.
|
|
Can be empty.
|
|
Can be present even if request failed.
|
|
type: string
|
|
consumer_metadata:
|
|
description: OPTIONAL field.
|
|
Information (metadata) about the original caller of the API.
|
|
Only sender_partition is used directly - CGW will try to post
|
|
respons / reply messages to response topic within specified
|
|
partition id.
|
|
Complete object is carried on back in the reply body.
|
|
Can be used later on to find out original caller, if kafka
|
|
broker rebalanced partitions mapping of the underlying consumers.
|
|
type: object
|
|
value:
|
|
sender_partition:
|
|
description: OPTIONAL field.
|
|
The partition to which CGW should post messages (replies) back to.
|
|
type: integer
|
|
sender_id:
|
|
description: OPTIONAL field.
|
|
The unique identifier of the sender (kafka consumer id, for example),
|
|
that uniquely identifies the single consumer within consumer group.
|
|
type: string
|
|
timestamp:
|
|
description: MANDATORY field.
|
|
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
|
|
the response had been generated.
|
|
type: integer
|
|
|
|
infra_request_result:
|
|
description:
|
|
Result of the underlying 'infrastructure_group_infra_message_enqueue' request execution.
|
|
This result is generated whenever underlying infra finishes and responds
|
|
to the request with status 'result' message that CGW handles internally.
|
|
type:
|
|
description: MANDATORY field. Type should be parsed by NB services for matching.
|
|
type: string
|
|
enum:
|
|
- infra_request_result
|
|
reporter_shard_id:
|
|
description: MANDATORY field.
|
|
ID of the shard that handled request and generated this response.
|
|
type: integer
|
|
infra_group_id:
|
|
description: MANDATORY field.
|
|
Infrastructure group ID to which original request was directed to.
|
|
type: integer
|
|
uuid:
|
|
description: MANDATORY field.
|
|
The underlying unique identifier of the request, to which
|
|
type: string
|
|
format: uuid
|
|
cloud-header:
|
|
description: OPTIONAL field.
|
|
The infrastructure group and infra cloud header.
|
|
This field might be empty JSON object or missed.
|
|
type: string
|
|
success:
|
|
type: boolean
|
|
error_message:
|
|
description: MANDATORY field (could be empty / null).
|
|
Error message reporting why the request failed.
|
|
Filled only if 'success' is false (e.g. request failed).
|
|
Empty otherwise.
|
|
type: string
|
|
consumer_metadata:
|
|
description: OPTIONAL field.
|
|
Information (metadata) about the original caller of the API.
|
|
Only sender_partition is used directly - CGW will try to post
|
|
respons / reply messages to response topic within specified
|
|
partition id.
|
|
Complete object is carried on back in the reply body.
|
|
Can be used later on to find out original caller, if kafka
|
|
broker rebalanced partitions mapping of the underlying consumers.
|
|
type: object
|
|
value:
|
|
sender_partition:
|
|
description: OPTIONAL field.
|
|
The partition to which CGW should post messages (replies) back to.
|
|
type: integer
|
|
sender_id:
|
|
description: OPTIONAL field.
|
|
The unique identifier of the sender (kafka consumer id, for example),
|
|
that uniquely identifies the single consumer within consumer group.
|
|
type: string
|
|
payload:
|
|
description: OPTIONAL field.
|
|
The original infra result response message. It might be empty if infra doesn't send response or
|
|
original request tiemed out.
|
|
timestamp:
|
|
description: MANDATORY field.
|
|
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
|
|
the response had been received by the CGW on the socket level.
|
|
type: integer
|
|
|
|
rebalance_groups_response:
|
|
description: Response to corresponding 'rebalance_groups' request.
|
|
type:
|
|
description: MANDATORY field. Type should be parsed by NB services for matching.
|
|
type: string
|
|
enum:
|
|
- rebalance_groups_response
|
|
reporter_shard_id:
|
|
description: MANDATORY field.
|
|
ID of the shard that handled request and generated this response.
|
|
type: integer
|
|
infra_group_id:
|
|
description: MANDATORY field.
|
|
Infrastructure group ID to which original request was directed to.
|
|
type: integer
|
|
uuid:
|
|
description: MANDATORY field.
|
|
The underlying unique identifier of the request, to which
|
|
type: string
|
|
format: uuid
|
|
success:
|
|
type: boolean
|
|
error_message:
|
|
description: MANDATORY field (could be empty / null).
|
|
Error message reporting why the request failed.
|
|
Filled only if 'success' is false (e.g. request failed).
|
|
Empty otherwise.
|
|
type: string
|
|
consumer_metadata:
|
|
description: OPTIONAL field.
|
|
Information (metadata) about the original caller of the API.
|
|
Only sender_partition is used directly - CGW will try to post
|
|
respons / reply messages to response topic within specified
|
|
partition id.
|
|
Complete object is carried on back in the reply body.
|
|
Can be used later on to find out original caller, if kafka
|
|
broker rebalanced partitions mapping of the underlying consumers.
|
|
type: object
|
|
value:
|
|
sender_partition:
|
|
description: OPTIONAL field.
|
|
The partition to which CGW should post messages (replies) back to.
|
|
type: integer
|
|
sender_id:
|
|
description: OPTIONAL field.
|
|
The unique identifier of the sender (kafka consumer id, for example),
|
|
that uniquely identifies the single consumer within consumer group.
|
|
type: string
|
|
timestamp:
|
|
description: MANDATORY field.
|
|
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
|
|
the response had been generated.
|
|
type: integer
|
|
|
|
infrastructure_group_set_cloud_header_response:
|
|
description:
|
|
Response to corresponding 'infrastructure_group_set_cloud_header' request.
|
|
type:
|
|
description: MANDATORY field. Type should be parsed by NB services for matching.
|
|
type: string
|
|
enum:
|
|
- infrastructure_group_set_cloud_header_response
|
|
reporter_shard_id:
|
|
description: MANDATORY field.
|
|
ID of the shard that handled request and generated this response.
|
|
type: integer
|
|
infra_group_id:
|
|
description: MANDATORY field.
|
|
Infrastructure group ID to which original request was directed to.
|
|
type: integer
|
|
uuid:
|
|
description: MANDATORY field.
|
|
The underlying unique identifier of the request, to which
|
|
type: string
|
|
format: uuid
|
|
success:
|
|
type: boolean
|
|
error_message:
|
|
description: MANDATORY field (could be empty / null).
|
|
Error message reporting why the request failed.
|
|
Filled only if 'success' is false (e.g. request failed).
|
|
Empty otherwise.
|
|
type: string
|
|
consumer_metadata:
|
|
description: OPTIONAL field.
|
|
Information (metadata) about the original caller of the API.
|
|
Only sender_partition is used directly - CGW will try to post
|
|
respons / reply messages to response topic within specified
|
|
partition id.
|
|
Complete object is carried on back in the reply body.
|
|
Can be used later on to find out original caller, if kafka
|
|
broker rebalanced partitions mapping of the underlying consumers.
|
|
type: object
|
|
value:
|
|
sender_partition:
|
|
description: OPTIONAL field.
|
|
The partition to which CGW should post messages (replies) back to.
|
|
type: integer
|
|
sender_id:
|
|
description: OPTIONAL field.
|
|
The unique identifier of the sender (kafka consumer id, for example),
|
|
that uniquely identifies the single consumer within consumer group.
|
|
type: string
|
|
timestamp:
|
|
description: MANDATORY field.
|
|
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
|
|
the response had been generated.
|
|
type: integer
|
|
|
|
infrastructure_group_infras_set_cloud_header_response:
|
|
description:
|
|
Response to corresponding 'infrastructure_group_infras_set_cloud_header' request.
|
|
type:
|
|
description: MANDATORY field. Type should be parsed by NB services for matching.
|
|
type: string
|
|
enum:
|
|
- infrastructure_group_infras_set_cloud_header_response
|
|
reporter_shard_id:
|
|
description: MANDATORY field.
|
|
ID of the shard that handled request and generated this response.
|
|
type: integer
|
|
infra_group_id:
|
|
description: MANDATORY field.
|
|
Infrastructure group ID to which original request was directed to.
|
|
type: integer
|
|
uuid:
|
|
description: MANDATORY field.
|
|
The underlying unique identifier of the request, to which
|
|
type: string
|
|
format: uuid
|
|
success:
|
|
type: boolean
|
|
error_message:
|
|
description: MANDATORY field (could be empty / null).
|
|
Error message reporting why the request failed.
|
|
Filled only if 'success' is false (e.g. request failed).
|
|
Empty otherwise.
|
|
type: string
|
|
failed_infras:
|
|
description: MANDATORY field. Can be empty.
|
|
Array of infras (MAC address / mac serial, any form is accepted) that
|
|
should were not added (failed to) to specified infras cloud header.
|
|
Potential cause - infra is a member of some other group (different from infra_group_id specified in current request)
|
|
and should be removed from old group first.
|
|
type: array
|
|
items:
|
|
type: string
|
|
consumer_metadata:
|
|
description: OPTIONAL field.
|
|
Information (metadata) about the original caller of the API.
|
|
Only sender_partition is used directly - CGW will try to post
|
|
respons / reply messages to response topic within specified
|
|
partition id.
|
|
Complete object is carried on back in the reply body.
|
|
Can be used later on to find out original caller, if kafka
|
|
broker rebalanced partitions mapping of the underlying consumers.
|
|
type: object
|
|
value:
|
|
sender_partition:
|
|
description: OPTIONAL field.
|
|
The partition to which CGW should post messages (replies) back to.
|
|
type: integer
|
|
sender_id:
|
|
description: OPTIONAL field.
|
|
The unique identifier of the sender (kafka consumer id, for example),
|
|
that uniquely identifies the single consumer within consumer group.
|
|
type: string
|
|
timestamp:
|
|
description: MANDATORY field.
|
|
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
|
|
the response had been generated.
|
|
type: integer
|
|
|