How to use update_trunk method in tempest

Best Python code snippet using tempest_python

test_trunk.py

Source:test_trunk.py Github

copy

Full Screen

...33 self.assertTrue(34 policy.enforce(self.context, 'get_trunk', self.target))35 self.assertTrue(36 policy.enforce(self.context, 'get_trunk', self.alt_target))37 def test_update_trunk(self):38 self.assertTrue(39 policy.enforce(self.context, 'update_trunk', self.target))40 self.assertTrue(41 policy.enforce(self.context, 'update_trunk', self.alt_target))42 def test_delete_trunk(self):43 self.assertTrue(44 policy.enforce(self.context, 'delete_trunk', self.target))45 self.assertTrue(46 policy.enforce(self.context, 'delete_trunk', self.alt_target))47 def test_get_subports(self):48 self.assertTrue(49 policy.enforce(self.context, 'get_subports', self.target))50 self.assertTrue(51 policy.enforce(self.context, 'get_subports', self.alt_target))52 def test_add_subports(self):53 self.assertTrue(54 policy.enforce(self.context, 'add_subports', self.target))55 self.assertTrue(56 policy.enforce(self.context, 'add_subports', self.alt_target))57 def test_remove_subports(self):58 self.assertTrue(59 policy.enforce(self.context, 'remove_subports', self.target))60 self.assertTrue(61 policy.enforce(self.context, 'remove_subports', self.alt_target))62class SystemMemberTests(SystemAdminTests):63 def setUp(self):64 super(SystemMemberTests, self).setUp()65 self.context = self.system_member_ctx66 def test_create_trunk(self):67 self.assertRaises(68 base_policy.PolicyNotAuthorized,69 policy.enforce,70 self.context, 'create_trunk', self.target)71 self.assertRaises(72 base_policy.PolicyNotAuthorized,73 policy.enforce,74 self.context, 'create_trunk', self.alt_target)75 def test_update_trunk(self):76 self.assertRaises(77 base_policy.PolicyNotAuthorized,78 policy.enforce,79 self.context, 'update_trunk', self.target)80 self.assertRaises(81 base_policy.PolicyNotAuthorized,82 policy.enforce,83 self.context, 'update_trunk', self.alt_target)84 def test_delete_trunk(self):85 self.assertRaises(86 base_policy.PolicyNotAuthorized,87 policy.enforce,88 self.context, 'delete_trunk', self.target)89 self.assertRaises(90 base_policy.PolicyNotAuthorized,91 policy.enforce,92 self.context, 'delete_trunk', self.alt_target)93 def test_add_subports(self):94 self.assertRaises(95 base_policy.PolicyNotAuthorized,96 policy.enforce,97 self.context, 'add_subports', self.target)98 self.assertRaises(99 base_policy.PolicyNotAuthorized,100 policy.enforce,101 self.context, 'add_subports', self.alt_target)102 def test_remove_subports(self):103 self.assertRaises(104 base_policy.PolicyNotAuthorized,105 policy.enforce,106 self.context, 'remove_subports', self.target)107 self.assertRaises(108 base_policy.PolicyNotAuthorized,109 policy.enforce,110 self.context, 'remove_subports', self.alt_target)111class SystemReaderTests(SystemMemberTests):112 def setUp(self):113 super(SystemReaderTests, self).setUp()114 self.context = self.system_reader_ctx115class ProjectAdminTests(TrunkAPITestCase):116 def setUp(self):117 super(ProjectAdminTests, self).setUp()118 self.context = self.project_admin_ctx119 def test_create_trunk(self):120 self.assertTrue(121 policy.enforce(self.context, 'create_trunk', self.target))122 self.assertRaises(123 base_policy.PolicyNotAuthorized,124 policy.enforce,125 self.context, 'create_trunk', self.alt_target)126 def test_get_trunk(self):127 self.assertTrue(128 policy.enforce(self.context, 'get_trunk', self.target))129 self.assertRaises(130 base_policy.PolicyNotAuthorized,131 policy.enforce,132 self.context, 'get_trunk', self.alt_target)133 def test_update_trunk(self):134 self.assertTrue(135 policy.enforce(self.context, 'update_trunk', self.target))136 self.assertRaises(137 base_policy.PolicyNotAuthorized,138 policy.enforce,139 self.context, 'update_trunk', self.alt_target)140 def test_delete_trunk(self):141 self.assertTrue(142 policy.enforce(self.context, 'delete_trunk', self.target))143 self.assertRaises(144 base_policy.PolicyNotAuthorized,145 policy.enforce,146 self.context, 'delete_trunk', self.alt_target)147 def test_get_subports(self):148 self.assertTrue(149 policy.enforce(self.context, 'get_subports', self.target))150 self.assertRaises(151 base_policy.PolicyNotAuthorized,152 policy.enforce,153 self.context, 'get_subports', self.alt_target)154 def test_add_subports(self):155 self.assertTrue(156 policy.enforce(self.context, 'add_subports', self.target))157 self.assertRaises(158 base_policy.PolicyNotAuthorized,159 policy.enforce,160 self.context, 'add_subports', self.alt_target)161 def test_remove_subports(self):162 self.assertTrue(163 policy.enforce(self.context, 'remove_subports', self.target))164 self.assertRaises(165 base_policy.PolicyNotAuthorized,166 policy.enforce,167 self.context, 'remove_subports', self.alt_target)168class ProjectMemberTests(ProjectAdminTests):169 def setUp(self):170 super(ProjectMemberTests, self).setUp()171 self.context = self.project_member_ctx172class ProjectReaderTests(ProjectMemberTests):173 def setUp(self):174 super(ProjectReaderTests, self).setUp()175 self.context = self.project_reader_ctx176 def test_create_trunk(self):177 self.assertRaises(178 base_policy.PolicyNotAuthorized,179 policy.enforce,180 self.context, 'create_trunk', self.target)181 self.assertRaises(182 base_policy.PolicyNotAuthorized,183 policy.enforce,184 self.context, 'create_trunk', self.alt_target)185 def test_update_trunk(self):186 self.assertRaises(187 base_policy.PolicyNotAuthorized,188 policy.enforce,189 self.context, 'update_trunk', self.target)190 self.assertRaises(191 base_policy.PolicyNotAuthorized,192 policy.enforce,193 self.context, 'update_trunk', self.alt_target)194 def test_delete_trunk(self):195 self.assertRaises(196 base_policy.PolicyNotAuthorized,197 policy.enforce,198 self.context, 'delete_trunk', self.target)199 self.assertRaises(...

Full Screen

Full Screen

fabfile.py

Source:fabfile.py Github

copy

Full Screen

...24aqua_dir = '/home/student/moos-ivp-aquaticus/'25moosivp_dir = '/home/student/moos-ivp/'26def svn_up():27 run('svn up')28def update_trunk(path):29 with cd(path):30 svn_up()31def build(path):32 with cd(path):33 run('./build.sh')34def cd_missions():35 cd(os.path.join(aqua_dir, 'missions'))36@roles('mokais', 'm200s')37@task38def build_aquaticus():39 print(green('[ ] Building aquaticus on ') + red('%(host)s' % env) + '.')40 build(aqua_dir)41 print(green('[v] Building aquaticus on ') + red('%(host)s' % env) + '.')42@roles('mokais', 'm200s')43@task44def build_moosivp():45 print(green('[ ] Building moos-ivp on ') + red('%(host)s' % env) + '.')46 build(moosivp_dir)47 print(green('[v] Building moos-ivp on ') + red('%(host)s' % env) + '.')48@roles('mokais', 'm200s')49@task50def update_all():51 print(green('[ ] Updating moos-ivp ') + red('%(host)s' % env) + '.')52 update_trunk(moosivp_dir)53 print(green('[v] Updating moos-ivp ') + red('%(host)s' % env) + '.')54 print(green('[ ] Updating aquaticus ') + red('%(host)s' % env) + '.')55 update_trunk(aqua_dir)56 print(green('[v] Updating ') + red('%(host)s' % env) + '.')57@roles('mokais')58@task59def launch_humans_v():60 with cd(os.path.join(aqua_dir, 'missions', 'aquaticus1.0', 'mokai')):61 if (env.host == '192.168.1.191'):62 run('./launch_mokai.sh -e -b &')63 elif (env.host == '192.168.1.192'):64 run('./launch_mokai.sh -f -r &')65@roles('m200s')66@task67def launch_robots_v():68 with cd(os.path.join(aqua_dir, 'missions', 'aquaticus1.0', 'm200')):69 if (env.host == '192.168.5.100'):...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tempest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful