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

Update generated types to vSphere 8.0 GA #3006

Merged
merged 6 commits into from Dec 12, 2022

Conversation

akutz
Copy link
Member

@akutz akutz commented Dec 12, 2022

Description

This PR updates the generated types to vSphere 8.0 GA and includes several other changes in order to support running tests locally on macOS 12.4:

  1. fixes a bug where govc about.cert was not respecting the -k flag (or env var) that disabled TLS verification
  2. updates the cert/key pairs vC Sim uses for testing to be RSA 2048 in accordance with Apple's new requirements on macOS
  3. updates the GoVmomi SOAP client to use DialTLSContext instead of DialTLS, as the latter has been deprecated for multiple, major Go versions. The DialTLSContext function refactors the logic related to thumbprint verification due to changes in Go 1.18+. For more information, please search for Certificate.Verify in the Go 1.18 release notes
  4. updates the instances of $mktemp in the govc/test/*.bats files to support the macOS variant's flags
  5. fixes several bugs related to the Namespace API:
    • there was an NPE occurring due to a pointer variable being used prior to being assigned
    • the govc namespace.logs.download was just broken due to:
      • not sending the VAPI authentication data
      • the VAPI client assuming the response will always be JSON and not possibly binary data as one sends when receiving a tar file
    • the namespace.bats file used to use the cluster name Workload-Cluster, but due to a hack in the simulated namespaces API, it only recognizes clusters that begin with WCP.

Related issues:

Closes: NA

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?

make test

Some tests related to vC Sim failed due to the nginx container used and running them on Apple Silicon. Allowing the PR's GitHub actions to validate the PR the rest of the way.

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

@akutz akutz force-pushed the feature/vsphere-8.0-ga-types branch 2 times, most recently from dd2c301 to 9e7ab0c Compare December 12, 2022 02:44
@akutz akutz mentioned this pull request Dec 12, 2022
11 tasks
@akutz akutz force-pushed the feature/vsphere-8.0-ga-types branch from ea7b1dc to 188ce3d Compare December 12, 2022 15:19
aruneshpa
aruneshpa previously approved these changes Dec 12, 2022
Copy link
Contributor

@aruneshpa aruneshpa left a comment

Choose a reason for hiding this comment

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

LGTM.

govc/test/namespace.bats Show resolved Hide resolved
akutz and others added 6 commits December 12, 2022 11:25
This patch updates the generated types to vSphere 8.0 GA.
This patch fixes a bug where "govc about.cert" was not respecting
the -k flag (or env var) that disabled TLS verification.
This patch updates the cert/key pairs vC Sim uses for testing to
be RSA 2048 in accordance with Apple's new requirements on macOS.

https://developer.apple.com/documentation/security/preventing_insecure_network_connections
This patch updates the GoVmomi SOAP client to use DialTLSContext
instead of DialTLS, as the latter has been deprecated for multiple,
major Go versions.

This patch also updates how the SOAP client handles TLS validation
with respect to thumbprints. Go 1.18+ adopted the host's certificate
verification framework, so it is necessary to alter a few things to
continue to support thumbprint verification.

* https://tip.golang.org/doc/go1.18 (search for "Certificate.Verify")
* square/certigo#264
This patch updates the instances of $mktemp in the govc/test/*.bats
files to support the macOS variant.
This patch fixes a few bugs related to the Namespaces API. There
was an NPE occurring due to a pointer variable being used prior to
being assigned. The "govc namespace.logs.download" command also
just failed to work due to the VAPI client assuming the response
will always be JSON and not possibly, binary data as one sends when
one receives a tar file. Finally, the namespace.bats file used to
use the cluster name "Workload-Cluster", but due to a hack in the
simulated namespaces API, it only recognizes clusters that begin
with "WCP".
Copy link
Member

@HakanSunay HakanSunay left a comment

Choose a reason for hiding this comment

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

LGTM

@akutz akutz merged commit 9a92fef into vmware:master Dec 12, 2022
@akutz akutz deleted the feature/vsphere-8.0-ga-types branch December 12, 2022 18:06
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

4 participants