Skip to content

Commit

Permalink
Merge branch 'replication-namespace'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokesh committed Aug 14, 2024
2 parents 41360b7 + 864ee68 commit 30fca51
Show file tree
Hide file tree
Showing 6 changed files with 693 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .cspell
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ authc
authinfo
authtoken
autocut
autofollow
backendroles
backpressure
beider
Expand Down Expand Up @@ -78,6 +79,7 @@ lucene
Lucene
lycheeverse
marvinpinto
memlock
metaphone
mget
millis
Expand Down Expand Up @@ -173,6 +175,7 @@ tokenfilters
translog
Translog
tubone
ulimits
unigrams
Unmanaged
unmatch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Run Tests
run: |
npm run test:spec -- \
--opensearch-insecure \
--opensearch-insecure --verbose\
--opensearch-version=${{ matrix.entry.version }} \
--coverage coverage/test-spec-coverage-${{ matrix.entry.version }}-${{ matrix.entry.tests || 'default' }}.json \
--tests=tests/${{ matrix.entry.tests || 'default' }}
Expand Down
322 changes: 322 additions & 0 deletions spec/namespaces/replication.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,322 @@
openapi: 3.1.0
info:
title: OpenSearch Replication API
description: OpenSearch Replication API
version: 1.0.0
paths:
/_plugins/_replication/{index}/_start:
put:
operationId: replication.start.0
x-operation-group: replication.start
x-version-added: '1.1'
description: Initiate replication of an index from the leader cluster to the follower cluster.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#start-replication
parameters:
- $ref: '#/components/parameters/replication.start::path.index'
requestBody:
$ref: '#/components/requestBodies/replication.start'
responses:
'200':
$ref: '#/components/responses/replication.start@200'
/_plugins/_replication/{index}/_stop:
post:
operationId: replication.stop.0
x-operation-group: replication.stop
x-version-added: '1.1'
description: Terminates replication and converts the follower index to a standard index.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#stop-replication
parameters:
- $ref: '#/components/parameters/replication.stop::path.index'
requestBody:
$ref: '#/components/requestBodies/replication.stop'
responses:
'200':
$ref: '#/components/responses/replication.stop@200'
/_plugins/_replication/{index}/_pause:
post:
operationId: replication.pause.0
x-operation-group: replication.pause
x-version-added: '1.1'
description: Pauses replication of the leader index.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#pause-replication
parameters:
- $ref: '#/components/parameters/replication.pause::path.index'
requestBody:
$ref: '#/components/requestBodies/replication.pause'
responses:
'200':
$ref: '#/components/responses/replication.pause@200'
/_plugins/_replication/{index}/_resume:
post:
operationId: replication.resume.0
x-operation-group: replication.resume
x-version-added: '1.1'
description: Resumes replication of the leader index.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#resume-replication
parameters:
- $ref: '#/components/parameters/replication.resume::path.index'
requestBody:
$ref: '#/components/requestBodies/replication.resume'
responses:
'200':
$ref: '#/components/responses/replication.resume@200'
/_plugins/_replication/{index}/_status:
get:
operationId: replication.status.0
x-operation-group: replication.status
x-version-added: '1.1'
description: Gets the status of index replication.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-replication-status
parameters:
- $ref: '#/components/parameters/replication.status::path.index'
responses:
'200':
$ref: '#/components/responses/replication.status@200'
/_plugins/_replication/leader_stats:
get:
operationId: replication.leader_stats.0
x-operation-group: replication.leader_stats
x-version-added: '1.1'
description: Gets information about replicated leader indexes on a specified cluster.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-leader-cluster-stats
responses:
'200':
$ref: '#/components/responses/replication.leader_stats@200'
/_plugins/_replication/follower_stats:
get:
operationId: replication.follower_stats.0
x-operation-group: replication.follower_stats
x-version-added: '1.1'
description: Gets information about follower (syncing) indexes on a specified cluster.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-follower-cluster-stats
responses:
'200':
$ref: '#/components/responses/replication.follower_stats@200'
/_plugins/_replication/autofollow_stats:
get:
operationId: replication.autofollow_stats.0
x-operation-group: replication.autofollow_stats
x-version-added: '1.1'
description: Gets information about auto-follow activity and any replication rules configured on the specified cluster.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-auto-follow-stats
responses:
'200':
$ref: '#/components/responses/replication.autofollow_stats@200'
/_plugins/_replication/{index}/_update:
put:
operationId: replication.update_settings.0
x-operation-group: replication.update_settings
x-version-added: '1.1'
description: Updates settings on the follower index.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#update-settings
parameters:
- $ref: '#/components/parameters/replication.update_settings::path.index'
requestBody:
$ref: '#/components/requestBodies/replication.update_settings'
responses:
'200':
$ref: '#/components/responses/replication.update_settings@200'
/_plugins/_replication/_autofollow:
post:
operationId: replication.create_replication_rule.0
x-operation-group: replication.create_replication_rule
x-version-added: '1.1'
description: Automatically starts replication on indexes matching a specified pattern.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#create-replication-rule
requestBody:
$ref: '#/components/requestBodies/replication.create_replication_rule'
responses:
'200':
$ref: '#/components/responses/replication.create_replication_rule@200'
delete:
operationId: replication.delete_replication_rule.0
x-operation-group: replication.delete_replication_rule
x-version-added: '1.1'
description: Deletes the specified replication rule.
externalDocs:
url: https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#delete-replication-rule
requestBody:
$ref: '#/components/requestBodies/replication.delete_replication_rule'
responses:
'200':
$ref: '#/components/responses/replication.delete_replication_rule@200'
components:
parameters:
replication.start::path.index:
in: path
name: index
description: Name of the data stream, index, or index alias to perform bulk actions on.
required: true
schema:
$ref: '../schemas/_common.yaml#/components/schemas/IndexName'
style: simple
replication.stop::path.index:
in: path
name: index
description: Name of the data stream, index, or index alias to perform bulk actions on.
required: true
schema:
$ref: '../schemas/_common.yaml#/components/schemas/IndexName'
style: simple
replication.pause::path.index:
in: path
name: index
description: Name of the data stream, index, or index alias to perform bulk actions on.
required: true
schema:
$ref: '../schemas/_common.yaml#/components/schemas/IndexName'
style: simple
replication.resume::path.index:
in: path
name: index
description: Name of the data stream, index, or index alias to perform bulk actions on.
required: true
schema:
$ref: '../schemas/_common.yaml#/components/schemas/IndexName'
style: simple
replication.status::path.index:
in: path
name: index
description: Name of the data stream, index, or index alias to perform bulk actions on.
required: true
schema:
$ref: '../schemas/_common.yaml#/components/schemas/IndexName'
style: simple
replication.update_settings::path.index:
in: path
name: index
description: Name of the data stream, index, or index alias to perform bulk actions on.
required: true
schema:
$ref: '../schemas/_common.yaml#/components/schemas/IndexName'
style: simple
requestBodies:
replication.start:
content:
application/json:
schema:
$ref: '../schemas/replication._common.yaml#/components/schemas/Replication'
required: true
replication.stop:
content:
application/json:
schema:
type: object
required: true
replication.pause:
content:
application/json:
schema:
type: object
required: true
replication.resume:
content:
application/json:
schema:
type: object
required: true
replication.update_settings:
content:
application/json:
schema:
$ref: '../schemas/replication._common.yaml#/components/schemas/UpdateSettings'
required: true
replication.create_replication_rule:
content:
application/json:
schema:
$ref: '../schemas/replication._common.yaml#/components/schemas/CreateReplicationRule'
required: true
replication.delete_replication_rule:
content:
application/json:
schema:
$ref: '../schemas/replication._common.yaml#/components/schemas/DeleteReplicationRule'
required: true
responses:
replication.start@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
replication.stop@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
replication.pause@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
replication.resume@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
replication.status@200:
content:
application/json:
schema:
$ref: '../schemas/replication._common.yaml#/components/schemas/Status'
replication.leader_stats@200:
content:
application/json:
schema:
$ref: '../schemas/replication._common.yaml#/components/schemas/LeaderStatus'
replication.follower_stats@200:
content:
application/json:
schema:
$ref: '../schemas/replication._common.yaml#/components/schemas/FollowerStatus'
replication.autofollow_stats@200:
content:
application/json:
schema:
$ref: '../schemas/replication._common.yaml#/components/schemas/AutoFollowStatus'
replication.update_settings@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
replication.create_replication_rule@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
replication.delete_replication_rule@200:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
Loading

0 comments on commit 30fca51

Please sign in to comment.