# -*- coding: UTF-8 -*- # Copyright 2016 Red Hat, Inc. # Part of clufter project # Licensed under GPLv2+ (a copy included | http://gnu.org/licenses/gpl-2.0.txt) __author__ = "Jan Pokorný " ### from .... import package_name from ....utils_xslt import xslt_is_member cibprelude2cibcompact = ('''\ ''') % dict(package_name=package_name()) ### from ....filters._2pcscmd import verbose_ec_test, verbose_inform from ....filters.cib2pcscmd import attrset_xsl from ....utils_xslt import NL cib2pcscmd = ('''\ ''' + ( verbose_inform('"new stonith: ", @id') ) + ''' ''' + ( attrset_xsl("instance_attributes") ) + ''' ''' + ( attrset_xsl("meta_attributes") ) + ''' ''' + ( verbose_ec_test ) + ''' ''' + ( verbose_inform('"new resource: ", @id, " (to be set as clone)"') ) + ''' ''' + ( verbose_inform('"new resource: ", @id, " (to be set as master)"') ) + ''' ''' + ( verbose_inform('"new resource: ", @id') ) + ''' ''' + ( attrset_xsl("instance_attributes") ) + ''' ''' + ( attrset_xsl("meta_attributes") ) + ''' ''' + ( verbose_ec_test ) + ''' ''' + ( verbose_inform('"set utilization for resource: ", @id') ) + ''' ''' + ( attrset_xsl("utilization") ) + ''' ''' + ( verbose_ec_test ) + ''' Cannot convert templates to pcs commands yet [https://bugzilla.redhat.com/1281359] ''') % dict( NL=NL, ) ### from ....utils_xslt import xslt_is_member cib_meld_templates_op_roles = ('Started', 'Slave') # see lib/pengine/complex.c: unpack_template cib_meld_templates = ('''\ NOTE: this step may not be necessary once pcs handles templates [https://bugzilla.redhat.com/1281359] ''') ### cibcompact2cib = ('''\ ''')