コード例 #1
0
ファイル: test_edge_router.py プロジェクト: pjh03/quantum
 def test_create_lswitch_with_shared_as_arg(self):
     result = nsp._process_base_create_lswitch_args(self.cluster, 'foo_id',
                                                    self.tenant_id,
                                                    self.display_name,
                                                    self.tz_config, True)
     additional_tags = [{'scope': 'shared', 'tag': 'true'}]
     expected = self.tags + additional_tags
     self.assertEqual(sorted(expected), sorted(result[2]))
コード例 #2
0
ファイル: test_edge_router.py プロジェクト: pjh03/quantum
 def test_create_lswitch_with_basic_args(self):
     result = nsp._process_base_create_lswitch_args(self.cluster, 'foo_id',
                                                    self.tenant_id,
                                                    self.display_name,
                                                    self.tz_config)
     self.assertEqual(self.display_name, result[0])
     self.assertEqual(self.tz_config, result[1])
     self.assertEqual(sorted(self.tags), sorted(result[2]))
コード例 #3
0
ファイル: test_edge_router.py プロジェクト: Vegasq/neutron
 def test_create_lswitch_with_shared_as_kwarg(self):
     result = nsp._process_base_create_lswitch_args(self.cluster,
                                                    'foo_id',
                                                    self.tenant_id,
                                                    self.display_name,
                                                    self.tz_config,
                                                    shared=True)
     expected = self.tags + [{'scope': 'shared', 'tag': 'true'}]
     self.assertEqual(sorted(expected), sorted(result[2]))
コード例 #4
0
ファイル: test_edge_router.py プロジェクト: Vegasq/neutron
 def test_create_lswitch_with_basic_args(self):
     result = nsp._process_base_create_lswitch_args(self.cluster,
                                                    'foo_id',
                                                    self.tenant_id,
                                                    self.display_name,
                                                    self.tz_config)
     self.assertEqual(self.display_name, result[0])
     self.assertEqual(self.tz_config, result[1])
     self.assertEqual(sorted(self.tags), sorted(result[2]))
コード例 #5
0
ファイル: test_edge_router.py プロジェクト: Vegasq/neutron
 def test_create_lswitch_with_additional_tags(self):
     more_tags = [{'scope': 'foo_scope', 'tag': 'foo_tag'}]
     result = nsp._process_base_create_lswitch_args(self.cluster,
                                                    'foo_id',
                                                    self.tenant_id,
                                                    self.display_name,
                                                    self.tz_config,
                                                    tags=more_tags)
     expected = self.tags + more_tags
     self.assertEqual(sorted(expected), sorted(result[2]))
コード例 #6
0
ファイル: test_edge_router.py プロジェクト: pjh03/quantum
 def test_create_lswitch_with_additional_tags(self):
     more_tags = [{'scope': 'foo_scope', 'tag': 'foo_tag'}]
     result = nsp._process_base_create_lswitch_args(self.cluster,
                                                    'foo_id',
                                                    self.tenant_id,
                                                    self.display_name,
                                                    self.tz_config,
                                                    tags=more_tags)
     expected = self.tags + more_tags
     self.assertEqual(sorted(expected), sorted(result[2]))