Skip to content

Commit 8adeb8b

Browse files
committedDec 16, 2024·
fix: SOAP vcSessionCookie value must be from vim25.Client
Commit 1918984 refactored how we set vcSessionCookie for pbm and vslm endpoints. We need to use the value of vim25.Client's vmware_soap_session for vSessionCookie. Since the first response from pbm/vslm includes a 'Set-Cookie: vmware_soap_session=...', the value of which is _not_ valid for vcSessionCookie. Signed-off-by: Doug MacEachern <dougm@broadcom.com>
1 parent 4976002 commit 8adeb8b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎pbm/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type Client struct {
4949

5050
func NewClient(ctx context.Context, c *vim25.Client) (*Client, error) {
5151
sc := c.Client.NewServiceClient(Path, Namespace)
52-
sc.Cookie = sc.SessionCookie // vcSessionCookie soap.Header
52+
sc.Cookie = c.SessionCookie // vcSessionCookie soap.Header, value must be from vim25.Client
5353

5454
req := types.PbmRetrieveServiceContent{
5555
This: ServiceInstance,

‎vslm/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type Client struct {
4646

4747
func NewClient(ctx context.Context, c *vim25.Client) (*Client, error) {
4848
sc := c.Client.NewServiceClient(Path, Namespace)
49-
sc.Cookie = sc.SessionCookie // vcSessionCookie soap.Header
49+
sc.Cookie = c.SessionCookie // vcSessionCookie soap.Header, value must be from vim25.Client
5050

5151
req := types.RetrieveContent{
5252
This: ServiceInstance,

0 commit comments

Comments
 (0)
Please sign in to comment.