Skip to content

Commit

Permalink
v0.4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
tmunzer committed Nov 29, 2024
1 parent d0b186b commit 1a93708
Show file tree
Hide file tree
Showing 13 changed files with 96 additions and 31 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

## Introduction

> Version: **2410.1.16**
> Version: **2410.1.17**
>
> Date: **November 26, 2024**
> Date: **November 29, 2024**
---

Expand Down
9 changes: 5 additions & 4 deletions doc/models/gateway-oob-ip-config-node-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@ for HA Cluster, node1 can have different IP Config
| `Ip` | `*string` | Optional | - |
| `Netmask` | `*string` | Optional | used only if `subnet` is not specified in `networks` |
| `Type` | [`*models.IpTypeEnum`](../../doc/models/ip-type-enum.md) | Optional | enum: `dhcp`, `static`<br>**Default**: `"dhcp"` |
| `UseMgmtVrf` | `*bool` | Optional | if supported on the platform. If enabled, DNS will be using this routing-instance, too |
| `UseMgmtVrfForHostOut` | `*bool` | Optional | whether to use `mgmt_junos` for host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired |
| `UseMgmtVrf` | `*bool` | Optional | if supported on the platform. If enabled, DNS will be using this routing-instance, too<br>**Default**: `false` |
| `UseMgmtVrfForHostOut` | `*bool` | Optional | whether to use `mgmt_junos` for host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired<br>**Default**: `false` |
| `VlanId` | `*string` | Optional | - |

## Example (as JSON)

```json
{
"type": "static",
"use_mgmt_vrf": false,
"use_mgmt_vrf_for_host_out": false,
"gateway": "gateway0",
"ip": "ip4",
"netmask": "netmask0",
"use_mgmt_vrf": false
"netmask": "netmask0"
}
```

6 changes: 4 additions & 2 deletions doc/models/gateway-oob-ip-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ out-of-band (vme/em0/fxp0) IP config
| `Netmask` | `*string` | Optional | if `type`==`static` |
| `Node1` | [`*models.GatewayOobIpConfigNode1`](../../doc/models/gateway-oob-ip-config-node-1.md) | Optional | for HA Cluster, node1 can have different IP Config |
| `Type` | [`*models.IpTypeEnum`](../../doc/models/ip-type-enum.md) | Optional | enum: `dhcp`, `static`<br>**Default**: `"dhcp"` |
| `UseMgmtVrf` | `*bool` | Optional | if supported on the platform. If enabled, DNS will be using this routing-instance, too |
| `UseMgmtVrfForHostOut` | `*bool` | Optional | for host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired |
| `UseMgmtVrf` | `*bool` | Optional | if supported on the platform. If enabled, DNS will be using this routing-instance, too<br>**Default**: `false` |
| `UseMgmtVrfForHostOut` | `*bool` | Optional | for host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired<br>**Default**: `false` |
| `VlanId` | `*string` | Optional | - |

## Example (as JSON)

