forked from vmware/go-vcloud-director
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: abarreiro <[email protected]>
- Loading branch information
Showing
19 changed files
with
1,063 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
* Added `ContentLibraryItem` and `types.ContentLibraryItem` structures to manage Content Library Items | ||
with methods `ContentLibrary.CreateContentLibraryItem`, `ContentLibrary.GetAllContentLibraryItems`, | ||
`ContentLibrary.GetContentLibraryItemByName`, `ContentLibrary.GetContentLibraryItemById`, `ContentLibraryItem.Update`, | ||
`ContentLibraryItem.Delete`, `VCDClient.GetContentLibraryItemById` [GH-717, GH-724] | ||
`ContentLibraryItem.Delete`, `VCDClient.GetContentLibraryItemById` [GH-717, GH-724, GH-733] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
* Added `TmProviderGateway` and `types.TmProviderGateway` structures and methods | ||
`VCDClient.CreateTmProviderGateway`, `VCDClient.GetAllTmProviderGateways`, | ||
`VCDClient.GetTmProviderGatewayByName`, `VCDClient.GetTmProviderGatewayById`, | ||
`VCDClient.GetTmProviderGatewayByNameAndRegionId`, `TmProviderGateway.Update`, | ||
`TmProviderGateway.Delete` to manage Provider Gateways [GH-725] | ||
* Added `TmTier0Gateway` and `types.TmTier0Gateway` structures and methods | ||
`VCDClient.GetAllTmTier0GatewaysWithContext`, `VCDClient.GetTmTier0GatewayWithContextByName` to | ||
read Tier 0 Gateways that are available for TM consumption [GH-725] | ||
* Added `TmIpSpaceAssociation` and `types.TmIpSpaceAssociation` structures and methods | ||
`VCDClient.CreateTmIpSpaceAssociation`, `VCDClient.GetAllTmIpSpaceAssociations`, | ||
`VCDClient.GetTmIpSpaceAssociationById`, | ||
`VCDClient.GetAllTmIpSpaceAssociationsByProviderGatewayId`, | ||
`VCDClient.GetAllTmIpSpaceAssociationsByIpSpaceId`, `TmIpSpaceAssociation.Delete` to manage IP | ||
Space associations with Provider Gateways [GH-725] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* Added types `TmEdgeCluster` and `types.TmEdgeCluster` for reading TM Edge Clusters and managing | ||
their QoS settings `VCDClient.GetAllTmEdgeClusters`, `VCDClient.GetTmEdgeClusterByName`, | ||
`VCDClient.GetTmEdgeClusterByNameAndRegionId`, `VCDClient.GetTmEdgeClusterById`, | ||
`VCDClient.TmSyncEdgeClusters`, `TmEdgeCluster.Update`, `TmEdgeCluster.Delete`, | ||
`TmEdgeCluster.GetTransportNodeStatus` [GH-730] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
//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 || cse || slz || ALL | ||
|
||
/* | ||
* Copyright 2025 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. | ||
*/ | ||
package govcd | ||
|
||
import ( | ||
"fmt" | ||
"net/http" | ||
|
||
"github.com/vmware/go-vcloud-director/v3/types/v56" | ||
"github.com/vmware/go-vcloud-director/v3/util" | ||
|
||
. "gopkg.in/check.v1" | ||
) | ||
|
||
// Test_NewRequestWitNotEncodedParamsWithApiVersion verifies that api version override works | ||
func (vcd *TestVCD) Test_NewRequestWitNotEncodedParamsWithApiVersion(check *C) { | ||
fmt.Printf("Running: %s\n", check.TestName()) | ||
queryUlr := vcd.client.Client.VCDHREF | ||
queryUlr.Path += "/query" | ||
|
||
apiVersion, err := vcd.client.Client.MaxSupportedVersion() | ||
check.Assert(err, IsNil) | ||
|
||
req := vcd.client.Client.NewRequestWitNotEncodedParamsWithApiVersion(nil, map[string]string{"type": "media", | ||
"filter": "name==any"}, http.MethodGet, queryUlr, nil, apiVersion) | ||
|
||
check.Assert(req.Header.Get("User-Agent"), Equals, vcd.client.Client.UserAgent) | ||
|
||
resp, err := checkResp(vcd.client.Client.Http.Do(req)) | ||
check.Assert(err, IsNil) | ||
|
||
check.Assert(resp.Header.Get("Content-Type"), Equals, types.MimeQueryRecords+";version="+apiVersion) | ||
|
||
bodyBytes, err := rewrapRespBodyNoopCloser(resp) | ||
check.Assert(err, IsNil) | ||
|
||
util.ProcessResponseOutput(util.FuncNameCallStack(), resp, string(bodyBytes)) | ||
debugShowResponse(resp, bodyBytes) | ||
|
||
// Repeats the call without API version change | ||
req = vcd.client.Client.NewRequestWitNotEncodedParams(nil, map[string]string{"type": "media", | ||
"filter": "name==any"}, http.MethodGet, queryUlr, nil) | ||
|
||
resp, err = checkResp(vcd.client.Client.Http.Do(req)) | ||
check.Assert(err, IsNil) | ||
|
||
// Checks that the regularAPI version was not affected by the previous call | ||
check.Assert(resp.Header.Get("Content-Type"), Equals, types.MimeQueryRecords+";version="+vcd.client.Client.APIVersion) | ||
|
||
bodyBytes, err = rewrapRespBodyNoopCloser(resp) | ||
check.Assert(err, IsNil) | ||
util.ProcessResponseOutput(util.FuncNameCallStack(), resp, string(bodyBytes)) | ||
debugShowResponse(resp, bodyBytes) | ||
|
||
fmt.Printf("Test: %s run with api Version: %s\n", check.TestName(), apiVersion) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.