'Creates an image from a system disk snapshot.
@inherits :class:`NodeDriver.create_image`
:keyword ex_snapshot_id: the id of the snapshot to create the image.
(required)
:type ex_snapshot_id: ``str``
:keyword ex_image_version: the version number of the image
:type ex_image_version: ``str``
:keyword ex_client_token: a token generated by client to identify
each request.
:type ex_client_token: ``str``'

def create_image(self, node, name, description=None, ex_snapshot_id=None, ex_image_version=None, ex_client_token=None):

    params = {'Action': 'CreateImage', 'RegionId': self.region}
    if name:
        params['ImageName'] = name
    if description:
        params['Description'] = description
    if ex_snapshot_id:
        params['SnapshotId'] = ex_snapshot_id
    else:
        raise AttributeError('ex_snapshot_id    is    required')
    if ex_image_version:
        params['ImageVersion'] = ex_image_version
    if ex_client_token:
        params['ClientToken'] = ex_client_token
    resp = self.connection.request(self.path, params)
    image_id = findtext(resp.object, 'ImageId', namespace=self.namespace)
    return self.get_image(image_id=image_id)
