Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.1.0.dev3
current_version = 2.2.0.dev0
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0.dev3
2.2.0.dev0
1 change: 1 addition & 0 deletions docs/docs/References/Plugin_Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The name of the file can be specified during the build. By default, the build lo
|language|Y|enum|Must be `PYTHON27`.|
|defaultLocale|N|enum|The locale to be used by the plugin if the Delphix user does not specify one. Plugin messages will be displayed in this locale by default. The default value is `en-us`.|
|rootSquashEnabled|N|boolean|This dictates whether "root squash" is enabled on NFS mounts for the plugin (i.e. whether the `root` user on remote hosts has access to the NFS mounts). Setting this to `false` allows processes usually run as `root`, like Docker daemons, access to the NFS mounts. The default value is `true`. This field only applies to Unix hosts.|
|extendedStartStopHooks|N|boolean|This controls whether the user's pre-start and post-start hooks will run during enable operations (and, likewise, whether pre-stop and post-stop hooks will run during disable operations). The default value is `false`.|

## Example
Assume the following basic plugin structure:
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/References/Workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@

![Screenshot](images/VirtualSourceEnable.png)

Note: pre- and post-start hooks are only run if `extendedStartStopHooks` is set to `true` in the [plugin config](Plugin_Config.md).

## Virtual Source Disable

![Screenshot](images/VirtualSourceDisable.png)

Note: pre- and post-stop hooks are only run if `extendedStartStopHooks` is set to `true` in the [plugin config](Plugin_Config.md).

## Upgrade

