'Calling the ``/VolumerDriver.Create`` API with an ``Opts`` value
of "size=<somesize> in the request body JSON create a volume
with a given name and random size between 1-100G'

def test_create_with_size(self):

    name = random_name(self)
    size = integers(min_value=1, max_value=75).example()
    expression = volume_expression.example()
    size_opt = (''.join(str(size)) + expression)
    d = self.assertResult('POST', '/VolumeDriver.Create', {u'Name': name, 'Opts': {u'size': size_opt}}, OK, {u'Err': u''})
    real_size = int(parse_num(size_opt).to_Byte())
    d.addCallback((lambda _: self.flocker_client.list_datasets_configuration()))
    d.addCallback(list)
    d.addCallback((lambda result: self.assertItemsEqual(result, [Dataset(dataset_id=result[0].dataset_id, primary=self.NODE_A, maximum_size=real_size, metadata={NAME_FIELD: name, u'maximum_size': unicode(real_size)})])))
    return d
