methods.go 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package internal
  14. import (
  15. "context"
  16. "github.com/vmware/govmomi/vim25/soap"
  17. )
  18. type RetrieveDynamicTypeManagerBody struct {
  19. Req *RetrieveDynamicTypeManagerRequest `xml:"urn:vim25 RetrieveDynamicTypeManager"`
  20. Res *RetrieveDynamicTypeManagerResponse `xml:"urn:vim25 RetrieveDynamicTypeManagerResponse"`
  21. Fault_ *soap.Fault
  22. }
  23. func (b *RetrieveDynamicTypeManagerBody) Fault() *soap.Fault { return b.Fault_ }
  24. func RetrieveDynamicTypeManager(ctx context.Context, r soap.RoundTripper, req *RetrieveDynamicTypeManagerRequest) (*RetrieveDynamicTypeManagerResponse, error) {
  25. var reqBody, resBody RetrieveDynamicTypeManagerBody
  26. reqBody.Req = req
  27. if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
  28. return nil, err
  29. }
  30. return resBody.Res, nil
  31. }
  32. type RetrieveManagedMethodExecuterBody struct {
  33. Req *RetrieveManagedMethodExecuterRequest `xml:"urn:vim25 RetrieveManagedMethodExecuter"`
  34. Res *RetrieveManagedMethodExecuterResponse `xml:"urn:vim25 RetrieveManagedMethodExecuterResponse"`
  35. Fault_ *soap.Fault
  36. }
  37. func (b *RetrieveManagedMethodExecuterBody) Fault() *soap.Fault { return b.Fault_ }
  38. func RetrieveManagedMethodExecuter(ctx context.Context, r soap.RoundTripper, req *RetrieveManagedMethodExecuterRequest) (*RetrieveManagedMethodExecuterResponse, error) {
  39. var reqBody, resBody RetrieveManagedMethodExecuterBody
  40. reqBody.Req = req
  41. if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
  42. return nil, err
  43. }
  44. return resBody.Res, nil
  45. }
  46. type DynamicTypeMgrQueryMoInstancesBody struct {
  47. Req *DynamicTypeMgrQueryMoInstancesRequest `xml:"urn:vim25 DynamicTypeMgrQueryMoInstances"`
  48. Res *DynamicTypeMgrQueryMoInstancesResponse `xml:"urn:vim25 DynamicTypeMgrQueryMoInstancesResponse"`
  49. Fault_ *soap.Fault
  50. }
  51. func (b *DynamicTypeMgrQueryMoInstancesBody) Fault() *soap.Fault { return b.Fault_ }
  52. func DynamicTypeMgrQueryMoInstances(ctx context.Context, r soap.RoundTripper, req *DynamicTypeMgrQueryMoInstancesRequest) (*DynamicTypeMgrQueryMoInstancesResponse, error) {
  53. var reqBody, resBody DynamicTypeMgrQueryMoInstancesBody
  54. reqBody.Req = req
  55. if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
  56. return nil, err
  57. }
  58. return resBody.Res, nil
  59. }
  60. type DynamicTypeMgrQueryTypeInfoBody struct {
  61. Req *DynamicTypeMgrQueryTypeInfoRequest `xml:"urn:vim25 DynamicTypeMgrQueryTypeInfo"`
  62. Res *DynamicTypeMgrQueryTypeInfoResponse `xml:"urn:vim25 DynamicTypeMgrQueryTypeInfoResponse"`
  63. Fault_ *soap.Fault
  64. }
  65. func (b *DynamicTypeMgrQueryTypeInfoBody) Fault() *soap.Fault { return b.Fault_ }
  66. func DynamicTypeMgrQueryTypeInfo(ctx context.Context, r soap.RoundTripper, req *DynamicTypeMgrQueryTypeInfoRequest) (*DynamicTypeMgrQueryTypeInfoResponse, error) {
  67. var reqBody, resBody DynamicTypeMgrQueryTypeInfoBody
  68. reqBody.Req = req
  69. if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
  70. return nil, err
  71. }
  72. return resBody.Res, nil
  73. }
  74. type ExecuteSoapBody struct {
  75. Req *ExecuteSoapRequest `xml:"urn:vim25 ExecuteSoap"`
  76. Res *ExecuteSoapResponse `xml:"urn:vim25 ExecuteSoapResponse"`
  77. Fault_ *soap.Fault
  78. }
  79. func (b *ExecuteSoapBody) Fault() *soap.Fault { return b.Fault_ }
  80. func ExecuteSoap(ctx context.Context, r soap.RoundTripper, req *ExecuteSoapRequest) (*ExecuteSoapResponse, error) {
  81. var reqBody, resBody ExecuteSoapBody
  82. reqBody.Req = req
  83. if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
  84. return nil, err
  85. }
  86. return resBody.Res, nil
  87. }