![Screenshot](images/PluginUpgrade.png)
13 changes: 6 additions & 7 deletions docs/docs/References/html/VirtualSourceDisable.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title>Draw.io Diagram</title>
<meta http-equiv="refresh" content="0;URL='https://www.draw.io/#G1ElT8DJD5QH8kzMbz85S95KI6mnwQtmEg'"/>
<title>disable</title>
<meta charset="utf-8"/>
</head>
<body>
<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quot;resize&quot;:true,&quot;xml&quot;:&quot;&lt;mxfile modified=\&quot;2019-03-18T01:10:35.272Z\&quot; host=\&quot;www.draw.io\&quot; agent=\&quot;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\&quot; etag=\&quot;gfhqW0cUHT1rRxW5FEZE\&quot; version=\&quot;10.4.9\&quot; type=\&quot;google\&quot;&gt;&lt;diagram id=\&quot;-ZfKtbs5jN34PJB2tePp\&quot; name=\&quot;Page-1\&quot;&gt;5VbRbtsgFP2aSNvDIgcnjvPYJl0nTZMqZV3WR4KvbTRsMoybZF8/CGDj2F3XLdMmLZUq7uFygXMO4FG4LA63Au/yDzwBNkJBchiFqxFCi0ms/mvgaIBpPDVAJmhioEkLrOk3sGBg0ZomUHUSJedM0l0XJLwsgcgOhoXg+25ayll31h3OoAesCWZ9dEMTmRs0ngUt/g5olruZJ4HtKbBLtkCV44TvPSi8GYVLwbk0reKwBKa5c7yYcW+f6G0WJqCUPzOg2BSr+J5s7uHje3Idf73bbMQbW+URs9pueIQipupdVztcqnam25+okDXWxda8FgRUY0UrvFUk2eytcLlriYWEpN/hELVCv7YlRx4d45UU/EtDtqLpOpcFU82JXlWOdzqvOGTabuOU8T3J1YxjCaKgJZZcqLR9TiWsd5jo3L3KVFhKGVtypvvVNGGCIU6JLnmaz+uJSAzbtFmaz7CjC9QWDx5kGb8FXoAUR5Vie6cTZIZY+8+QPQ/71kwTZ6bcM1JkMWz9mzWlW4lVw6r8AsVRT/GXqDvkjhUvf5D5j8idphCRQbmT+WKrDu0fkXse/G25w57cj0bucV2qOzOlWS3g1eueLILXZQKJ1WGIYE8mvK04qyVcCWJv8BPaRtOGeF/oc4lm+m/wRJ5+egQvpYeb34WkQ1FHuihEfekQ6kvn8i4uXTRwN5+pBGVypR85FRGGq4qSrjBwoPKzagfjmY0evJ6V3nrggqMNnuSyMrfDs15TD0AG8vkrCJLO09tXxmN+6Mw4TADDkj52H+whNewMd5yqnTXCo0XQEX4xPTuLZt92lP/AnhWaxvPu4Y/PnGGI6RU6maPZ9q/7ZX4Bv5RqCZ5hdPjgTKKD1jKn6OgZ6KU+08EdCKq2DeK3vee+DZ/zXvh/eC9C4YW8p8L2G9Wktx/64c13&lt;/diagram&gt;&lt;/mxfile&gt;&quot;,&quot;toolbar&quot;:&quot;pages zoom layers lightbox&quot;,&quot;page&quot;:0}"></div>
<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="https://www.draw.io/#G1ElT8DJD5QH8kzMbz85S95KI6mnwQtmEg" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>
<body><div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quot;resize&quot;:true,&quot;toolbar&quot;:&quot;zoom layers lightbox&quot;,&quot;edit&quot;:&quot;_blank&quot;,&quot;xml&quot;:&quot;&lt;mxfile host=\&quot;app.diagrams.net\&quot; modified=\&quot;2020-07-27T18:26:11.051Z\&quot; agent=\&quot;5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36\&quot; etag=\&qu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I1KXmsLnsWtGs1LpHISh5DMpE4a1dIUDhIQZI4xD/SgAr0b6m4yNhLnodlM/HFnbcbe2bVtI3bGEF+oeHvU9szjipD4JlywuDkIXB2eyMjuaaWPByrxnRH52KwvPYGWDF0Xe1Its72VmpJdDaG6MzjeN8Y29LDjRy9xLepkXBZY/FVp8JjcLndlCT7jZubzK8U4QKBC71l0uZM4zZVj3AzryCCWHIeY3Dp7XqvgfIuVBWwduJH9a4+5I47YVx6+SuBMbtd+9sMTjEyWOliV+snZf5VuxWcN4LX8WsQsUsdAPLlzEHPO71GuqGJrf8Ndd8Sg0qlhw4SvunnjF44tWsTi04FP48MxKWhi/tKTNvk/6/plKGnSHXw3b8OG3V/f+fw==&lt;/diagram&gt;&lt;/mxfile&gt;&quot;}"></div>
<script type="text/javascript" src="https://app.diagrams.net/js/viewer-static.min.js"></script>
</body>
</html>
</html>
13 changes: 6 additions & 7 deletions docs/docs/References/html/VirtualSourceEnable.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title>Draw.io Diagram</title>
<meta http-equiv="refresh" content="0;URL='https://www.draw.io/?state=%7B%22ids%22:%5B%221FnLSP-dOiLAaqH-rlW5kZYU2utVpn8ca%22%5D,%22action%22:%22open%22,%22userId%22:%22110114316315334056404%22%7D#G1FnLSP-dOiLAaqH-rlW5kZYU2utVpn8ca'"/>
<title>enable</title>
<meta charset="utf-8"/>
</head>
<body>
<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quot;resize&quot;:true,&quot;xml&quot;:&quot;&lt;mxfile modified=\&quot;2019-03-31T23:00:14.170Z\&quot; host=\&quot;www.draw.io\&quot; agent=\&quot;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\&quot; etag=\&quot;mcP3AlbGPUOvhFV9SQxh\&quot; version=\&quot;10.5.9\&quot; type=\&quot;google\&quot;&gt;&lt;diagram id=\&quot;-ZfKtbs5jN34PJB2tePp\&quot; name=\&quot;Page-1\&quot;&gt;7Vptj9o4EP41SO2HrvKe8HEX2O6q6mkl2t71vpxM4gTrQowcs0B//Y2JTV4cFpYmsD2VlVA8Ho/teR7PTLwM7NFi85Gh5fwzjXA6sIxoM7DHA8vy3QC+hWBbCJzALwQJI1EhMkvBlPzAUmhI6YpEOK8pckpTTpZ1YUizDIe8JkOM0XVdLaZpfdYlSrAmmIYo1aV/kojPC2ngGqX8AZNkrmY2DdmzQEpZCvI5iui6IrInA3vEKOXF02IzwqnwnfJLMe7+QO9+YQxn/JQBD5+frLvtxPfW3uPDx09f/b/D+Qdp5RmlK7nh29GXx2+TgTB2D9+PfyjBbg98qxyTc0b/3fvEHNh3c75I5SPsdSn0FptEsOImTuk6nCPGbyIckpzQDJTWc8LxdIlCobkGPZDJ5WDG8ebgPs2994B1mC4wZ1tQkQNsT1JOMs5WiKxL/PYozavYKSGSnEn2tku3woP07Cu8bGle/kYYXyExcEpXDDxgGZMMzcC5lpfCeu5mDJ4S8TTl4DccqY58iTLVpSsrCSyzrvgietap6HHMFiRDnLID+MUkTUc0Ff0wjR0hHMShMLmbr9LjhQGexR0h7tg1xIctgLstgHt94W3/DN5tQI9p9oLmGwE7jrEXtoId+cMZHK6OwLZqYHv2tdF2NLQ1BHAW3YpkBK0wRXlOwjoIeEP4X/Bs3Liy9b3SMxZbN1RjW2k8YUZgE5gpWQYbqhgSze/VvtLUrqVsFQvGkZYLG6jApgr6Ho11ELQSzF/KPE47zBUY21BUMoZTxMlzfb1t0MoZniiBnZQscgPwUC1NuG7dSLFTOa6aVzVTw0a+aRgqXKEZ2nFtv/Hz6edq9DuYs+HU8TrxGM7Jj10cKoiwFKvcrdu9G7hjkKAVp3lRlokBKCUJJO9ximNhShxlAtXSrRRzuixCV0iy5ItojOF8dHPwDafu55aD77cwxurr3HsHa6f/k9udwDjqdu+Sbvc1tz8XyfVmQVcZ/ydfQokZg3c4lJnv3mtoMNCKcCQd25bXKkChWU7TFce3LJxW0Chbzj7fVfNrMzO64q+1DNp9xAia8Yq8+HSDoGX6jVjnGMOWnOnrINpWTyAOO8yZlYxZ5s9fKmeqF9tjOdO/ZsqEd/kGjXy3ccZPTpmWZqr57nUgaQIj0LaiJgPn4UUPmzPZbu01GR4Km53mZHV7cSK/M1Het5Lb/GlyR/dErL0Xyl6Nihp/huaZVHTtpimnyeqOqKjPdBkq6lc851HxVe8mvdHOuyrvNAg9/0zeOUbTlNs01VkI9A7M1C/v9EuQV/LuLA5dixonxJG3Rw190Zehhn5jokr4nCO+yn9X7RBq/Po9195Ehc/DFj73VrKb+kXDSwe6vWY/s9betbTa5ozE1GUqkiw+ftN11ZTlaCkrODMu6bX0/u71Qlddpn7logIHwyHNYpKsGP4dPUSl0rzfdIa2Fj9MdaYvE0D0m5vLBZDrxgr/1FBx1fLW1A643/ynycmxQgs7fvMNre9YEbyxdHU6nY7SxL4mSxztOlErT09mSdAfS6BZ/raiUC9/oGJP/gM=&lt;/diagram&gt;&lt;/mxfile&gt;&quot;,&quot;toolbar&quot;:&quot;pages zoom layers lightbox&quot;,&quot;page&quot;: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%221FnLSP-dOiLAaqH-rlW5kZYU2utVpn8ca%22%5D,%22action%22:%22open%22,%22userId%22:%22110114316315334056404%22%7D#G1FnLSP-dOiLAaqH-rlW5kZYU2utVpn8ca" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>
<body><div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quot;resize&quot;:true,&quot;toolbar&quot;:&quot;zoom layers lightbox&quot;,&quot;edit&quot;:&quot;_blank&quot;,&quot;xml&quot;:&quot;&lt;mxfile host=\&quot;app.diagrams.net\&quot; modified=\&quot;2020-07-27T18:24:48.685Z\&quot; agent=\&quot;5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36\&quot; etag=\&quot;YgVpqTCTXyGi0B7-PypJ\&quot; version=\&quot;13.5.3\&quot; type=\&quot;device\&quot;&gt;&lt;diagram id=\&quot;JZMjSxPrt3WQ65kFyIVw\&quot; name=\&quot;Page-1\&quot;&gt;7Vpdb6M4FP01kWYfGoHN52PbtLuzq11Vymg6fVq5YBJrAEfGaZL59WvzkWBMGkpJmB01lSp8MRf7nuN7LoYJvE22vzO0Wv5NQxxPgBFuJ3A2AcC3HPFfGnaFwXJAYVgwEhYm82CYkx+4NBqldU1CnCkdOaUxJyvVGNA0xQFXbIgxulG7RTRW77pCC6wZ5gGKdesjCfmysHq2cbD/gcliWd3ZNMozCao6l4ZsiUK6qZng3QTeMkp5cZRsb3EsY1fFpbju/sjZ/cAYTnmXC3D0uPRnj3/Odpvv37wfj38ly6er0ssLitflhK9vv3z+ejeRzu7F/8//VIZ8DnxXBSbjjH7fx8ScwJslT+LyUMx1Jfsl24VkxTSK6SZYIsanIQ5IRmgqOm2WhOP5CgWy50b0E7ZyOJhxvD06T3MfPcE6TBPM2U50KS+AjldcUjIOVohsDvjtUVrWsauMqOTMYu/7EFZxUEb2DVEGWpS/EsbXSF44p2smIgCMuxQ9i+ACJxbjuXlm4mghj+ZcxA2H1YlshdLqlN65sohhqh1fRQ90RY9jlpAUccqO4BeROL6lsTwvbgNDhL0okC7z+9XOOIGHn6OBELeggrjfArjdArhzLrzhe/BuA3pG01d6/iRgRxF2glawQ9d/FovrLGC7cGy0LQ1tDQGchtdSjEQriFGWkUAFAW8J/yaOjaldtp5qZ2Zy6kbV2NUaD5gRMQnMKlsqJ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t;/diagram&gt;&lt;/mxfile&gt;&quot;}"></div>
<script type="text/javascript" src="https://app.diagrams.net/js/viewer-static.min.js"></script>
</body>
</html>
</html>
Binary file modified docs/docs/References/images/VirtualSourceDisable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/docs/References/images/VirtualSourceEnable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dvp/src/main/python/dlpx/virtualization/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0.dev3
2.2.0.dev0
2 changes: 1 addition & 1 deletion libs/src/main/python/dlpx/virtualization/libs/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0.dev3
2.2.0.dev0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0.dev3
2.2.0.dev0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0.dev3
2.2.0.dev0
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019 by Delphix. All rights reserved.
# Copyright (c) 2019, 2020 by Delphix. All rights reserved.
#

