def test_create_firewall_with_all_params(self):
     """firewall-create with all params set."""
     resource = 'firewall'
     cmd = firewall.CreateFirewall(test_cli20.MyApp(sys.stdout), None)
     name = 'my-name'
     description = 'my-desc'
     policy_id = 'my-policy-id'
     tenant_id = 'my-tenant'
     my_id = 'my-id'
     args = [
         '--description', description, '--admin-state-down', '--tenant-id',
         tenant_id, policy_id
     ]
     position_names = [
         'firewall_policy_id',
     ]
     position_values = [
         policy_id,
     ]
     self._test_create_resource(resource,
                                cmd,
                                name,
                                my_id,
                                args,
                                position_names,
                                position_values,
                                description=description,
                                admin_state_up=False,
                                tenant_id=tenant_id)
 def test_create_firewall_with_mandatory_params(self):
     """firewall-create with mandatory (none) params."""
     resource = 'firewall'
     cmd = firewall.CreateFirewall(test_cli20.MyApp(sys.stdout), None)
     name = ''
     tenant_id = 'my-tenant'
     my_id = 'my-id'
     policy_id = 'my-policy-id'
     args = [
         '--tenant-id',
         tenant_id,
         policy_id,
     ]
     position_names = [
         'firewall_policy_id',
     ]
     position_values = [
         policy_id,
     ]
     self._test_create_resource(resource,
                                cmd,
                                name,
                                my_id,
                                args,
                                position_names,
                                position_values,
                                admin_state_up=True,
                                tenant_id=tenant_id)
 def test_create_firewall_with_routers(self):
     resource = 'firewall'
     cmd = firewall.CreateFirewall(test_cli20.MyApp(sys.stdout), None)
     name = 'my-name'
     policy_id = 'my-policy-id'
     my_id = 'my-id'
     args = ['--router', 'fake-id', '--router', 'fake-name', policy_id]
     router_ids = ['fake-id', 'fake-name']
     position_names = ['firewall_policy_id', 'router_ids']
     position_values = [policy_id, router_ids]
     self._test_create_resource(resource, cmd, name, my_id, args,
                                position_names, position_values)