mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	Sync xcat-buildkit files from trunk to 2.8 branch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15439 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=XLC12 for Linux
 | 
			
		||||
   version=12.1.0.0
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
#   kitdeployparams=sample/kitdeployparams.lst
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=XLF14 for Linux
 | 
			
		||||
   version=14.1.0.0
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
#   kitdeployparams=sample/kitdeployparams.lst
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=XLF14 for Linux
 | 
			
		||||
   version=14.1.0.0
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
#   kitdeployparams=sample/kitdeployparams.lst
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=essl for Linux
 | 
			
		||||
   version=5.1.1
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=essl.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=essl for Linux
 | 
			
		||||
   version=5.1.1
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=essl.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=General Parallel File System
 | 
			
		||||
   version=3.5.0-7
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   #kitdeployparams=
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=General Parallel File System
 | 
			
		||||
   version=3.5.0-7
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   #kitdeployparams=
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=General Parallel File System
 | 
			
		||||
   version=3.5.0-7
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   #kitdeployparams=
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=General Parallel File System
 | 
			
		||||
   version=3.5.0-7
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   #kitdeployparams=
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,9 @@
 | 
			
		||||
<HTML>
 | 
			
		||||
<HEAD>
 | 
			
		||||
<TITLE>GPFS Documentation</TITLE>
 | 
			
		||||
<meta http-equiv="REFRESH" content="0;url=http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/topic/com.ibm.cluster.gpfs.doc/gpfsbooks.html"></HEAD>
 | 
			
		||||
<BODY>
 | 
			
		||||
Redirecting to:
 | 
			
		||||
http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/topic/com.ibm.cluster.gpfs.doc/gpfsbooks.html
 | 
			
		||||
</BODY>
 | 
			
		||||
</HTML>
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=pessl for Linux
 | 
			
		||||
   version=4.2.0
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=pessl.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=pessl for Linux
 | 
			
		||||
   version=4.2.0
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=pessl.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=Parallel Environment Runtime Edition 
 | 
			
		||||
   version=1.3.0.0
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=pe.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -109,7 +109,7 @@ kitcomponent:
 | 
			
		||||
    basename=pperte_compute
 | 
			
		||||
    description=PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=rhels6_ppc64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -124,7 +124,7 @@ kitcomponent:
 | 
			
		||||
    basename=min_pperte_compute
 | 
			
		||||
    description=Minimal PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=rhels6_ppc64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -139,7 +139,7 @@ kitcomponent:
 | 
			
		||||
    basename=pperte_login
 | 
			
		||||
    description=PE RTE for login nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=login
 | 
			
		||||
    kitrepoid=rhels6_ppc64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -155,7 +155,7 @@ kitcomponent:
 | 
			
		||||
    basename=pperte_compute
 | 
			
		||||
    description=PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=sles11_ppc64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -170,7 +170,7 @@ kitcomponent:
 | 
			
		||||
    basename=min_pperte_compute
 | 
			
		||||
    description=Minimal PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=sles11_ppc64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -185,7 +185,7 @@ kitcomponent:
 | 
			
		||||
    basename=pperte_login
 | 
			
		||||
    description=PE RTE for login nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=login
 | 
			
		||||
    kitrepoid=sles11_ppc64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -245,42 +245,42 @@ kitcomponent:
 | 
			
		||||
 | 
			
		||||
### RH6 ppc64 rpms
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=pperte-1.3.0.0-1302a.ppc64.rpm
 | 
			
		||||
    filename=pperte-1.3.0.0-*.ppc64.rpm
 | 
			
		||||
    kitrepoid=rhels6_ppc64,sles11_ppc64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=pperteman-1.3.0.0-1302a.ppc64.rpm
 | 
			
		||||
    filename=pperteman-1.3.0.0-*.ppc64.rpm
 | 
			
		||||
    kitrepoid=rhels6_ppc64,sles11_ppc64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppertesamples-1.3.0.0-1302a.ppc64.rpm
 | 
			
		||||
    filename=ppertesamples-1.3.0.0-*.ppc64.rpm
 | 
			
		||||
    kitrepoid=rhels6_ppc64,sles11_ppc64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_1300-1.3.0.0-1302a.ppc64.rpm
 | 
			
		||||
    filename=ppe_rte_1300-1.3.0.0-*.ppc64.rpm
 | 
			
		||||
    kitrepoid=rhels6_ppc64,sles11_ppc64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_man-1.3.0.0-1302a.ppc64.rpm
 | 
			
		||||
    filename=ppe_rte_man-1.3.0.0-*.ppc64.rpm
 | 
			
		||||
    kitrepoid=rhels6_ppc64,sles11_ppc64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_samples-1.3.0.0-1302a.ppc64.rpm
 | 
			
		||||
    filename=ppe_rte_samples-1.3.0.0-*.ppc64.rpm
 | 
			
		||||
    kitrepoid=rhels6_ppc64,sles11_ppc64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
@@ -296,7 +296,7 @@ kitpackage:
 | 
			
		||||
 | 
			
		||||
### License rpm gets placed in all repos
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_license-1.3.0.0-1302a.ppc64.rpm
 | 
			
		||||
    filename=ppe_rte_license-1.3.0.0-*.ppc64.rpm
 | 
			
		||||
    kitrepoid=rhels6_ppc64,sles11_ppc64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=Parallel Environment Runtime Edition 
 | 
			
		||||
   version=1.3.0.0
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=pe.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -109,7 +109,7 @@ kitcomponent:
 | 
			
		||||
    basename=pperte_compute
 | 
			
		||||
    description=PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=rhels6_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -124,7 +124,7 @@ kitcomponent:
 | 
			
		||||
    basename=min_pperte_compute
 | 
			
		||||
    description=Minimal PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=rhels6_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -139,7 +139,7 @@ kitcomponent:
 | 
			
		||||
    basename=pperte_login
 | 
			
		||||
    description=PE RTE for login nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=login
 | 
			
		||||
    kitrepoid=rhels6_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -155,7 +155,7 @@ kitcomponent:
 | 
			
		||||
    basename=pperte_compute
 | 
			
		||||
    description=PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=sles11_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -170,7 +170,7 @@ kitcomponent:
 | 
			
		||||
    basename=min_pperte_compute
 | 
			
		||||
    description=Minimal PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=sles11_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -185,7 +185,7 @@ kitcomponent:
 | 
			
		||||
    basename=pperte_login
 | 
			
		||||
    description=PE RTE for login nodes
 | 
			
		||||
    version=1.3.0.0
 | 
			
		||||
    release=1302a
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=login
 | 
			
		||||
    kitrepoid=sles11_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
@@ -245,42 +245,42 @@ kitcomponent:
 | 
			
		||||
 | 
			
		||||
### RH6 x86_64 rpms
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=pperte-1.3.0.0-1302a.x86_64.rpm
 | 
			
		||||
    filename=pperte-1.3.0.0-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=pperteman-1.3.0.0-1302a.x86_64.rpm
 | 
			
		||||
    filename=pperteman-1.3.0.0-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppertesamples-1.3.0.0-1302a.x86_64.rpm
 | 
			
		||||
    filename=ppertesamples-1.3.0.0-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_1300-1.3.0.0-1302a.x86_64.rpm
 | 
			
		||||
    filename=ppe_rte_1300-1.3.0.0-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_man-1.3.0.0-1302a.x86_64.rpm
 | 
			
		||||
    filename=ppe_rte_man-1.3.0.0-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_samples-1.3.0.0-1302a.x86_64.rpm
 | 
			
		||||
    filename=ppe_rte_samples-1.3.0.0-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
@@ -296,7 +296,7 @@ kitpackage:
 | 
			
		||||
 | 
			
		||||
### License rpm gets placed in all repos
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_license-1.3.0.0-1302a.x86_64.rpm
 | 
			
		||||
    filename=ppe_rte_license-1.3.0.0-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,9 @@
 | 
			
		||||
<HTML>
 | 
			
		||||
<HEAD>
 | 
			
		||||
<TITLE>PE RTE Documentation</TITLE>
 | 
			
		||||
<meta http-equiv="REFRESH" content="0;url=http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/topic/com.ibm.cluster.pe.doc/pebooks.html"></HEAD>
 | 
			
		||||
<BODY>
 | 
			
		||||
Redirecting to:
 | 
			
		||||
http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/topic/com.ibm.cluster.pe.doc/pebooks.html
 | 
			
		||||
</BODY>
 | 
			
		||||
</HTML>
 | 
			
		||||
@@ -0,0 +1,308 @@
 | 
			
		||||
# Kit Build File
 | 
			
		||||
# 
 | 
			
		||||
#
 | 
			
		||||
#  xCAT Kit buildkit configuration file for:
 | 
			
		||||
#     PE RTE 1.3.0.1
 | 
			
		||||
#  This will create a "partial" kit that does not contain the full product
 | 
			
		||||
#  rpm packages.
 | 
			
		||||
#  Rename this file to 'buildkit.conf' before using
 | 
			
		||||
#
 | 
			
		||||
# Refer to the buildkit manpage for further details.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# kit: This section defines general info for the Kit. 
 | 
			
		||||
#      There must be exactly one kit section in a kit build file.
 | 
			
		||||
# 
 | 
			
		||||
# kit attributes:
 | 
			
		||||
#    basename        (mandatory) Kit base name. e.g., kit-lsf
 | 
			
		||||
#    description     (optional)  Kit description.
 | 
			
		||||
#    version         (mandatory) Kit version. e.g., 1.0
 | 
			
		||||
#    ostype          (mandatory) Kit OS type.  Must be Linux.
 | 
			
		||||
#                      AIX is currently not supported.
 | 
			
		||||
#    isinternal      (optional)  PCM use only.
 | 
			
		||||
#                      Indicate if Kit is for internal use.
 | 
			
		||||
#                      Use 1 for yes, 0 for no. Default: 0
 | 
			
		||||
#    kitdeployparams (optional)  Filename containing a list of kit deployment
 | 
			
		||||
#                       parameters, relative to
 | 
			
		||||
#                       <Kit Build Directory>/other_files
 | 
			
		||||
kit:
 | 
			
		||||
   basename=pperte
 | 
			
		||||
   description=Parallel Environment Runtime Edition 
 | 
			
		||||
   version=1.3.0.1
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=pe.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# kitrepo: This section defines a Kit Package Repository.
 | 
			
		||||
#          There must be at least one kitrepo section in a kit build file.  
 | 
			
		||||
#          If you want to support multiple OSes, you should create a separate
 | 
			
		||||
#          repo for each OS.  Also, no two repos can be defined with the same 
 | 
			
		||||
#          OS name, major/minor version and arch. For example, you cannot have
 | 
			
		||||
#          two repos for RHEL 6.2 x86_64 in the same kit.
 | 
			
		||||
#
 | 
			
		||||
# kitrepo attributes:
 | 
			
		||||
#    kitrepoid          (mandatory) Kit package repository ID.
 | 
			
		||||
#                         Must be unique within this file.
 | 
			
		||||
#    osbasename         (mandatory) OS distro base name. e.g., rhels.
 | 
			
		||||
#    osmajorversion     (mandatory) OS major version. e.g., 6
 | 
			
		||||
#    osminorversion     (optional)  OS minor version.
 | 
			
		||||
#    osarch             (mandatory) OS architecture. e.g., x86_64
 | 
			
		||||
#    compat_osbasenames (optional)  Comma-separated list of compatible 
 | 
			
		||||
#                         OS distro base names. e.g., centos
 | 
			
		||||
 | 
			
		||||
kitrepo:
 | 
			
		||||
   kitrepoid=rhels6_x86_64
 | 
			
		||||
   osbasename=rhels
 | 
			
		||||
   osmajorversion=6
 | 
			
		||||
   osarch=x86_64
 | 
			
		||||
 | 
			
		||||
kitrepo:
 | 
			
		||||
   kitrepoid=sles11_x86_64
 | 
			
		||||
   osbasename=sles
 | 
			
		||||
   osmajorversion=11
 | 
			
		||||
   osarch=x86_64
 | 
			
		||||
 | 
			
		||||
   #compat_osbasenames=
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# kitcomponent: This section defines one Kit Component.  
 | 
			
		||||
#               There can be zero or more kitcomponent sections. 
 | 
			
		||||
#               If you want to build a component which supports multiple OSes,
 | 
			
		||||
#               you should create one kitcomponent section for each OS.  
 | 
			
		||||
#               Also, no two components in a kit can be defined with the same 
 | 
			
		||||
#               base name. 
 | 
			
		||||
#
 | 
			
		||||
# kitcomponent attributes:
 | 
			
		||||
#    basename        (mandatory) Kit component base name
 | 
			
		||||
#    description     (optional)  Kit component description
 | 
			
		||||
#    version         (mandatory) Kit component version
 | 
			
		||||
#    release         (mandatory) Kit component release
 | 
			
		||||
#    serverroles     (mandatory) Comma-separated list of servers that this
 | 
			
		||||
#                      component can install on. Valid values:
 | 
			
		||||
#                         mgtnode,servicenode,compute,login,storage,utility
 | 
			
		||||
#    kitrepoid       (mandatory) The ID of the kit package repository this
 | 
			
		||||
#                      component belongs to
 | 
			
		||||
#    kitcompdeps     (optional)  Comma-separated list of kit component
 | 
			
		||||
#                       dependencies.  These kit components can be included in
 | 
			
		||||
#                       this kit or in other kits.
 | 
			
		||||
#    ospkgdeps       (optional)  Comma-separated list of OS package dependencies
 | 
			
		||||
#                       These packages must be shipped with the OS distro.
 | 
			
		||||
#    kitpkgdeps      (optional)  Comma-separated list of kit package names that
 | 
			
		||||
#                       will be listed as "REQUIRES" when building this kit
 | 
			
		||||
#                       component. Each package must be defined in a separate
 | 
			
		||||
#                       kitpackage section. Each package must be in the same 
 | 
			
		||||
#                       kitrepo as this kit component.
 | 
			
		||||
#    non_native_pkgs (optional)  TBD -- NOT SUPPORTED YET!
 | 
			
		||||
#                       Comma-separated list of non-native package 
 | 
			
		||||
#                       paths that will be included as files in this kit 
 | 
			
		||||
#                       component. All filenames are relative to 
 | 
			
		||||
#                       <Kit Build Directory>/source_packages 
 | 
			
		||||
#                       Kit component deployment scripts must be specified
 | 
			
		||||
#                       to manage these files.
 | 
			
		||||
#   driverpacks      (optional) Comma-separated list of driver package filenames
 | 
			
		||||
#                       Each driverpack must be defined in a separate kitpackage
 | 
			
		||||
#                       section.
 | 
			
		||||
#   exlist           (optional) Exclude list file for stateless image, relative
 | 
			
		||||
#                       to <Kit Build Directory>/other_files
 | 
			
		||||
#   Kit component deployment scripts (optional)  Each attribute specifies 
 | 
			
		||||
#                       script path relative to <Kit Build Directory>/scripts
 | 
			
		||||
#                       Script attributes:
 | 
			
		||||
#                         preinstall, postinstall, preuninstall, postuninstall, 
 | 
			
		||||
#                         preupgrade, postupgrade, postbootscripts
 | 
			
		||||
kitcomponent:
 | 
			
		||||
    basename=pperte_compute
 | 
			
		||||
    description=PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.1
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=rhels6_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
    ospkgdeps=yum,at,rsh,rsh-server,xinetd,sudo,libibverbs(x86-32),libibverbs(x86-64)
 | 
			
		||||
    kitpkgdeps=ppe_rte_license,pperte >= 1.3.0.1,pperteman >= 1.3.0.1,ppertesamples >= 1.3.0.1,src
 | 
			
		||||
    exlist=pe.exlist
 | 
			
		||||
    postinstall=pperte_postinstall
 | 
			
		||||
    postupgrade=pperte_postinstall
 | 
			
		||||
    postbootscripts=pperte_postboot
 | 
			
		||||
 | 
			
		||||
kitcomponent:
 | 
			
		||||
    basename=min_pperte_compute
 | 
			
		||||
    description=Minimal PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.1
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=rhels6_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
    ospkgdeps=yum,at,rsh,rsh-server,xinetd,sudo,libibverbs(x86-32),libibverbs(x86-64)
 | 
			
		||||
    kitpkgdeps=ppe_rte_license,pperte >= 1.3.0.1,src
 | 
			
		||||
    exlist=pe.exlist
 | 
			
		||||
    postinstall=pperte_postinstall
 | 
			
		||||
    postupgrade=pperte_postinstall
 | 
			
		||||
    postbootscripts=pperte_postboot
 | 
			
		||||
 | 
			
		||||
