def broken_test_hpe_mount_umount_volume(self):
name = 'test-mount-volume'
path = b"/VolumeDriver.Create"
body = {u"Name": name}
# Create a volume to be mounted
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": ''}))
d.addErrback(self.cbFailed)
# Mount the previously created volume
d.addCallback(self._mount_the_volume, name)
# UMount the previously created volume
d.addCallback(self._unmount_the_volume, name)
# Remove the previously created volume
d.addCallback(self._remove_volume_callback, name)
return d
test_hpe_plugin.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录