-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
316 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "DatasetsConfig", | ||
"type": "object", | ||
"required": [ | ||
"datasets", | ||
"generation" | ||
], | ||
"properties": { | ||
"datasets": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/DatasetConfig" | ||
} | ||
}, | ||
"generation": { | ||
"description": "generation number of this configuration\n\nThis generation number is owned by the control plane (i.e., RSS or Nexus, depending on whether RSS-to-Nexus handoff has happened). It should not be bumped within Sled Agent.\n\nSled Agent rejects attempts to set the configuration to a generation older than the one it's currently running.", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/Generation" | ||
} | ||
] | ||
} | ||
}, | ||
"definitions": { | ||
"DatasetConfig": { | ||
"description": "Configuration information necessary to request a single dataset", | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"name" | ||
], | ||
"properties": { | ||
"compression": { | ||
"description": "The compression mode to be supplied, if any", | ||
"type": [ | ||
"string", | ||
"null" | ||
] | ||
}, | ||
"id": { | ||
"description": "The UUID of the dataset being requested", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/TypedUuidForDatasetKind" | ||
} | ||
] | ||
}, | ||
"name": { | ||
"description": "The dataset's name", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/DatasetName" | ||
} | ||
] | ||
}, | ||
"quota": { | ||
"description": "The upper bound on the amount of storage used by this dataset", | ||
"type": [ | ||
"integer", | ||
"null" | ||
], | ||
"format": "uint", | ||
"minimum": 0.0 | ||
}, | ||
"reservation": { | ||
"description": "The lower bound on the amount of storage usable by this dataset", | ||
"type": [ | ||
"integer", | ||
"null" | ||
], | ||
"format": "uint", | ||
"minimum": 0.0 | ||
} | ||
} | ||
}, | ||
"DatasetKind": { | ||
"description": "The type of a dataset, and an auxiliary information necessary to successfully launch a zone managing the associated data.", | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"type" | ||
], | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"cockroach_db" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"type" | ||
], | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"crucible" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"type" | ||
], | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"clickhouse" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"type" | ||
], | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"clickhouse_keeper" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"type" | ||
], | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"external_dns" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"type" | ||
], | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"internal_dns" | ||
] | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"DatasetName": { | ||
"type": "object", | ||
"required": [ | ||
"kind", | ||
"pool_name" | ||
], | ||
"properties": { | ||
"kind": { | ||
"$ref": "#/definitions/DatasetKind" | ||
}, | ||
"pool_name": { | ||
"$ref": "#/definitions/ZpoolName" | ||
} | ||
} | ||
}, | ||
"Generation": { | ||
"description": "Generation numbers stored in the database, used for optimistic concurrency control", | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
}, | ||
"TypedUuidForDatasetKind": { | ||
"type": "string", | ||
"format": "uuid" | ||
}, | ||
"ZpoolName": { | ||
"title": "The name of a Zpool", | ||
"description": "Zpool names are of the format ox{i,p}_<UUID>. They are either Internal or External, and should be unique", | ||
"type": "string", | ||
"pattern": "^ox[ip]_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters