Check hotfixes for given platform
Hotfixes are platform specific, thus needed to be specified in branding.inc. Change-Id: Ifb753c3cab3618471a8b642d42ecf9a815e3da28
This commit is contained in:
parent
b772bc52ef
commit
3f4b41c802
3
Makefile
3
Makefile
|
@ -33,7 +33,8 @@ ${BUILDROOT}/${PLUGIN_NAME}: ${BRANDING} iso
|
|||
-e s/@HYPERVISOR_LOWER@/${HYPERVISOR_LOWER}/g \
|
||||
-e s/@PLUGIN_NAME@/${PLUGIN_NAME}/g {} \
|
||||
-e s/@PLUGIN_VERSION@/${PLUGIN_VERSION}/g {} \
|
||||
-e s/@PLUGIN_REVISION@/${PLUGIN_REVISION}/g {}
|
||||
-e s/@PLUGIN_REVISION@/${PLUGIN_REVISION}/g {} \
|
||||
-e s/@VERSION_HOTFIXES@/${VERSION_HOTFIXES}/g {}
|
||||
cp suppack/xenapi-plugins-*.iso ${BUILDROOT}/${PLUGIN_NAME}/deployment_scripts/
|
||||
|
||||
${BUILDROOT}/doc/source ${BUILDROOT}/doc/Makefile: ${BRANDING}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
HYPERVISOR_NAME=XenServer
|
||||
HYPERVISOR_LOWER=xenserver
|
||||
PLUGIN_NAME=fuel-plugin-xenserver
|
||||
VERSION_HOTFIXES='{"6.5.0":["XS65ESP1013"]}'
|
||||
|
||||
PLUGIN_BRANCHES="9.0 8.0 7.0 6.1"
|
||||
PLUGIN_VERSION_6_1=1.0
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import stat
|
||||
|
@ -8,7 +9,7 @@ from utils import HIMN_IP
|
|||
|
||||
XS_RSA = '/root/.ssh/xs_rsa'
|
||||
LOG_FILE = os.path.join(utils.LOG_ROOT, 'compute_pre_deployment.log')
|
||||
PLATFORM_VERSION = '1.9'
|
||||
VERSION_HOTFIXES = '@VERSION_HOTFIXES@'
|
||||
|
||||
if not os.path.exists(utils.LOG_ROOT):
|
||||
os.mkdir(utils.LOG_ROOT)
|
||||
|
@ -42,16 +43,24 @@ def ssh_copy_id(host, username, password):
|
|||
|
||||
|
||||
def check_host_compatibility(himn, username):
|
||||
hotfix = 'XS65ESP1013'
|
||||
installed = utils.ssh(himn, username,
|
||||
'xe patch-list name-label=%s --minimal' % hotfix)
|
||||
version_hotfixes = json.loads(VERSION_HOTFIXES)
|
||||
|
||||
ver = utils.ssh(himn, username,
|
||||
('xe host-param-get uuid=$(xe host-list --minimal) '
|
||||
'param-name=software-version param-key=platform_version'))
|
||||
'param-name=software-version param-key=product_version'))
|
||||
hotfixes = version_hotfixes.get(ver)
|
||||
if not hotfixes:
|
||||
return
|
||||
|
||||
if not installed and ver[:3] == PLATFORM_VERSION:
|
||||
utils.reportError(('Hotfix %s has not been installed '
|
||||
'and product version is %s') % (hotfix, ver))
|
||||
for hotfix in hotfixes:
|
||||
if not hotfix:
|
||||
continue
|
||||
|
||||
installed = utils.ssh(himn, username,
|
||||
'xe patch-list name-label=%s --minimal' % hotfix)
|
||||
|
||||
if not installed:
|
||||
utils.reportError('Hotfix %s has not been installed ' % ver)
|
||||
|
||||
|
||||
def check_local_sr(himn, username):
|
||||
|
|
Loading…
Reference in New Issue