Skip to content
Permalink
Browse files
Make sure we treat OutOfBandManagementResponse correctly (#97)
  • Loading branch information
Sander van Harmelen committed Apr 19, 2018
1 parent 75e6e94 commit 0bc524282c2afc7da6ef19291cac338b8c6b12a7
Showing 9 changed files with 261 additions and 259 deletions.
@@ -321,33 +321,33 @@ type ExternalLoadBalancer struct {
Videoram int64 `json:"videoram"`
} `json:"vgpu"`
} `json:"gpugroup"`
Hahost bool `json:"hahost"`
Hasenoughcapacity bool `json:"hasenoughcapacity"`
Hosttags string `json:"hosttags"`
Hypervisor string `json:"hypervisor"`
Hypervisorversion string `json:"hypervisorversion"`
Id string `json:"id"`
Ipaddress string `json:"ipaddress"`
Islocalstorageactive bool `json:"islocalstorageactive"`
Lastpinged string `json:"lastpinged"`
Managementserverid int64 `json:"managementserverid"`
Memoryallocated int64 `json:"memoryallocated"`
Memorytotal int64 `json:"memorytotal"`
Memoryused int64 `json:"memoryused"`
Name string `json:"name"`
Networkkbsread int64 `json:"networkkbsread"`
Networkkbswrite int64 `json:"networkkbswrite"`
Oscategoryid string `json:"oscategoryid"`
Oscategoryname string `json:"oscategoryname"`
Outofbandmanagement string `json:"outofbandmanagement"`
Podid string `json:"podid"`
Podname string `json:"podname"`
Removed string `json:"removed"`
Resourcestate string `json:"resourcestate"`
State string `json:"state"`
Suitableformigration bool `json:"suitableformigration"`
Type string `json:"type"`
Version string `json:"version"`
Zoneid string `json:"zoneid"`
Zonename string `json:"zonename"`
Hahost bool `json:"hahost"`
Hasenoughcapacity bool `json:"hasenoughcapacity"`
Hosttags string `json:"hosttags"`
Hypervisor string `json:"hypervisor"`
Hypervisorversion string `json:"hypervisorversion"`
Id string `json:"id"`
Ipaddress string `json:"ipaddress"`
Islocalstorageactive bool `json:"islocalstorageactive"`
Lastpinged string `json:"lastpinged"`
Managementserverid int64 `json:"managementserverid"`
Memoryallocated int64 `json:"memoryallocated"`
Memorytotal int64 `json:"memorytotal"`
Memoryused int64 `json:"memoryused"`
Name string `json:"name"`
Networkkbsread int64 `json:"networkkbsread"`
Networkkbswrite int64 `json:"networkkbswrite"`
Oscategoryid string `json:"oscategoryid"`
Oscategoryname string `json:"oscategoryname"`
Outofbandmanagement OutOfBandManagementResponse `json:"outofbandmanagement"`
Podid string `json:"podid"`
Podname string `json:"podname"`
Removed string `json:"removed"`
Resourcestate string `json:"resourcestate"`
State string `json:"state"`
Suitableformigration bool `json:"suitableformigration"`
Type string `json:"type"`
Version string `json:"version"`
Zoneid string `json:"zoneid"`
Zonename string `json:"zonename"`
}
@@ -399,13 +399,13 @@ func (s *FirewallService) NewConfigurePaloAltoFirewallParams(fwdeviceid string)
}

// Configures a Palo Alto firewall device
func (s *FirewallService) ConfigurePaloAltoFirewall(p *ConfigurePaloAltoFirewallParams) (*ConfigurePaloAltoFirewallResponse, error) {
func (s *FirewallService) ConfigurePaloAltoFirewall(p *ConfigurePaloAltoFirewallParams) (*PaloAltoFirewallResponse, error) {
resp, err := s.cs.newRequest("configurePaloAltoFirewall", p.toURLValues())
if err != nil {
return nil, err
}

var r ConfigurePaloAltoFirewallResponse
var r PaloAltoFirewallResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
@@ -438,7 +438,7 @@ func (s *FirewallService) ConfigurePaloAltoFirewall(p *ConfigurePaloAltoFirewall
return &r, nil
}

type ConfigurePaloAltoFirewallResponse struct {
type PaloAltoFirewallResponse struct {
JobID string `json:"jobid"`
Fwdevicecapacity int64 `json:"fwdevicecapacity"`
Fwdeviceid string `json:"fwdeviceid"`
@@ -503,13 +503,13 @@ func (s *FirewallService) NewConfigureSrxFirewallParams(fwdeviceid string) *Conf
}

// Configures a SRX firewall device
func (s *FirewallService) ConfigureSrxFirewall(p *ConfigureSrxFirewallParams) (*ConfigureSrxFirewallResponse, error) {
func (s *FirewallService) ConfigureSrxFirewall(p *ConfigureSrxFirewallParams) (*SrxFirewallResponse, error) {
resp, err := s.cs.newRequest("configureSrxFirewall", p.toURLValues())
if err != nil {
return nil, err
}

var r ConfigureSrxFirewallResponse
var r SrxFirewallResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
@@ -542,7 +542,7 @@ func (s *FirewallService) ConfigureSrxFirewall(p *ConfigureSrxFirewallParams) (*
return &r, nil
}

type ConfigureSrxFirewallResponse struct {
type SrxFirewallResponse struct {
JobID string `json:"jobid"`
Fwdevicecapacity int64 `json:"fwdevicecapacity"`
Fwdeviceid string `json:"fwdeviceid"`

0 comments on commit 0bc5242

Please sign in to comment.