Skip to content

Conversation

vimleshmishra
Copy link
Contributor

Problem:

These changes are required to support two upcoming decorators, where plugin authors will be allowed to define the ways for calculating the size of different sources [Direct Linked Source, Staged Linked Source, and Virtual Source]. That data can then be displayed in the UI/CLI and used as needed by users.

Solution:

Most of these changes are boilerplate to support the two upcoming decorators.

Testing

git blackbox -s appdata_python_samples --extra-params="-p virt-sdk-repo=https://github.com/vimleshmishra/virtualization-sdk.git -p virt-sdk-branch=develop"

git blackbox -s appdata_basic -c APPDATA_PYTHON_DIRECT_CENTOS73 --extra-params="-p virt-sdk-repo=https://github.com/vimleshmishra/virtualization-sdk.git -p virt-sdk-branch=develop"

git blackbox -s appdata_basic -c APPDATA_PYTHON_STAGED_CENTOS73 --extra-params="-p virt-sdk-repo=https://github.com/vimleshmishra/virtualization-sdk.git -p virt-sdk-branch=develop"

@vimleshmishra vimleshmishra requested review from nhlien93 and mrburke July 6, 2022 10:11
Copy link
Contributor

@ravi-cm ravi-cm left a comment

Choose a reason for hiding this comment

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

And could you also please update test section w/ the o/p of unit tests under platform and tools? If you want to update unit tests in a separate CP, that should be ok. Ship it once tests are clean.

source_config = SourceConfigDefinition.from_dict(
json.loads(request.source_config.parameters.json))