kitcomponent:
 | 
			
		||||
    basename=pperte_login
 | 
			
		||||
    description=PE RTE for login nodes
 | 
			
		||||
    version=1.3.0.1
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=login
 | 
			
		||||
    kitrepoid=rhels6_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
    ospkgdeps=yum,at,rsh,rsh-server,xinetd,sudo,libibverbs(x86-32),libibverbs(x86-64)
 | 
			
		||||
    kitpkgdeps=ppe_rte_license,pperte >= 1.3.0.1,pperteman >= 1.3.0.1,ppertesamples >= 1.3.0.1,src
 | 
			
		||||
    exlist=pe.exlist
 | 
			
		||||
    postinstall=pperte_postinstall
 | 
			
		||||
    postupgrade=pperte_postinstall
 | 
			
		||||
    postbootscripts=pperte_postboot
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
kitcomponent:
 | 
			
		||||
    basename=pperte_compute
 | 
			
		||||
    description=PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.1
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=sles11_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
    ospkgdeps=zypper,at,rsh-server,xinetd,sudo,libibverbs-32bit,libibverbs
 | 
			
		||||
    kitpkgdeps=ppe_rte_license,pperte >= 1.3.0.1,pperteman >= 1.3.0.1,ppertesamples >= 1.3.0.1,src
 | 
			
		||||
    exlist=pe.exlist
 | 
			
		||||
    postinstall=pperte_postinstall
 | 
			
		||||
    postupgrade=pperte_postinstall
 | 
			
		||||
    postbootscripts=pperte_postboot
 | 
			
		||||
 | 
			
		||||
kitcomponent:
 | 
			
		||||
    basename=min_pperte_compute
 | 
			
		||||
    description=Minimal PE RTE for compute nodes
 | 
			
		||||
    version=1.3.0.1
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=compute
 | 
			
		||||
    kitrepoid=sles11_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
    ospkgdeps=zypper,at,rsh-server,xinetd,sudo,libibverbs-32bit,libibverbs
 | 
			
		||||
    kitpkgdeps=ppe_rte_license,pperte >= 1.3.0.1,src
 | 
			
		||||
    exlist=pe.exlist
 | 
			
		||||
    postinstall=pperte_postinstall
 | 
			
		||||
    postupgrade=pperte_postinstall
 | 
			
		||||
    postbootscripts=pperte_postboot
 | 
			
		||||
 | 
			
		||||
kitcomponent:
 | 
			
		||||
    basename=pperte_login
 | 
			
		||||
    description=PE RTE for login nodes
 | 
			
		||||
    version=1.3.0.1
 | 
			
		||||
    release=0
 | 
			
		||||
    serverroles=login
 | 
			
		||||
    kitrepoid=sles11_x86_64
 | 
			
		||||
    #kitcompdeps=
 | 
			
		||||
    ospkgdeps=zypper,at,rsh-server,xinetd,sudo,libibverbs-32bit,libibverbs
 | 
			
		||||
    kitpkgdeps=ppe_rte_license,pperte >= 1.3.0.1,pperteman >= 1.3.0.1,ppertesamples >= 1.3.0.1,src
 | 
			
		||||
    exlist=pe.exlist
 | 
			
		||||
    postinstall=pperte_postinstall
 | 
			
		||||
    postupgrade=pperte_postinstall
 | 
			
		||||
    postbootscripts=pperte_postboot
 | 
			
		||||
 | 
			
		||||
# kitpackage: This section defines one Kit Package, and how to build it.
 | 
			
		||||
#             There can be zero or more kitpackage sections.  
 | 
			
		||||
#             All filenames should be relative paths to
 | 
			
		||||
#                <Kit Build Directory>/source_packages  
 | 
			
		||||
#             If you want to build a package which can run on multiple OSes, 
 | 
			
		||||
#             you have two options:
 | 
			
		||||
#               1. Build a separate package for each OS you want to support.  
 | 
			
		||||
#                  For this option, you need to define one kitpackage section 
 | 
			
		||||
#                  per supported OS.
 | 
			
		||||
#               2. Build one package that can run on multiple OSes.  
 | 
			
		||||
#                  If you are building an RPM package, you are responsible for 
 | 
			
		||||
#                  creating an RPM spec file that can run on multiple OSes.  
 | 
			
		||||
#                  For this option, you need to define one kitpackage section
 | 
			
		||||
#                  which contains multiple kitrepoid lines.
 | 
			
		||||
# 
 | 
			
		||||
# kitpackage attributes:
 | 
			
		||||
#    filename   (mandatory) Package filename
 | 
			
		||||
#    kitrepoid  (mandatory) The repo(s) this package belongs to.  
 | 
			
		||||
#                 If multiple repos are defined, the package will be built for
 | 
			
		||||
#                 the first repo only. For the other repos, a symlink is created
 | 
			
		||||
#                 to the package built for the first repo.
 | 
			
		||||
#   Package build methods (optional)  
 | 
			
		||||
#                 Define how to build the packages. 
 | 
			
		||||
#                 If you don't specify a build method, the default behavior is
 | 
			
		||||
#                 to assume the package is pre-built under 
 | 
			
		||||
#                   <Kit Build Directory>/source_packages
 | 
			
		||||
#                 All files in this section are relative to 
 | 
			
		||||
#                   <Kit Build Directory>/source_packages
 | 
			
		||||
#                 There are four methods to build packages.
 | 
			
		||||
#                   1. Use pre-built RPM package
 | 
			
		||||
#                       isexternalpkg:  'no'|'0', 'yes'|'1'  (default:  'no') 
 | 
			
		||||
#                         Indicates whether the RPM package will be added to the
 | 
			
		||||
#                         the kit tar file now as part of the kit build process,
 | 
			
		||||
#                         or whether the customer will need to separately
 | 
			
		||||
#                         obtain the RPM pacakage and add it to the kit tar file
 | 
			
		||||
#                         using 'buildkit addpkgs'
 | 
			
		||||
#                       rpm_prebuiltdir: If isexternalpkg=yes, path to directory
 | 
			
		||||
#                         containing pre-built RPM package
 | 
			
		||||
#                   2. Build RPM from spec + src dir
 | 
			
		||||
#                       rpm_spec:   Path to spec file.
 | 
			
		||||
#                       rpm_srcdir: Path to source directory.
 | 
			
		||||
#                   3. Build RPM from spec + src tarball
 | 
			
		||||
#                       rpm_spec:        Path to spec file.
 | 
			
		||||
#                       rpm_srctarball:  Path to source tarball.
 | 
			
		||||
#                   4. Build RPM from source RPM
 | 
			
		||||
#                       rpm_srpm:  Path to source RPM package.
 | 
			
		||||
 | 
			
		||||
### RH6 x86_64 rpms
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=pperte-1.3.0.1-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=pperteman-1.3.0.1-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppertesamples-1.3.0.1-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_1301-1.3.0.1-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_man-1.3.0.1-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_samples-1.3.0.1-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=src-*.i386.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### License rpm gets placed in all repos
 | 
			
		||||
kitpackage:
 | 
			
		||||
    filename=ppe_rte_license-1.3.0.1-*.x86_64.rpm
 | 
			
		||||
    kitrepoid=rhels6_x86_64,sles11_x86_64
 | 
			
		||||
    # Method 1: Use pre-built RPM package
 | 
			
		||||
    isexternalpkg=yes
 | 
			
		||||
    
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=Parallel Environment Runtime Edition 
 | 
			
		||||
   version=1.3.0.0
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=pe.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=Parallel Environment Runtime Edition 
 | 
			
		||||
   version=1.3.0.0
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=pe.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=Parallel Environment Developer Edition
 | 
			
		||||
   version=1.2.0-1
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=ppedev.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=Parallel Environment Developer Edition
 | 
			
		||||
   version=1.2.0-1
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=ppedev.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,9 @@
 | 
			
		||||
<HTML>
 | 
			
		||||
<HEAD>
 | 
			
		||||
<TITLE>PE DE Documentation</TITLE>
 | 
			
		||||
<meta http-equiv="REFRESH" content="0;url=http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/topic/com.ibm.cluster.pedev.doc/pedevbooks.html"></HEAD>
 | 
			
		||||
