diff options
-rw-r--r-- | babel.cfg | 2 | ||||
-rw-r--r-- | neutronclient/osc/v2/vpnaas/ikepolicy.py | 2 | ||||
-rw-r--r-- | neutronclient/tests/unit/osc/v2/vpnaas/test_ikepolicy.py | 20 | ||||
-rw-r--r-- | releasenotes/notes/add-aggressive-negotiation-mode-5218b1baff930eb8.yaml | 5 | ||||
-rw-r--r-- | setup.cfg | 14 |
5 files changed, 26 insertions, 17 deletions
diff --git a/babel.cfg b/babel.cfg deleted file mode 100644 index 15cd6cb..0000000 --- a/babel.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[python: **.py] - diff --git a/neutronclient/osc/v2/vpnaas/ikepolicy.py b/neutronclient/osc/v2/vpnaas/ikepolicy.py index eb598ea..73b6402 100644 --- a/neutronclient/osc/v2/vpnaas/ikepolicy.py +++ b/neutronclient/osc/v2/vpnaas/ikepolicy.py @@ -64,7 +64,7 @@ def _get_common_parser(parser): help=_('Encryption algorithm')) parser.add_argument( '--phase1-negotiation-mode', - choices=['main'], + choices=['main', 'aggressive'], type=_convert_to_lowercase, help=_('IKE Phase1 negotiation mode')) parser.add_argument( diff --git a/neutronclient/tests/unit/osc/v2/vpnaas/test_ikepolicy.py b/neutronclient/tests/unit/osc/v2/vpnaas/test_ikepolicy.py index 0d2673a..cfe65a2 100644 --- a/neutronclient/tests/unit/osc/v2/vpnaas/test_ikepolicy.py +++ b/neutronclient/tests/unit/osc/v2/vpnaas/test_ikepolicy.py @@ -208,6 +208,10 @@ class TestCreateIKEPolicy(TestIKEPolicy, common.TestCreateVPNaaS): def test_create_with_all_params_name(self): self._test_create_with_all_params({'name': 'new_ikepolicy'}) + def test_create_with_all_params_aggressive_mode(self): + self._test_create_with_all_params( + {'phase1_negotiation_mode': 'aggressive'}) + class TestDeleteIKEPolicy(TestIKEPolicy, common.TestDeleteVPNaaS): @@ -292,6 +296,22 @@ class TestSetIKEPolicy(TestIKEPolicy, common.TestSetVPNaaS): target, {self.res: {'auth_algorithm': 'sha256'}}) self.assertIsNone(result) + def test_set_phase1_negotiation_mode_with_aggressive(self): + target = self.resource['id'] + phase1_negotiation_mode = 'aggressive' + arglist = [target, + '--phase1-negotiation-mode', phase1_negotiation_mode] + verifylist = [ + (self.res, target), + ('phase1_negotiation_mode', phase1_negotiation_mode), + ] + parsed_args = self.check_parser(self.cmd, arglist, verifylist) + result = self.cmd.take_action(parsed_args) + + self.mocked.assert_called_once_with( + target, {self.res: {'phase1_negotiation_mode': 'aggressive'}}) + self.assertIsNone(result) + class TestShowIKEPolicy(TestIKEPolicy, common.TestShowVPNaaS): diff --git a/releasenotes/notes/add-aggressive-negotiation-mode-5218b1baff930eb8.yaml b/releasenotes/notes/add-aggressive-negotiation-mode-5218b1baff930eb8.yaml new file mode 100644 index 0000000..ae1b667 --- /dev/null +++ b/releasenotes/notes/add-aggressive-negotiation-mode-5218b1baff930eb8.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The ``--phase1-negotiation-mode`` option supports ``aggressive`` mode + in VPNaaS ikepolicy commands. @@ -455,17 +455,3 @@ neutron.cli.v2 = vpn-ikepolicy-create = neutronclient.neutron.v2_0.vpn.ikepolicy:CreateIKEPolicy vpn-ikepolicy-update = neutronclient.neutron.v2_0.vpn.ikepolicy:UpdateIKEPolicy vpn-ikepolicy-delete = neutronclient.neutron.v2_0.vpn.ikepolicy:DeleteIKEPolicy - -[extract_messages] -keywords = _ gettext ngettext l_ lazy_gettext -mapping_file = babel.cfg -output_file = neutronclient/locale/neutronclient.pot - -[compile_catalog] -directory = neutronclient/locale -domain = neutronclient - -[update_catalog] -domain = neutronclient -output_dir = neutronclient/locale -input_file = neutronclient/locale/neutronclient.pot |