Skip to content

Commit

Permalink
Merge branch 'main' into provider-vdc
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Maxia <gmaxia@vmware.com>
  • Loading branch information
Giuseppe Maxia committed Jul 2, 2023
2 parents 6ab169f + be0efa9 commit 7981dff
Show file tree
Hide file tree
Showing 13 changed files with 771 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changes/v2.21.0/575-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Added methods to create, get, publish and delete UI Plugins `VCDClient.AddUIPlugin`, `VCDClient.GetAllUIPlugins`,
`VCDClient.GetUIPluginById`, `VCDClient.GetUIPlugin`, `UIPlugin.Update`, `UIPlugin.GetPublishedTenants`,
`UIPlugin.PublishAll`, `UIPlugin.UnpublishAll`, `UIPlugin.Publish`, `UIPlugin.Unpublish`, `UIPlugin.IsTheSameAs` and `UIPlugin.Delete` [GH-575]
1 change: 1 addition & 0 deletions .changes/v2.21.0/583-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Added `unit` step to GitHub Actions [GH-583]
3 changes: 3 additions & 0 deletions .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ jobs:

- name: verify
run: make tagverify

- name: unit
run: make testunit
10 changes: 7 additions & 3 deletions govcd/api_vcd_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build api || openapi || functional || catalog || vapp || gateway || network || org || query || extnetwork || task || vm || vdc || system || disk || lb || lbAppRule || lbAppProfile || lbServerPool || lbServiceMonitor || lbVirtualServer || user || search || nsxv || nsxt || auth || affinity || role || alb || certificate || vdcGroup || metadata || providervdc || rde || vsphere || ALL
//go:build api || openapi || functional || catalog || vapp || gateway || network || org || query || extnetwork || task || vm || vdc || system || disk || lb || lbAppRule || lbAppProfile || lbServerPool || lbServiceMonitor || lbVirtualServer || user || search || nsxv || nsxt || auth || affinity || role || alb || certificate || vdcGroup || metadata || providervdc || rde || vsphere || uiPlugin || ALL

/*
* Copyright 2022 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
Expand Down Expand Up @@ -786,10 +786,14 @@ func (vcd *TestVCD) removeLeftoverEntities(entity CleanupEntity) {

// RDE Framework has a bug in VCD 10.3.0 that causes "not found" errors to return as "400 bad request",
// so we need to amend them
isBuggyRdeError := strings.Contains(entity.OpenApiEndpoint, types.OpenApiEndpointRdeInterfaces)
if isBuggyRdeError {
if strings.Contains(entity.OpenApiEndpoint, types.OpenApiEndpointRdeInterfaces) {
err = amendRdeApiError(&vcd.client.Client, err)
}
// UI Plugin has a bug in VCD 10.4.x that causes "not found" errors to return a NullPointerException,
// so we need to amend them
if strings.Contains(entity.OpenApiEndpoint, types.OpenApiEndpointExtensionsUi) {
err = amendUIPluginGetByIdError(entity.Name, err)
}

if ContainsNotFound(err) {
vcd.infoCleanup(notFoundMsg, entity.EntityType, entity.Name)
Expand Down
2 changes: 1 addition & 1 deletion govcd/common_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build api || auth || functional || catalog || vapp || gateway || network || org || query || extnetwork || task || vm || vdc || system || disk || lb || lbAppRule || lbAppProfile || lbServerPool || lbServiceMonitor || lbVirtualServer || user || role || nsxv || nsxt || openapi || affinity || search || alb || certificate || vdcGroup || metadata || providervdc || rde || vsphere || ALL
//go:build api || auth || functional || catalog || vapp || gateway || network || org || query || extnetwork || task || vm || vdc || system || disk || lb || lbAppRule || lbAppProfile || lbServerPool || lbServiceMonitor || lbVirtualServer || user || role || nsxv || nsxt || openapi || affinity || search || alb || certificate || vdcGroup || metadata || providervdc || rde || uiPlugin || vsphere || ALL

/*
* Copyright 2021 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
Expand Down
9 changes: 9 additions & 0 deletions govcd/openapi_endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ var endpointMinApiVersions = map[string]string{
types.OpenApiPathVersion1_0_0 + types.OpenApiEndpointNetworkPools: "36.0",
types.OpenApiPathVersion1_0_0 + types.OpenApiEndpointNetworkPoolSummaries: "36.0",
types.OpenApiPathVersion1_0_0 + types.OpenApiEndpointStorageProfiles: "33.0",

// Extensions API endpoints. These are not versioned
types.OpenApiEndpointExtensionsUi: "35.0", // VCD 10.2+
types.OpenApiEndpointExtensionsUiPlugin: "35.0", // VCD 10.2+
types.OpenApiEndpointExtensionsUiTenants: "35.0", // VCD 10.2+
types.OpenApiEndpointExtensionsUiTenantsPublishAll: "35.0", // VCD 10.2+
types.OpenApiEndpointExtensionsUiTenantsPublish: "35.0", // VCD 10.2+
types.OpenApiEndpointExtensionsUiTenantsUnpublishAll: "35.0", // VCD 10.2+
types.OpenApiEndpointExtensionsUiTenantsUnpublish: "35.0", // VCD 10.2+
}

// endpointElevatedApiVersions endpoint elevated API versions
Expand Down
Loading

0 comments on commit 7981dff

Please sign in to comment.