Skip to content
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

Add KMS support to mock vcenter #3296

Open
wants to merge 195 commits into
base: main
Choose a base branch
from

Conversation

priyanka19-98
Copy link

Description

Mock VC simulator did not have any support for KMS.

Added basic KMS support for mock simulator.

Closes: #(issue-number)

Type of change

Please mark options that are relevant:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update
  • Build related change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. If applicable, please also list any relevant
details for your test configuration.

  • Test Description 1
  • Test Description 2

Checklist:

  • My code follows the CONTRIBUTION guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

@vmwclabot
Copy link
Member

@priyanka19-98, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

Copy link
Member

@dougm dougm left a comment

Choose a reason for hiding this comment

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

Thanks @priyanka19-98 , this is looking good. Based some things commented out, printfs, main() func in simulator package, etc., is this still work-in-progress? I will take a closer look soon and I've not used KMS at all myself, so want to read up on that a bit too.

@priyanka19-98
Copy link
Author

Thanks @priyanka19-98 , this is looking good. Based some things commented out, printfs, main() func in simulator package, etc., is this still work-in-progress? I will take a closer look soon and I've not used KMS at all myself, so want to read up on that a bit too.

yes, I am waiting for one PR to be merged into these changes. Thanks for your response

dougm and others added 25 commits January 17, 2024 14:44
The uuid.NodeID function returns the node's (first) nic hardware address.
Using this makes ServiceContent.InstanceUuid unique, yet stable.
This change adds a common stub for the non-linux envs using buildtags.
…oup method

govc: Add feature in sso.group.ls to list users using FindUsersInGroup method

Closes: vmware#2945
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Closes vmware#2956

Signed-off-by: Sunny Carter <[email protected]>
[Elastic Agent VMware vSphere integration](https://github.com/elastic/integrations/tree/main/packages/vsphere) to the list of projects using govmomi.

Signed-off-by: Essodjolo KAHANAM <[email protected]>
This change fixes the recentTasks errors in the task historyCollector.
TaskHistoryCollector does not have a recentTask property,
so this method always fails.
Update to latestPage to fix this bug.
PlaceVmsXCluster request has two optional bool fields as to whether host
and/or datastore selection is required as a part of the placement response.

Update simulator PlaceVmsXCluster response to include the ConfigSpec
only when the datastore selection is required to match real VC behavior.
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.6 to 1.13.9.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](sparklemotion/nokogiri@v1.13.6...v1.13.9)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [chuhlomin/render-template](https://github.com/chuhlomin/render-template) from 1.5 to 1.6.
- [Release notes](https://github.com/chuhlomin/render-template/releases)
- [Commits](chuhlomin/render-template@v1.5...v1.6)

---
updated-dependencies:
- dependency-name: chuhlomin/render-template
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [andstor/file-existence-action](https://github.com/andstor/file-existence-action) from 1 to 2.
- [Release notes](https://github.com/andstor/file-existence-action/releases)
- [Commits](andstor/file-existence-action@v1...v2)

---
updated-dependencies:
- dependency-name: andstor/file-existence-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
dougm and others added 25 commits January 17, 2024 14:44
PR vmware#3007 added camelCase json tags for generated types
BREAKING: This change adds camelCase (lower-case 1st character) json tags for govc types

Fixes vmware#3243
Fixes vmware#3242
Fixes vmware#3241
vcsim: add EnvironmentBrowser methods and record/replay support

api: add object.EnvironmentBrowser helper methods

govc: add vm.option.ls, vm.target.info and vm.target.cap.ls commands

BREAKING: removed object.VirtualMachine.QueryConfigTarget method
- Use object.VirtualMachine.EnvironmentBrowser().QueryConfigTarget instead
guest file transfer and ticketed datastore file transfer use direct ESX connections.
The connection should be only be used for a single request, ensure this by disabling client side.
The ConfigSpec returned by CreateImportSpec() will include devices from
the OVF but since the simulator impl just reconfigures the VM with the
user provided ConfigSpec, those default devices won't be removed.  In VM
Operator, likely the only user of this API w/ the ConfigSpec param, this
would result in an extra Reconfigure to remove the unexpected devices.
However, I'd like to be able to assert that a just-created VM matches
the expected config.

It is a easier to just skip the EthCards instead of including all the
disk and disk controllers. A later improvement would be to merge the two
ConfigSpecs so the Reconfigure is not needed but neither is a huge deal
for the simulator.
Bumps [chuhlomin/render-template](https://github.com/chuhlomin/render-template) from 1.7 to 1.8.
- [Release notes](https://github.com/chuhlomin/render-template/releases)
- [Commits](chuhlomin/render-template@v1.7...v1.8)

---
updated-dependencies:
- dependency-name: chuhlomin/render-template
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
vcsim: ResourcePool.ImportVApp improvements
- Run within an internal Task as real vCenter does
- Set VirtualMachineImportSpec.VAppConfig in CreateImportSpec
- Propagate VAppConfig to VirtualMachine (config.vAppConfig)
- Validate userConfigurable=false properties

Fixes vmware#3111
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.9 to 0.6.0.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](google/go-cmp@v0.5.9...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
BREAKING: api: view.ListView.{Add,Remove,Reset} methods now return unresolved references
soap.Client sends OperationID as part of the soap body header.
vapi uses the `X-Request-ID` http header.
vcsim: apply DasConfig + DrsConfig in ReconfigureComputResource_Task
The existing code would panic due to not checking for svm being nil and
then immediately accessing a field to check power state.
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](google/uuid@v1.3.1...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/google/uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@priyanka19-98
Copy link
Author

Thanks @priyanka19-98 , this is looking good. Based some things commented out, printfs, main() func in simulator package, etc., is this still work-in-progress? I will take a closer look soon and I've not used KMS at all myself, so want to read up on that a bit too.

yes, I am waiting for one PR to be merged into these changes. Thanks for your response

@dougm could you please review again?

@dougm
Copy link
Member

dougm commented Feb 29, 2024

Thanks @priyanka19-98 , will try to review soon. Could you please rebase ? (note how PR says your branch has "195 commits")

Copy link
Contributor

This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Mark as fresh by adding the comment /remove-lifecycle stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet