XenAPI: remove hardcode dom0 plugin version in unit test

When XenAPI driver are calling dom0 plugin via os-xenapi, it will
check whether the dom0 plugin's version is match which is fine.
But our FakeXenAPISession is using the hardcode dom0 plugin version
for unit test which make the UT fail each time we bump dom0 plugin
version in os-xenapi repo. This patch is to remove the hardcode
and use the exact version from os-xenapi

Change-Id: I52939fbd42b1b1f7f6c216f3715158b779c597ab
This commit is contained in:
Huan Xie 2017-05-18 23:59:36 -07:00
parent c861dc181b
commit 2735d18c19
1 changed files with 2 additions and 1 deletions

View File

@ -781,7 +781,8 @@ class SessionBase(object):
zlib.compress(("dom_id: %s" % dom_id).encode('utf-8')))
def _plugin_dom0_plugin_version_get_version(self, method, args):
return pickle.dumps("2.0")
return pickle.dumps(
xenapi_session.XenAPISession.PLUGIN_REQUIRED_VERSION)
def _plugin_xenhost_query_gc(self, method, args):
return pickle.dumps("False")