-
Notifications
You must be signed in to change notification settings - Fork 27
Fixes #250 Support empty VDBs #256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ Plugin Operation | **Required** | Decorator | Delphix Engine Operations | |
| [Staged Linked Source<br/>Status](#staged-linked-source-status) | **No** |`linked.status()` | N/A | ||
| [Staged Linked Source<br/>Worker](#staged-linked-source-worker) | **No** |`linked.worker()` | N/A | ||
| [Staged Linked Source<br/>Mount Specification](#staged-linked-source-mount-specification) | **Yes** | `linked.mount_specification()` | [Linked Source Sync](Workflows.md#linked-source-sync)<br/>[Linked Source Enable](Workflows.md#linked-source-enable) | ||
| [Virtual Source<br/>Initialize](#virtual-source-initialize) | **No** | `virtual.initialize()` | [Virtual Source Create Empty VDB](Workflows.md#virtual-source-create-empty-vdb) | ||
| [Virtual Source<br/>Configure](#virtual-source-configure) | **Yes** | `virtual.configure()` | [Virtual Source Provision](Workflows.md#virtual-source-provision)<br/>[Virtual Source Refresh](Workflows.md#virtual-source-refresh) | ||
| [Virtual Source<br/>Unconfigure](#virtual-source-unconfigure) | **No** | `virtual.unconfigure()` | [Virtual Source Refresh](Workflows.md#virtual-source-refresh)<br/>[Virtual Source Delete](Workflows.md#virtual-source-delete) | ||
| [Virtual Source<br/>Reconfigure](#virtual-source-reconfigure) | **Yes** | `virtual.reconfigure()` | [Virtual Source Rollback](Workflows.md#virtual-source-rollback)<br/>[Virtual Source Enable](Workflows.md#virtual-source-enable) | ||
|
|
@@ -593,6 +594,68 @@ def linked_mount_specification(staged_source, repository): | |
| return MountSpecification([mount], ownership_spec) | ||
| ``` | ||
|
|
||
| ## Virtual Source Initialize | ||
|
|
||
| Initializes a brand-new [empty VDB](Glossary.md#empty-vdb). As with all VDBs, this new dataset will have access to mounted Delphix Engine storage, but of course there will be no data there at first. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again not sure if "of course" part really make sense here. I think it's reasonable just to have the sentence say something like: |
||
|
|
||
| The job of the plugin is to do whatever is necessary to set up a new dataset from scratch. For example, this might involve running a `CREATE DATABASE` command. This is an optional operation -- users will not be allowed to create empty VDBs for plugins that choose not to implement this operation. | ||
|
|
||
| As with the `configure` operation, this `initialize` operation must return source config parameters that represent the new dataset. | ||
|
|
||
| ### Required / Optional | ||
| **Optional.** | ||
|
|
||
| ### Delphix Engine Operations | ||
|
|
||
| * [Virtual Source Create Empty VDB](Workflows.md#virtual-source-create-empty-vdb) | ||
|
|
||
| ### Signature | ||
|
|
||
| `def initialize(virtual_source, repository)` | ||
|
|
||
| ### Decorator | ||
|
|
||
| `virtual.initialize()` | ||
|
|
||
| ### Arguments | ||
|
|
||
| Argument | Type | Description | ||
| -------- | ---- | ----------- | ||
| virtual_source | [VirtualSource](Classes.md#virtualsource) | The source associated with this operation. | ||
| repository | [RepositoryDefinition](Schemas_and_Autogenerated_Classes.md#repositorydefinition-class) | The repository associated with this source. | ||
|
|
||
| ### Returns | ||
| [SourceConfigDefinition](Schemas_and_Autogenerated_Classes.md#sourceconfigdefinition-class) | ||
|
|
||
| ### Example | ||
|
|
||
| ```python | ||
| from dlpx.virtualization.platform import Plugin | ||
| from generated.defintions import SourceConfigDefinition | ||
|
|
||
| plugin = Plugin() | ||
|
|
||
| @plugin.virtual.initialize() | ||
| def initialize(virtual_source, repository): | ||
| source_config = SourceConfigDefinition(name="config_name") | ||
| return source_config | ||
| ``` | ||
|
|
||
| > The above command assumes a [SourceConfig Schema](Schemas_and_Autogenerated_Classes.md#sourceconfig-schema) defined as: | ||
|
|
||
| ```json | ||
| { | ||
| "type": "object", | ||
| "required": ["name"], | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "name": { "type": "string" } | ||
| }, | ||
| "identityFields": ["name"], | ||
| "nameField": ["name"] | ||
| } | ||
| ``` | ||
|
|
||
| ## Virtual Source Configure | ||
|
|
||
| Configures the data in a particular snapshot to be usable on a target environment. For database data files, this may mean recovering from a crash consistent format or backup. For application files, this may mean reconfiguring XML files or rewriting hostnames and symlinks. | ||
|
|
||
This file contains hidden or 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 hidden or 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,12 @@ | ||
| <!DOCTYPE html> | ||
| <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| <head> | ||
| <title>Draw.io Diagram</title> | ||
| <meta http-equiv="refresh" content="0;URL='https://www.draw.io/?state=%7B%22ids%22:%5B%221HFcufpN6oaA0JSLXy53Q9dzmEO26Iqng%22%5D,%22action%22:%22open%22,%22userId%22:%22110114316315334056404%22%7D#G1HFcufpN6oaA0JSLXy53Q9dzmEO26Iqng'"/> | ||
| <meta charset="utf-8"/> | ||
| </head> | ||
| <body> | ||
| <div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{"highlight":"#0000ff","nav":true,"resize":true,"xml":"<mxfile modified=\"2019-03-18T00:59:12.121Z\" host=\"www.draw.io\" agent=\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36\" etag=\"SG5n2WI_aCI_iGwCprHQ\" version=\"10.4.9\" type=\"google\"><diagram id=\"-ZfKtbs5jN34PJB2tePp\" name=\"Page-1\">7Vjbbts4EP0aA7sPa+hiy9Jj4rRZYFEggNt1+1Qw0kgiSoleio7tfn2HFmmRktKk3tywWAcIOIfkUJxzyBlpEi6r/bUgm/IDz4BNAi/bT8KrSRAkfoz/FXBogVk8a4FC0KyF/A5Y0e+gQU+jW5pB4wyUnDNJNy6Y8rqGVDoYEYLv3GE5Z+6qG1LAAFilhA3RNc1k2aLx3OvwP4EWpVnZ93RPRcxgDTQlyfjOgsJ3k3ApOJdtq9ovganYmbi0897f03t6MAG1fMyEal1dxZ/S9Sf4+Fd6Gf9zs16LP7SXO8K2esOTIGLo77LZkBrbhWr/TYXcEuVsxbciBWzcCH5HG8prM/5WmNErSYSEbNhhEHxG27sOjzyYmDdS8G+ncGOgLktZMWz66rlKslHjqn2hBDfNGd+lJa44lSAqWhPJBQ7blVTCakNSNXaHIxHLKWNLzlQ/LhNmBOI8VS6P61k9URrDbX56NDvGJmCAW9xbkI75NfAKpDjgEN0784N2ij4A80CfiF0nJ9/IqbSkFGmMaAUXJ9cdydjQPP8C58GA81/jd0whV7yGN094nkOUjhKeLZJbPLjPQni88F6Z8HBA+F1L+BRvzZwWWwG//T4gRfBtnUGmWRgLr0USuW0420q4EKm+w49oZ81OYbdp7hM0V3+jJ/L4UzN4LS28/T0RcaFL3MIfOan+CHFm3pMTNx+5nXssQZ1dqDSHVspI09DUJQbDIQ6f0fCmc2N+UaYxrvaOdbCtGxAUdwLCgHsqLV9ofTHLYLvzpAzj6F5imvaq+UluSnS+J6IA+fCFBpmTyoc8WzyOnT+DCWBE0ju3ABjjVq9wwylurZNRvHBlNO+d63bjepadsHuOwpnnXiRJz1EbmIGjo9RO2z5ffdETqO9FBRM+Ui9GWG9EMEHi8pzMzhTMQHlmoy8kmMUrXldnCE0Z/RvuX9xWj72svP+m+F77tjJat9S3NNXNkh3L054WVWVA8U3vgtGiVoJEzpUQnOJzULKYchQ1QhgDxrEqrRDfWEpy+iyJjVZRbp1llUzH1dq2Nw1UkZPySh2Yo1J7pRP42RwWY6VTEi1CEj1Vbdu7YZLFsESajZVIz/Yy4w1oN8VthYGVX5sNpDRHniW+zPxf5iKHnsthFCZDDqOXLHODsa8QbzhxnJ8kjFofzBLhm0oSs8SVzDyJz0sSQS9JRHHP0dlJAs3uU1o7vPseGb77AQ==</diagram></mxfile>","toolbar":"pages zoom layers lightbox","page":0}"></div> | ||
| <a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="https://www.draw.io/?state=%7B%22ids%22:%5B%221HFcufpN6oaA0JSLXy53Q9dzmEO26Iqng%22%5D,%22action%22:%22open%22,%22userId%22:%22110114316315334056404%22%7D#G1HFcufpN6oaA0JSLXy53Q9dzmEO26Iqng" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a> | ||
| </body> | ||
| </html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kinda nit, I'm not sure I like this sentence but my suggestions aren't much better. Maybe instead of saying like ths vdb will typically not stay empty for long we can write a more clear sentence about how it starts out empty but can have things written into it depending on the user?
You can leave it this way if too if you disagree with my suggestion.