vmware / go-vcloud-director

Golang SDK for VMware Cloud Director
Other
80 stars 79 forks source link

enable query orgs #612

Closed medea61 closed 4 months ago

medea61 commented 12 months ago

Description

Related issue: #611

vmwclabot commented 12 months ago

@medea61, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

vmwclabot commented 12 months ago

@medea61, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

dataclouder commented 12 months ago

Thanks for your contribution. We don't have a query for organizations because our software clients have not required it yet. That said, we can add the feature, but we will do so only if it is accompanied by proper testing. Look at Test_QueryProviderVdcByName for an example of the test we would like to see . A Query element per se is not useful: it should have at least three auxiliary functions:

vmwclabot commented 12 months ago

@medea61, VMware has approved your signed contributor license agreement.

dataclouder commented 12 months ago

Please make sure your code compiles before asking for review

go test -tags functional -check.f Test_QueryOrgByName -check.vv -timeout 0
# github.com/vmware/go-vcloud-director/v2/govcd [github.com/vmware/go-vcloud-director/v2/govcd.test]
./system_test.go:764:24: vcd.config.VCD.Org.Name undefined (type string has no field or method Name)
./system_test.go:769:26: vcd.client.QueryOrgByName undefined (type *VCDClient has no field or method QueryOrgByName)
./system_test.go:769:52: vcd.config.Org undefined (type TestConfig has no field or method Org)
./system_test.go:775:25: vcd.config.VCD.Org.Name undefined (type string has no field or method Name)
./system_test.go:794:24: vcd.config.VCD.Org.Id undefined (type string has no field or method Id)
./system_test.go:799:26: vcd.client.QueryOrgById undefined (type *VCDClient has no field or method QueryOrgById)
./system_test.go:799:50: vcd.config.Org undefined (type TestConfig has no field or method Org)
./system_test.go:805:25: vcd.config.VCD.Org.Name undefined (type string has no field or method Name)
medea61 commented 12 months ago

Please make sure your code compiles before asking for review

Tests compile now. Can't run the tests locally at the moment as I have only prod deployments. 🙈

lvirbalas commented 11 months ago

@medea61 this PR is very close to approval. Would you have a chance to implement the remaining asks?

dataclouder commented 4 months ago

Thanks for your contribution. This code has been merged with PR #669

dataclouder commented 1 month ago

Added to main through PR #669