<BODY>
 | 
			
		||||
Redirecting to:
 | 
			
		||||
http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/topic/com.ibm.cluster.pedev.doc/pedevbooks.html
 | 
			
		||||
</BODY>
 | 
			
		||||
</HTML>
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=Parallel Environment Developer Edition
 | 
			
		||||
   version=1.2.0-1
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=ppedev.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=Parallel Environment Developer Edition
 | 
			
		||||
   version=1.2.0-1
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
   kitdeployparams=ppedev.env
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=teal for Linux
 | 
			
		||||
   version=1.2.0.2
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
#   kitdeployparams=
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=teal for Linux
 | 
			
		||||
   version=1.2.0.2
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
#   kitdeployparams=
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=teal for Linux
 | 
			
		||||
   version=1.2.0.2
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
#   kitdeployparams=
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ kit:
 | 
			
		||||
   description=teal for Linux
 | 
			
		||||
   version=1.2.0.2
 | 
			
		||||
   ostype=Linux
 | 
			
		||||
   kitlicense=IPLA
 | 
			
		||||
   kitlicense=ILAN
 | 
			
		||||
#   kitdeployparams=
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,8 @@
 | 
			
		||||
# IBM(c) 2012 EPL license http://www.eclipse.org/legal/epl-v10.html
 | 
			
		||||
 | 
			
		||||
#TEST: UNCOMMENT the first line, and COMMENT OUT the second line.
 | 
			
		||||
#BUILD: COMMENT OUT the first line, and UNCOMMENT the second line.
 | 
			
		||||
#package xCAT_plugin::imageprofile;
 | 
			
		||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile;
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
@@ -7,27 +12,81 @@ require xCAT::Utils;
 | 
			
		||||
require xCAT::Table;
 | 
			
		||||
require xCAT::KitPluginUtils;
 | 
			
		||||
 | 
			
		||||
use Data::Dumper;
 | 
			
		||||
 | 
			
		||||
# buildkit Processing
 | 
			
		||||
#   In order to avoid collisions with other plugins, the package
 | 
			
		||||
#   name for this plugin must contain the full kit name.
 | 
			
		||||
#   The buildkit buildtar command will copy this file from your plugins
 | 
			
		||||
#   directory to the the kit build directory, renaming the file with the
 | 
			
		||||
#   correct kit name.  All strings in this file of the form
 | 
			
		||||
#      <<<buildkit_WILL_INSERT_kitname_HERE>>>
 | 
			
		||||
#   will be replaced with the full kit name.  In order for buildkit to
 | 
			
		||||
#   correctly edit this file, do not remove these strings.
 | 
			
		||||
#
 | 
			
		||||
# KIT PLUGIN FOR IMAGE PROFILE MANAGEMENT
 | 
			
		||||
# =======================================
 | 
			
		||||
# What is this plugin used for?
 | 
			
		||||
#    This is an xCAT Perl plugin that lets you add custom code
 | 
			
		||||
#    which gets called during certain image profile management 
 | 
			
		||||
#    operations.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
# What image profile management operations automatically call this plugin?
 | 
			
		||||
#
 | 
			
		||||
#    - Generate image profile (pcmgenerateimageprofile / pcmmgtnodeimageprofile)
 | 
			
		||||
#      operation calls:
 | 
			
		||||
#          - kitimagepregenerate():  Any code added here gets called
 | 
			
		||||
#                                    before an image profile is created.
 | 
			
		||||
#
 | 
			
		||||
#          - kitimagepostgenerate(): Any code added here gets called
 | 
			
		||||
#                                    after an image profile is created.
 | 
			
		||||
#
 | 
			
		||||
#    - Copy image profile (pcmcopyimageprofile) operation calls:
 | 
			
		||||
#          - kitimageprecopy():  Any code added here gets called
 | 
			
		||||
#                                before an image profile is copied.
 | 
			
		||||
#
 | 
			
		||||
#          - kitimagepostcopy(): Any code added here gets called
 | 
			
		||||
#                                after an image profile is copied.
 | 
			
		||||
#
 | 
			
		||||
#    - Update image profile (pcmupdateimageprofile) operation calls:
 | 
			
		||||
#          - kitimagepreupdate():  Any code added here gets called
 | 
			
		||||
#                                  before an image profile is updated.
 | 
			
		||||
#
 | 
			
		||||
#          - kitimagepostupdate(): Any code added here gets called
 | 
			
		||||
#                                  after an image profile is updated.
 | 
			
		||||
#
 | 
			
		||||
#    - Delete image profile (pcmdeleteimageprofile) operation calls:
 | 
			
		||||
#          - kitimagepredelete():  Any code added here gets called
 | 
			
		||||
#                                  before an image profile is deleted.
 | 
			
		||||
#
 | 
			
		||||
#          - kitimagepostdelete(): Any code added here gets called
 | 
			
		||||
#                                  after an image profile is deleted.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
# How to create a new plugin for your kit?
 | 
			
		||||
#
 | 
			
		||||
#    1) Copy the sample plugin
 | 
			
		||||
#          % cp plugins/sample/imageprofile.pm plugins
 | 
			
		||||
#
 | 
			
		||||
#    2) Modify the sample plugin by implementing one or more of 
 | 
			
		||||
#       the plugin commands above.
 | 
			
		||||
#
 | 
			
		||||
#       Refer to each command's comments for command parameters 
 | 
			
		||||
#       and return values.
 | 
			
		||||
#
 | 
			
		||||
#       For details on how to write plugin code, refer to:
 | 
			
		||||
#       http://sourceforge.net/apps/mediawiki/xcat/index.php?title=XCAT_Developer_Guide
 | 
			
		||||
#
 | 
			
		||||
#    3) To test the plugin commands:
 | 
			
		||||
#          a) Search this file for lines that start with "TEST:" and follow the 
 | 
			
		||||
#              instructions
 | 
			
		||||
#
 | 
			
		||||
#          b) Refer to each command's comments for test steps.
 | 
			
		||||
#
 | 
			
		||||
#    4) After you finish the test, you can build the the kit.
 | 
			
		||||
#       Before building, search this file for lines that start with "BUILD:" and 
 | 
			
		||||
#       follow the instructions.
 | 
			
		||||
#
 | 
			
		||||
#    5) Run buildkit as normal to build the kit.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Global Variables
 | 
			
		||||
 | 
			
		||||
# This is the full name of the kit which this plugin belongs 
 | 
			
		||||
# to. The kit name is used by some code in process_request() 
 | 
			
		||||
# to determine if the plugin should run.  When you are testing 
 | 
			
		||||
# your plugin the kit name should be set to "TESTMODE" to 
 | 
			
		||||
# bypass the plugin check in process_request().
 | 
			
		||||
 | 
			
		||||
our ($PLUGIN_KITNAME);
 | 
			
		||||
 | 
			
		||||
#TEST: UNCOMMENT the first line, and COMMENT OUT the second line.
 | 
			
		||||
#BUILD: COMMENT OUT the first line, and UNCOMMENT the second line.
 | 
			
		||||
#$PLUGIN_KITNAME = "TESTMODE";
 | 
			
		||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
 | 
			
		||||
 | 
			
		||||