```json
{
"type": "static",
"use_mgmt_vrf": false,
"use_mgmt_vrf_for_host_out": false,
"gateway": "gateway0",
"ip": "ip4",
"netmask": "netmask0",
Expand Down
2 changes: 1 addition & 1 deletion doc/models/idp-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| `AlertOnly` | `*bool` | Optional | - |
| `Enabled` | `*bool` | Optional | **Default**: `false` |
| `IdpprofileId` | `*uuid.UUID` | Optional | org_level IDP Profile can be used, this takes precedence over `profile` |
| `Profile` | `*string` | Optional | `strict` (default) / `standard` / or keys from from idp_profiles<br>**Default**: `"strict"` |
| `Profile` | `*string` | Optional | enum: `Custom`, `strict` (default), `standard` or keys from from idp_profiles<br>**Default**: `"strict"` |

## Example (as JSON)

Expand Down
4 changes: 2 additions & 2 deletions doc/models/switch-matching-rule-oob-ip-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Out-of-Band Management interface configuration
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `Type` | [`*models.IpTypeEnum`](../../doc/models/ip-type-enum.md) | Optional | enum: `dhcp`, `static`<br>**Default**: `"dhcp"` |
| `UseMgmtVrf` | `*bool` | Optional | f supported on the platform. If enabled, DNS will be using this routing-instance, too |
| `UseMgmtVrfForHostOut` | `*bool` | Optional | for host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired |
| `UseMgmtVrf` | `*bool` | Optional | if supported on the platform. If enabled, DNS will be using this routing-instance, too<br>**Default**: `false` |
| `UseMgmtVrfForHostOut` | `*bool` | Optional | for host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired<br>**Default**: `false` |

## Example (as JSON)

Expand Down
35 changes: 32 additions & 3 deletions doc/models/switch-matching-rule.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@

# Switch Matching Rule

property key defines the type of matching, value is the string to match. e.g: `match_name[0:3]`, `match_name[2:6]`, `match_model`, `match_model[0-6]`
property key defines the type of matching, value is the string to match. e.g:

* `match_name[0:3]`: switch name must match the first 3 letters of the property value
* `match_name[2:6]`: switch name must match the property value from the 2nd to the 6th letter
* `match_model[0-8]`: switch model must match the first 8 letters of the property value
* `match_role`: switch role must match the property value

## Structure

Expand All @@ -13,7 +18,6 @@ property key defines the type of matching, value is the string to match. e.g: `m
| --- | --- | --- | --- |
| `AdditionalConfigCmds` | `[]string` | Optional | additional CLI commands to append to the generated Junos config<br><br>**Note**: no check is done |
| `IpConfig` | [`*models.SwitchMatchingRuleIpConfig`](../../doc/models/switch-matching-rule-ip-config.md) | Optional | In-Band Management interface configuration |
| `MatchRole` | `*string` | Optional | role to match |
| `Name` | `*string` | Optional | - |
| `OobIpConfig` | [`*models.SwitchMatchingRuleOobIpConfig`](../../doc/models/switch-matching-rule-oob-ip-config.md) | Optional | Out-of-Band Management interface configuration |
| `PortConfig` | [`map[string]models.JunosPortConfig`](../../doc/models/junos-port-config.md) | Optional | Propery key is the interface name or interface range |
Expand All @@ -33,12 +37,37 @@ property key defines the type of matching, value is the string to match. e.g: `m
"network": "network6",
"type": "dhcp"
},
"match_role": "match_role2",
"name": "name2",
"oob_ip_config": {
"type": "dhcp",
"use_mgmt_vrf": false,
"use_mgmt_vrf_for_host_out": false
},
"port_config": {
"key0": {
"ae_disable_lacp": false,
"ae_idx": 230,
"ae_lacp_slow": false,
"aggregated": false,
"critical": false,
"usage": "usage6"
},
"key1": {
"ae_disable_lacp": false,
"ae_idx": 230,
"ae_lacp_slow": false,
"aggregated": false,
"critical": false,
"usage": "usage6"
},
"key2": {
"ae_disable_lacp": false,
"ae_idx": 230,
"ae_lacp_slow": false,
"aggregated": false,
"critical": false,
"usage": "usage6"
}
}
}
```
Expand Down
38 changes: 36 additions & 2 deletions doc/models/switch-matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,29 @@ Switch template
"network": "network6",
"type": "dhcp"
},
"match_role": "match_role8",
"name": "name8",
"oob_ip_config": {
"type": "dhcp",
"use_mgmt_vrf": false,
"use_mgmt_vrf_for_host_out": false
},
"port_config": {
"key0": {
"ae_disable_lacp": false,
"ae_idx": 230,
"ae_lacp_slow": false,
"aggregated": false,
"critical": false,
"usage": "usage6"
},
"key1": {
"ae_disable_lacp": false,
"ae_idx": 230,
"ae_lacp_slow": false,
"aggregated": false,
"critical": false,
"usage": "usage6"
}
}
},
{
Expand All @@ -44,12 +61,29 @@ Switch template
"network": "network6",
"type": "dhcp"
},
"match_role": "match_role8",
"name": "name8",
"oob_ip_config": {
"type": "dhcp",
"use_mgmt_vrf": false,
"use_mgmt_vrf_for_host_out": false
},
"port_config": {
"key0": {
"ae_disable_lacp": false,
"ae_idx": 230,
"ae_lacp_slow": false,
"aggregated": false,
"critical": false,
"usage": "usage6"
},
"key1": {
"ae_disable_lacp": false,
"ae_idx": 230,
"ae_lacp_slow": false,
"aggregated": false,
"critical": false,
"usage": "usage6"
}
}
}
]
Expand Down
6 changes: 4 additions & 2 deletions doc/models/switch-oob-ip-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@
| `Netmask` | `*string` | Optional | used only if `subnet` is not specified in `networks` |
| `Network` | `*string` | Optional | optional, the network to be used for mgmt |
| `Type` | [`*models.IpTypeEnum`](../../doc/models/ip-type-enum.md) | Optional | enum: `dhcp`, `static`<br>**Default**: `"dhcp"` |
| `UseMgmtVrf` | `*bool` | Optional | f supported on the platform. If enabled, DNS will be using this routing-instance, too |
| `UseMgmtVrfForHostOut` | `*bool` | Optional | for host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired |
| `UseMgmtVrf` | `*bool` | Optional | if supported on the platform. If enabled, DNS will be using this routing-instance, too<br>**Default**: `false` |
| `UseMgmtVrfForHostOut` | `*bool` | Optional | for host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired<br>**Default**: `false` |

## Example (as JSON)

