-
Notifications
You must be signed in to change notification settings - Fork 75
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
Work with tenant non-Admin resources as provider user #384
Comments
updated fields for QueryResultAdminOrgVdcStorageProfileRecordType and QueryResultOrgVdcStorageProfileRecordType add skip/error in case of Client.IsSysAdmin - vmware#384
As i understood, you tried to fix something same in #376 |
We have only recently started working with tenant context. Until recently the XML-based API did not require any special treatment in this regard. Our first inclusion of tenant context was with vApp and Catalog access control. There, we added tenant context only for those specific calls. Moving to JSON-based Open API calls, we realized that many more calls need the tenant context. We again did specific adjustments for VDC retrieval functions. |
May be i can help? In my code i'm working with tenant context every time. (Also i already have functions for work with nat and firewall rules on NSX-T). Do you have some public roadmap or plan? |
As example: all funcs, that works Admin objects should have tenantID as parameter. |
Thanks for your help offer. However what we are implementing is the result of a lengthy internal discussion and we could not possibly change it before release time, which is approaching rapidly. |
Any news? Now this library can't work correctly with tenant resources as provider admin. May be we can discuss some solutions, that can be applied right now? go-vcloud-director/govcd/vdc.go Line 673 in cb04bc1
add header with tenant id? queryReq.Header.Add(types.HeaderTenantContext, orgID) Or you some problems with this solutions? |
When you work with tenant non-Admin resources as provider user, on every request you should add
X-VMWARE-VCLOUD-TENANT-CONTEXT
header with tenant id. (as i understood).That was a root problem of #373.
And i see some wrong hot-fixes in code.
Example -
go-vcloud-director/govcd/vdc.go
Line 673 in cb04bc1
QueryResultAdminVMRecordType and QueryResultVMRecordType - different types,
https://code.vmware.com/apis/722/vmware-cloud-director/doc/doc/types/QueryResultAdminVMRecordType.html
https://code.vmware.com/apis/722/vmware-cloud-director/doc/doc/types/QueryResultVMRecordType.html
but both are implemented as QueryResultVMRecordType -
go-vcloud-director/types/v56/types.go
Line 2134 in cb04bc1
Im my code i needed to re-implement some functions with adding one line
And providing
orgID
when i work as provider userMay be you already know about this situation and have some thoughts?
The text was updated successfully, but these errors were encountered: