-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
T5595 : PIM multicast bfd feature #2411
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Copyright (C) 2019-2020 VyOS maintainers and contributors | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License version 2 or later as | ||
# published by the Free Software Foundation. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
import os | ||
import unittest | ||
|
||
from base_vyostest_shim import VyOSUnitTestSHIM | ||
from vyos.configsession import ConfigSessionError | ||
from vyos.ifconfig import Section | ||
from vyos.utils.process import process_named_running | ||
|
||
PROCESS_NAME = 'pimd' | ||
base_path = ['protocols', 'pim'] | ||
|
||
class TestProtocolsPIM(VyOSUnitTestSHIM.TestCase): | ||
def tearDown(self): | ||
# Check for running process | ||
self.assertTrue(process_named_running(PROCESS_NAME)) | ||
self.cli_delete(base_path) | ||
self.cli_commit() | ||
|
||
def test_pim_01_simple(self): | ||
rp = '127.0.0.1' | ||
group = '224.0.0.0/4' | ||
hello = '100' | ||
# commit changes | ||
|
||
self.cli_set(base_path + ['rp', 'address', rp, 'group', group]) | ||
interfaces = Section.interfaces('ethernet') | ||
|
||
for interface in interfaces: | ||
self.cli_set(base_path + ['interface', interface]) | ||
self.cli_set(base_path + ['interface', interface , 'hello', hello]) | ||
self.cli_set(base_path + ['interface', interface , 'bfd', 'enable']) | ||
|
||
self.cli_commit() | ||
|
||
|
||
# Verify FRR pimd configuration | ||
frrconfig = self.getFRRconfig('ip pim rp {rp} {group}', daemon=PROCESS_NAME) | ||
|
||
for interface in interfaces: | ||
frrconfig = self.getFRRconfig( | ||
f'interface {interface}', daemon=PROCESS_NAME) | ||
self.assertIn(f'interface {interface}', frrconfig) | ||
self.assertIn(f' ip pim', frrconfig) | ||
self.assertIn(f' ip pim bfd', frrconfig) | ||
self.assertIn(f' ip pim hello {hello}', frrconfig) | ||
|
||
self.cli_commit() | ||
|
||
if __name__ == '__main__': | ||
unittest.main(verbosity=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have bfd does it mean we want to enable it? Let’s avoid
enable/disable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see BGP neighbors, there is a simple bfd node that is valueless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All nodes with values like true/false, enable/disable that still remain in the system are legacy and should be converted to valueless as soon as it's feasible. The policy not to make any new ones has been in place since Vyatta times, in fact. ;)