Skip to content

Commit 16f71a4

Browse files
committed
Enhance DHCP options in AsyncAppliance API
- Added new parameters: dhcpBootNextServer and dhcpBootFilename to support additional DHCP boot options in the appliance API documentation and request payload. #312
1 parent ed9af06 commit 16f71a4

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

meraki/aio/api/appliance.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2050,6 +2050,8 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg
20502050
- dhcpLeaseTime (string): The term of DHCP leases if the appliance is running a DHCP server on this VLAN. One of: '30 minutes', '1 hour', '4 hours', '12 hours', '1 day' or '1 week'
20512051
- mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above
20522052
- dhcpBootOptionsEnabled (boolean): Use DHCP boot options specified in other properties
2053+
- dhcpBootNextServer (string): DHCP boot option to direct boot clients to the server to load the boot file from
2054+
- dhcpBootFilename (string): DHCP boot option for boot filename
20532055
- dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties.
20542056
"""
20552057

@@ -2072,7 +2074,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg
20722074
networkId = urllib.parse.quote(str(networkId), safe='')
20732075
resource = f'/networks/{networkId}/appliance/vlans'
20742076

2075-
body_params = ['id', 'name', 'subnet', 'applianceIp', 'groupPolicyId', 'templateVlanType', 'cidr', 'mask', 'ipv6', 'dhcpHandling', 'dhcpLeaseTime', 'mandatoryDhcp', 'dhcpBootOptionsEnabled', 'dhcpOptions', ]
2077+
body_params = ['id', 'name', 'subnet', 'applianceIp', 'groupPolicyId', 'templateVlanType', 'cidr', 'mask', 'ipv6', 'dhcpHandling', 'dhcpLeaseTime', 'mandatoryDhcp', 'dhcpBootOptionsEnabled', 'dhcpBootNextServer', 'dhcpBootFilename', 'dhcpOptions', ]
20762078
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
20772079

20782080
return self._session.post(metadata, resource, payload)

meraki/api/appliance.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2050,6 +2050,8 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg
20502050
- dhcpLeaseTime (string): The term of DHCP leases if the appliance is running a DHCP server on this VLAN. One of: '30 minutes', '1 hour', '4 hours', '12 hours', '1 day' or '1 week'
20512051
- mandatoryDhcp (object): Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate. Only available on firmware versions 17.0 and above
20522052
- dhcpBootOptionsEnabled (boolean): Use DHCP boot options specified in other properties
2053+
- dhcpBootNextServer (string): DHCP boot option to direct boot clients to the server to load the boot file from
2054+
- dhcpBootFilename (string): DHCP boot option for boot filename
20532055
- dhcpOptions (array): The list of DHCP options that will be included in DHCP responses. Each object in the list should have "code", "type", and "value" properties.
20542056
"""
20552057

@@ -2072,7 +2074,7 @@ def createNetworkApplianceVlan(self, networkId: str, id: str, name: str, **kwarg
20722074
networkId = urllib.parse.quote(str(networkId), safe='')
20732075
resource = f'/networks/{networkId}/appliance/vlans'
20742076

2075-
body_params = ['id', 'name', 'subnet', 'applianceIp', 'groupPolicyId', 'templateVlanType', 'cidr', 'mask', 'ipv6', 'dhcpHandling', 'dhcpLeaseTime', 'mandatoryDhcp', 'dhcpBootOptionsEnabled', 'dhcpOptions', ]
2077+
body_params = ['id', 'name', 'subnet', 'applianceIp', 'groupPolicyId', 'templateVlanType', 'cidr', 'mask', 'ipv6', 'dhcpHandling', 'dhcpLeaseTime', 'mandatoryDhcp', 'dhcpBootOptionsEnabled', 'dhcpBootNextServer', 'dhcpBootFilename', 'dhcpOptions', ]
20762078
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
20772079

20782080
return self._session.post(metadata, resource, payload)

0 commit comments

Comments
 (0)