'Get power management template
@param str power_type power management type
@return str power management input template'

def get_power_template(self, power_type):

    if power_type:
        power_template = ('%s/fence_%s.template' % (self.settings.power_template_dir, power_type))
        if os.path.isfile(power_template):
            f = open(power_template)
            template = f.read()
            f.close()
            return template
    return 'action=$power_mode\nlogin=$power_user\npasswd=$power_pass\nipaddr=$power_address\nport=$power_id'
