Skip to content

Commit

Permalink
vcsim: esxcli FirewallInfo fixes (#661)
Browse files Browse the repository at this point in the history
- Add missing error check when calling NewExecutor

- Add RetrieveManagedMethodExecuter to type map
  • Loading branch information
dougm authored Jan 28, 2017
1 parent 17e6545 commit 5f7efaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions govc/host/esxcli/firewall_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ type FirewallInfo struct {
// This helper can be useful in particular to determine if the firewall is enabled or disabled.
func GetFirewallInfo(s *object.HostSystem) (*FirewallInfo, error) {
x, err := NewExecutor(s.Client(), s)
if err != nil {
return nil, err
}

res, err := x.Run([]string{"network", "firewall", "get"})
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions vim25/types/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ type RetrieveManagedMethodExecuter struct {
This ManagedObjectReference `xml:"_this"`
}

func init() {
t["RetrieveManagedMethodExecuter"] = reflect.TypeOf((*RetrieveManagedMethodExecuter)(nil)).Elem()
}

type RetrieveManagedMethodExecuterResponse struct {
Returnval *ReflectManagedMethodExecuter `xml:"urn:vim25 returnval"`
}
Expand Down

0 comments on commit 5f7efaf

Please sign in to comment.