'Creates test snapshopt with provided metadata'

def _create_snapshot(self, name=None, metadata=None):

    req = fakes.HTTPRequest.blank('/v3/snapshots')
    snap = {'volume_size': 200, 'volume_id': fake.VOLUME_ID, 'display_name': (name or 'Volume    Test    Name'), 'display_description': 'Volume    Test    Desc', 'availability_zone': 'zone1:host1', 'host': 'fake-host'}
    if metadata:
        snap['metadata'] = metadata
    body = {'snapshot': snap}
    self.controller.create(req, body)