@@ -56,9 +115,27 @@ $PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub handled_commands {
 | 
			
		||||
    #TEST: UNCOMMENT the first return, and COMMENT OUT the second return.
 | 
			
		||||
    #BUILD: COMMENT OUT the first return, and UNCOMMENT the second return.
 | 
			
		||||
    #return {
 | 
			
		||||
    #    kitimagepregenerate => 'imageprofile',
 | 
			
		||||
    #    kitimagepostgenerate => 'imageprofile',
 | 
			
		||||
    #    kitimageprecopy => 'imageprofile',
 | 
			
		||||
    #    kitimagepostcopy => 'imageprofile',
 | 
			
		||||
    #    kitimagepreupdate => 'imageprofile',
 | 
			
		||||
    #    kitimagepostupdate => 'imageprofile',
 | 
			
		||||
    #    kitimagepredelete => 'imageprofile',
 | 
			
		||||
    #    kitimagepostdelete => 'imageprofile',
 | 
			
		||||
    #};
 | 
			
		||||
    return {
 | 
			
		||||
        kitimagevalidatecomps => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
 | 
			
		||||
        kitimageimport => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
 | 
			
		||||
        kitimagepregenerate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
 | 
			
		||||
        kitimagepostgenerate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
 | 
			
		||||
        kitimageprecopy => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
 | 
			
		||||
        kitimagepostcopy => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
 | 
			
		||||
        kitimagepreupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
 | 
			
		||||
        kitimagepostupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
 | 
			
		||||
        kitimagepredelete => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
 | 
			
		||||
        kitimagepostdelete => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_imageprofile',
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -76,33 +153,64 @@ sub handled_commands {
 | 
			
		||||
sub process_request {
 | 
			
		||||
    my $request = shift;
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
 | 
			
		||||
    # This kit plugin is passed the name of an image profile.
 | 
			
		||||
    # We need to determine which kits is used by this
 | 
			
		||||
    # image profile to decide if this plugin should run or not.
 | 
			
		||||
 | 
			
		||||
    my $imgprofilename = $request->{arg}->[0];
 | 
			
		||||
 | 
			
		||||
    my $kitdata = $request->{kitdata};
 | 
			
		||||
    if (! defined($kitdata)) {
 | 
			
		||||
        $kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imgprofilename]);
 | 
			
		||||
        $request->{kitdata} = $kitdata;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    # Name of command and node list
 | 
			
		||||
    my $command = $request->{command}->[0];
 | 
			
		||||
    my $args = $request->{arg};
 | 
			
		||||
 | 
			
		||||
    if($command eq 'kitimagevalidatecomps') {
 | 
			
		||||
        kitimagevalidatecomps($callback, $args);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitimageimport') {
 | 
			
		||||
        kitimageimport($callback, $args);
 | 
			
		||||
    # This kit plugin is passed the name of an image profile.
 | 
			
		||||
    # Before running this plugin, we should check if the 
 | 
			
		||||
    # image profile is using the kit which this plugin belongs to.
 | 
			
		||||
 | 
			
		||||
    if ($PLUGIN_KITNAME eq "TESTMODE") {
 | 
			
		||||
        # Don't do the check in test mode
 | 
			
		||||
    } elsif ($command eq 'kitimagepregenerate' || $command eq 'kitimageprecopy') {
 | 
			
		||||
        # Also, don't do the check if the image profile doesn't yet exist
 | 
			
		||||
    } else {
 | 
			
		||||
        # Do the check 
 | 
			
		||||
        my $imageprofile = parse_str_arg($request->{arg}->[0]);
 | 
			
		||||
 | 
			
		||||
        my $kitdata = $request->{kitdata};
 | 
			
		||||
        if (! defined($kitdata)) {
 | 
			
		||||
            $kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imageprofile]);
 | 
			
		||||
            $request->{kitdata} = $kitdata;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (! exists($kitdata->{$PLUGIN_KITNAME})) {
 | 
			
		||||
            # This image profile is not using this plugin's kit, so don't run the plugin.
 | 
			
		||||
            $rsp->{data}->[0] = "Skipped running \"$command\" plugin command for \"$PLUGIN_KITNAME\" kit.";
 | 
			
		||||
            xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    # Run the command
 | 
			
		||||
    
 | 
			
		||||
    if($command eq 'kitimagepregenerate') {
 | 
			
		||||
        kitimagepregenerate($callback, $args);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitimagepostgenerate') {
 | 
			
		||||
        kitimagepostgenerate($callback, $args);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitimageprecopy') {
 | 
			
		||||
        kitimageprecopy($callback, $args);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitimagepostcopy') {
 | 
			
		||||
        kitimagepostcopy($callback, $args);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitimagepreupdate') {
 | 
			
		||||
        kitimagepreupdate($callback, $args);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitimagepostupdate') {
 | 
			
		||||
        kitimagepostupdate($callback, $args);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitimagepredelete') {
 | 
			
		||||
        kitimagepredelete($callback, $args);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitimagepostdelete') {
 | 
			
		||||
        kitimagepostdelete($callback, $args);
 | 
			
		||||
    } else {
 | 
			
		||||
        my $rsp;
 | 
			
		||||
        $rsp->{data}->[0] = "Command is not supported";
 | 
			
		||||
@@ -113,63 +221,524 @@ sub process_request {
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  kitimagevalidatecomps
 | 
			
		||||
=head3  kitimagepregenerate
 | 
			
		||||
 | 
			
		||||
     This command is called to validate new changes to an 
 | 
			
		||||
     image profile's kit component list before the changes 
 | 
			
		||||
     are committed.
 | 
			
		||||
     This command is called before an image profile 
 | 
			
		||||
     is created with a specified set of parameters.
 | 
			
		||||
 | 
			
		||||
     Command-line interface:
 | 
			
		||||
          kitimagepregenerate imageprofile="<image profile name>"
 | 
			
		||||
                              osdistro="<os distro name>"
 | 
			
		||||
                              osdistroupdate="<os distro update name>"
 | 
			
		||||
                              bootparams="<boot params string>"
 | 
			
		||||
                              ospkgs="<comma-separated list of ospkgs>"
 | 
			
		||||
                              custompkgs="<comma-separated list of custompkgs>"
 | 
			
		||||
                              kitcomponents="<comma-separated list of kitcomponents>"
 | 
			
		||||
                              modules="<comma-separated list of modules>"
 | 
			
		||||
 | 
			
		||||
     Parameters:
 | 
			
		||||
          $imageprofile    :  image profile name
 | 
			
		||||
          $osdistro        :  os distro name
 | 
			
		||||
          $osdistroupdate  :  os distro update name
 | 
			
		||||
          $bootparams      :  boot params string
 | 
			
		||||
          @ospkgs          :  list of ospkg names
 | 
			
		||||
          @custompkgs      :  list of custompkg names
 | 
			
		||||
          @kitcomponents   :  list of kit component names
 | 
			
		||||
          @modules         :  list of module names
 | 
			
		||||
 | 
			
		||||
     Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
     Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclientnnr kitimagepregenerate
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitimagepregenerate <params ...>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub kitimagevalidatecomps {
 | 
			
		||||
sub kitimagepregenerate {
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
    my $args = shift;
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $imgprofilename =  $args->[0];
 | 
			
		||||
    my $newcomplist = $args->[1];
 | 
			
		||||
    my @newcomplist = ();
 | 
			
		||||
    if (defined($newcomplist)) {
 | 
			
		||||
        @newcomplist = split(/,/, $newcomplist);
 | 
			
		||||
    }
 | 
			
		||||
    my $newosdistro = $args->[2];
 | 
			
		||||
    my $newosdistroupdate = $args->[3];
 | 
			
		||||
    my $imageprofile = parse_str_arg(shift(@$args));
 | 
			
		||||
    my $osdistro = parse_str_arg(shift(@$args));
 | 
			
		||||
    my $osdistroupdate = parse_str_arg(shift(@$args));
 | 
			
		||||
    my $bootparams = parse_str_arg(shift(@$args));
 | 
			
		||||
    my @ospkgs = parse_list_arg(shift(@$args));
 | 
			
		||||
    my @custompkgs = parse_list_arg(shift(@$args));
 | 
			
		||||
    my @kitcomponents = parse_list_arg(shift(@$args));
 | 
			
		||||
    my @modules = parse_list_arg(shift(@$args));
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitimagevalidatecomps";
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitimagepregenerate ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO
 | 
			
		||||
    # ... ADD YOUR CODE HERE
 | 
			
		||||
    $rsp->{data}->[0] = "Image Profile: $imageprofile";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO: ADD YOUR CODE HERE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  kitimageimport
 | 
			
		||||
=head3  kitimagepostgenerate
 | 
			
		||||
 | 
			
		||||
    This command is called after changes to an image profile 
 | 
			
		||||
    have been committed.
 | 
			
		||||
     This command is called after an image profile 
 | 
			
		||||
     is created.
 | 
			
		||||
 | 
			
		||||
     Command-line interface:
 | 
			
		||||
          kitimagepostgenerate imageprofile="<image profile name>"
 | 
			
		||||
 | 
			
		||||
     Parameters:
 | 
			
		||||
          $imageprofile    :  image profile name
 | 
			
		||||
 | 
			
		||||
     Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
     Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclientnnr kitimagepostgenerate
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitimagepostgenerate <params ...>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub kitimageimport {
 | 
			
		||||
sub kitimagepostgenerate {
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
    my $args = shift;
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $imgprofilename = $args->[0];
 | 
			
		||||
    my $imageprofile = parse_str_arg(shift(@$args));
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitimageimport";
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitimagepostgenerate ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO
 | 
			
		||||
    # ... ADD YOUR CODE HERE
 | 
			
		||||
    $rsp->{data}->[0] = "Image Profile: $imageprofile";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO: ADD YOUR CODE HERE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  kitimageprecopy
 | 
			
		||||
 | 
			
		||||
     This command is called before an image profile 
 | 
			
		||||
     is copied with a specified set of parameters.
 | 
			
		||||
 | 
			
		||||
     Command-line interface:
 | 
			
		||||
          kitimageprecopy  imageprofile="<image profile name>"
 | 
			
		||||
                           osdistro="<os distro name>"
 | 
			
		||||
                           osdistroupdate="<os distro update name>"
 | 
			
		||||
                           bootparams="<boot params string>"
 | 
			
		||||
                           ospkgs="<comma-separated list of ospkgs>"
 | 
			
		||||
                           custompkgs="<comma-separated list of custompkgs>"
 | 
			
		||||
                           kitcomponents="<comma-separated list of kitcomponents>"
 | 
			
		||||
                           modules="<comma-separated list of modules>"
 | 
			
		||||
 | 
			
		||||
     Parameters:
 | 
			
		||||
          $imageprofile    :  image profile name
 | 
			
		||||
          $osdistro        :  os distro name
 | 
			
		||||
          $osdistroupdate  :  os distro update name
 | 
			
		||||
          $bootparams      :  boot params string
 | 
			
		||||
          @ospkgs          :  list of ospkg names
 | 
			
		||||
          @custompkgs      :  list of custompkg names
 | 
			
		||||
          @kitcomponents   :  list of kit component names
 | 
			
		||||
          @modules         :  list of module names
 | 
			
		||||
 | 
			
		||||
     Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
     Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclientnnr kitimageprecopy
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitimageprecopy <params ...>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub kitimageprecopy {
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
    my $args = shift;
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $imageprofile = parse_str_arg(shift(@$args));
 | 
			
		||||
    my $osdistro = parse_str_arg(shift(@$args));
 | 
			
		||||
    my $osdistroupdate = parse_str_arg(shift(@$args));
 | 
			
		||||
    my $bootparams = parse_str_arg(shift(@$args));
 | 
			
		||||
    my @ospkgs = parse_list_arg(shift(@$args));
 | 
			
		||||
    my @custompkgs = parse_list_arg(shift(@$args));
 | 
			
		||||
    my @kitcomponents = parse_list_arg(shift(@$args));
 | 
			
		||||
    my @modules = parse_list_arg(shift(@$args));
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitimageprecopy ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Image Profile: $imageprofile";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO: ADD YOUR CODE HERE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  kitimagepostcopy
 | 
			
		||||
 | 
			
		||||
     This command is called after an image profile 
 | 
			
		||||
     is copied.
 | 
			
		||||
 | 
			
		||||
     Command-line interface:
 | 
			
		||||
          kitimagepostcopy imageprofile="<image profile name>"
 | 
			
		||||
 | 
			
		||||
     Parameters:
 | 
			
		||||
          $imageprofile    :  image profile name
 | 
			
		||||
 | 
			
		||||
     Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
     Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclientnnr kitimagepostcopy
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitimagepostcopy <params ...>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub kitimagepostcopy {
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
    my $args = shift;
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $imageprofile = parse_str_arg(shift(@$args));
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitimagepostcopy ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Image Profile: $imageprofile";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO: ADD YOUR CODE HERE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  kitimagepreupdate
 | 
			
		||||
 | 
			
		||||
     This command is called before an image profile 
 | 
			
		||||
     is updated with a specified set of parameters.
 | 
			
		||||
 | 
			
		||||
     Command-line interface:
 | 
			
		||||
          kitimagepreupdate  imageprofile="<image profile name>"
 | 
			
		||||
                             osdistro="<os distro name>"
 | 
			
		||||
                             osdistroupdate="<os distro update name>"
 | 
			
		||||
                             bootparams="<boot params string>"
 | 
			
		||||
                             ospkgs="<comma-separated list of ospkgs>"
 | 
			
		||||
                             custompkgs="<comma-separated list of custompkgs>"
 | 
			
		||||
                             kitcomponents="<comma-separated list of kitcomponents>"
 | 
			
		||||
                             modules="<comma-separated list of modules>"
 | 
			
		||||
 | 
			
		||||
     Parameters:
 | 
			
		||||
          $imageprofile    :  image profile name
 | 
			
		||||
          $osdistro        :  os distro name
 | 
			
		||||
          $osdistroupdate  :  os distro update name
 | 
			
		||||
          $bootparams      :  boot params string
 | 
			
		||||
          @ospkgs          :  list of ospkg names
 | 
			
		||||
          @custompkgs      :  list of custompkg names
 | 
			
		||||
          @kitcomponents   :  list of kit component names
 | 
			
		||||
          @modules         :  list of module names
 | 
			
		||||
 | 
			
		||||
     Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
     Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclientnnr kitimagepreupdate
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitimagepreupdate <params ...>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub kitimagepreupdate {
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
    my $args = shift;
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $imageprofile = parse_str_arg(shift(@$args));
 | 
			
		||||
    my $osdistro = parse_str_arg(shift(@$args));
 | 
			
		||||
    my $osdistroupdate = parse_str_arg(shift(@$args));
 | 
			
		||||
    my $bootparams = parse_str_arg(shift(@$args));
 | 
			
		||||
    my @ospkgs = parse_list_arg(shift(@$args));
 | 
			
		||||
    my @custompkgs = parse_list_arg(shift(@$args));
 | 
			
		||||
    my @kitcomponents = parse_list_arg(shift(@$args));
 | 
			
		||||
    my @modules = parse_list_arg(shift(@$args));
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitimagepreupdate ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Image Profile: $imageprofile";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO: ADD YOUR CODE HERE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  kitimagepostupdate
 | 
			
		||||
 | 
			
		||||
     This command is called after an image profile 
 | 
			
		||||
     is updated.
 | 
			
		||||
 | 
			
		||||
     Command-line interface:
 | 
			
		||||
          kitimagepostupdate imageprofile="<image profile name>"
 | 
			
		||||
 | 
			
		||||
     Parameters:
 | 
			
		||||
          $imageprofile    :  image profile name
 | 
			
		||||
 | 
			
		||||
     Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
     Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclientnnr kitimagepostupdate
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitimagepostupdate <params ...>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub kitimagepostupdate {
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
    my $args = shift;
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $imageprofile = parse_str_arg(shift(@$args));
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitimagepostupdate ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Image Profile: $imageprofile";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO: ADD YOUR CODE HERE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  kitimagepredelete
 | 
			
		||||
 | 
			
		||||
     This command is called before an image profile 
 | 
			
		||||
     is deleted.
 | 
			
		||||
 | 
			
		||||
     Command-line interface:
 | 
			
		||||
          kitimagepredelete  imageprofile="<image profile name>"
 | 
			
		||||
 | 
			
		||||
     Parameters:
 | 
			
		||||
          $imageprofile    :  image profile name
 | 
			
		||||
 | 
			
		||||
     Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
     Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclientnnr kitimagepredelete
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitimagepredelete <params ...>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub kitimagepredelete {
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
    my $args = shift;
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $imageprofile = parse_str_arg(shift(@$args));
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitimagepredelete ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Image Profile: $imageprofile";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO: ADD YOUR CODE HERE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  kitimagepostdelete
 | 
			
		||||
 | 
			
		||||
     This command is called after an image profile 
 | 
			
		||||
     is deleted.
 | 
			
		||||
 | 
			
		||||
     Command-line interface:
 | 
			
		||||
          kitimagepostdelete imageprofile="<image profile name>"
 | 
			
		||||
 | 
			
		||||
     Parameters:
 | 
			
		||||
          $imageprofile    :  image profile name
 | 
			
		||||
 | 
			
		||||
     Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
     Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclientnnr kitimagepostdelete
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitimagepostdelete <params ...>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub kitimagepostdelete {
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
    my $args = shift;
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $imageprofile = parse_str_arg(shift(@$args));
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitimagepostdelete ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Image Profile: $imageprofile";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO: ADD YOUR CODE HERE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  parse_str_arg
 | 
			
		||||
 | 
			
		||||
    Utility function to extract the string value of an 
 | 
			
		||||
    argument in this format:
 | 
			
		||||
         PARAM=string1
 | 
			
		||||
 | 
			
		||||
    Returns a string:
 | 
			
		||||
         'string1'
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
sub parse_str_arg {
 | 
			
		||||
  
 | 
			
		||||
   my $arg = shift;
 | 
			
		||||
   my $result;
 | 
			
		||||
 | 
			
		||||
   if (!defined($arg)) {
 | 
			
		||||
      return $arg;
 | 
			
		||||
   }
 | 
			
		||||
   
 | 
			
		||||
   $arg =~ s/.*?=//;
 | 
			
		||||
   $result = $arg;
 | 
			
		||||
 
 | 
			
		||||
   return $result;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  parse_list_arg
 | 
			
		||||
 | 
			
		||||
    Utility function to extract the list of values of 
 | 
			
		||||
    an argument in this format:
 | 
			
		||||
         PARAM=value1,value2,value3
 | 
			
		||||
 | 
			
		||||
    Returns a list of values:
 | 
			
		||||
         ('value1', 'value2', 'value3')
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
sub parse_list_arg {
 | 
			
		||||
  
 | 
			
		||||
   my $arg = shift;
 | 
			
		||||
   my @result;
 | 
			
		||||
   
 | 
			
		||||
   if (!defined($arg)) {
 | 
			
		||||
      return $arg;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   $arg =~ s/.*?=//;
 | 
			
		||||
   @result = split(/,/, $arg);
 | 
			
		||||
 
 | 
			
		||||
   return @result;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,8 @@
 | 
			
		||||
# IBM(c) 2012 EPL license http://www.eclipse.org/legal/epl-v10.html
 | 
			
		||||
 | 
			
		||||
#TEST: UNCOMMENT the first line, and COMMENT OUT the second line.
 | 
			
		||||
#BUILD: COMMENT OUT the first line, and UNCOMMENT the second line.
 | 
			
		||||
#package xCAT_plugin::nodemgmt;
 | 
			
		||||
package xCAT_plugin::<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt;
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
@@ -7,25 +12,70 @@ require xCAT::Utils;
 | 
			
		||||
require xCAT::Table;
 | 
			
		||||
require xCAT::KitPluginUtils;
 | 
			
		||||
 | 
			
		||||
# buildkit Processing
 | 
			
		||||
#   In order to avoid collisions with other plugins, the package
 | 
			
		||||
#   name for this plugin must contain the full kit name.
 | 
			
		||||
#   The buildkit buildtar command will copy this file from your plugins
 | 
			
		||||
#   directory to the the kit build directory, renaming the file with the
 | 
			
		||||
#   correct kit name.  All strings in this file of the form 
 | 
			
		||||
#      <<<buildkit_WILL_INSERT_kitname_HERE>>>
 | 
			
		||||
#   will be replaced with the full kit name.  In order for buildkit to
 | 
			
		||||
#   correctly edit this file, do not remove these strings.
 | 
			
		||||
use Data::Dumper;
 | 
			
		||||
 | 
			
		||||
# Global Variables
 | 
			
		||||
 | 
			
		||||
# This is the full name of the kit which this plugin belongs 
 | 
			
		||||
# to. The kit name is used by some code in process_request() 
 | 
			
		||||
# to determine if the plugin should run.  When you are testing 
 | 
			
		||||
# your plugin the kit name should be set to "TESTMODE" to 
 | 
			
		||||
# bypass the plugin check in process_request().
 | 
			
		||||
#
 | 
			
		||||
# KIT PLUGIN FOR NODE MANAGEMENT
 | 
			
		||||
# ==============================
 | 
			
		||||
# What is this plugin used for?
 | 
			
		||||
#    This is an xCAT Perl plugin that lets you add custom code
 | 
			
		||||
#    which gets called during certain node management operations.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
# What node management operations automatically call this plugin?
 | 
			
		||||
#
 | 
			
		||||
#    - Import node (nodeimport) / Discover node (findme) operations call:
 | 
			
		||||
#          - kitnodeadd():  Any code added here gets called after
 | 
			
		||||
#                           one or more nodes are added to the cluster. 
 | 
			
		||||
#
 | 
			
		||||
#    - Remove node (nodepurge) operation calls:
 | 
			
		||||
#          - kitnoderemove():  Any code added here gets called after
 | 
			
		||||
#                              one or more nodes are removed from the cluster. 
 | 
			
		||||
#
 | 
			
		||||
#    - Update node's profiles (kitnodeupdate) / Update node's MAC (nodechmac)
 | 
			
		||||
#      operations call:
 | 
			
		||||
#          - kitnodeupdate():  Any code added here gets called after
 | 
			
		||||
#                              a node's profile(s) or MAC address changes
 | 
			
		||||
#
 | 
			
		||||
#    - Refresh node's configuration files (noderefresh) / Re-generate IPs 
 | 
			
		||||
#       for nodes (noderegenips) operations call:
 | 
			
		||||
#          - kitnoderefresh():  Any code added here gets called when 
 | 
			
		||||
#                               node config files need to be regenerated. 
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
# How to create a new plugin for your kit?
 | 
			
		||||
#
 | 
			
		||||
#    1) Copy the sample plugin
 | 
			
		||||
#          % cp plugins/sample/nodemgmt.pm plugins
 | 
			
		||||
#
 | 
			
		||||
#    2) Modify the sample plugin by implementing one or more of
 | 
			
		||||
#       the plugin commands above.
 | 
			
		||||
#
 | 
			
		||||
#      Refer to each command's comments for command parameters 
 | 
			
		||||
#      and return values.
 | 
			
		||||
#
 | 
			
		||||
#      For details on how to write plugin code, refer to:
 | 
			
		||||
#      http://sourceforge.net/apps/mediawiki/xcat/index.php?title=XCAT_Developer_Guide
 | 
			
		||||
#
 | 
			
		||||
#    3) To test the plugin commands:
 | 
			
		||||
#          a) Search this file for lines that start with "TEST:" and follow the
 | 
			
		||||
#              instructions
 | 
			
		||||
#
 | 
			
		||||
#          b) Refer to each command's comments for test steps.
 | 
			
		||||
#
 | 
			
		||||
#    4) After you finish the test, you can build the kit with your new plugin.
 | 
			
		||||
#       Before building, search this file for lines that start with "BUILD:" and
 | 
			
		||||
#       follow the instructions.
 | 
			
		||||
#
 | 
			
		||||
#    5) Run buildkit as normal to build the kit.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
our ($PLUGIN_KITNAME);
 | 
			
		||||
 | 
			
		||||
#TEST: UNCOMMENT the first line, and COMMENT OUT the second line.
 | 
			
		||||
#BUILD: COMMENT OUT the first line, and UNCOMMENT the second line.
 | 
			
		||||
#$PLUGIN_KITNAME = "TESTMODE";
 | 
			
		||||
$PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
 | 
			
		||||
 | 
			
		||||
@@ -54,12 +104,19 @@ $PLUGIN_KITNAME = "<<<buildkit_WILL_INSERT_kitname_HERE>>>";
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub handled_commands {
 | 
			
		||||
    #TEST: UNCOMMENT the first return, and COMMENT OUT the second return.
 | 
			
		||||
    #BUILD: COMMENT OUT the first return, and UNCOMMENT the second return.
 | 
			
		||||
    #return {
 | 
			
		||||
    #    kitnodeadd => 'nodemgmt',
 | 
			
		||||
    #    kitnoderemove => 'nodemgmt',
 | 
			
		||||
    #    kitnodeupdate => 'nodemgmt',
 | 
			
		||||
    #    kitnoderefresh => 'nodemgmt',
 | 
			
		||||
    #};
 | 
			
		||||
    return {
 | 
			
		||||
        kitnodeadd => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
 | 
			
		||||
        kitnoderemove => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
 | 
			
		||||
        kitnodeupdate => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
 | 
			
		||||
        kitnoderefresh => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
 | 
			
		||||
        kitnodefinished => '<<<buildkit_WILL_INSERT_kitname_HERE>>>_nodemgmt',
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -77,43 +134,52 @@ sub handled_commands {
 | 
			
		||||
sub process_request {
 | 
			
		||||
    my $request = shift;
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    # Name of command and node list
 | 
			
		||||
    my $command = $request->{command}->[0];
 | 
			
		||||
    my $nodes = $request->{node};
 | 
			
		||||
 | 
			
		||||
    # This kit plugin is passed a list of node names.
 | 
			
		||||
    # We need to determine which kits are used by these
 | 
			
		||||
    # nodes to decide if this plugin should run or not.
 | 
			
		||||
    # Before running this plugin, we should check which 
 | 
			
		||||
    # nodes are using the kit which this plugin belongs to,
 | 
			
		||||
    # and run the plugin only on these nodes.
 | 
			
		||||
 | 
			
		||||
    my $kitdata = $request->{kitdata};
 | 
			
		||||
    if (! defined($kitdata)) {
 | 
			
		||||
        $kitdata = xCAT::KitPluginUtils->get_kits_used_by_nodes($nodes);
 | 
			
		||||
        $request->{kitdata} = $kitdata;
 | 
			
		||||
    my $nodes2;
 | 
			
		||||
 | 
			
		||||
    if ($PLUGIN_KITNAME eq "TESTMODE") {
 | 
			
		||||
        # Don't do the check in test mode
 | 
			
		||||
        $nodes2 = $nodes;
 | 
			
		||||
    } else {
 | 
			
		||||
        # Do the check
 | 
			
		||||
        my $kitdata = $request->{kitdata};
 | 
			
		||||
        if (! defined($kitdata)) {
 | 
			
		||||
            $kitdata = xCAT::KitPluginUtils->get_kits_used_by_nodes($nodes);
 | 
			
		||||
            $request->{kitdata} = $kitdata;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (! exists($kitdata->{$PLUGIN_KITNAME})) {
 | 
			
		||||
            # None of the nodes are using this plugin's kit, so don't run the plugin.
 | 
			
		||||
            $rsp->{data}->[0] = "Skipped running \"$command\" plugin command for \"$PLUGIN_KITNAME\" kit.";
 | 
			
		||||
            xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        $nodes2 = $kitdata->{$PLUGIN_KITNAME};
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ($PLUGIN_KITNAME ne "TESTMODE" && ! exists($kitdata->{$PLUGIN_KITNAME})) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # Get the nodes using this plugin's kit
 | 
			
		||||
    $nodes = $kitdata->{$PLUGIN_KITNAME};
 | 
			
		||||
 | 
			
		||||
    # Run the command
 | 
			
		||||
 | 
			
		||||
    if($command eq 'kitnodeadd') {
 | 
			
		||||
        kitnodeadd($callback, $nodes);
 | 
			
		||||
        kitnodeadd($callback, $nodes2);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitnoderemove') {
 | 
			
		||||
        kitnoderemove($callback, $nodes);
 | 
			
		||||
        kitnoderemove($callback, $nodes2);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitnodeupdate') {
 | 
			
		||||
        kitnodeupdate($callback, $nodes);
 | 
			
		||||
        kitnodeupdate($callback, $nodes2);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitnoderefresh') {
 | 
			
		||||
        kitnoderefresh($callback, $nodes);
 | 
			
		||||
    }
 | 
			
		||||
    elsif ($command eq 'kitnodefinished') {
 | 
			
		||||
        kitnodefinished($callback);
 | 
			
		||||
        kitnoderefresh($callback, $nodes2);
 | 
			
		||||
 | 
			
		||||
    } else {
 | 
			
		||||
        my $rsp;
 | 
			
		||||
@@ -130,6 +196,27 @@ sub process_request {
 | 
			
		||||
    This command is called when one or more nodes are added 
 | 
			
		||||
    to the cluster.
 | 
			
		||||
 | 
			
		||||
    Command-line interface:
 | 
			
		||||
         kitnodeadd <noderange>
 | 
			
		||||
 | 
			
		||||
    Parameters:
 | 
			
		||||
         $nodes: list of nodes
 | 
			
		||||
 | 
			
		||||
    Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclient kitnodeadd
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitnodeadd <noderange>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
@@ -141,11 +228,15 @@ sub kitnodeadd {
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $nodes = shift;
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitnodeadd";
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitnodeadd ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Nodes: @$nodes";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO
 | 
			
		||||
    # ... ADD YOUR CODE HERE
 | 
			
		||||
    #
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -156,6 +247,27 @@ sub kitnodeadd {
 | 
			
		||||
    This command is called when one or more nodes are 
 | 
			
		||||
    removed from the cluster.
 | 
			
		||||
 | 
			
		||||
    Command-line interface:
 | 
			
		||||
         kitnoderemove <noderange>
 | 
			
		||||
 | 
			
		||||
    Parameters:
 | 
			
		||||
         $nodes: list of nodes
 | 
			
		||||
 | 
			
		||||
    Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclient kitnoderemove
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitnoderemove <noderange>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
@@ -167,11 +279,15 @@ sub kitnoderemove {
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $nodes = shift;
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitnoderemove";
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitnoderemove ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Nodes: @$nodes";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO
 | 
			
		||||
    # ... ADD YOUR CODE HERE
 | 
			
		||||
    #
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -182,6 +298,27 @@ sub kitnoderemove {
 | 
			
		||||
    This command is called when the configuration of one 
 | 
			
		||||
    or more nodes are updated.
 | 
			
		||||
 | 
			
		||||
    Command-line interface:
 | 
			
		||||
         kitnodeupdate <noderange>
 | 
			
		||||
 | 
			
		||||
    Parameters:
 | 
			
		||||
         $nodes: list of nodes
 | 
			
		||||
 | 
			
		||||
    Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclient kitnodeupdate
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitnodeupdate <noderange>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
@@ -193,11 +330,15 @@ sub kitnodeupdate {
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $nodes = shift;
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitnodeupdate";
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitnodeupdate ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Nodes: @$nodes";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO
 | 
			
		||||
    # ... ADD YOUR CODE HERE
 | 
			
		||||
    #
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -205,8 +346,29 @@ sub kitnodeupdate {
 | 
			
		||||
 | 
			
		||||
=head3  kitnoderefresh
 | 
			
		||||
 | 
			
		||||
    This command is called when node-related configuration
 | 
			
		||||
    files are updated.
 | 
			
		||||
    This command is called to refresh node-related configuration
 | 
			
		||||
    files. 
 | 
			
		||||
 | 
			
		||||
    Command-line interface:
 | 
			
		||||
         kitnoderefresh <noderange>
 | 
			
		||||
 | 
			
		||||
    Parameters:
 | 
			
		||||
         $nodes: list of nodes
 | 
			
		||||
 | 
			
		||||
    Return value:
 | 
			
		||||
         Info/Debug messages should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Info messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
         Errors should be returned like so:
 | 
			
		||||
             $rsp->{data}->[0] = "Error messsage";
 | 
			
		||||
             xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    Test Steps:
 | 
			
		||||
         # cd /opt/xcat/bin
 | 
			
		||||
         # ln -s xcatclient kitnoderefresh
 | 
			
		||||
         # cd -
 | 
			
		||||
         # XCATBYPASS=/path/to/this/plugin kitnoderefresh <noderange>
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
@@ -219,33 +381,14 @@ sub kitnoderefresh {
 | 
			
		||||
    # Parameters
 | 
			
		||||
    my $nodes = shift;
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitnoderefresh";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO
 | 
			
		||||
    # ... ADD YOUR CODE HERE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
=head3  kitnodefinished
 | 
			
		||||
 | 
			
		||||
    This command is called at the end of a node management
 | 
			
		||||
    operation. 
 | 
			
		||||
 | 
			
		||||
=cut
 | 
			
		||||
 | 
			
		||||
#-------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
sub kitnodefinished {
 | 
			
		||||
    my $callback = shift;
 | 
			
		||||
    my $rsp;
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitnodefinished";
 | 
			
		||||
    $rsp->{data}->[0] = "Running kitnoderefresh ($PLUGIN_KITNAME) ...";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    $rsp->{data}->[0] = "Nodes: @$nodes";
 | 
			
		||||
    xCAT::MsgUtils->message("I", $rsp, $callback);
 | 
			
		||||
 | 
			
		||||
    # TODO
 | 
			
		||||
    # ... ADD YOUR CODE HERE
 | 
			
		||||
    #
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user