コード例 #1
0
 def test_get_chanin_name(self):
     name = '0123456789' * 5
     # 28 chars is the maximum length of iptables chain name.
     self.assertEqual(iptables_manager.get_chain_name(name, wrap=False),
                      name[:28])
     # 11 chars is the maximum length of chain name of iptable_manager
     # if binary_name is prepended.
     self.assertEqual(iptables_manager.get_chain_name(name, wrap=True),
                      name[:11])
コード例 #2
0
 def test_get_chanin_name(self):
     name = '0123456789' * 5
     # 28 chars is the maximum length of iptables chain name.
     self.assertEqual(iptables_manager.get_chain_name(name, wrap=False),
                      name[:28])
     # 11 chars is the maximum length of chain name of iptable_manager
     # if binary_name is prepended.
     self.assertEqual(iptables_manager.get_chain_name(name, wrap=True),
                      name[:11])
コード例 #3
0
ファイル: iptables_firewall.py プロジェクト: Apsu/quantum
 def _port_chain_name(self, port, direction):
     return iptables_manager.get_chain_name(
         '%s%s' % (CHAIN_NAME_PREFIX[direction], port['device']))
コード例 #4
0
ファイル: iptables_firewall.py プロジェクト: soheilhy/quantum
 def _port_chain_name(self, port, direction):
     return iptables_manager.get_chain_name(
         '%s%s' % (CHAIN_NAME_PREFIX[direction], port['device']))
コード例 #5
0
ファイル: iptables_firewall.py プロジェクト: mygoda/openstack
 def _port_chain_name(self, port, direction):
     return iptables_manager.get_chain_name("%s%s" % (CHAIN_NAME_PREFIX[direction], port["device"]))