From e8f51948989bc5d2eb4cb6ea1251747d8bc1a362 Mon Sep 17 00:00:00 2001 From: jeff ngo Date: Thu, 7 Jan 2021 11:50:01 -0800 Subject: [PATCH 1/3] Virtualization SDK Docs - New plugin config property snapshotParametersDefinition --- docs/docs/References/Glossary.md | 6 +-- docs/docs/References/Schemas.md | 1 + .../Schemas_and_Autogenerated_Classes.md | 37 +++++++++++++++++++ docs/docs/Release_Notes/.pages | 1 + docs/docs/Release_Notes/3.0.0/.pages | 3 ++ docs/docs/Release_Notes/3.0.0/3.0.0.md | 12 ++++++ .../3.0.0/3.0.0_Breaking_Changes.md | 36 ++++++++++++++++++ docs/mkdocs.yml | 3 +- 8 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 docs/docs/Release_Notes/3.0.0/.pages create mode 100644 docs/docs/Release_Notes/3.0.0/3.0.0.md create mode 100644 docs/docs/Release_Notes/3.0.0/3.0.0_Breaking_Changes.md diff --git a/docs/docs/References/Glossary.md b/docs/docs/References/Glossary.md index 3d439050..c6150997 100644 --- a/docs/docs/References/Glossary.md +++ b/docs/docs/References/Glossary.md @@ -88,10 +88,10 @@ Information that represents a set of dependencies that a dataset requires in ord A formal description of a data type. Plugins use JSON format for their [schemas](Schemas_and_Autogenerated_Classes.md#schemas-and-autogenerated-classes). ## Snapshot -A point-in-time read-only copy of a dataset. A snapshot includes associated metadata represented by the [SnapshotDefinition Schema](Schemas_and_Autogenerated_Classes.md#snapshotdefinition) +A point-in-time read-only copy of a dataset. A snapshot includes associated metadata represented by the [SnapshotDefinition Schema](Schemas_and_Autogenerated_Classes.md#snapshotdefinition). -## Snapshot Parameter -User provided parameters for the snapshot operation. Currently the only properties the parameter has is resync. +## Snapshot Parameters +User provided parameters for the snapshot operation which can be defined in a [Snapshot Parameters Definition](Schemas_and_Autogenerated_Classes.md#snapshotparametersdefinition). ## Source Config A collection of information that the Delphix Engine needs to interact with a dataset (whether [linked](#linked-dataset) or [virtual](#virtual-dataset) on an [environment](#environment). diff --git a/docs/docs/References/Schemas.md b/docs/docs/References/Schemas.md index 8411e39e..472d6f32 100644 --- a/docs/docs/References/Schemas.md +++ b/docs/docs/References/Schemas.md @@ -22,6 +22,7 @@ Delphix Object | Schema | Autogenerated Class [Linked Source](Glossary.md#linked-source) | [LinkedSourceDefinition](Schemas_and_Autogenerated_Classes.md#linkedsourcedefinition-schema) | [LinkedSourceDefinition](Schemas_and_Autogenerated_Classes.md#linkedsourcedefinition-class) [Virtual Source](Glossary.md#virtual-source) | [VirtualSourceDefinition](Schemas_and_Autogenerated_Classes.md#virtualsourcedefinition-schema)| [VirtualSourceDefinition](Schemas_and_Autogenerated_Classes.md#virtualsourcedefinition-class) [Snapshot](Glossary.md#linked-source) | [SnapshotDefinition](Schemas_and_Autogenerated_Classes.md#snapshotdefinition-schema) | [SnapshotDefinition](Schemas_and_Autogenerated_Classes.md#snapshotdefinition-class) +[Snapshot Parameters](Glossary.md#snapshot-parameters) | [SnapshotParametersDefinition](Schemas_and_Autogenerated_Classes.md#snapshotparametersdefinition-schema) | [SnapshotParametersDefinition](Schemas_and_Autogenerated_Classes.md#snapshotparametersdefinition-class) ## JSON Schemas diff --git a/docs/docs/References/Schemas_and_Autogenerated_Classes.md b/docs/docs/References/Schemas_and_Autogenerated_Classes.md index f5ac155b..ba0a97e7 100644 --- a/docs/docs/References/Schemas_and_Autogenerated_Classes.md +++ b/docs/docs/References/Schemas_and_Autogenerated_Classes.md @@ -230,3 +230,40 @@ snapshot2.transaction_id = 1500 # A snapshot that omits the optional "transaction_id" property snapshot3 = SnapshotDefinition(version="1.0.0") ``` + +## SnapshotParametersDefinition + +Defines [Snapshot Parameters](Glossary.md#snapshot-parameters) for the snapshot operation. + +### SnapshotParametersDefinition Schema + +```json +{ + "type": "object", + "required": ["resync"], + "additionalProperties": false, + "properties": { + "resync": { "type": "boolean" } + } +} +``` + +### SnapshotParametersDefinition Class + +Autogenerated based on the [Snapshot Parameters Definition Schema](#snapshotparametersdefinition-schema). + +```python +class SnapshotParametersDefinition: + + def __init__(self, resync): + self._inner_dict = { "resync": resync } +``` + +> To use the class: + +```python +from generated.defintions import SnapshotParametersDefinition + +# Since "resync" is required, it must be specified when constructing the object +snapshot_parameter_definition = SnapshotParametersDefinition(resync=True) +``` diff --git a/docs/docs/Release_Notes/.pages b/docs/docs/Release_Notes/.pages index d160c92f..f123a584 100644 --- a/docs/docs/Release_Notes/.pages +++ b/docs/docs/Release_Notes/.pages @@ -1,4 +1,5 @@ arrange: + - 3.0.0 - 2.1.0 - 2.0.0 - 1.0.0 diff --git a/docs/docs/Release_Notes/3.0.0/.pages b/docs/docs/Release_Notes/3.0.0/.pages new file mode 100644 index 00000000..cd4759ab --- /dev/null +++ b/docs/docs/Release_Notes/3.0.0/.pages @@ -0,0 +1,3 @@ +arrange: + - 3.0.0.md + - 3.0.0_Breaking_Changes.md diff --git a/docs/docs/Release_Notes/3.0.0/3.0.0.md b/docs/docs/Release_Notes/3.0.0/3.0.0.md new file mode 100644 index 00000000..236b5726 --- /dev/null +++ b/docs/docs/Release_Notes/3.0.0/3.0.0.md @@ -0,0 +1,12 @@ +# Release - v3.0.0 + +To install or upgrade the SDK, refer to instructions [here](/Getting_Started.md#installation). + +## New & Improved +* N/A + +## Breaking Changes + +* Added a new required schema [Snapshot Parameters Definition](/References/Schemas_and_Autogenerated_Classes.md#snapshotparametersdefinition-schema). + +[**For more information and detailed steps to detect and make changes.**](/Release_Notes/3.0.0/3.0.0_Breaking_Changes#new-required-schema) \ No newline at end of file diff --git a/docs/docs/Release_Notes/3.0.0/3.0.0_Breaking_Changes.md b/docs/docs/Release_Notes/3.0.0/3.0.0_Breaking_Changes.md new file mode 100644 index 00000000..b0c13762 --- /dev/null +++ b/docs/docs/Release_Notes/3.0.0/3.0.0_Breaking_Changes.md @@ -0,0 +1,36 @@ +# Breaking Changes - v.3.0.0 + +## New required schema +[Snapshot Parameters Definition](/References/Schemas_and_Autogenerated_Classes.md#snapshotparametersdefinition-schema) allows plugin authors to define [Snapshot Parameters] which can be displayed to an end-user whenever a linked source snapshot is taken. + +### What is affected +All plugins built with v2.0.0 or below will be affected. The [Schema](/References/Schemas) must contain a `snapshotParametersDefinition`. + +### How does it fail +[dvp build](/References/CLI.md#build) will fail with the following error message if the [SnapshotParametersDefinition Schema](/References/Schemas_and_Autogenerated_Classes.md#snapshotparametersdefinition-schema) is not added to the schema file: + +```bash +$ dvp build +Error: 'snapshotParametersDefinition' is a required property on ['required'] + +Validation failed on /private/var/tmp/fp/schemas/schema.json. +0 Warning(s). 1 Error(s) + +BUILD FAILED. +``` + +### How to fix it +Add a [SnapshotParametersDefinition Schema](/References/Schemas_and_Autogenerated_Classes.md#snapshotparametersdefinition-schema) to the `schemaFile` defined in the [Plugin Config](/References/Plugin_Config). + +Example: +```python +"snapshotParametersDefinition": { + "additionalProperties": false, + "properties": { + "resync": { + "type": "boolean" + } + }, + "type": "object" +} +``` diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 75fd7ad4..ab7a34db 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -10,8 +10,9 @@ theme: font: text: Helvetica Neue code: Ubuntu Mono + feature: -copyright: Copyright © 2019 Delphix Corp. +copyright: Copyright © 2021 Delphix Corp. google_analytics: - 'UA-35429885-3' From 271b084439d6a4f06a1a45331efd5e72bd6ccd9a Mon Sep 17 00:00:00 2001 From: jeff ngo Date: Thu, 7 Jan 2021 12:44:09 -0800 Subject: [PATCH 2/3] Updated site name --- docs/mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index ab7a34db..d1799bc9 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Delphix Virtualization SDK 2.1.0 +site_name: Delphix Virtualization SDK 3.0.0 theme: name: material custom_dir: 'material/' From f6b228d7064883a76e18887d9104a09b42ea13c1 Mon Sep 17 00:00:00 2001 From: jeff ngo Date: Mon, 11 Jan 2021 13:03:49 -0800 Subject: [PATCH 3/3] Added a release note for scratch paths --- docs/docs/Release_Notes/3.0.0/3.0.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/Release_Notes/3.0.0/3.0.0.md b/docs/docs/Release_Notes/3.0.0/3.0.0.md index 236b5726..f6854791 100644 --- a/docs/docs/Release_Notes/3.0.0/3.0.0.md +++ b/docs/docs/Release_Notes/3.0.0/3.0.0.md @@ -3,7 +3,8 @@ To install or upgrade the SDK, refer to instructions [here](/Getting_Started.md#installation). ## New & Improved -* N/A +* Added a `scratch_path` property on the [RemoteHost](/References/Classes/#remotehost) object for storage and debugging purposes. +More details about `scratch_path` can be found [here](/Best_Practices/Scratch_Paths.md) ## Breaking Changes