import base64
Expand Down Expand Up @@ -217,6 +217,12 @@ def prepare_upload_artifact(plugin_config_content, src_dir, schemas, manifest):
if plugin_config_content.get('luaName'):
artifact['luaName'] = plugin_config_content['luaName']

if plugin_config_content.get('extendedStartStopHooks'):
artifact['extendedStartStopHooks'] = plugin_config_content[
'extendedStartStopHooks']
else:
artifact['extendedStartStopHooks'] = False

if plugin_config_content.get('minimumLuaVersion'):
artifact['minimumLuaVersion'] = plugin_config_content[
'minimumLuaVersion']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
"type": "string",
"pattern": "^[a-z0-9_:-]+$"
},
"extendedStartStopHooks" : {
"type": "boolean"
},
"minimumLuaVersion": {
"type": "string",
"pattern": "^([0-9]+)\\.([0-9]+)$"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
"type": "string",
"pattern": "^[a-z0-9_:-]+$"
},
"extendedStartStopHooks" : {
"type": "boolean"
},
"minimumLuaVersion": {
"type": "string",
"pattern": "^([0-9]+)\\.([0-9]+)$"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,18 @@ def test_build_number_parameter(plugin_config_content, src_dir,

assert expected == upload_artifact['buildNumber']

@staticmethod
@pytest.mark.parametrize('extended_start_stop_hooks, expected', [
pytest.param(True, True),
pytest.param(False, False),
pytest.param(None, False),
])
def test_extended_hooks_parameter(plugin_config_content, src_dir,
schema_content, expected):
upload_artifact = build.prepare_upload_artifact(
plugin_config_content, src_dir, schema_content, {})
assert expected == upload_artifact.get('extendedStartStopHooks')

@staticmethod
@pytest.mark.parametrize('lua_name, expected', [
pytest.param('lua-toolkit-1', 'lua-toolkit-1'),
Expand Down
15 changes: 13 additions & 2 deletions tools/src/test/python/dlpx/virtualization/_internal/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ def artifact_file_created():
def plugin_config_content(plugin_id, plugin_name, external_version, language,
host_types, plugin_type, entry_point, src_dir,
schema_file, manual_discovery, build_number,
lua_name, minimum_lua_version):
extended_start_stop_hooks, lua_name,
minimum_lua_version):
"""
This fixutre creates the dict expected in the properties yaml file the
This fixture creates the dict expected in the properties yaml file the
customer must provide for the build and compile commands.
"""
config = {
Expand Down Expand Up @@ -220,6 +221,9 @@ def plugin_config_content(plugin_id, plugin_name, external_version, language,
if lua_name:
config['luaName'] = lua_name

if extended_start_stop_hooks:
config['extendedStartStopHooks'] = extended_start_stop_hooks

if minimum_lua_version:
config['minimumLuaVersion'] = minimum_lua_version

Expand Down Expand Up @@ -281,6 +285,11 @@ def build_number():
return '2.0.0'


@pytest.fixture
def extended_start_stop_hooks():
return False


@pytest.fixture
def lua_name():
return 'lua-toolkit-1'
Expand Down Expand Up @@ -579,6 +588,7 @@ def basic_artifact_content(engine_api, virtual_source_definition,
'rootSquashEnabled': True,
'buildNumber': '2',
'luaName': 'lua-toolkit-1',
'extendedStartStopHooks': False,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not your change at all but can you quickly check why this basic_artifact_content exist outside of the artifact_content fixture? seems odd to me that we need to have two fixtures for the same thing when it's pretty easy to parameterized them to have the information we'd want/need? (you don't need to fix anything if it might take long, but maybe file an issue to track cleaning this up if it is needed?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I can't immediately find any reason for this to exist either. It was added here http://reviews.delphix.com/r/48675/ before this was open-sourced. Neither the review nor the Jira ticket mentions anything about why this was required, instead of just using artifact_content. I filed #241 for this

'minimumLuaVersion': '2.3',
'sourceCode': 'UEsFBgAAAAAAAAAAAAAAAAAAAAAAAA==',
'manifest': {}
Expand Down Expand Up @@ -628,6 +638,7 @@ def artifact_content(engine_api, virtual_source_definition,
'rootSquashEnabled': True,
'buildNumber': '2',
'luaName': 'lua-toolkit-1',
'extendedStartStopHooks': False,
'minimumLuaVersion': '2.3',
'manifest': {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class TestPackageUtil:
@staticmethod
def test_get_version():
assert package_util.get_version() == '2.1.0.dev3'
assert package_util.get_version() == '2.2.0.dev0'

@staticmethod
def test_get_virtualization_api_version():
Expand Down