Compare commits
8 Commits
v0.0.1-alp
...
v0.0.1-alp
| Author | SHA1 | Date | |
|---|---|---|---|
| 8974e82e78 | |||
| 01e89ca98d | |||
| f85fe28c53 | |||
| 82702848f9 | |||
| c52743effa | |||
| b079790183 | |||
| bae6a964eb | |||
| bab50ebfc4 |
@@ -14,9 +14,9 @@ type FirewallZone struct {
|
||||
// NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
Name string `json:"name"`
|
||||
Description string `json:"desc"`
|
||||
DefaultZone bool `json:default_zone,omitempty`
|
||||
NetworkIDs []string `json:network_ids,omitempty`
|
||||
ZoneKey string `json:"zone_key,omitempty"`
|
||||
|
||||
// Role string `json:"role"`
|
||||
}
|
||||
|
||||
@@ -213,7 +213,11 @@ func (c *Client) do(ctx context.Context, method, relativeURL string, reqBody int
|
||||
return fmt.Errorf("unable to parse URL: %s %s %w", method, relativeURL, err)
|
||||
}
|
||||
if !strings.HasPrefix(relativeURL, "/") && !reqURL.IsAbs() {
|
||||
reqURL.Path = path.Join(c.apiPath, reqURL.Path)
|
||||
if strings.Contains(relativeURL, "firewall/zone") {
|
||||
reqURL.Path = path.Join(c.apiV2Path, reqURL.Path)
|
||||
} else {
|
||||
reqURL.Path = path.Join(c.apiPath, reqURL.Path)
|
||||
}
|
||||
}
|
||||
|
||||
url := c.baseURL.ResolveReference(reqURL)
|
||||
|
||||
Reference in New Issue
Block a user