def test_hpe_create_volume_invalid_option(self):
name = 'test-create-volume-fake'
path = b"/VolumeDriver.Create"
body = {u"Name": name,
u"Opts": {u"fake": u"fake"}}
headers = Headers({b"content-type": [b"application/json"]})
body_producer = FileBodyProducer(BytesIO(dumps(body)))
agent = Agent.usingEndpointFactory(reactor, HPEEndpointFactory())
d = agent.request(b'POST', b"UNIX://localhost" + path, headers,
body_producer)
d.addCallback(self.checkResponse, json.dumps({
u"Err": "create volume failed, error is: fake is not a valid "
"option. Valid options are: ['size', 'provisioning', "
"'flash-cache']"}))
d.addCallback(self._remove_volume_callback, name)
d.addErrback(self.cbFailed)
return d
test_hpe_plugin.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录