Skip to content

Commit

Permalink
Merge pull request #4352 from natali-rs1985/T6628-fix
Browse files Browse the repository at this point in the history
T6628: IPoE-server rename "static-ip" to "ip-address" for local auth
  • Loading branch information
c-po authored Feb 20, 2025
2 parents 624039b + 8241857 commit 6be2553
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 27 deletions.
2 changes: 1 addition & 1 deletion data/templates/accel-ppp/chap-secrets.ipoe.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% if mac_config.vlan is vyos_defined %}
{% set iface = iface ~ '.' ~ mac_config.vlan %}
{% endif %}
{{ "%-11s" | format(iface) }} * {{ mac | lower }} {{ mac_config.static_ip if mac_config.static_ip is vyos_defined else '*' }} {{ mac_config.rate_limit.download ~ '/' ~ mac_config.rate_limit.upload if mac_config.rate_limit.download is vyos_defined and mac_config.rate_limit.upload is vyos_defined }}
{{ "%-11s" | format(iface) }} * {{ mac | lower }} {{ mac_config.ip_address if mac_config.ip_address is vyos_defined else '*' }} {{ mac_config.rate_limit.download ~ '/' ~ mac_config.rate_limit.upload if mac_config.rate_limit.download is vyos_defined and mac_config.rate_limit.upload is vyos_defined }}
{% endfor %}
{% endif %}
{% endfor %}
Expand Down
14 changes: 14 additions & 0 deletions interface-definitions/include/ip-address.xml.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- include start from ip-address.xml.i -->
<leafNode name="ip-address">
<properties>
<help>Fixed IP address of static mapping</help>
<valueHelp>
<format>ipv4</format>
<description>IPv4 address used in static mapping</description>
</valueHelp>
<constraint>
<validator name="ipv4-address"/>
</constraint>
</properties>
</leafNode>
<!-- include end -->
13 changes: 1 addition & 12 deletions interface-definitions/service_dhcp-server.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -211,18 +211,7 @@
#include <include/dhcp/option-v4.xml.i>
#include <include/generic-description.xml.i>
#include <include/generic-disable-node.xml.i>
<leafNode name="ip-address">
<properties>
<help>Fixed IP address of static mapping</help>
<valueHelp>
<format>ipv4</format>
<description>IPv4 address used in static mapping</description>
</valueHelp>
<constraint>
<validator name="ipv4-address"/>
</constraint>
</properties>
</leafNode>
#include <include/ip-address.xml.i>
#include <include/interface/mac.xml.i>
#include <include/interface/duid.xml.i>
</children>
Expand Down
13 changes: 1 addition & 12 deletions interface-definitions/service_ipoe-server.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,7 @@
<constraintErrorMessage>VLAN IDs need to be in range 1-4094</constraintErrorMessage>
</properties>
</leafNode>
<leafNode name="static-ip">
<properties>
<help>Static client IP address</help>
<valueHelp>
<format>ipv4</format>
<description>IPv4 address</description>
</valueHelp>
<constraint>
<validator name="ipv4-address"/>
</constraint>
</properties>
</leafNode>
#include <include/ip-address.xml.i>
</children>
</tagNode>
</children>
Expand Down
4 changes: 2 additions & 2 deletions smoketest/scripts/cli/test_service_ipoe-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def test_ipoe_server_vlan(self):
tmp = ','.join(vlans)
self.assertIn(f'{interface},{tmp}', conf['ipoe']['vlan-mon'])

def test_ipoe_server_static_client_ip(self):
def test_ipoe_server_static_client_ip_address(self):
mac_address = '08:00:27:2f:d8:06'
ip_address = '192.0.2.100'

Expand All @@ -274,7 +274,7 @@ def test_ipoe_server_static_client_ip(self):
interface,
'mac',
mac_address,
'static-ip',
'ip-address',
ip_address,
]
)
Expand Down

0 comments on commit 6be2553

Please sign in to comment.