summaryrefslogtreecommitdiff
path: root/neutronclient/tests/unit/osc/v2/vpnaas/test_ikepolicy.py
diff options
context:
space:
mode:
Diffstat (limited to 'neutronclient/tests/unit/osc/v2/vpnaas/test_ikepolicy.py')
-rw-r--r--neutronclient/tests/unit/osc/v2/vpnaas/test_ikepolicy.py20
1 files changed, 20 insertions, 0 deletions
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):