size = self.source_size_impl(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: same comment here and other places - size -> source_size

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will be taking care in separate JIRA.

@@ -450,6 +453,7 @@ def plugin_manifest(upgrade_operation):
'hasVirtualPostSnapshot': True,
'hasVirtualMountSpecification': True,
'hasVirtualStatus': False,
'hasVirtualSourceSize': False,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please update `tools/src/test/python/dlpx/virtualization/_internal/fake_plugin/direct/successful.py and add this new decorator and plugin implementation on the same lines as other methods here so that pytest under tools covers this? test_plugin_importer.py uses these fake plugins for unit testing/integ of sorts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will be taking care in separate JIRA.

@@ -408,6 +409,7 @@ def mount_specification(virtual_source, repository):
virtual.status_impl = None
virtual.initialize_impl = None
virtual.cleanup_impl = None
virtual.source_size_impl = None
Copy link
Contributor

Choose a reason for hiding this comment

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

This CP or may be a follow up - do you think it makes sense to add some unit tests in platform/src/test/python/dlpx/virtualization/test_plugin.py ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will be taking care in separate JIRA.

@vimleshmishra vimleshmishra merged commit 5178f8b into delphix:develop Jul 12, 2022
SumoSourabh pushed a commit to SumoSourabh/virtualization-sdk that referenced this pull request Aug 24, 2022
* __hash__ is needed in python 3

* DLPX-79760 SnapshotDefinitionDataPaths object is not hashable since py2-3 transition

* DOC-2234 Update new logo in developer.delphix.com

* Resolved COnflicts

* revert logo chnages

* revert logo chnages

* Resolve Conflicts

* revert changes

* revert logo.png

* Resolve Conflicts

* DOC-2234 Update new logo in developer.delphix.com

* logo chnages

* DOC-2234 Update new logo in developer.delphix.com

* new favicon

* incorporated review comments

* DLPX-81195 develop version of vSDK needs to be bumped up to 4.0.4 for testing to use latest vSDK code

* DLPX-81195 develop version of vSDK needs to be bumped up to 4.0.4 for testing to use latest vSDK code

* Changes suggested by Aleks

* CP-8174 VSDK Changes to support source sizing decorators

* reverted dvp version related changes

* reverted extra comma

* update engine API version

* Fixed Formatting Issues

* Fixed Formatting Issues

* Fixed Unit Tests

* Fixed Unit Tests
SumoSourabh added a commit to SumoSourabh/virtualization-sdk that referenced this pull request Aug 24, 2022
* Updating code owners for the github repository (delphix#439)

Updating code owners

Co-authored-by: Sourabh Jain <[email protected]>

* Create CodeOwners File [Terraform]

* CP-8174 VSDK Changes to support source sizing decorators (delphix#441)

* __hash__ is needed in python 3

* DLPX-79760 SnapshotDefinitionDataPaths object is not hashable since py2-3 transition

* DOC-2234 Update new logo in developer.delphix.com

* Resolved COnflicts

* revert logo chnages

* revert logo chnages

* Resolve Conflicts

* revert changes

* revert logo.png

* Resolve Conflicts

* DOC-2234 Update new logo in developer.delphix.com

* logo chnages

* DOC-2234 Update new logo in developer.delphix.com

* new favicon

* incorporated review comments

* DLPX-81195 develop version of vSDK needs to be bumped up to 4.0.4 for testing to use latest vSDK code

* DLPX-81195 develop version of vSDK needs to be bumped up to 4.0.4 for testing to use latest vSDK code

* Changes suggested by Aleks

* CP-8174 VSDK Changes to support source sizing decorators

* reverted dvp version related changes

* reverted extra comma

* update engine API version

* Fixed Formatting Issues

* Fixed Formatting Issues

* Fixed Unit Tests

* Fixed Unit Tests

* CP-8293 Update version to 4.0.5.dev0 for virtualization-sdk develop branch before updating github actions (delphix#442)

* __hash__ is needed in python 3

* DLPX-79760 SnapshotDefinitionDataPaths object is not hashable since py2-3 transition

* DOC-2234 Update new logo in developer.delphix.com

* Resolved COnflicts

* revert logo chnages

* revert logo chnages

* Resolve Conflicts

* revert changes

* revert logo.png

* Resolve Conflicts

* DOC-2234 Update new logo in developer.delphix.com

* logo chnages

* DOC-2234 Update new logo in developer.delphix.com

* new favicon

* incorporated review comments

* DLPX-81195 develop version of vSDK needs to be bumped up to 4.0.4 for testing to use latest vSDK code

* DLPX-81195 develop version of vSDK needs to be bumped up to 4.0.4 for testing to use latest vSDK code

* Changes suggested by Aleks

* CP-8174 VSDK Changes to support source sizing decorators

* reverted dvp version related changes

* reverted extra comma

* update engine API version

* Fixed Formatting Issues

* Fixed Formatting Issues

* Fixed Unit Tests

* Fixed Unit Tests

* Bumping up dvp-api, vsdk

* uppdate formatting

* Revert "CP-8293 Update version to 4.0.5.dev0 for virtualization-sdk develop branch before updating github actions (delphix#442)" (delphix#443)

This reverts commit 222517e.

* CP-8293 Update version to 4.0.5.dev0 for virtualization-sdk develop branch before updating github actions (delphix#444)

* __hash__ is needed in python 3

* DLPX-79760 SnapshotDefinitionDataPaths object is not hashable since py2-3 transition

* DOC-2234 Update new logo in developer.delphix.com

* Resolved COnflicts

* revert logo chnages

* revert logo chnages

* Resolve Conflicts

* revert changes

* revert logo.png

* Resolve Conflicts

* DOC-2234 Update new logo in developer.delphix.com

* logo chnages

* DOC-2234 Update new logo in developer.delphix.com

* new favicon

* incorporated review comments

* DLPX-81195 develop version of vSDK needs to be bumped up to 4.0.4 for testing to use latest vSDK code

* DLPX-81195 develop version of vSDK needs to be bumped up to 4.0.4 for testing to use latest vSDK code

* Changes suggested by Aleks

* CP-8174 VSDK Changes to support source sizing decorators

* reverted dvp version related changes

* reverted extra comma

* update engine API version

* Fixed Formatting Issues

* Fixed Formatting Issues

* Fixed Unit Tests

* Fixed Unit Tests

* Bumping up dvp-api, vsdk

* uppdate formatting

* for rerun the failed runs

* bumpversion support dev bumping

* revert bumpversion support dev bumping

* bump up version from dev0 to dev1

* bump up version from dev0 to dev1

* virtualization-sdk master branch will always refer dlpx-appgate stage/release

* virtualization-sdk master branch will always refer dlpx-appgate stage/release

* virtualization-sdk master branch will always refer dlpx-appgate stage/release

* virtualization-sdk master branch will always refer dlpx-appgate stage/release

* virtualization-sdk master branch will always refer dlpx-appgate stage/release

* Fixed Issue: Lint common - Python38

Co-authored-by: Sourabh Jain <[email protected]>
Co-authored-by: Sourabh Jain <[email protected]>
Co-authored-by: Terraform User <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants