[nat64] add runtime switch for NAT64 prefix publisher and translator (#8194)

This commit is contained in:
Song GUO
2022-10-19 05:42:25 +08:00
committed by GitHub
parent 77fd973a76
commit aae250af89
13 changed files with 541 additions and 29 deletions
+16
View File
@@ -2023,6 +2023,22 @@ class NodeImpl:
self.send_command(cmd)
return self._expect_command_output()[0].split(' ')[0]
def enable_nat64(self):
self.send_command(f'nat64 enable')
self._expect_done()
def disable_nat64(self):
self.send_command(f'nat64 disable')
self._expect_done()
def get_nat64_state(self):
self.send_command('nat64 state')
res = {}
for line in self._expect_command_output():
state = line.split(':')
res[state[0].strip()] = state[1].strip()
return res
def get_nat64_mappings(self):
cmd = 'nat64 mappings'
self.send_command(cmd)