def _get_volume_mount_path(self, body, name):
# NOTE: body arg is the result from last deferred call.
# Python complains about parameter mis-match if you don't include it
# In this test, we need it to compare expected results with Path
# request
# Compare path returned by mount (body) with Get Path request
path = b"/VolumeDriver.Path"
newbody = {u"Name": name}
headers = Headers({b"content-type": [b"application/json"]})
body_producer = FileBodyProducer(BytesIO(dumps(newbody)))
agent = Agent.usingEndpointFactory(reactor, HPEEndpointFactory())
d = agent.request(b'POST', b"UNIX://localhost" + path, headers,
body_producer)
d.addCallback(self.checkResponse, body)
d.addErrback(self.cbFailed)
return d
test_hpe_plugin.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录