```json
{
"type": "static",
"use_mgmt_vrf": false,
"use_mgmt_vrf_for_host_out": false,
"gateway": "gateway0",
"ip": "ip4",
"netmask": "netmask0",
Expand Down
2 changes: 1 addition & 1 deletion mistapi/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func NewClient(configuration Configuration) ClientInterface {
configuration: configuration,
}

client.userAgent = utilities.UpdateUserAgent("SDK 2410.1.16")
client.userAgent = utilities.UpdateUserAgent("SDK 2410.1.17")
client.callBuilderFactory = callBuilderHandler(
func(server string) string {
if server == "" {
Expand Down
2 changes: 1 addition & 1 deletion mistapi/models/idp_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type IdpConfig struct {
Enabled *bool `json:"enabled,omitempty"`
// org_level IDP Profile can be used, this takes precedence over `profile`
IdpprofileId *uuid.UUID `json:"idpprofile_id,omitempty"`
// `strict` (default) / `standard` / or keys from from idp_profiles
// enum: `Custom`, `strict` (default), `standard` or keys from from idp_profiles
Profile *string `json:"profile,omitempty"`
AdditionalProperties map[string]any `json:"_"`
}
Expand Down
15 changes: 6 additions & 9 deletions mistapi/models/switch_matching_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ import (
)

// SwitchMatchingRule represents a SwitchMatchingRule struct.
// property key defines the type of matching, value is the string to match. e.g: `match_name[0:3]`, `match_name[2:6]`, `match_model`, `match_model[0-6]`
// property key defines the type of matching, value is the string to match. e.g:
// * `match_name[0:3]`: switch name must match the first 3 letters of the property value
// * `match_name[2:6]`: switch name must match the property value from the 2nd to the 6th letter
// * `match_model[0-8]`: switch model must match the first 8 letters of the property value
// * `match_role`: switch role must match the property value
type SwitchMatchingRule struct {
// additional CLI commands to append to the generated Junos config
// **Note**: no check is done
AdditionalConfigCmds []string `json:"additional_config_cmds,omitempty"`
// In-Band Management interface configuration
IpConfig *SwitchMatchingRuleIpConfig `json:"ip_config,omitempty"`
// role to match
MatchRole *string `json:"match_role,omitempty"`
Name *string `json:"name,omitempty"`
// Out-of-Band Management interface configuration
OobIpConfig *SwitchMatchingRuleOobIpConfig `json:"oob_ip_config,omitempty"`
Expand Down Expand Up @@ -45,9 +47,6 @@ func (s SwitchMatchingRule) toMap() map[string]any {
if s.IpConfig != nil {
structMap["ip_config"] = s.IpConfig.toMap()
}
if s.MatchRole != nil {
structMap["match_role"] = s.MatchRole
}
if s.Name != nil {
structMap["name"] = s.Name
}
Expand All @@ -74,15 +73,14 @@ func (s *SwitchMatchingRule) UnmarshalJSON(input []byte) error {
if err != nil {
return err
}
additionalProperties, err := UnmarshalAdditionalProperties(input, "additional_config_cmds", "ip_config", "match_role", "name", "oob_ip_config", "port_config", "port_mirroring", "switch_mgmt")
additionalProperties, err := UnmarshalAdditionalProperties(input, "additional_config_cmds", "ip_config", "name", "oob_ip_config", "port_config", "port_mirroring", "switch_mgmt")
if err != nil {
return err
}

s.AdditionalProperties = additionalProperties
s.AdditionalConfigCmds = temp.AdditionalConfigCmds
s.IpConfig = temp.IpConfig
s.MatchRole = temp.MatchRole
s.Name = temp.Name
s.OobIpConfig = temp.OobIpConfig
s.PortConfig = temp.PortConfig
Expand All @@ -95,7 +93,6 @@ func (s *SwitchMatchingRule) UnmarshalJSON(input []byte) error {
type tempSwitchMatchingRule struct {
AdditionalConfigCmds []string `json:"additional_config_cmds,omitempty"`
IpConfig *SwitchMatchingRuleIpConfig `json:"ip_config,omitempty"`
MatchRole *string `json:"match_role,omitempty"`
Name *string `json:"name,omitempty"`
OobIpConfig *SwitchMatchingRuleOobIpConfig `json:"oob_ip_config,omitempty"`
PortConfig map[string]JunosPortConfig `json:"port_config,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion mistapi/models/switch_matching_rule_oob_ip_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
type SwitchMatchingRuleOobIpConfig struct {
// enum: `dhcp`, `static`
Type *IpTypeEnum `json:"type,omitempty"`
// f supported on the platform. If enabled, DNS will be using this routing-instance, too
// if supported on the platform. If enabled, DNS will be using this routing-instance, too
UseMgmtVrf *bool `json:"use_mgmt_vrf,omitempty"`
// for host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired
UseMgmtVrfForHostOut *bool `json:"use_mgmt_vrf_for_host_out,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion mistapi/models/switch_oob_ip_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type SwitchOobIpConfig struct {
Network *string `json:"network,omitempty"`
// enum: `dhcp`, `static`
Type *IpTypeEnum `json:"type,omitempty"`
// f supported on the platform. If enabled, DNS will be using this routing-instance, too
// if supported on the platform. If enabled, DNS will be using this routing-instance, too
UseMgmtVrf *bool `json:"use_mgmt_vrf,omitempty"`
// for host-out traffic (NTP/TACPLUS/RADIUS/SYSLOG/SNMP), if alternative source network/ip is desired
UseMgmtVrfForHostOut *bool `json:"use_mgmt_vrf_for_host_out,omitempty"`
Expand Down

0 comments on commit 1a93708

Please sign in to comment.