def test_create(self):
        userdata = '#!/bin/sh echo "Hello"'
        f = tempfile.TemporaryFile()
        f.write(userdata)
        f.seek(0)
        params = {
            'ppid': '11111111',
            'name':'process1',
            'nova_flavor_id': 1,
            'glance_image_id': '22222222',
            'keypair_id': '33333333',
            'securitygroup_ids': ['44444444', '55555555'],
            'userdata': f,
            'args': {
                "key1": "value1",
                "key2": "value2"
            }
        }
        process = self.cs.processes.create(self.gid, **params)
        body = self._create_body(**params)
        body['process']['userdata'] = base64.b64encode(userdata)
        self.cs.assert_called('POST', '/groups/%s/processes' % self.gid, body)
        self.assertIsInstance(process, self.process_type)
dataset/ETHPy150Open openstack/python-rackclient/rackclient/tests/v1/test_processes.py/ProcesssTest.test_create/original